Debian Codegraph @

texk/cjkutils/extconv.c

raw
1 #define banner \
2 "extconv (CJK ver. 4.8.5)" \
3
4 /*2:*/
5 #line 94 "./cjkutils-src/extconv/extconv.w"
6
7 #include <stdio.h>
8 #include <stdlib.h>
9 #ifdef WIN32
10 #include <fcntl.h>
11 #include <io.h>
12 #endif
13
14
15 int main(int argc,char*argv[])
16 {int ch;
17
18 #ifdef WIN32
19 setmode(fileno(stdout),_O_BINARY);
20 #endif
21
22 fprintf(stdout,"\\def\\CJKpreproc{%s}",banner);
23
24 ch= fgetc(stdin);
25
26 while(!feof(stdin))
27 {if(ch>=0x81&&ch<=0xFE)
28 {fprintf(stdout,"\177%c\177",ch);
29
30 ch= fgetc(stdin);
31 if(!feof(stdin))
32 fprintf(stdout,"%d\177",ch);
33 }
34 else
35 fputc(ch,stdout);
36
37 ch= fgetc(stdin);
38 }
39 exit(EXIT_SUCCESS);
40 return 0;
41 }/*:2*/