sync with sylpheed 0.7.2cvs11
[claws.git] / libkcc / libkcc.h
blob829f7cd6704b406532c056204ae4d9e97829bfff
1 #define LENLINE (BUFSIZ * 4)
2 #define HOLDBUFSIZ 8192 /* default size of hold buffer */
4 #define ESC 0x1b
5 #define SO 0x0e
6 #define SI 0x0f
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 */
13 typedef int bool;
15 #define bitflag(c) (1L << ((c) - '@'))
17 enum mode {
18 M_ASCII,
19 M_KANJI,
20 M_GAIJI,
21 M_SO, /* hankaku kana with SO */
22 M_ESCI, /* hankaku kana with "ESC(I" */
25 /* buffer.c */
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,
31 unsigned long *ingj);
32 void Kcc_bufffree(void);
34 /* check.c */
35 unsigned KCC_check(char *s, int extend);
37 /* compare.c */
38 bool Kcc_compare(register char *s, register char *str);
40 /* dec.c */
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);
46 /* euc.c */
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);
51 /* filter.c */
52 int KCC_filter(char *ddd, char *outcode_name, char *sss, char *incode_name,
53 int extend, int zenkaku, int gaiji);
55 /* getstr.c */
56 int Kcc_getstr(char *str, register int n, char **sp);
58 /* guess.c */
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,
62 unsigned long *ingj);
64 /* jis.c */
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);
72 /* out.c */
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);
79 /* outchar.c */
80 void Kcc_outchar(char **ddd, register int c);
82 /* outsjis.c */
83 void outsjis(register int c1, register int c2);
85 /* setfunc.c */
86 void Kcc_setfunc(unsigned outcode);
88 /* showcode.c */
89 int Kcc_showcode(register unsigned code);
91 /* sjis.c */
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);