24 #define _LIBICONV_VERSION 0x010D
25 extern int _libiconv_version;
46 #define iconv_t libiconv_t
47 typedef void* iconv_t;
71 #define iconv_open libiconv_open
73 extern iconv_t iconv_open (
const char* tocode,
const char* fromcode);
81 #define iconv libiconv
83 extern size_t iconv (iconv_t cd,
const char* * inbuf,
size_t *inbytesleft,
char* * outbuf,
size_t *outbytesleft);
87 #define iconv_close libiconv_close
89 extern int iconv_close (iconv_t cd);
116 } iconv_allocation_t;
121 #define iconv_open_into libiconv_open_into
122 extern int iconv_open_into (
const char* tocode,
const char* fromcode,
123 iconv_allocation_t* resultp);
126 #define iconvctl libiconvctl
127 extern int iconvctl (iconv_t cd,
int request,
void* argument);
130 typedef void (*iconv_unicode_char_hook) (
unsigned int uc,
void* data);
132 typedef void (*iconv_wide_char_hook) (
wchar_t wc,
void* data);
135 iconv_unicode_char_hook uc_hook;
136 iconv_wide_char_hook wc_hook;
144 typedef void (*iconv_unicode_mb_to_uc_fallback)
145 (
const char* inbuf,
size_t inbufsize,
146 void (*write_replacement) (
const unsigned int *buf,
size_t buflen,
154 typedef void (*iconv_unicode_uc_to_mb_fallback)
156 void (*write_replacement) (
const char *buf,
size_t buflen,
165 typedef void (*iconv_wchar_mb_to_wc_fallback)
166 (
const char* inbuf,
size_t inbufsize,
167 void (*write_replacement) (
const wchar_t *buf,
size_t buflen,
175 typedef void (*iconv_wchar_wc_to_mb_fallback)
177 void (*write_replacement) (
const char *buf,
size_t buflen,
184 typedef void (*iconv_wchar_mb_to_wc_fallback) ();
185 typedef void (*iconv_wchar_wc_to_mb_fallback) ();
188 struct iconv_fallbacks {
189 iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback;
190 iconv_unicode_uc_to_mb_fallback uc_to_mb_fallback;
191 iconv_wchar_mb_to_wc_fallback mb_to_wc_fallback;
192 iconv_wchar_wc_to_mb_fallback wc_to_mb_fallback;
197 #define ICONV_TRIVIALP 0
198 #define ICONV_GET_TRANSLITERATE 1
199 #define ICONV_SET_TRANSLITERATE 2
200 #define ICONV_GET_DISCARD_ILSEQ 3
201 #define ICONV_SET_DISCARD_ILSEQ 4
202 #define ICONV_SET_HOOKS 5
203 #define ICONV_SET_FALLBACKS 6
206 #define iconvlist libiconvlist
207 extern void iconvlist (
int (*do_one) (
unsigned int namescount,
208 const char *
const * names,
214 extern const char * iconv_canonicalize (
const char * name);
223 extern void libiconv_set_relocation_prefix (
const char *orig_prefix,
224 const char *curr_prefix);