gconv.h
001: 
002: 
003: 
004: 
005: 
006: 
007: 
008: 
009: 
010: 
011: 
012: 
013: 
014: 
015: 
016: 
017: 
018: 
019: 
020: 
021: 
022: 
023: #ifndef _GCONV_H
024: #define _GCONV_H        1
025: 
026: #include <features.h>
027: #define __need_mbstate_t
028: #define __need_wint_t
029: #include <wchar.h>
030: #define __need_size_t
031: #define __need_wchar_t
032: #include <stddef.h>
033: 
034: 
035: #define __UNKNOWN_10646_CHAR    ((wchar_t) 0xfffd)
036: 
037: 
038: enum
039: {
040:   __GCONV_OK = 0,
041:   __GCONV_NOCONV,
042:   __GCONV_NODB,
043:   __GCONV_NOMEM,
044: 
045:   __GCONV_EMPTY_INPUT,
046:   __GCONV_FULL_OUTPUT,
047:   __GCONV_ILLEGAL_INPUT,
048:   __GCONV_INCOMPLETE_INPUT,
049: 
050:   __GCONV_ILLEGAL_DESCRIPTOR,
051:   __GCONV_INTERNAL_ERROR
052: };
053: 
054: 
055: 
056: enum
057: {
058:   __GCONV_IS_LAST = 0x0001,
059:   __GCONV_IGNORE_ERRORS = 0x0002,
060:   __GCONV_SWAP = 0x0004
061: };
062: 
063: 
064: 
065: struct __gconv_step;
066: struct __gconv_step_data;
067: struct __gconv_loaded_object;
068: struct __gconv_trans_data;
069: 
070: 
071: 
072: typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
073:                             __const unsigned char **, __const unsigned char *,
074:                             unsigned char **, size_t *, int, int);
075: 
076: 
077: typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char);
078: 
079: 
080: typedef int (*__gconv_init_fct) (struct __gconv_step *);
081: typedef void (*__gconv_end_fct) (struct __gconv_step *);
082: 
083: 
084: 
085: typedef int (*__gconv_trans_fct) (struct __gconv_step *,
086:                                   struct __gconv_step_data *, void *,
087:                                   __const unsigned char *,
088:                                   __const unsigned char **,
089:                                   __const unsigned char *, unsigned char **,
090:                                   size_t *);
091: 
092: 
093: typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
094:                                           __const unsigned char *,
095:                                           unsigned char *, unsigned char *);
096: 
097: 
098: typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
099:                                         size_t *);
100: 
101: 
102: typedef int (*__gconv_trans_init_fct) (void **, const char *);
103: typedef void (*__gconv_trans_end_fct) (void *);
104: 
105: struct __gconv_trans_data
106: {
107:   
108:   __gconv_trans_fct __trans_fct;
109:   __gconv_trans_context_fct __trans_context_fct;
110:   __gconv_trans_end_fct __trans_end_fct;
111:   void *__data;
112:   struct __gconv_trans_data *__next;
113: };
114: 
115: 
116: 
117: struct __gconv_step
118: {
119:   struct __gconv_loaded_object *__shlib_handle;
120:   __const char *__modname;
121: 
122:   int __counter;
123: 
124:   char *__from_name;
125:   char *__to_name;
126: 
127:   __gconv_fct __fct;
128:   __gconv_btowc_fct __btowc_fct;
129:   __gconv_init_fct __init_fct;
130:   __gconv_end_fct __end_fct;
131: 
132:   
133: 
134:   int __min_needed_from;
135:   int __max_needed_from;
136:   int __min_needed_to;
137:   int __max_needed_to;
138: 
139:   
140:   int __stateful;
141: 
142:   void *__data;         
143: };
144: 
145: 
146: 
147: struct __gconv_step_data
148: {
149:   unsigned char *__outbuf;    
150:   unsigned char *__outbufend; 
151: 
152: 
153:   
154:   int __flags;
155: 
156:   
157: 
158:   int __invocation_counter;
159: 
160:   
161: 
162:   int __internal_use;
163: 
164:   __mbstate_t *__statep;
165:   __mbstate_t __state;  
166: 
167: 
168:   
169:   struct __gconv_trans_data *__trans;
170: };
171: 
172: 
173: 
174: typedef struct __gconv_info
175: {
176:   size_t __nsteps;
177:   struct __gconv_step *__steps;
178:   __extension__ struct __gconv_step_data __data __flexarr;
179: } *__gconv_t;
180: 
181: #endif 
182: 
      
      
      
      
   
      
      
         
            
            © Andrew Scott 2006 -
            2025, 
            All Rights Reserved