/** Network Kanji Filter. (PDS Version) ************************************************************************ ** Copyright (C) 1987, Fujitsu LTD. (Itaru ICHIKAWA) ** 連絡先: (株)富士通研究所 ソフト3研 市川 至 ** (E-Mail Address: ichikawa@flab.fujitsu.co.jp) ** Copyright (C) 1996,1998 ** 連絡先: 琉球大学情報工学科 河野 真治 mine/X0208 support ** (E-Mail Address: kono@ie.u-ryukyu.ac.jp) ** 連絡先: COW for DOS & Win16 & Win32 & OS/2 ** (E-Mail Address: GHG00637@niftyserve.or.p) ** このソースのいかなる複写,改変,修正も許諾します。ただし、 ** その際には、誰が貢献したを示すこの部分を残すこと。 ** 再配布や雑誌の付録などの問い合わせも必要ありません。 ** このプログラムについては特に何の保証もしない、悪しからず。 ** Everyone is permitted to do anything on this program ** including copying, modifying, improving. ** as long as you don't try to pretend that you wrote it. ** i.e., the above copyright notice has to appear in all copies. ** You don't have to ask before copying or publishing. ** THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE. ***********************************************************************/ static char *__ = "Copyright (C) 1987, FUJITSU LTD. (I.Ichikawa),1998 S. Kono, COW"; static char *l_ = "1.7"; static char *l__ = "1/9811/Shinji Kono"; /* ** ** ** ** USAGE: nkf [flags] [file] ** ** Flags: ** b Output is bufferred (DEFAULT) ** u Output is unbufferred ** ** t no operation ** ** j Outout code is JIS 7 bit (DEFAULT SELECT) ** s Output code is MS Kanji (DEFAULT SELECT) ** e Output code is AT&T JIS (DEFAULT SELECT) ** l Output code is JIS 7bit and ISO8859-1 Latin-1 ** ** m MIME conversion for ISO-2022-JP ** i_ Output sequence to designate JIS-kanji (DEFAULT_J) ** o_ Output sequence to designate single-byte roman characters (DEFAULT_R) ** ** r {de/en}crypt ROT13/47 ** ** v display Version ** ** T Text mode output (for MS-DOS) ** ** x Do not convert X0201 kana into X0208 ** Z Convert X0208 alphabet to ASCII ** ** f60 fold option ** ** m MIME decode ** B try to fix broken JIS, missing Escape ** B[1-9] broken level ** ** O Output to 'nkf.out' file ** d Delete \r in line feed ** c Add \r in line feed **/ /******************************/ /* デフォルトの出力コード選択 */ /* Select DEFAULT_CODE */ #define ll_ /* #define DEFAULT_CODE_SJIS */ /* #define DEFAULT_CODE_EUC */ /******************************/ #if (defined(__TURBOC__) || defined(LSI_C)) && !defined(MSDOS) #define l___ #endif #ifndef PERL_XS #include #endif #if defined(MSDOS) || defined(__OS2__) #include #include #include #endif #ifdef MSDOS #ifdef LSI_C #define l_l_(ll__) lll_(ll__) #else /* Microsoft C, Turbo C */ #define l_l_(ll__) l____(fileno(ll__), l__l_) #endif #else /* UNIX,OS/2 */ #define l_l_(ll__) #endif #ifdef _IOFBF /* SysV and MSDOS */ #define l_l__(ll__, l_ll_, ll___) setvbuf(ll__, l_ll_, _IOFBF, ll___) #else /* BSD */ #define l_l__(ll__, l_ll_, ll___) ll_l_(ll__, l_ll_, ll___) #endif /*Borland C++ 4.5 EasyWin*/ #if defined(__TURBOC__) && defined(_Windows) && !defined(__WIN32__) /*Easy Win */ #define lll__ #include #endif #define llll_ 0 #define l_____ 1 /* state of output_mode and input_mode */ #define l___l_ 0 #define l__l__ 1 #define l__ll_ 2 #define l_l___ 3 #define l_l_l_ 4 #define l_ll__ 5 #define l_lll_ 6 #define ll____ 7 #define ll__l_ -2 #define ll_l__ 0x0a #define ll_ll_ 0x1b #define lll___ 0x20 #define lll_l_ 0x40 #define llll__ 0xa0 #define lllll_ 0x7f #define l______ 0x0f #define l____l_ 0x0e #define l___l__ 0x8e #define l___ll_ 32 #define l__l___ 16384 #define l__l_l_ 'B' #define l__ll__ 'B' #define l__lll_ 0x00e1 /* 01 - 62 ku offset */ #define l_l____ 0x0161 /* 63 - 94 ku offset */ /* MIME preprocessor */ #define l_l__l_ /* do stupid strict mime integrity check */ #define l_l_l__(l_l_ll_) ((!l_ll___)?getc(l_l_ll_):l_ll_l_(l_l_ll_)) #define l_lll__(l_llll_,l_l_ll_) ((!l_ll___)?ungetc(l_llll_,l_l_ll_):ll_____(l_llll_)) #ifdef EASYWIN /*Easy Win */ extern ll___l_ ll__l__; #endif /* function prototype */ static int ll__ll_(FILE *ll_l___); static int ll_l_l_(FILE *ll_l___); static int ll_ll__(FILE *ll_l___,int ll_lll_,int lll____); static int lll__l_(int ll_lll_,int lll____); static int lll_l__(int ll_lll_,int lll____); static int lll_ll_(int ll_lll_,int lll____); static int llll___(int ll_lll_,int lll____); static int llll_l_(int ll_lll_,int lll____); static int lllll__(int ll_lll_,int lll____); static int llllll_(int lll____,int ll_lll_); static int l_______(FILE *ll_l___); static int l_ll_l_(FILE *ll_l___); static int ll_____(unsigned int l_llll_); static int l_____l_(FILE *ll_l___,unsigned char *l_l_ll_); static int l____l__(int l_llll_); static int l____ll_(void); static void l___l___(char *l_llll_); static void l___l_l_(); /* buffers */ static char l___ll__[l__l___]; static char l___lll_[l__l___]; static unsigned char l__l____[l___ll_*2]; static int l__l__l_; /* MIME preprocessor fifo */ #define l__l_l__ (1024) /* 2^n ring buffer */ #define l__l_ll_ (l__l_l__-1) #define l__ll___(l__ll_l_) l__lll__[(l__ll_l_)&l__l_ll_] static unsigned char l__lll__[l__l_l__]; static unsigned int l__llll_ = 0; static unsigned int l_l_____ = 0; /* decoded */ static unsigned int l_l___l_ = 0; /* undecoded */ /* flags */ static int l_l__l__ = llll_; static int l_l__ll_ = llll_; static int l_l_l___ = llll_; static int l_l_l_l_ = l_____; /* binary mode */ static int l_l_ll__ = llll_; /* rot14/43 mode */ static int l_l_lll_ = llll_; /* non fixed input code */ static int l_ll____ = llll_; /* convert JIx0208 alphbet to ASCII */ static int l_ll__l_ = l_____; /* convert MIME B base64 or Q */ static int l_ll_l__ = llll_; /* MIME buffered input */ static int l_ll_ll_ = llll_; /* convert ESC-less broken JIS */ static int l_lll___ = llll_; /* ISO8859 through */ #if defined(MSDOS) || defined(__OS2__) static int l_lll_l_ = l_____; /* Assume JISX0201 kana */ #else static int l_lll_l_ = l_l___; /* Assume NO JISX0201 */ #endif /* X0208 -> ASCII converter */ static int l_llll__; /* fold parameter */ static int l_lllll_ = 0; /* chars in line */ static int ll______ = 0; static int ll____l_ = llll_; static int ll___l__ = 0; /* options */ static char ll___ll_ = l__l_l_, ll__l___ = l__ll__; /* Folding */ int lllll__(); #define ll__l_l_ 10 #define ll__ll__ 60 /* converters */ #ifdef DEFAULT_CODE_JIS # define ll__lll_ llll_l_ #endif #ifdef DEFAULT_CODE_SJIS # define ll__lll_ llll___ #endif #ifdef DEFAULT_CODE_EUC # define ll__lll_ lll_ll_ #endif static int (*ll_l____)(int ll_lll_,int lll____); /* s_iconv or oconv */ static int (*ll_l__l_)(int ll_lll_,int lll____) = ll__lll_; /* [ejs]_oconv */ /* Global states */ static int ll_l_l__ = l___l_, /* output kanji mode */ ll_l_ll_ = l___l_, /* input kanji mode */ ll_ll___ = llll_; /* TRUE shift out, or X0201 */ static int l_ll___ = llll_; /* MIME mode B base64, Q hex */ /* X0201 / X0208 conversion tables */ /* X0201 kana conversion table */ /* 90-9F A0-DF */ unsigned char ll_ll_l_[]= { 0x21,0x21,0x21,0x23,0x21,0x56,0x21,0x57, 0x21,0x22,0x21,0x26,0x25,0x72,0x25,0x21, 0x25,0x23,0x25,0x25,0x25,0x27,0x25,0x29, 0x25,0x63,0x25,0x65,0x25,0x67,0x25,0x43, 0x21,0x3c,0x25,0x22,0x25,0x24,0x25,0x26, 0x25,0x28,0x25,0x2a,0x25,0x2b,0x25,0x2d, 0x25,0x2f,0x25,0x31,0x25,0x33,0x25,0x35, 0x25,0x37,0x25,0x39,0x25,0x3b,0x25,0x3d, 0x25,0x3f,0x25,0x41,0x25,0x44,0x25,0x46, 0x25,0x48,0x25,0x4a,0x25,0x4b,0x25,0x4c, 0x25,0x4d,0x25,0x4e,0x25,0x4f,0x25,0x52, 0x25,0x55,0x25,0x58,0x25,0x5b,0x25,0x5e, 0x25,0x5f,0x25,0x60,0x25,0x61,0x25,0x62, 0x25,0x64,0x25,0x66,0x25,0x68,0x25,0x69, 0x25,0x6a,0x25,0x6b,0x25,0x6c,0x25,0x6d, 0x25,0x6f,0x25,0x73,0x21,0x2b,0x21,0x2c, 0x00,0x00}; /* X0201 kana conversion table for daguten */ /* 90-9F A0-DF */ unsigned char ll_lll__[]= { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x25,0x2c,0x25,0x2e, 0x25,0x30,0x25,0x32,0x25,0x34,0x25,0x36, 0x25,0x38,0x25,0x3a,0x25,0x3c,0x25,0x3e, 0x25,0x40,0x25,0x42,0x25,0x45,0x25,0x47, 0x25,0x49,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x25,0x50,0x25,0x53, 0x25,0x56,0x25,0x59,0x25,0x5c,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00}; /* X0201 kana conversion table for han-daguten */ /* 90-9F A0-DF */ unsigned char ll_llll_[]= { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x25,0x51,0x25,0x54, 0x25,0x57,0x25,0x5a,0x25,0x5d,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00}; /* X0208 kigou conversion table */ /* 0x8140 - 0x819e */ unsigned char lll_____[] = { 0x00,0x00,0x00,0x00,0x2c,0x2e,0x00,0x3a, 0x3b,0x3f,0x21,0x00,0x00,0x27,0x60,0x00, 0x5e,0x00,0x5f,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x2d,0x00,0x2f, 0x5c,0x00,0x00,0x7c,0x00,0x00,0x60,0x27, 0x22,0x22,0x28,0x29,0x00,0x00,0x5b,0x5d, 0x7b,0x7d,0x3c,0x3e,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x2b,0x2d,0x00,0x00, 0x00,0x3d,0x00,0x3c,0x3e,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x24,0x00,0x00,0x25,0x23,0x26,0x2a,0x40, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } ; static int lll___l_ = llll_; static int lll__l__ = llll_; static int lll__ll_ = llll_; static int lll_l___; #ifndef PERL_XS int main(lll_l_l_, lll_ll__) int lll_l_l_; char **lll_ll__; { FILE *lll_lll_; char *llll____; #ifdef EASYWIN /*Easy Win */ ll__l__.y = 400;/*Set Scroll Buffer Size*/ #endif for (lll_l_l_--,lll_ll__++; (lll_l_l_ > 0) && **lll_ll__ == '-'; lll_l_l_--, lll_ll__++) { llll____ = *lll_ll__; l___l___(llll____); } if(l_lll___ && (ll_l__l_ != llll_l_ || !l_lll_l_ )) { fprintf(stderr,"Mixed ISO8859/JISX0201/SJIS/EUC output is not allowed.\n"); exit(1); } if(l_l_l_l_ == l_____) #ifdef __OS2__ if(freopen("","wb",stdout) == NULL) return (-1); #else l_l_(stdout); #endif if(l_l__l__) setbuf(stdout, (char *) NULL); else l_l__(stdout, l___lll_, l__l___); if(lll_l_l_ == 0) { if(l_l_l_l_ == l_____) #ifdef __OS2__ if(freopen("","rb",stdin) == NULL) return (-1); #else l_l_(stdin); #endif l_l__(stdin, l___ll__, l__l___); if(l_l_l___) ll__ll_(stdin); else ll_l_l_(stdin); } else { while (lll_l_l_--) { if((lll_lll_ = fopen(*lll_ll__++, "r")) == NULL) { perror(*--lll_ll__); return(-1); } else { /* reopen file for stdout */ if(lll___l_ == l_____){ if(lll_l_l_ == 1 ) { if(freopen(*lll_ll__++, "w", stdout) == NULL) { perror(*--lll_ll__); return (-1); } lll_l_l_--; } else { if(freopen("nkf.out", "w", stdout) == NULL) { perror(*--lll_ll__); return (-1); } } if(l_l_l_l_ == l_____) { #ifdef __OS2__ if(freopen("","wb",stdout) == NULL) return (-1); #else l_l_(stdout); #endif } } if(l_l_l_l_ == l_____) #ifdef __OS2__ if(freopen("","rb",lll_lll_) == NULL) return (-1); #else l_l_(lll_lll_); #endif l_l__(lll_lll_, l___ll__, l__l___); if(l_l_l___) ll__ll_(lll_lll_); else ll_l_l_(lll_lll_); fclose(lll_lll_); } } } #ifdef EASYWIN /*Easy Win */ if(lll___l_ == llll_) scanf("%d",&lll_l___); else fclose(stdout); #else /* for Other OS */ if(lll___l_ == l_____) fclose(stdout); #endif return (0); } #endif void l___l___(char *llll____) { while (*llll____) { switch (*llll____++) { case 'b': /* buffered mode */ l_l__l__ = llll_; continue; case 'u': /* non bufferd mode */ l_l__l__ = l_____; continue; case 't': /* transparent mode */ l_l_l___ = l_____; continue; case 'j': /* JIS output */ case 'n': ll_l__l_ = llll_l_; continue; case 'e': /* AT&T EUC output */ ll_l__l_ = lll_ll_; continue; case 's': /* SJIS output */ ll_l__l_ = llll___; continue; case 'l': /* ISO8859 Latin-1 support, no conversion */ l_lll___ = l_____; /* Only compatible with ISO-2022-JP */ l_l_lll_ = l_lll_; continue; case 'i': /* Kanji IN ESC-$-@/B */ if(*llll____=='@'||*llll____=='B') ll___ll_ = *llll____++; continue; case 'o': /* ASCII IN ESC-(-J/B */ if(*llll____=='J'||*llll____=='B'||*llll____=='H') ll__l___ = *llll____++; continue; case 'r': l_l_ll__ = l_____; continue; #if defined(MSDOS) || defined(__OS2__) case 'T': l_l_l_l_ = llll_; continue; #endif #ifndef PERL_XS case 'v': l____ll_(); exit(1); break; #endif /* Input code assumption */ case 'J': /* JIS input */ case 'E': /* AT&T EUC input */ l_l_lll_ = l_l_l_; continue; case 'S': /* MS Kanji input */ l_l_lll_ = l_ll__; if(l_lll_l_==l_l___) l_lll_l_=l_____; continue; case 'Z': /* Convert X0208 alphabet to asii */ /* bit:0 Convert X0208 bit:1 Convert Kankaku to one space bit:2 Convert Kankaku to two spaces */ if('9'>= *llll____ && *llll____>='0') l_ll____ |= 1<<(*llll____++ -'0'); else l_ll____ |= l_____; continue; case 'x': /* Convert X0201 kana to X0208 or X0201 Conversion */ l_lll_l_ = llll_; /* No X0201->X0208 conversion */ /* accept X0201 ESC-(-I in JIS, EUC, MS Kanji SI/SO in JIS, EUC, MS Kanji SSO in EUC, JIS, not in MS Kanji MS Kanji (0xa0-0xdf) output X0201 ESC-(-I in JIS (0x20-0x5f) SSO in EUC (0xa0-0xdf) 0xa0-0xd in MS Kanji (0xa0-0xdf) */ continue; case 'X': /* Assume X0201 kana */ /* Default value is NO_X0201 for EUC/MS-Kanji mix */ l_lll_l_ = l_____; continue; case 'f': /* folding -f60 or -f */ ll____l_ = l_____; ll___l__ = atoi(llll____); if(!(0= *llll____ && *llll____>='0') l_ll_ll_ |= 1<<(*llll____++ -'0'); else l_ll_ll_ |= l_____; continue; #ifndef PERL_XS case 'O':/* for Output file */ lll___l_ = l_____; continue; #endif case 'c':/* add cr code */ lll__l__ = l_____; continue; case 'd':/* delete cr code */ lll__ll_ = l_____; continue; default: /* bogus option but ignored */ continue; } } } int ll__ll_(ll_l___) FILE *ll_l___; { int l_llll_; while ((l_llll_ = getc(ll_l___)) != EOF) putchar(l_llll_); return 1; } int ll_l_l_(ll_l___) FILE *ll_l___; { int lll____, ll_lll_; ll_lll_ = 0; if(l_l_lll_ == l_l_l_ || l_l_lll_ == l_lll_) { l_l__ll_ = l_____; ll_l____ = ll_l__l_; } else if(l_l_lll_ == l_ll__) { l_l__ll_ = l_____; ll_l____ = lll_l__; } else { l_l__ll_ = llll_; ll_l____ = ll_l__l_; } ll_l_ll_ = l___l_; ll_l_l__ = l___l_; ll_ll___ = llll_; #define llll__l_ continue /* no output, get next */ #define llll_l__ ; /* output c1 and c2, get next */ #define llll_ll_ break /* end of loop, go closing */ while ((lll____ = l_l_l__(ll_l___)) != EOF) { if(ll_lll_) { /* second byte */ if(ll_lll_ > lllll_) { /* in case of 8th bit is on */ if(!l_l__ll_) { /* in case of not established yet */ if(lll____ > llll__) { /* It is still ambiguious */ ll_ll__(ll_l___, ll_lll_, lll____); ll_lll_ = 0; llll__l_; } else if(lll____ < lll_l_) { /* ignore bogus code */ ll_lll_ = 0; llll__l_; } else { /* established */ /* it seems to be MS Kanji */ l_l__ll_ = l_____; ll_l____ = lll_l__; llll_l__; } } else /* in case of already established */ if(lll____ < lll_l_) { /* ignore bogus code */ ll_lll_ = 0; llll__l_; } else llll_l__; } else /* 7 bit code */ /* it might be kanji shitfted */ if((lll____ == lllll_) || (lll____ <= lll___)) { /* ignore bogus first code */ ll_lll_ = 0; llll__l_; } else llll_l__; } else { /* first byte */ if(lll____ > lllll_) { /* 8 bit code */ if(!l_l__ll_ && !l_lll___) { /* not established yet */ if(lll____ < llll__) { /* it seems to be MS Kanji */ l_l__ll_ = l_____; ll_l____ = lll_l__; } else if(lll____ < 0xe0) { /* it seems to be EUC */ l_l__ll_ = l_____; ll_l____ = ll_l__l_; } else { /* still ambiguious */ } ll_lll_ = lll____; llll__l_; } else { /* estab_f==TRUE */ if(l_lll___) { llll_l__; } else if(llll__<=lll____ && lll____<0xe0 && ll_l____ == lll_l__) { /* SJIS X0201 Case... */ /* This is too arrogant, but ... */ if(l_lll_l_==l_l___) { ll_l____ = ll_l__l_; ll_lll_ = lll____; llll__l_; } else if(l_lll_l_) { if(ll_lll__[(lll____-llll__)*2]||ll_llll_[(lll____-llll__)*2]) { /* look ahead for X0201/X0208conversion */ if((ll_lll_ = l_l_l__(ll_l___)) == EOF) { (*ll_l__l_)(ll_ll_l_[(lll____-llll__)*2],ll_ll_l_[(lll____-llll__)*2+1]); llll_ll_; } else if(ll_lll_==(0xde)) { /* 濁点 */ (*ll_l__l_)(ll_lll__[(lll____-llll__)*2],ll_lll__[(lll____-llll__)*2+1]); ll_lll_=0; llll__l_; } else if(ll_lll_==(0xdf)&&ll_llll_[(lll____-llll__)*2]) { /* 半濁点 */ (*ll_l__l_)(ll_llll_[(lll____-llll__)*2],ll_llll_[(lll____-llll__)*2+1]); ll_lll_=0; llll__l_; } l_lll__(ll_lll_,ll_l___); ll_lll_ = 0; } (*ll_l__l_)(ll_ll_l_[(lll____-llll__)*2],ll_ll_l_[(lll____-llll__)*2+1]); llll__l_; } else llll_l__; } else if(lll____==l___l__ && ll_l____ != lll_l__) { /* EUC X0201 Case */ /* This is too arrogant if(x0201_f == NO_X0201) { estab_f = FALSE; c2 = 0; NEXT; } */ lll____ = l_l_l__(ll_l___); /* skip SSO */ lllll___: if(l_lll_l_ && llll__<=lll____ && lll____<0xe0) { if(ll_lll__[(lll____-llll__)*2]||ll_llll_[(lll____-llll__)*2]) { if((ll_lll_ = l_l_l__(ll_l___)) == EOF) { (*ll_l__l_)(ll_ll_l_[(lll____-llll__)*2],ll_ll_l_[(lll____-llll__)*2+1]); llll_ll_; } /* forward lookup 濁点/半濁点 */ if(ll_lll_ != l___l__) { l_lll__(ll_lll_,ll_l___); ll_lll_ = 0; (*ll_l__l_)(ll_ll_l_[(lll____-llll__)*2],ll_ll_l_[(lll____-llll__)*2+1]); llll__l_; } else if((ll_lll_ = l_l_l__(ll_l___)) == EOF) { (*ll_l__l_)(ll_ll_l_[(lll____-llll__)*2],ll_ll_l_[(lll____-llll__)*2+1]); (*ll_l__l_)(0,l___l__); llll_ll_; } else if(ll_lll_==(0xde)) { /* 濁点 */ (*ll_l__l_)(ll_lll__[(lll____-llll__)*2],ll_lll__[(lll____-llll__)*2+1]); ll_lll_=0; llll__l_; } else if(ll_lll_==(0xdf)&&ll_llll_[(lll____-llll__)*2]) { /* 半濁点 */ (*ll_l__l_)(ll_llll_[(lll____-llll__)*2],ll_llll_[(lll____-llll__)*2+1]); ll_lll_=0; llll__l_; } else { (*ll_l__l_)(ll_ll_l_[(lll____-llll__)*2],ll_ll_l_[(lll____-llll__)*2+1]); /* we have to check this c2 */ /* and no way to push back SSO */ lll____ = ll_lll_; ll_lll_ = 0; goto lllll___; } } (*ll_l__l_)(ll_ll_l_[(lll____-llll__)*2],ll_ll_l_[(lll____-llll__)*2+1]); llll__l_; } else llll_l__; } else if(lll____ < llll__ && ll_l____ != lll_l__) { /* strange code in EUC */ ll_l____ = lll_l__; /* try SJIS */ ll_lll_ = lll____; llll__l_; } else { /* already established */ ll_lll_ = lll____; llll__l_; } } } else if((lll____ > lll___) && (lll____ != lllll_)) { /* in case of Roman characters */ if(ll_ll___) { lll____ |= 0x80; /* output 1 shifted byte */ if(l_lll_l_ && (!l_lll___||ll_l_ll_==l__ll_) && llll__<=lll____ && lll____<0xe0 ) { if(ll_lll__[(lll____-llll__)*2]||ll_llll_[(lll____-llll__)*2]) { if((ll_lll_ = l_l_l__(ll_l___)) == EOF) { (*ll_l__l_)(ll_ll_l_[(lll____-llll__)*2],ll_ll_l_[(lll____-llll__)*2+1]); llll_ll_; } else if(ll_lll_==(0xde&0x7f)) { /* 濁点 */ (*ll_l__l_)(ll_lll__[(lll____-llll__)*2],ll_lll__[(lll____-llll__)*2+1]); ll_lll_=0; llll__l_; } else if(ll_lll_==(0xdf&0x7f)&&ll_llll_[(lll____-llll__)*2]) { /* 半濁点 */ (*ll_l__l_)(ll_llll_[(lll____-llll__)*2],ll_llll_[(lll____-llll__)*2+1]); ll_lll_=0; llll__l_; } l_lll__(ll_lll_,ll_l___); ll_lll_ = 0; } (*ll_l__l_)(ll_ll_l_[(lll____-llll__)*2],ll_ll_l_[(lll____-llll__)*2+1]); llll__l_; } else llll_l__; } else if(lll____ == '(' && l_ll_ll_ && ll_l_ll_ == l__l__ && !l_ll___ ) { /* Try to recover missing escape */ if((lll____ = l_l_l__(ll_l___)) == EOF) { (*ll_l__l_)(0, '('); llll_ll_; } else { if(lll____ == 'B' || lll____ == 'J' || lll____ == 'H') { ll_l_ll_ = l___l_; ll_ll___ = llll_; llll__l_; } else { (*ll_l__l_)(0, '('); /* do not modify various input_mode */ /* It can be vt100 sequence */ llll_l__; } } } else if(ll_l_ll_ == l__l__) { /* in case of Kanji shifted */ ll_lll_ = lll____; llll__l_; /* goto next_byte */ } else if(lll____ == '=' && l_ll__l_ && !l_ll___ ) { if((lll____ = getc(ll_l___)) == EOF) { (*ll_l__l_)(0, '='); llll_ll_; } else if(lll____ == '?') { /* =? is mime conversiooon start sequence */ if(l_______(ll_l___) == EOF) /* check in detail */ llll_ll_; else llll__l_; } else { (*ll_l__l_)(0, '='); ungetc(lll____,ll_l___); llll__l_; } } else if(lll____ == '$' && l_ll_ll_ && !l_ll___) { /* try to recover missing escape */ if((lll____ = l_l_l__(ll_l___)) == EOF) { (*ll_l__l_)(0, '$'); llll_ll_; } else if(lll____ == '@'|| lll____ == 'B') { /* in case of Kanji in ESC sequence */ ll_l_ll_ = l__l__; ll_ll___ = llll_; llll__l_; } else { /* sorry */ (*ll_l__l_)(0, '$'); (*ll_l__l_)(0, lll____); llll__l_; } } else llll_l__; } else if(lll____ == l______) { ll_ll___ = llll_; llll__l_; } else if(lll____ == l____l_) { ll_ll___ = l_____; llll__l_; } else if(lll____ == ll_ll_ ) { if((lll____ = l_l_l__(ll_l___)) == EOF) { (*ll_l__l_)(0, ll_ll_); llll_ll_; } else if(lll____ == '$') { if((lll____ = l_l_l__(ll_l___)) == EOF) { (*ll_l__l_)(0, ll_ll_); (*ll_l__l_)(0, '$'); llll_ll_; } else if(lll____ == '@'|| lll____ == 'B') { /* This is kanji introduction */ ll_l_ll_ = l__l__; ll_ll___ = llll_; llll__l_; } else if(lll____ == '(') { if((lll____ = l_l_l__(ll_l___)) == EOF) { (*ll_l__l_)(0, ll_ll_); (*ll_l__l_)(0, '$'); (*ll_l__l_)(0, '('); llll_ll_; } else if(lll____ == '@'|| lll____ == 'B') { /* This is kanji introduction */ ll_l_ll_ = l__l__; ll_ll___ = llll_; llll__l_; } else { (*ll_l__l_)(0, ll_ll_); (*ll_l__l_)(0, '$'); (*ll_l__l_)(0, '('); (*ll_l__l_)(0, lll____); llll__l_; } } else if(l_ll_ll_&0x2) { ll_l_ll_ = l__l__; ll_ll___ = llll_; llll__l_; } else { (*ll_l__l_)(0, ll_ll_); (*ll_l__l_)(0, '$'); (*ll_l__l_)(0, lll____); llll__l_; } } else if(lll____ == '(') { if((lll____ = l_l_l__(ll_l___)) == EOF) { (*ll_l__l_)(0, ll_ll_); (*ll_l__l_)(0, '('); llll_ll_; } else { if(lll____ == 'I') { /* This is X0201 kana introduction */ ll_l_ll_ = l__ll_; ll_ll___ = l__ll_; llll__l_; } else if(lll____ == 'B' || lll____ == 'J' || lll____ == 'H') { /* This is X0208 kanji introduction */ ll_l_ll_ = l___l_; ll_ll___ = llll_; llll__l_; } else if(l_ll_ll_&0x2) { ll_l_ll_ = l___l_; ll_ll___ = llll_; llll__l_; } else { (*ll_l__l_)(0, ll_ll_); (*ll_l__l_)(0, '('); /* maintain various input_mode here */ llll_l__; } } } else { /* lonely ESC */ (*ll_l__l_)(0, ll_ll_); llll_l__; } } else if(lll____ == ll_l__ && l_ll_ll_&4) { ll_l_ll_ = l___l_; llll_l__; } else llll_l__; } /* send: */ if(ll_l_ll_ == l__l__) (*ll_l__l_)(ll_lll_, lll____); /* this is JIS, not SJIS/EUC case */ else (*ll_l____)(ll_lll_, lll____); /* can be EUC/SJIS */ ll_lll_ = 0; continue; /* goto next_word */ } /* epilogue */ (*ll_l____)(EOF, 0); return 1; } int ll_ll__(ll_l___, ll_lll_, lll____) FILE *ll_l___; int lll____, ll_lll_; { int lllll_l_; /** it must NOT be in the kanji shifte sequence */ /** it must NOT be written in JIS7 */ /** and it must be after 2 byte 8bit code */ l__l__l_ = 0; lll__l_(ll_lll_, lll____); ll_lll_ = 0; while ((lll____ = l_l_l__(ll_l___)) != EOF) { if(ll_lll_) { /* second byte */ if(!l_l__ll_) { /* not established */ if(lll____ > llll__) { /* it is still ambiguious yet */ llll_l__; } else if(lll____ < lll_l_) { /* ignore bogus first byte */ ll_lll_ = 0; llll_l__; } else { /* now established */ /* it seems to be MS Kanji */ l_l__ll_ = l_____; ll_l____ = lll_l__; llll_l__; } } else llll_l__; } else { /* First byte */ if(lll____ > lllll_) { /* 8th bit is on */ if(lll____ < llll__) { /* it seems to be MS Kanji */ l_l__ll_ = l_____; ll_l____ = lll_l__; } else if(lll____ < 0xe0) { /* it seems to be EUC */ l_l__ll_ = l_____; ll_l____ = ll_l__l_; } else { /* still ambiguious */ } ll_lll_ = lll____; llll__l_; } else /* 7 bit code , then send without any process */ llll_l__; } /* send: */ if((lll__l_(ll_lll_, lll____) == EOF) || l_l__ll_) break; ll_lll_ = 0; continue; } /** now, ** 1) EOF is detected, or ** 2) Code is established, or ** 3) Buffer is FULL (but last word is pushed) ** ** in 1) and 3) cases, we continue to use ** Kanji codes by oconv and leave estab_f unchanged. **/ for (lllll_l_ = 0; lllll_l_ < l__l__l_; lllll_l_ += 2) { ll_lll_ = l__l____[lllll_l_]; lll____ = l__l____[lllll_l_+1]; (*ll_l____)(ll_lll_, lll____); } return; } int lll__l_(ll_lll_, lll____) int ll_lll_, lll____; { if(l__l__l_ >= l___ll_*2) return (EOF); l__l____[l__l__l_++] = ll_lll_; l__l____[l__l__l_++] = lll____; return ((l__l__l_ >= l___ll_*2) ? EOF : l__l__l_); } int lll_l__(ll_lll_, lll____) int ll_lll_, lll____; { if((ll_lll_ == EOF) || (ll_lll_ == 0)) { /* NOP */ } else { ll_lll_ = ll_lll_ + ll_lll_ - ((ll_lll_ <= 0x9f) ? l__lll_ : l_l____); if(lll____ < 0x9f) lll____ = lll____ - ((lll____ > lllll_) ? lll___ : 0x1f); else { lll____ = lll____ - 0x7e; ll_lll_++; } } (*ll_l__l_)(ll_lll_, lll____); return 1; } lll_ll_(ll_lll_, lll____) int ll_lll_, lll____; { ll_lll_ = llllll_(lll____,ll_lll_); lll____ = l_llll__; if(ll____l_) { switch(lllll__(ll_lll_,lll____)) { case '\n': if(lll__l__ == l_____) { putchar('\r'); lll____ = '\n'; } putchar('\n'); break; case 0: return; case '\r': lll____ = '\n'; ll_lll_ = 0; break; case '\t': case ' ': lll____ = ' '; ll_lll_ = 0; break; } } if(ll_lll_==ll__l_) { putchar(' '); putchar(' '); return; } if(ll_lll_ == EOF) return; else if(ll_lll_ == 0 && (lll____&0x80)) { putchar(l___l__); putchar(lll____); } else if(ll_lll_ == 0) { if(lll____ == '\n' && lll__l__ == l_____) putchar('\r'); if(lll____ != '\r') putchar(lll____); else if(lll__ll_ == llll_) putchar(lll____); } else { if((lll____<0x20 || 0x7e> 1) + ((ll_lll_ <= 0x5e) ? 0x71 : 0xb1))); putchar((lll____ + ((ll_lll_ & 1) ? ((lll____ < 0x60) ? 0x1f : 0x20) : 0x7e))); } return; } llll_l_(ll_lll_, lll____) int ll_lll_, lll____; { ll_lll_ = llllll_(lll____,ll_lll_); lll____ = l_llll__; if(ll____l_) { switch(lllll__(ll_lll_,lll____)) { case '\n': if(ll_l_l__) { putchar(ll_ll_); putchar('('); putchar(ll__l___); } if(lll__l__ == l_____) { putchar('\r'); lll____ = '\n'; } putchar('\n'); ll_l_l__ = l___l_; break; case '\r': lll____ = '\n'; ll_lll_ = 0; break; case '\t': case ' ': lll____ = ' '; ll_lll_ = 0; break; case 0: return; } } if(ll_lll_ == EOF) { if(ll_l_l__) { putchar(ll_ll_); putchar('('); putchar(ll__l___); } } else if(ll_lll_ == 0 && (lll____ & 0x80)) { if(ll_l_ll_==l__ll_ || !l_lll___) { if(ll_l_l__!=l__ll_) { putchar(ll_ll_); putchar('('); putchar('I'); ll_l_l__ = l__ll_; } lll____ &= 0x7f; } else { /* iso8859 introduction, or 8th bit on */ /* Can we convert in 7bit form using ESC-'-'-A ? Is this popular? */ } putchar(lll____); } else if(ll_lll_ == 0) { if(ll_l_l__) { putchar(ll_ll_); putchar('('); putchar(ll__l___); ll_l_l__ = l___l_; } if(lll____ == '\n' && lll__l__ == l_____) putchar('\r'); if(lll____ != '\r') putchar(lll____); else if(lll__ll_ == llll_) putchar(lll____); } else if(ll_lll_ == ll__l_) { if(ll_l_l__) { putchar(ll_ll_); putchar('('); putchar(ll__l___); ll_l_l__ = l___l_; } putchar(' '); if(lll____ == '\n' && lll__l__ == l_____) putchar('\r'); if(lll____ != '\r') putchar(lll____); else if(lll__ll_ == llll_) putchar(lll____); } else { if(ll_l_l__ != l__l__) { putchar(ll_ll_); putchar('$'); putchar(ll___ll_); ll_l_l__ = l__l__; } if(lll____<0x20 || 0x7e0x80 Japanese (X0208/X0201) <0x80 ASCII \n new line ' ' space This fold algorthm does not preserve heading space in a line. This is the main difference from fmt. */ int lllll__(ll_lll_,lll____) int ll_lll_,lll____; { int l________; if(lll____=='\r') return 0; /* ignore cr */ if(lll____== 8) { if(l_lllll_>0) l_lllll_--; return 1; } if(ll_lll_==EOF && l_lllll_ != 0) /* close open last line */ return '\n'; /* new line */ if(lll____=='\n') { if(ll______ == lll____) { /* duplicate newline */ if(l_lllll_) { l_lllll_ = 0; return '\n'; /* output two newline */ } else { l_lllll_ = 0; return 1; } } else { if(ll______&0x80) { /* Japanese? */ ll______ = lll____; return 0; /* ignore given single newline */ } else if(ll______==' ') { return 0; } else { ll______ = lll____; if(++l_lllll_<=ll___l__) return ' '; else { l_lllll_ = 0; return '\r'; /* fold and output nothing */ } } } } if(lll____=='\f') { ll______ = '\n'; if(l_lllll_==0) return 1; l_lllll_ = 0; return '\n'; /* output newline and clear */ } /* X0208 kankaku or ascii space */ if( (ll_lll_==0&&lll____==' ')|| (ll_lll_==0&&lll____=='\t')|| (ll_lll_==ll__l_)|| (ll_lll_=='!'&& lll____=='!')) { if(ll______ == ' ') { return 0; /* remove duplicate spaces */ } ll______ = ' '; if(++l_lllll_<=ll___l__) return ' '; /* output ASCII space only */ else { ll______ = ' '; l_lllll_ = 0; return '\r'; /* fold and output nothing */ } } l________ = ll______; /* we still need this one... , but almost done */ ll______ = lll____; if(ll_lll_ || (llll__<=lll____ && lll____<=0xdf)) ll______ |= 0x80; /* this is Japanese */ l_lllll_ += (ll_lll_==0)?1:2; if(l_lllll_<=ll___l__) { /* normal case */ return 1; } if(l_lllll_>=ll___l__+ll__l_l_) { /* too many kinsou suspension */ l_lllll_ = (ll_lll_==0)?1:2; return '\n'; /* We can't wait, do fold now */ } /* simple kinsoku rules return 1 means no folding */ if(ll_lll_==0) { if(lll____==0xde) return 1; /* ゛*/ if(lll____==0xdf) return 1; /* ゜*/ if(lll____==0xa4) return 1; /* 。*/ if(lll____==0xa3) return 1; /* ,*/ if(lll____==0xa1) return 1; /* 」*/ if(lll____==0xb0) return 1; /* - */ if(llll__<=lll____ && lll____<=0xdf) { /* X0201 */ l_lllll_ = 1; return '\n';/* add one new line before this character */ } /* fold point in ASCII { [ ( */ if(( lll____!=')'&& lll____!=']'&& lll____!='}'&& lll____!='.'&& lll____!=','&& lll____!='!'&& lll____!='?'&& lll____!='/'&& lll____!=':'&& lll____!=';')&& ((l________=='\n')|| (l________==' ')|| /* ignored new line */ (l________&0x80)) /* X0208 - ASCII */ ) { l_lllll_ = 1; return '\n';/* add one new line before this character */ } return 1; /* default no fold in ASCII */ } else { if(ll_lll_=='!') { if(lll____=='"') return 1; /* 、 */ if(lll____=='#') return 1; /* 。 */ if(lll____=='$') return 1; /* , */ if(lll____=='%') return 1; /* . */ if(lll____=='\'') return 1; /* + */ if(lll____=='(') return 1; /* ; */ if(lll____==')') return 1; /* ? */ if(lll____=='*') return 1; /* ! */ if(lll____=='+') return 1; /* ゛ */ if(lll____==',') return 1; /* ゜ */ } l_lllll_ = 2; return '\n'; /* add one new line before this character */ } } int llllll_(lll____,ll_lll_) int lll____,ll_lll_; { if(ll_lll_) lll____ &= 0x7f; l_llll__ = lll____; if(ll_lll_==EOF) return ll_lll_; ll_lll_ &= 0x7f; if(l_l_ll__) { if(ll_lll_) { lll____ = lllllll_(lll____); ll_lll_ = lllllll_(ll_lll_); } else { if(!(lll____ & 0x80)) lll____ = llllll__(lll____); } l_llll__ = lll____; } /* JISX0208 Alphabet */ if(l_ll____ && ll_lll_ == 0x23 ) return 0; /* JISX0208 Kigou */ if(l_ll____ && ll_lll_ == 0x21 ) { if(0x21==lll____) { if(l_ll____&0x2) { l_llll__ = ' '; return 0; } else if(l_ll____&0x4) { l_llll__ = ' '; return ll__l_; } else { return ll_lll_; } } else if(0x20' ';l____ll__++) { /* start at =? */ if( ((l___l_l__[l____ll__] = lll____ = getc(ll_l___))==EOF) || l____l_l_(lll____) != l_l_ll_[l____ll__] ) { /* pattern fails, try next one */ l___l__l_ = l_l_ll_; while (l_l_ll_ = l______l_[++l____lll_]) { for(l___l____=2;l___l____ i */ if(l_l_ll_[l___l____]!=l___l__l_[l___l____]) break; if(l___l____==l____ll__ && l____l_l_(lll____)==l_l_ll_[l___l____]) break; } if(l_l_ll_) continue; /* found next one, continue */ /* all fails, output from recovery buffer */ ungetc(lll____,ll_l___); for(l____lll_=0;l____lll_> 4) & 0x03); if(ll_lll_ != '=') { l__ll___(l_l_____++) = l___llll_; l___llll_ = ((l__l___l_ << 4) & 0x0f0) | ((l__l__l__ >> 2) & 0x0f); if(l___ll_l_ != '=') { l__ll___(l_l_____++) = l___llll_; l___llll_ = ((l__l__l__ << 6) & 0x0c0) | (l__l__ll_ & 0x3f); if(l___lll__ != '=') l__ll___(l_l_____++) = l___llll_; } } else { return lll____; } return l__ll___(l__llll_++); } int ll_____(l_llll_) unsigned int l_llll_; { l__ll___(l_l_____++) = l_llll_; return l_llll_; } #ifdef STRICT_MIME int l_____l_(ll_l___,l_l_ll_) FILE *ll_l___; unsigned char *l_l_ll_; { int l_llll_,l__l_lll_; unsigned int l___l__l_; /* In buffered mode, read until =? or NL or buffer fffull */ l_l___l_ = l__llll_; l_l_____ = l__llll_; while(*l_l_ll_) l__ll___(l_l___l_++) = *l_l_ll_++; l__l_lll_ = 0; l___l__l_ = l_l___l_; while((l_llll_=getc(ll_l___))!=EOF) { if(((l_l___l_-l__llll_)&l__l_ll_)==0) break; if(l_llll_=='=' && l__l_lll_=='?') { /* checked. skip header, start decode */ l__ll___(l_l___l_++) = l_llll_; l_l___l_ = l___l__l_; return 1; } if(!( (l_llll_=='+'||l_llll_=='/'|| l_llll_=='=' || l_llll_=='?' || ('a'<=l_llll_ && l_llll_<='z')||('A'<= l_llll_ && l_llll_<='Z')||('0'<=l_llll_ && l_llll_<='9')))) break; /* Should we check length mod 4? */ l__ll___(l_l___l_++) = l_llll_; l__l_lll_=l_llll_; } /* In case of Incomplete MIME, no MIME decode */ l__ll___(l_l___l_++) = l_llll_; l_l_____ = l_l___l_; /* point undecoded buffer */ l_ll___ = 1; /* no decode on Fifo last in mime_getc */ return 1; } #endif int l____l__(l_llll_) int l_llll_; { int l____ll__; if(l_llll_ > '@') if(l_llll_ < '[') l____ll__ = l_llll_ - 'A'; /* A..Z 0-25 */ else l____ll__ = l_llll_ - 'G' /* - 'a' + 26 */ ; /* a..z 26-51 */ else if(l_llll_ > '/') l____ll__ = l_llll_ - '0' + '4' /* - '0' + 52 */ ; /* 0..9 52-61 */ else if(l_llll_ == '+') l____ll__ = '>' /* 62 */ ; /* + 62 */ else l____ll__ = '?' /* 63 */ ; /* / 63 */ return (l____ll__); } void l___l_l_() { l_l__l__ = llll_; l_l__ll_ = llll_; l_l_l___ = llll_; l_l_l_l_ = l_____; l_l_ll__ = llll_; l_l_lll_ = llll_; l_ll____ = llll_; l_ll__l_ = l_____; l_ll_l__ = llll_; l_ll_ll_ = llll_; l_lll___ = llll_; l_lll_l_ = l_____; l_lll_l_ = l_l___; ll____l_ = llll_; ll___ll_ = l__l_l_; ll__l___ = l__ll__; ll_l__l_ = ll__lll_; ll_l_l__ = l___l_; ll_l_ll_ = l___l_; ll_ll___ = llll_; l_ll___ = llll_; lll___l_ = llll_; lll__l__ = llll_; lll__ll_ = llll_; } #ifndef PERL_XS int l____ll_() { fprintf(stderr,"USAGE: nkf(nkf32,wnkf,nkf2) -[flags] [in file] .. [out file for -O flag]\n"); fprintf(stderr,"Flags:\n"); fprintf(stderr,"b,u Output is bufferred (DEFAULT),Output is unbufferred\n"); #ifdef DEFAULT_CODE_SJIS fprintf(stderr,"j,s,e Outout code is JIS 7 bit, Shift JIS (DEFAULT), AT &T JIS (EUC)\n"); #endif #ifdef DEFAULT_CODE_JIS fprintf(stderr,"j,s,e Outout code is JIS 7 bit (DEFAULT), Shift JIS, AT&T JIS (EUC)\n"); #endif #ifdef DEFAULT_CODE_EUC fprintf(stderr,"j,s,e Outout code is JIS 7 bit, Shift JIS, AT&T JIS (EU C) (DEFAULT)\n"); #endif fprintf(stderr,"J,S,E Input assumption is JIS 7 bit , Shift JIS, AT&T JIS (EUC)\n"); fprintf(stderr,"t no conversion\n"); fprintf(stderr,"i_ Output sequence to designate JIS-kanji (DEFAULT B)\n"); fprintf(stderr,"o_ Output sequence to designate ASCII (DEFAULT B)\n" ); fprintf(stderr,"r {de/en}crypt ROT13/47\n"); fprintf(stderr,"v Show this usage\n"); fprintf(stderr,"m[BQ0] MIME decode [B:base64,Q:quoted,0:no decode]\n"); fprintf(stderr,"l ISO8859-1 (Latin-1) support\n"); fprintf(stderr,"f Folding: -f60 or -f\n"); fprintf(stderr,"Z[0-2] Convert X0208 alphabet to ASCII 1: Kankaku to space,2: 2 spaces\n"); fprintf(stderr,"X,x Assume X0201 kana in MS-Kanji, -x preserves X0201 \n"); fprintf(stderr,"B[0-2] Broken input 0: missing ESC,1: any X on ESC-[($]-X,2: ASCII on NL\n"); #ifdef MSDOS fprintf(stderr,"T Text mode output\n"); #endif fprintf(stderr,"O Output to File (DEFAULT 'nkf.out')\n"); fprintf(stderr,"d,c Delete \\r in line feed, Add \\r in line feed\n") ; fprintf(stderr,"Network Kanji Filter Version %s (%s) " #if defined(MSDOS) && !defined(_Windows) "for DOS" #endif #if !defined(__WIN32__) && defined(_Windows) "for Win16" #endif #if defined(__WIN32__) && defined(_Windows) "for Win32" #endif #ifdef __OS2__ "for OS/2" #endif ,l_,l__); fprintf(stderr,"\n%s\n",__); return 0; } #endif /** ** パッチ制作者 ** void@merope.pleiades.or.jp (Kusakabe Youichi) ** NIDE Naoyuki ** ohta@src.ricoh.co.jp (Junn Ohta) ** inouet@strl.nhk.or.jp (Tomoyuki Inoue) ** kiri@pulser.win.or.jp (Tetsuaki Kiriyama) ** Kimihiko Sato ** a_kuroe@kuroe.aoba.yokohama.jp (Akihiko Kuroe) ** kono@ie.u-ryukyu.ac.jp (Shinji Kono) ** GHG00637@nifty-serve.or.jp (COW) ** ** 最終更新日 ** 1998.11.16 **/ /* end */