1 #define LENLINE (BUFSIZ * 4)
2 #define HOLDBUFSIZ 8192 /* default size of hold buffer */
7 #define SS2 0x8e /* EUC single shift 2 */
8 #define SS3 0x8f /* EUC single shift 3 */
10 #define ZENPAD 0x2222 /* padding char for zenkaku */
11 #define HANPAD 0x25 /* padding char for hankaku */
15 #define bitflag(c) (1L << ((c) - '@'))
21 M_SO
, /* hankaku kana with SO */
22 M_ESCI
, /* hankaku kana with "ESC(I" */
26 char *Kcc_buffalloc(unsigned len
);
27 bool Kcc_append(register char *s
, register int len
);
28 void Kcc_flush(unsigned code
, char **ddd
, unsigned outcode
,
29 enum mode
*inmode
, unsigned long *insi
,
30 unsigned long *inso
, unsigned long *innj
,
32 void Kcc_bufffree(void);
35 unsigned KCC_check(char *s
, int extend
);
38 bool Kcc_compare(register char *s
, register char *str
);
41 void Kcc_decascii(char **ddd
, register int c
);
42 void Kcc_decgaiji(char **ddd
, register int c1
, register int c2
);
43 void Kcc_deckana(char **ddd
, register int c
);
44 void Kcc_deckanji(char **ddd
, register int c1
, register int c2
);
47 void Kcc_eucgaiji(char **ddd
, register int c1
, register int c2
);
48 void Kcc_euckana(char **ddd
, register int c
);
49 void Kcc_euckanji(char **ddd
, register int c1
, register int c2
);
52 int KCC_filter(char *ddd
, char *outcode_name
, char *sss
, char *incode_name
,
53 int extend
, int zenkaku
, int gaiji
);
56 int Kcc_getstr(char *str
, register int n
, char **sp
);
59 unsigned Kcc_guess(char *str
, int len
, int extend
, bool zenkaku
,
60 enum mode
*gsmode
, unsigned long *insi
,
61 unsigned long *inso
, unsigned long *innj
,
65 void Kcc_jisascii(char **ddd
, register int c
);
66 void Kcc_jisgaiji(char **ddd
, register int c1
, register int c2
);
67 void Kcc_jiskana(char **ddd
, register int c
);
68 void Kcc_jiskana8(char **ddd
, register int c
);
69 void Kcc_jiskanak(char **ddd
, register int c
);
70 void Kcc_jiskanji(char **ddd
, register int c1
, register int c2
);
73 void Kcc_outsjis(char **ddd
, register int c1
, register int c2
);
74 unsigned Kcc_out(char **ddd
, char *str
, int len
, register unsigned code
,
75 unsigned outcode
, enum mode
*inmode
,
76 unsigned long *insi
, unsigned long *inso
,
77 unsigned long *innj
, unsigned long *ingj
);
80 void Kcc_outchar(char **ddd
, register int c
);
83 void outsjis(register int c1
, register int c2
);
86 void Kcc_setfunc(unsigned outcode
);
89 int Kcc_showcode(register unsigned code
);
92 void Kcc_sjisgaiji(char **ddd
, register int c1
, register int c2
);
93 void Kcc_sjiskana(char **ddd
, register int c
);
94 void Kcc_sjiskanji(char **ddd
, register int c1
, register int c2
);