1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23: #ifndef _GCONV_H
24: #define _GCONV_H 1
25:
26: #include <features.h>
27: #define __need_mbstate_t
28: #define __need_wint_t
29: #include <wchar.h>
30: #define __need_size_t
31: #define __need_wchar_t
32: #include <stddef.h>
33:
34:
35: #define __UNKNOWN_10646_CHAR ((wchar_t) 0xfffd)
36:
37:
38: enum
39: {
40: __GCONV_OK = 0,
41: __GCONV_NOCONV,
42: __GCONV_NODB,
43: __GCONV_NOMEM,
44:
45: __GCONV_EMPTY_INPUT,
46: __GCONV_FULL_OUTPUT,
47: __GCONV_ILLEGAL_INPUT,
48: __GCONV_INCOMPLETE_INPUT,
49:
50: __GCONV_ILLEGAL_DESCRIPTOR,
51: __GCONV_INTERNAL_ERROR
52: };
53:
54:
55:
56: enum
57: {
58: __GCONV_IS_LAST = 0x0001,
59: __GCONV_IGNORE_ERRORS = 0x0002
60: };
61:
62:
63:
64: struct __gconv_step;
65: struct __gconv_step_data;
66: struct __gconv_loaded_object;
67: struct __gconv_trans_data;
68:
69:
70:
71: typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
72: __const unsigned char **, __const unsigned char *,
73: unsigned char **, size_t *, int, int);
74:
75:
76: typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char);
77:
78:
79: typedef int (*__gconv_init_fct) (struct __gconv_step *);
80: typedef void (*__gconv_end_fct) (struct __gconv_step *);
81:
82:
83:
84: typedef int (*__gconv_trans_fct) (struct __gconv_step *,
85: struct __gconv_step_data *, void *,
86: __const unsigned char *,
87: __const unsigned char **,
88: __const unsigned char *, unsigned char **,
89: size_t *);
90:
91:
92: typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
93: __const unsigned char *,
94: unsigned char *, unsigned char *);
95:
96:
97: typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
98: size_t *);
99:
100:
101: typedef int (*__gconv_trans_init_fct) (void **, const char *);
102: typedef void (*__gconv_trans_end_fct) (void *);
103:
104: struct __gconv_trans_data
105: {
106:
107: __gconv_trans_fct __trans_fct;
108: __gconv_trans_context_fct __trans_context_fct;
109: __gconv_trans_end_fct __trans_end_fct;
110: void *__data;
111: struct __gconv_trans_data *__next;
112: };
113:
114:
115:
116: struct __gconv_step
117: {
118: struct __gconv_loaded_object *__shlib_handle;
119: __const char *__modname;
120:
121: int __counter;
122:
123: char *__from_name;
124: char *__to_name;
125:
126: __gconv_fct __fct;
127: __gconv_btowc_fct __btowc_fct;
128: __gconv_init_fct __init_fct;
129: __gconv_end_fct __end_fct;
130:
131:
132:
133: int __min_needed_from;
134: int __max_needed_from;
135: int __min_needed_to;
136: int __max_needed_to;
137:
138:
139: int __stateful;
140:
141: void *__data;
142: };
143:
144:
145:
146: struct __gconv_step_data
147: {
148: unsigned char *__outbuf;
149: unsigned char *__outbufend;
150:
151:
152:
153: int __flags;
154:
155:
156:
157: int __invocation_counter;
158:
159:
160:
161: int __internal_use;
162:
163: __mbstate_t *__statep;
164: __mbstate_t __state;
165:
166:
167:
168: struct __gconv_trans_data *__trans;
169: };
170:
171:
172:
173: typedef struct __gconv_info
174: {
175: size_t __nsteps;
176: struct __gconv_step *__steps;
177: __extension__ struct __gconv_step_data __data __flexarr;
178: } *__gconv_t;
179:
180: #endif