1:
2:
3:
4:
5:
6: #ifndef _xstr_h_included_
7: #define _xstr_h_included_
8:
9:
10:
11: typedef int xchar;
12:
13:
14:
15:
16: typedef struct xstr_ {
17:
18: xchar *str;
19:
20: int len;
21: } xstr;
22:
23:
24: void anthy_putxchar(xchar );
25: void anthy_putxstr(xstr *);
26: void anthy_putxstrln(xstr *);
27:
28:
29: int anthy_sputxchar(char *, xchar , int encoding);
30: int anthy_sputxstr(char *, xstr *, int encoding);
31: int anthy_snputxstr(char *, int , xstr *, int encoding);
32:
33:
34: xstr *anthy_cstr_to_xstr(const char *, int );
35:
36: char *anthy_xstr_to_cstr(xstr *, int);
37:
38:
39: xstr *anthy_xstr_dup(xstr *);
40: void anthy_free_xstr(xstr *);
41:
42:
43: xchar *anthy_xstr_dup_str(xstr *);
44: void anthy_free_xstr_str(xstr *);
45:
46:
47: xstr* anthy_xstrcpy(xstr *, xstr *);
48:
49: int anthy_xstrcmp(xstr *, xstr *);
50:
51: int anthy_xstrncmp(xstr *, xstr *, int);
52:
53: xstr *anthy_xstrcat(xstr *s, xstr *d);
54:
55: xstr *anthy_xstrappend(xstr *xs, xchar c);
56:
57:
58: long long anthy_xstrtoll(xstr *);
59:
60: xstr *anthy_xstr_wide_num_to_num(xstr *);
61:
62: xstr *anthy_xstr_hira_to_kata(xstr *);
63:
64: xstr *anthy_xstr_hira_to_half_kata(xstr *);
65: xstr *anthy_conv_half_wide(xstr *xs);
66:
67:
68: #define XCT_ALL 0xffffffff
69: #define XCT_NONE 0
70: #define XCT_HIRA 1
71: #define XCT_KATA 2
72: #define XCT_ASCII 4
73: #define XCT_NUM 8
74: #define XCT_WIDENUM 16
75: #define XCT_OPEN 32
76: #define XCT_CLOSE 64
77:
78: #define XCT_PART 128
79:
80: #define XCT_DEP 256
81:
82: #define XCT_SYMBOL 1024
83:
84: #define XCT_KANJI 2048
85:
86: #define XCT_PUNCTUATION 4096
87:
88:
89: int anthy_get_xchar_type(const xchar );
90:
91: int anthy_get_xstr_type(const xstr *);
92:
93:
94: int anthy_xstr_hash(xstr *);
95:
96:
97: int anthy_init_xstr(void);
98: void anthy_quit_xstr(void);
99: void anthy_xstr_set_print_encoding(int );
100:
101: int anthy_euc_to_ucs(int ec);
102: int anthy_ucs_to_euc(int uc);
103:
104: const char *anthy_utf8_to_ucs4_xchar(const char *s, xchar *res);
105:
106: char *anthy_conv_euc_to_utf8(const char *s);
107: char *anthy_conv_utf8_to_euc(const char *s);
108:
109: #endif