19#define UNUSED __attribute__((unused))
26#define GetProcAddressA GetProcAddress
32# define USE_LIBICONV_DLL
35#if !defined(DEFAULT_LIBICONV_DLL)
36# define DEFAULT_LIBICONV_DLL ""
41#define UNICODE_MODE_BOM_DONE 1
42#define UNICODE_MODE_SWAPPED 2
45#define FLAG_TRANSLIT 2
56size_t iconv(
iconv_t cd,
const char **
inbuf,
size_t *inbytesleft,
char **outbuf,
size_t *outbytesleft);
75typedef int* (*f_errno)(
void);
109#if defined(USE_LIBICONV_DLL)
116static size_t win_iconv(
iconv_t cd,
const char **
inbuf,
size_t *inbytesleft,
char **outbuf,
size_t *outbytesleft);
126static char *
xstrndup(
const char *
s,
size_t n);
129#if defined(USE_LIBICONV_DLL)
130static int libiconv_iconv_open(
rec_iconv_t *
cd,
const char *tocode,
const char *fromcode);
174 {1201,
"unicodeFFFE"},
188#ifndef GLIB_COMPILATION
215 {20127,
"ANSI_X3.4-1968"},
216 {20127,
"ANSI_X3.4-1986"},
221 {20127,
"ISO646-US"},
222 {20127,
"ISO_646.IRV:1991"},
230 {28591,
"ISO-8859-1"},
231 {28591,
"ISO-IR-100"},
232 {28591,
"ISO8859-1"},
233 {28591,
"ISO_8859-1"},
234 {28591,
"ISO_8859-1:1987"},
237 {28591,
"CSISOLATIN1"},
241 {1250,
"WINDOWS-1250"},
245 {1251,
"WINDOWS-1251"},
249 {1252,
"WINDOWS-1252"},
253 {1253,
"WINDOWS-1253"},
257 {1254,
"WINDOWS-1254"},
261 {1255,
"WINDOWS-1255"},
265 {1256,
"WINDOWS-1256"},
268 {1257,
"WINBALTRIM"},
269 {1257,
"WINDOWS-1257"},
272 {1258,
"WINDOWS-1258"},
277 {850,
"CSPC850MULTILINGUAL"},
283 {862,
"CSPC862LATINHEBREW"},
292 {154,
"CYRILLIC-ASIAN"},
299 {1133,
"IBM-CP1133"},
302 {874,
"WINDOWS-874"},
307 {51932,
"WINDOWS-51932"},
313 {932,
"SHIFFT_JIS-MS"},
318 {932,
"WINDOWS-31J"},
319 {932,
"WINDOWS-932"},
320 {932,
"CSWINDOWS31J"},
323 {50221,
"ISO-2022-JP"},
324 {50221,
"ISO-2022-JP-MS"},
325 {50221,
"ISO2022-JP"},
326 {50221,
"ISO2022-JP-MS"},
328 {50221,
"WINDOWS-50221"},
333 {936,
"WINDOWS-936"},
350 {437,
"CSPC8CODEPAGE437"},
356 {775,
"CSPC775BALTIC"},
440 {874,
"windows-874"},
445 {949,
"ks_c_5601-1987"},
461 {1250,
"windows-1250"},
462 {1251,
"windows-1251"},
463 {1252,
"windows-1252"},
464 {1253,
"windows-1253"},
465 {1254,
"windows-1254"},
466 {1255,
"windows-1255"},
467 {1256,
"windows-1256"},
468 {1257,
"windows-1257"},
469 {1258,
"windows-1258"},
471 {10000,
"macintosh"},
472 {10001,
"x-mac-japanese"},
473 {10002,
"x-mac-chinesetrad"},
474 {10003,
"x-mac-korean"},
475 {10004,
"x-mac-arabic"},
476 {10005,
"x-mac-hebrew"},
477 {10006,
"x-mac-greek"},
478 {10007,
"x-mac-cyrillic"},
479 {10008,
"x-mac-chinesesimp"},
480 {10010,
"x-mac-romanian"},
481 {10017,
"x-mac-ukrainian"},
482 {10021,
"x-mac-thai"},
484 {10079,
"x-mac-icelandic"},
485 {10081,
"x-mac-turkish"},
486 {10082,
"x-mac-croatian"},
487 {20000,
"x-Chinese_CNS"},
488 {20001,
"x-cp20001"},
489 {20002,
"x_Chinese-Eten"},
490 {20003,
"x-cp20003"},
491 {20004,
"x-cp20004"},
492 {20005,
"x-cp20005"},
494 {20106,
"x-IA5-German"},
495 {20107,
"x-IA5-Swedish"},
496 {20108,
"x-IA5-Norwegian"},
498 {20261,
"x-cp20261"},
499 {20269,
"x-cp20269"},
511 {20833,
"x-EBCDIC-KoreanExtended"},
519 {20936,
"x-cp20936"},
520 {20949,
"x-cp20949"},
524 {28591,
"iso-8859-1"},
525 {28591,
"iso8859-1"},
526 {28591,
"iso_8859-1"},
527 {28591,
"iso_8859_1"},
528 {28592,
"iso-8859-2"},
529 {28592,
"iso8859-2"},
530 {28592,
"iso_8859-2"},
531 {28592,
"iso_8859_2"},
532 {28593,
"iso-8859-3"},
533 {28593,
"iso8859-3"},
534 {28593,
"iso_8859-3"},
535 {28593,
"iso_8859_3"},
536 {28594,
"iso-8859-4"},
537 {28594,
"iso8859-4"},
538 {28594,
"iso_8859-4"},
539 {28594,
"iso_8859_4"},
540 {28595,
"iso-8859-5"},
541 {28595,
"iso8859-5"},
542 {28595,
"iso_8859-5"},
543 {28595,
"iso_8859_5"},
544 {28596,
"iso-8859-6"},
545 {28596,
"iso8859-6"},
546 {28596,
"iso_8859-6"},
547 {28596,
"iso_8859_6"},
548 {28597,
"iso-8859-7"},
549 {28597,
"iso8859-7"},
550 {28597,
"iso_8859-7"},
551 {28597,
"iso_8859_7"},
552 {28598,
"iso-8859-8"},
553 {28598,
"iso8859-8"},
554 {28598,
"iso_8859-8"},
555 {28598,
"iso_8859_8"},
556 {28599,
"iso-8859-9"},
557 {28599,
"iso8859-9"},
558 {28599,
"iso_8859-9"},
559 {28599,
"iso_8859_9"},
560 {28603,
"iso-8859-13"},
561 {28603,
"iso8859-13"},
562 {28603,
"iso_8859-13"},
563 {28603,
"iso_8859_13"},
564 {28605,
"iso-8859-15"},
565 {28605,
"iso8859-15"},
566 {28605,
"iso_8859-15"},
567 {28605,
"iso_8859_15"},
569 {38598,
"iso-8859-8-i"},
570 {38598,
"iso8859-8-i"},
571 {38598,
"iso_8859-8-i"},
572 {38598,
"iso_8859_8-i"},
573 {50220,
"iso-2022-jp"},
574 {50221,
"csISO2022JP"},
575 {50222,
"iso-2022-jp"},
576 {50225,
"iso-2022-kr"},
577 {50225,
"iso2022-kr"},
578 {50227,
"x-cp50227"},
591 {52936,
"hz-gb-2312"},
593 {57002,
"x-iscii-de"},
594 {57003,
"x-iscii-be"},
595 {57004,
"x-iscii-ta"},
596 {57005,
"x-iscii-te"},
597 {57006,
"x-iscii-as"},
598 {57007,
"x-iscii-or"},
599 {57008,
"x-iscii-ka"},
600 {57009,
"x-iscii-ma"},
601 {57010,
"x-iscii-gu"},
602 {57011,
"x-iscii-pa"},
670 LPINT lpnMultiCharCount,
672 LPINT lpnWideCharCount
678 LPINT lpnWideCharCount,
680 LPINT lpnMultiCharCount
738#if defined(USE_LIBICONV_DLL)
740 if (libiconv_iconv_open(
cd, tocode, fromcode))
759 int r =
cd->iconv_close(
cd->cd);
760 int e = *(
cd->_errno());
761#if defined(USE_LIBICONV_DLL)
762 if (
cd->hlibiconv !=
NULL)
774 size_t r =
cd->iconv(
cd->cd,
inbuf, inbytesleft, outbuf, outbytesleft);
815 tomode =
cd->to.mode;
825 cd->to.mode = tomode;
837 while (*inbytesleft != 0)
839 frommode =
cd->from.mode;
840 tomode =
cd->to.mode;
848 cd->from.mode = frommode;
854 cd->from.mode = frommode;
866 if (
cd->from.compat !=
NULL)
869 cp =
cd->from.compat;
870 for (
i = 0;
cp[
i].in != 0; ++
i)
880 if (
cd->to.compat !=
NULL)
884 for (
i = 0;
cp[
i].in != 0; ++
i)
894 outsize =
cd->to.wctomb(&
cd->to, wbuf, wsize, (
uchar *)*outbuf, *outbytesleft);
899 cd->to.mode = tomode;
904 cd->from.mode = frommode;
905 cd->to.mode = tomode;
923 int use_compat =
TRUE;
937 else if (
_stricmp(
p + 2,
"translit") == 0)
1025 if (*
name ==
'\0' ||
1032 else if (
'0' <=
name[0] &&
name[0] <=
'9')
1050 if (0xD800 <= wbuf[0] && wbuf[0] <= 0xDBFF)
1051 wc = ((wbuf[0] & 0x3FF) << 10) + (wbuf[1] & 0x3FF) + 0x10000;
1066 wbuf[0] = 0xD800 | ((wc >> 10) & 0x3FF);
1067 wbuf[1] = 0xDC00 | (wc & 0x3FF);
1145#if defined(USE_LIBICONV_DLL)
1147libiconv_iconv_open(
rec_iconv_t *
cd,
const char *tocode,
const char *fromcode)
1160 p =
getenv(
"WINICONV_LIBICONV_DLL");
1164 for ( ; *
p != 0;
p = (*
e ==
',') ?
e + 1 :
e)
1172 if (dllname ==
NULL)
1176 if (hlibiconv !=
NULL)
1178 if (hlibiconv == hwiniconv)
1188 if (hlibiconv ==
NULL)
1192 if (_iconv_open ==
NULL)
1195 if (
cd->iconv_close ==
NULL)
1200 cd->_errno = (
f_errno)find_imported_function(hlibiconv,
"_errno");
1201 if (_iconv_open ==
NULL ||
cd->iconv_close ==
NULL
1205 cd->cd = _iconv_open(tocode, fromcode);
1209 cd->hlibiconv = hlibiconv;
1213 if (hlibiconv !=
NULL)
1228#define TO_DOS_HEADER(base) ((PIMAGE_DOS_HEADER)(base))
1229#define TO_NT_HEADERS(base) ((PIMAGE_NT_HEADERS)((LPBYTE)(base) + TO_DOS_HEADER(base)->e_lfanew))
1235 p = TO_NT_HEADERS(
Base)->OptionalHeader.DataDirectory + DirectoryEntry;
1236 if (
p->VirtualAddress == 0) {
1302 if (
buf[0] <= 0x7F)
len = 1;
1303 else if (
buf[0] >= 0x81 &&
buf[0] <= 0xFE &&
1305 ((
buf[1] >= 0x40 &&
buf[1] <= 0x7E) ||
1306 (
buf[1] >= 0x80 &&
buf[1] <= 0xFE)))
len = 2;
1307 else if (
buf[0] >= 0x81 &&
buf[0] <= 0xFE &&
1309 buf[1] >= 0x30 &&
buf[1] <= 0x39)
len = 4;
1323 if (
buf[0] < 0x80)
len = 1;
1324 else if ((
buf[0] & 0xE0) == 0xC0)
len = 2;
1325 else if ((
buf[0] & 0xF0) == 0xE0)
len = 3;
1326 else if ((
buf[0] & 0xF8) == 0xF0)
len = 4;
1327 else if ((
buf[0] & 0xFC) == 0xF8)
len = 5;
1328 else if ((
buf[0] & 0xFE) == 0xFC)
len = 6;
1342 else if (
buf[0] == 0x8E)
1346 else if (!(0xA1 <=
buf[1] &&
buf[1] <= 0xDF))
1350 else if (
buf[0] == 0x8F)
1354 else if (!(0xA1 <=
buf[1] &&
buf[1] <= 0xFE)
1355 || !(0xA1 <=
buf[2] &&
buf[2] <= 0xFE))
1363 else if (!(0xA1 <=
buf[0] &&
buf[0] <= 0xFE)
1364 || !(0xA1 <=
buf[1] &&
buf[1] <= 0xFE))
1379 (
const char *)
buf,
len, (
wchar_t *)wbuf, *wbufsize);
1388 BOOL usedDefaultChar = 0;
1397 p = &usedDefaultChar;
1398#ifdef WC_NO_BEST_FIT_CHARS
1438 (
const char *)
buf, &
insize, (
wchar_t *)wbuf, wbufsize);
1453 (
const wchar_t *)wbuf, &wbufsize, tmpbuf, &tmpsize);
1458 else if (cv->
mblen(cv, (
uchar *)tmpbuf, tmpsize) != tmpsize)
1476 wbuf[0] = (
buf[1] << 8) |
buf[0];
1478 wbuf[0] = (
buf[0] << 8) |
buf[1];
1483 if (wbuf[0] == 0xFFFE)
1489 else if (wbuf[0] == 0xFEFF)
1496 if (0xDC00 <= wbuf[0] && wbuf[0] <= 0xDFFF)
1498 if (0xD800 <= wbuf[0] && wbuf[0] <= 0xDBFF)
1503 wbuf[1] = (
buf[3] << 8) |
buf[2];
1505 wbuf[1] = (
buf[2] << 8) |
buf[3];
1506 if (!(0xDC00 <= wbuf[1] && wbuf[1] <= 0xDFFF))
1540 buf[0] = (wbuf[0] & 0x00FF);
1541 buf[1] = (wbuf[0] & 0xFF00) >> 8;
1545 buf[0] = (wbuf[0] & 0xFF00) >> 8;
1546 buf[1] = (wbuf[0] & 0x00FF);
1548 if (0xD800 <= wbuf[0] && wbuf[0] <= 0xDBFF)
1554 buf[2] = (wbuf[1] & 0x00FF);
1555 buf[3] = (wbuf[1] & 0xFF00) >> 8;
1559 buf[2] = (wbuf[1] & 0xFF00) >> 8;
1560 buf[3] = (wbuf[1] & 0x00FF);
1580 wc = (
buf[3] << 24) | (
buf[2] << 16) | (
buf[1] << 8) |
buf[0];
1582 wc = (
buf[0] << 24) | (
buf[1] << 16) | (
buf[2] << 8) |
buf[3];
1587 if (wc == 0xFFFE0000)
1593 else if (wc == 0x0000FEFF)
1600 if ((0xD800 <= wc && wc <= 0xDFFF) || 0x10FFFF < wc)
1634 buf[0] = wc & 0x000000FF;
1635 buf[1] = (wc & 0x0000FF00) >> 8;
1636 buf[2] = (wc & 0x00FF0000) >> 16;
1637 buf[3] = (wc & 0xFF000000) >> 24;
1641 buf[0] = (wc & 0xFF000000) >> 24;
1642 buf[1] = (wc & 0x00FF0000) >> 16;
1643 buf[2] = (wc & 0x0000FF00) >> 8;
1644 buf[3] = wc & 0x000000FF;
1662#define ISO2022_MODE(cs, shift) (((cs) << 8) | (shift))
1663#define ISO2022_MODE_CS(mode) (((mode) >> 8) & 0xFF)
1664#define ISO2022_MODE_SHIFT(mode) ((mode) & 0xFF)
1682#define ISO2022JP_CS_ASCII 0
1683#define ISO2022JP_CS_JISX0201_ROMAN 1
1684#define ISO2022JP_CS_JISX0201_KANA 2
1685#define ISO2022JP_CS_JISX0208_1978 3
1686#define ISO2022JP_CS_JISX0208_1983 4
1687#define ISO2022JP_CS_JISX0212 5
1725 if (
strncmp((
char *)
buf, iesc[
i].esc, esc_len) == 0)
1762 for (
i = 0;
i <
len; ++
i)
1763 if (!(
buf[
i] < 0x80))
1766 memcpy(tmp, iesc[
cs].esc, esc_len);
1786 (
const char *)tmp, &
insize, (
wchar_t *)wbuf, wbufsize);
1792 if (wbuf[0] ==
buf[0]
1825 (
const wchar_t *)wbuf, &wbufsize, tmp, &tmpsize);
1841 if (
strncmp(tmp, iesc[
i].esc, esc_len) == 0)
1847 if (iesc[
i].esc ==
NULL)
1865 else if (tmpsize < esc_len +
len)
1896 return len + esc_len;
1932#if defined(MAKE_DLL) && defined(USE_LIBICONV_DLL)
1939 hwiniconv = (
HMODULE)hinstDLL;
1950#if defined(MAKE_EXE)
1957 char *fromcode =
NULL;
1958 char *tocode =
NULL;
1965 size_t outbytesleft;
1987 fromcode =
argv[++
i];
2013 if (fromcode ==
NULL || tocode ==
NULL)
2015 printf(
"usage: %s [-c] -f from-enc -t to-enc [file]\n",
argv[0]);
2029 strcat(tocode,
"//IGNORE");
2035 perror(
"iconv_open error");
2042 inbytesleft += rest;
2045 outbytesleft =
sizeof(outbuf);
2046 r =
iconv(
cd, &
pin, &inbytesleft, &pout, &outbytesleft);
2047 fwrite(outbuf, 1,
sizeof(outbuf) - outbytesleft,
out);
2050 perror(
"conversion error");
2057 outbytesleft =
sizeof(outbuf);
2059 fwrite(outbuf, 1,
sizeof(outbuf) - outbytesleft,
out);
2060 if (
r == (
size_t)(-1))
2062 perror(
"conversion error");
char * strcat(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strcpy(char *DstString, const char *SrcString)
char * strchr(const char *String, int ch)
#define _setmode(fd, mode)
#define ERROR_INSUFFICIENT_BUFFER
#define DLL_THREAD_DETACH
#define DLL_PROCESS_ATTACH
#define DLL_PROCESS_DETACH
#define _strnicmp(_String1, _String2, _MaxCount)
#define WideCharToMultiByte
#define DLL_THREAD_ATTACH
#define MultiByteToWideChar
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
BOOL WINAPI IsValidCodePage(UINT codepage)
BOOL WINAPI GetCPInfo(UINT codepage, LPCPINFO cpinfo)
BOOL WINAPI IsDBCSLeadByteEx(UINT codepage, BYTE testchar)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLdouble GLdouble GLdouble r
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLuint GLsizei bufsize
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
#define MB_ERR_INVALID_CHARS
#define WC_NO_BEST_FIT_CHARS
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
_Check_return_ _CRTIMP int __cdecl _fileno(_In_ FILE *_File)
_Check_return_ _CRTIMP int __cdecl feof(_In_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_opt_ _CRTIMP size_t __cdecl fread(_Out_writes_bytes_(_ElementSize *_Count) void *_DstBuf, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP size_t __cdecl fwrite(_In_reads_bytes_(_Size *_Count) const void *_Str, _In_ size_t _Size, _In_ size_t _Count, _Inout_ FILE *_File)
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
const unsigned char size_t insize
unsigned char size_t * outsize
BOOL WINAPI DllMain(IN HINSTANCE hinstDLL, IN DWORD dwReason, IN LPVOID lpvReserved)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
_In_ BOOLEAN MappedAsImage
struct _IMAGE_IMPORT_DESCRIPTOR * PIMAGE_IMPORT_DESCRIPTOR
#define IMAGE_SNAP_BY_ORDINAL(Ordinal)
PIMAGE_THUNK_DATA32 PIMAGE_THUNK_DATA
#define IMAGE_DIRECTORY_ENTRY_IMPORT
struct _IMAGE_IMPORT_BY_NAME * PIMAGE_IMPORT_BY_NAME
_CRTIMP int *__cdecl _errno(void)
f_iconv_close iconv_close
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
static int mbcs_mblen(csconv_t *cv, const uchar *buf, int bufsize)
int iconv_close(iconv_t cd)
static const char iso2022_SI_seq[]
size_t(* f_iconv)(iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
HRESULT(WINAPI * LCIDTORFC1766A)(LCID Locale, LPSTR pszRfc1766, int nChar)
static int kernel_mbtowc(csconv_t *cv, const uchar *buf, int bufsize, ushort *wbuf, int *wbufsize)
#define ISO2022_MODE_SHIFT(mode)
static compat_t cp20932_compat[]
static int kernel_wctomb(csconv_t *cv, ushort *wbuf, int wbufsize, uchar *buf, int bufsize)
iconv_t iconv_open(const char *tocode, const char *fromcode)
HRESULT(WINAPI * RFC1766TOLCIDA)(LCID *pLocale, LPSTR pszRfc1766)
static int sbcs_mblen(csconv_t *cv, const uchar *buf, int bufsize)
static size_t win_iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
static const char iso2022_SO_seq[]
static int make_csconv(const char *name, csconv_t *cv)
static iso2022_esc_t iso2022jp_esc[]
#define ISO2022_MODE(cs, shift)
#define UNICODE_MODE_BOM_DONE
static int win_iconv_close(iconv_t cd)
static int seterror(int err)
static RFC1766TOLCIDA Rfc1766ToLcidA
HRESULT(WINAPI * CONVERTINETMULTIBYTETOUNICODE)(LPDWORD lpdwMode, DWORD dwSrcEncoding, LPCSTR lpSrcStr, LPINT lpnMultiCharCount, LPWSTR lpDstStr, LPINT lpnWideCharCount)
HRESULT(WINAPI * CONVERTINETSTRING)(LPDWORD lpdwMode, DWORD dwSrcEncoding, DWORD dwDstEncoding, LPCSTR lpSrcStr, LPINT lpnSrcSize, LPBYTE lpDstStr, LPINT lpnDstSize)
static int win_iconv_open(rec_iconv_t *cd, const char *tocode, const char *fromcode)
static struct @4264 codepage_alias[]
static int dbcs_mblen(csconv_t *cv, const uchar *buf, int bufsize)
static LCIDTORFC1766A LcidToRfc1766A
int(* f_mblen)(csconv_t *cv, const uchar *buf, int bufsize)
static int iso2022jp_wctomb(csconv_t *cv, ushort *wbuf, int wbufsize, uchar *buf, int bufsize)
static int mbtowc_flags(int codepage)
static int iso2022jp_flush(csconv_t *cv, uchar *buf, int bufsize)
static uint utf16_to_ucs4(const ushort *wbuf)
static int must_use_null_useddefaultchar(int codepage)
static int eucjp_mblen(csconv_t *cv, const uchar *buf, int bufsize)
static int mlang_mbtowc(csconv_t *cv, const uchar *buf, int bufsize, ushort *wbuf, int *wbufsize)
static int mlang_wctomb(csconv_t *cv, ushort *wbuf, int wbufsize, uchar *buf, int bufsize)
int(* f_iconv_close)(iconv_t cd)
static int iso2022jp_mbtowc(csconv_t *cv, const uchar *buf, int bufsize, ushort *wbuf, int *wbufsize)
static compat_t cp932_compat[]
static char * xstrndup(const char *s, size_t n)
static CONVERTINETMULTIBYTETOUNICODE ConvertINetMultiByteToUnicode
static int utf16_wctomb(csconv_t *cv, ushort *wbuf, int wbufsize, uchar *buf, int bufsize)
static int utf8_mblen(csconv_t *cv, const uchar *buf, int bufsize)
int(* f_flush)(csconv_t *cv, uchar *buf, int bufsize)
static int utf16_mbtowc(csconv_t *cv, const uchar *buf, int bufsize, ushort *wbuf, int *wbufsize)
HRESULT(WINAPI * RFC1766TOLCIDW)(LCID *pLocale, LPWSTR pszRfc1766)
HRESULT(WINAPI * CONVERTINETUNICODETOMULTIBYTE)(LPDWORD lpdwMode, DWORD dwEncoding, LPCWSTR lpSrcStr, LPINT lpnWideCharCount, LPSTR lpDstStr, LPINT lpnMultiCharCount)
static int load_mlang(void)
static ISCONVERTINETSTRINGAVAILABLE IsConvertINetStringAvailable
static int name_to_codepage(const char *name)
iconv_t(* f_iconv_open)(const char *tocode, const char *fromcode)
static compat_t * cp5022x_compat
#define DEFAULT_LIBICONV_DLL
int(* f_wctomb)(csconv_t *cv, ushort *wbuf, int wbufsize, uchar *buf, int bufsize)
#define UNICODE_MODE_SWAPPED
#define ISO2022JP_CS_JISX0201_ROMAN
size_t iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
#define ISO2022JP_CS_JISX0201_KANA
#define ISO2022_MODE_CS(mode)
static char * strrstr(const char *str, const char *token)
static int utf32_mbtowc(csconv_t *cv, const uchar *buf, int bufsize, ushort *wbuf, int *wbufsize)
static CONVERTINETUNICODETOMULTIBYTE ConvertINetUnicodeToMultiByte
#define ISO2022JP_CS_JISX0212
#define ISO2022JP_CS_JISX0208_1983
static compat_t * cp51932_compat
#define ISO2022JP_CS_ASCII
HRESULT(WINAPI * LCIDTORFC1766W)(LCID Locale, LPWSTR pszRfc1766, int nChar)
int(* f_mbtowc)(csconv_t *cv, const uchar *buf, int bufsize, ushort *wbuf, int *wbufsize)
HRESULT(WINAPI * ISCONVERTINETSTRINGAVAILABLE)(DWORD dwSrcEncoding, DWORD dwDstEncoding)
static void ucs4_to_utf16(uint wc, ushort *wbuf, int *wbufsize)
static CONVERTINETSTRING ConvertINetString
static int utf32_wctomb(csconv_t *cv, ushort *wbuf, int wbufsize, uchar *buf, int bufsize)
DWORD WINAPI GetLastError(void)