#include <stdio.h>
Go to the source code of this file.
◆ main()
Definition at line 13 of file iso.c.
22 for (
i = 0;
i < 128;
i++)
23 koitab[
i] = isotab[
i] = 0;
25 while (fgets(
buf,
sizeof(
buf), stdin) != NULL)
29 sscanf(
buf,
"%d %x", &koi, &iso);
30 if (koi < 128 || koi > 255 || iso < 128 || iso > 255)
32 fprintf(stderr,
"invalid value %d\n", koi);
35 koitab[koi - 128] = iso;
36 isotab[iso - 128] = koi;
40 printf(
"static char koi2iso[] = {\n");
58 printf(
"static char iso2koi[] = {\n");
References buf, exit(), fprintf, i, j, and printf.