wchar.h 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the w64 mingw-runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER within this package.
  5. */
  6. #ifndef _INC_WCHAR
  7. #define _INC_WCHAR
  8. #include <_mingw.h>
  9. #pragma pack(push,_CRT_PACKING)
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. #ifndef WCHAR_MIN /* also at stdint.h */
  14. #define WCHAR_MIN 0
  15. #define WCHAR_MAX ((wchar_t) -1) /* UINT16_MAX */
  16. #endif
  17. #ifndef __GNUC_VA_LIST
  18. #define __GNUC_VA_LIST
  19. typedef __builtin_va_list __gnuc_va_list;
  20. #endif
  21. #ifndef _VA_LIST_DEFINED
  22. #define _VA_LIST_DEFINED
  23. typedef __gnuc_va_list va_list;
  24. #endif
  25. #ifndef WEOF
  26. #define WEOF (wint_t)(0xFFFF)
  27. #endif
  28. #ifndef _FILE_DEFINED
  29. struct _iobuf {
  30. char *_ptr;
  31. int _cnt;
  32. char *_base;
  33. int _flag;
  34. int _file;
  35. int _charbuf;
  36. int _bufsiz;
  37. char *_tmpfname;
  38. };
  39. typedef struct _iobuf FILE;
  40. #define _FILE_DEFINED
  41. #endif
  42. #ifndef _STDIO_DEFINED
  43. #ifdef _WIN64
  44. _CRTIMP FILE *__cdecl __iob_func(void);
  45. #else
  46. #ifdef _MSVCRT_
  47. extern FILE _iob[]; /* A pointer to an array of FILE */
  48. #define __iob_func() (_iob)
  49. #else
  50. extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
  51. #define __iob_func() (*_imp___iob)
  52. #define _iob __iob_func()
  53. #endif
  54. #endif
  55. #define _iob __iob_func()
  56. #endif
  57. #ifndef _STDSTREAM_DEFINED
  58. #define stdin (&__iob_func()[0])
  59. #define stdout (&__iob_func()[1])
  60. #define stderr (&__iob_func()[2])
  61. #define _STDSTREAM_DEFINED
  62. #endif
  63. #ifndef _FSIZE_T_DEFINED
  64. typedef unsigned long _fsize_t;
  65. #define _FSIZE_T_DEFINED
  66. #endif
  67. #ifndef _WFINDDATA_T_DEFINED
  68. struct _wfinddata32_t {
  69. unsigned attrib;
  70. __time32_t time_create;
  71. __time32_t time_access;
  72. __time32_t time_write;
  73. _fsize_t size;
  74. wchar_t name[260];
  75. };
  76. /* #if _INTEGRAL_MAX_BITS >= 64 */
  77. struct _wfinddata32i64_t {
  78. unsigned attrib;
  79. __time32_t time_create;
  80. __time32_t time_access;
  81. __time32_t time_write;
  82. __int64 size;
  83. wchar_t name[260];
  84. };
  85. struct _wfinddata64i32_t {
  86. unsigned attrib;
  87. __time64_t time_create;
  88. __time64_t time_access;
  89. __time64_t time_write;
  90. _fsize_t size;
  91. wchar_t name[260];
  92. };
  93. struct _wfinddata64_t {
  94. unsigned attrib;
  95. __time64_t time_create;
  96. __time64_t time_access;
  97. __time64_t time_write;
  98. __int64 size;
  99. wchar_t name[260];
  100. };
  101. /* #endif */
  102. #ifdef _USE_32BIT_TIME_T
  103. #define _wfinddata_t _wfinddata32_t
  104. #define _wfinddatai64_t _wfinddata32i64_t
  105. #define _wfindfirst _wfindfirst32
  106. #define _wfindnext _wfindnext32
  107. #define _wfindfirsti64 _wfindfirst32i64
  108. #define _wfindnexti64 _wfindnext32i64
  109. #else
  110. #define _wfinddata_t _wfinddata64i32_t
  111. #define _wfinddatai64_t _wfinddata64_t
  112. #define _wfindfirst _wfindfirst64i32
  113. #define _wfindnext _wfindnext64i32
  114. #define _wfindfirsti64 _wfindfirst64
  115. #define _wfindnexti64 _wfindnext64
  116. #endif
  117. #define _WFINDDATA_T_DEFINED
  118. #endif
  119. #ifndef NULL
  120. #ifdef __cplusplus
  121. #define NULL 0
  122. #else
  123. #define NULL ((void *)0)
  124. #endif
  125. #endif
  126. #ifndef _CONST_RETURN
  127. #define _CONST_RETURN
  128. #endif
  129. #define _WConst_return _CONST_RETURN
  130. #ifndef _CRT_CTYPEDATA_DEFINED
  131. #define _CRT_CTYPEDATA_DEFINED
  132. #ifndef _CTYPE_DISABLE_MACROS
  133. #ifndef __PCTYPE_FUNC
  134. #define __PCTYPE_FUNC __pctype_func()
  135. #ifdef _MSVCRT_
  136. #define __pctype_func() (_pctype)
  137. #else
  138. #define __pctype_func() (*_imp___pctype)
  139. #endif
  140. #endif
  141. #ifndef _pctype
  142. #ifdef _MSVCRT_
  143. extern unsigned short *_pctype;
  144. #else
  145. extern unsigned short **_imp___pctype;
  146. #define _pctype (*_imp___pctype)
  147. #endif
  148. #endif
  149. #endif
  150. #endif
  151. #ifndef _CRT_WCTYPEDATA_DEFINED
  152. #define _CRT_WCTYPEDATA_DEFINED
  153. #ifndef _CTYPE_DISABLE_MACROS
  154. #ifndef _wctype
  155. #ifdef _MSVCRT_
  156. extern unsigned short *_wctype;
  157. #else
  158. extern unsigned short **_imp___wctype;
  159. #define _wctype (*_imp___wctype)
  160. #endif
  161. #endif
  162. #ifdef _MSVCRT_
  163. #define __pwctype_func() (_pwctype)
  164. #else
  165. #define __pwctype_func() (*_imp___pwctype)
  166. #endif
  167. #ifndef _pwctype
  168. #ifdef _MSVCRT_
  169. extern unsigned short *_pwctype;
  170. #else
  171. extern unsigned short **_imp___pwctype;
  172. #define _pwctype (*_imp___pwctype)
  173. #endif
  174. #endif
  175. #endif
  176. #endif
  177. #define _UPPER 0x1
  178. #define _LOWER 0x2
  179. #define _DIGIT 0x4
  180. #define _SPACE 0x8
  181. #define _PUNCT 0x10
  182. #define _CONTROL 0x20
  183. #define _BLANK 0x40
  184. #define _HEX 0x80
  185. #define _LEADBYTE 0x8000
  186. #define _ALPHA (0x0100|_UPPER|_LOWER)
  187. #ifndef _WCTYPE_DEFINED
  188. #define _WCTYPE_DEFINED
  189. int __cdecl iswalpha(wint_t _C);
  190. _CRTIMP int __cdecl _iswalpha_l(wint_t _C,_locale_t _Locale);
  191. int __cdecl iswupper(wint_t _C);
  192. _CRTIMP int __cdecl _iswupper_l(wint_t _C,_locale_t _Locale);
  193. int __cdecl iswlower(wint_t _C);
  194. _CRTIMP int __cdecl _iswlower_l(wint_t _C,_locale_t _Locale);
  195. int __cdecl iswdigit(wint_t _C);
  196. _CRTIMP int __cdecl _iswdigit_l(wint_t _C,_locale_t _Locale);
  197. int __cdecl iswxdigit(wint_t _C);
  198. _CRTIMP int __cdecl _iswxdigit_l(wint_t _C,_locale_t _Locale);
  199. int __cdecl iswspace(wint_t _C);
  200. _CRTIMP int __cdecl _iswspace_l(wint_t _C,_locale_t _Locale);
  201. int __cdecl iswpunct(wint_t _C);
  202. _CRTIMP int __cdecl _iswpunct_l(wint_t _C,_locale_t _Locale);
  203. int __cdecl iswalnum(wint_t _C);
  204. _CRTIMP int __cdecl _iswalnum_l(wint_t _C,_locale_t _Locale);
  205. int __cdecl iswprint(wint_t _C);
  206. _CRTIMP int __cdecl _iswprint_l(wint_t _C,_locale_t _Locale);
  207. int __cdecl iswgraph(wint_t _C);
  208. _CRTIMP int __cdecl _iswgraph_l(wint_t _C,_locale_t _Locale);
  209. int __cdecl iswcntrl(wint_t _C);
  210. _CRTIMP int __cdecl _iswcntrl_l(wint_t _C,_locale_t _Locale);
  211. int __cdecl iswascii(wint_t _C);
  212. int __cdecl isleadbyte(int _C);
  213. _CRTIMP int __cdecl _isleadbyte_l(int _C,_locale_t _Locale);
  214. wint_t __cdecl towupper(wint_t _C);
  215. _CRTIMP wint_t __cdecl _towupper_l(wint_t _C,_locale_t _Locale);
  216. wint_t __cdecl towlower(wint_t _C);
  217. _CRTIMP wint_t __cdecl _towlower_l(wint_t _C,_locale_t _Locale);
  218. int __cdecl iswctype(wint_t _C,wctype_t _Type);
  219. _CRTIMP int __cdecl _iswctype_l(wint_t _C,wctype_t _Type,_locale_t _Locale);
  220. _CRTIMP int __cdecl __iswcsymf(wint_t _C);
  221. _CRTIMP int __cdecl _iswcsymf_l(wint_t _C,_locale_t _Locale);
  222. _CRTIMP int __cdecl __iswcsym(wint_t _C);
  223. _CRTIMP int __cdecl _iswcsym_l(wint_t _C,_locale_t _Locale);
  224. int __cdecl is_wctype(wint_t _C,wctype_t _Type);
  225. #endif
  226. #ifndef _WDIRECT_DEFINED
  227. #define _WDIRECT_DEFINED
  228. _CRTIMP wchar_t *__cdecl _wgetcwd(wchar_t *_DstBuf,int _SizeInWords);
  229. _CRTIMP wchar_t *__cdecl _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
  230. wchar_t *__cdecl _wgetdcwd_nolock(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
  231. _CRTIMP int __cdecl _wchdir(const wchar_t *_Path);
  232. _CRTIMP int __cdecl _wmkdir(const wchar_t *_Path);
  233. _CRTIMP int __cdecl _wrmdir(const wchar_t *_Path);
  234. #endif
  235. #ifndef _WIO_DEFINED
  236. #define _WIO_DEFINED
  237. _CRTIMP int __cdecl _waccess(const wchar_t *_Filename,int _AccessMode);
  238. _CRTIMP int __cdecl _wchmod(const wchar_t *_Filename,int _Mode);
  239. _CRTIMP int __cdecl _wcreat(const wchar_t *_Filename,int _PermissionMode);
  240. _CRTIMP intptr_t __cdecl _wfindfirst32(const wchar_t *_Filename,struct _wfinddata32_t *_FindData);
  241. _CRTIMP int __cdecl _wfindnext32(intptr_t _FindHandle,struct _wfinddata32_t *_FindData);
  242. _CRTIMP int __cdecl _wunlink(const wchar_t *_Filename);
  243. _CRTIMP int __cdecl _wrename(const wchar_t *_NewFilename,const wchar_t *_OldFilename);
  244. _CRTIMP wchar_t *__cdecl _wmktemp(wchar_t *_TemplateName);
  245. #if _INTEGRAL_MAX_BITS >= 64
  246. _CRTIMP intptr_t __cdecl _wfindfirst32i64(const wchar_t *_Filename,struct _wfinddata32i64_t *_FindData);
  247. intptr_t __cdecl _wfindfirst64i32(const wchar_t *_Filename,struct _wfinddata64i32_t *_FindData);
  248. _CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t *_Filename,struct _wfinddata64_t *_FindData);
  249. _CRTIMP int __cdecl _wfindnext32i64(intptr_t _FindHandle,struct _wfinddata32i64_t *_FindData);
  250. int __cdecl _wfindnext64i32(intptr_t _FindHandle,struct _wfinddata64i32_t *_FindData);
  251. _CRTIMP int __cdecl _wfindnext64(intptr_t _FindHandle,struct _wfinddata64_t *_FindData);
  252. #endif
  253. _CRTIMP errno_t __cdecl _wsopen_s(int *_FileHandle,const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionFlag);
  254. #if !defined(__cplusplus) || !(defined(_X86_) && !defined(__x86_64))
  255. _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,...);
  256. _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,...);
  257. #else
  258. extern "C++" _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,int _PermissionMode = 0);
  259. extern "C++" _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode = 0);
  260. #endif
  261. #endif
  262. #ifndef _WLOCALE_DEFINED
  263. #define _WLOCALE_DEFINED
  264. _CRTIMP wchar_t *__cdecl _wsetlocale(int _Category,const wchar_t *_Locale);
  265. #endif
  266. #ifndef _WPROCESS_DEFINED
  267. #define _WPROCESS_DEFINED
  268. _CRTIMP intptr_t __cdecl _wexecl(const wchar_t *_Filename,const wchar_t *_ArgList,...);
  269. _CRTIMP intptr_t __cdecl _wexecle(const wchar_t *_Filename,const wchar_t *_ArgList,...);
  270. _CRTIMP intptr_t __cdecl _wexeclp(const wchar_t *_Filename,const wchar_t *_ArgList,...);
  271. _CRTIMP intptr_t __cdecl _wexeclpe(const wchar_t *_Filename,const wchar_t *_ArgList,...);
  272. _CRTIMP intptr_t __cdecl _wexecv(const wchar_t *_Filename,const wchar_t *const *_ArgList);
  273. _CRTIMP intptr_t __cdecl _wexecve(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
  274. _CRTIMP intptr_t __cdecl _wexecvp(const wchar_t *_Filename,const wchar_t *const *_ArgList);
  275. _CRTIMP intptr_t __cdecl _wexecvpe(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
  276. _CRTIMP intptr_t __cdecl _wspawnl(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
  277. _CRTIMP intptr_t __cdecl _wspawnle(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
  278. _CRTIMP intptr_t __cdecl _wspawnlp(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
  279. _CRTIMP intptr_t __cdecl _wspawnlpe(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
  280. _CRTIMP intptr_t __cdecl _wspawnv(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
  281. _CRTIMP intptr_t __cdecl _wspawnve(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
  282. _CRTIMP intptr_t __cdecl _wspawnvp(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
  283. _CRTIMP intptr_t __cdecl _wspawnvpe(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
  284. #ifndef _CRT_WSYSTEM_DEFINED
  285. #define _CRT_WSYSTEM_DEFINED
  286. _CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
  287. #endif
  288. #endif
  289. #ifndef _WCTYPE_INLINE_DEFINED
  290. #undef _CRT_WCTYPE_NOINLINE
  291. #if !defined(__cplusplus) || defined(_CRT_WCTYPE_NOINLINE)
  292. #define iswalpha(_c) (iswctype(_c,_ALPHA))
  293. #define iswupper(_c) (iswctype(_c,_UPPER))
  294. #define iswlower(_c) (iswctype(_c,_LOWER))
  295. #define iswdigit(_c) (iswctype(_c,_DIGIT))
  296. #define iswxdigit(_c) (iswctype(_c,_HEX))
  297. #define iswspace(_c) (iswctype(_c,_SPACE))
  298. #define iswpunct(_c) (iswctype(_c,_PUNCT))
  299. #define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT))
  300. #define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT))
  301. #define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT))
  302. #define iswcntrl(_c) (iswctype(_c,_CONTROL))
  303. #define iswascii(_c) ((unsigned)(_c) < 0x80)
  304. #define _iswalpha_l(_c,_p) (_iswctype_l(_c,_ALPHA,_p))
  305. #define _iswupper_l(_c,_p) (_iswctype_l(_c,_UPPER,_p))
  306. #define _iswlower_l(_c,_p) (_iswctype_l(_c,_LOWER,_p))
  307. #define _iswdigit_l(_c,_p) (_iswctype_l(_c,_DIGIT,_p))
  308. #define _iswxdigit_l(_c,_p) (_iswctype_l(_c,_HEX,_p))
  309. #define _iswspace_l(_c,_p) (_iswctype_l(_c,_SPACE,_p))
  310. #define _iswpunct_l(_c,_p) (_iswctype_l(_c,_PUNCT,_p))
  311. #define _iswalnum_l(_c,_p) (_iswctype_l(_c,_ALPHA|_DIGIT,_p))
  312. #define _iswprint_l(_c,_p) (_iswctype_l(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT,_p))
  313. #define _iswgraph_l(_c,_p) (_iswctype_l(_c,_PUNCT|_ALPHA|_DIGIT,_p))
  314. #define _iswcntrl_l(_c,_p) (_iswctype_l(_c,_CONTROL,_p))
  315. #ifndef _CTYPE_DISABLE_MACROS
  316. #define isleadbyte(_c) (__PCTYPE_FUNC[(unsigned char)(_c)] & _LEADBYTE)
  317. #endif
  318. #endif
  319. #define _WCTYPE_INLINE_DEFINED
  320. #endif
  321. #if !defined(_POSIX_) || defined(__GNUC__)
  322. #ifndef _INO_T_DEFINED
  323. #define _INO_T_DEFINED
  324. typedef unsigned short _ino_t;
  325. #ifndef NO_OLDNAMES
  326. typedef unsigned short ino_t;
  327. #endif
  328. #endif
  329. #ifndef _DEV_T_DEFINED
  330. #define _DEV_T_DEFINED
  331. typedef unsigned int _dev_t;
  332. #ifndef NO_OLDNAMES
  333. typedef unsigned int dev_t;
  334. #endif
  335. #endif
  336. #ifndef _OFF_T_DEFINED
  337. #define _OFF_T_DEFINED
  338. #ifndef _OFF_T_
  339. #define _OFF_T_
  340. typedef long _off_t;
  341. #if !defined(NO_OLDNAMES) || defined(_POSIX)
  342. typedef long off_t;
  343. #endif
  344. #endif
  345. #endif
  346. #ifndef _OFF64_T_DEFINED
  347. #define _OFF64_T_DEFINED
  348. typedef long long _off64_t;
  349. #if !defined(NO_OLDNAMES) || defined(_POSIX)
  350. typedef long long off64_t;
  351. #endif
  352. #endif
  353. #ifndef _STAT_DEFINED
  354. #define _STAT_DEFINED
  355. #ifdef _USE_32BIT_TIME_T
  356. #ifdef WIN64
  357. #define _fstat _fstat32
  358. #define _stat _stat32
  359. #define _wstat _wstat32
  360. #else
  361. #define _fstat32 _fstat
  362. #define _stat32 _stat
  363. #define _wstat32 _wstat
  364. #endif
  365. #define _fstati64 _fstat32i64
  366. #define _stati64 _stat32i64
  367. #define _wstati64 _wstat32i64
  368. #else
  369. #define _fstat _fstat64i32
  370. #define _fstati64 _fstat64
  371. #define _stat _stat64i32
  372. #define _stati64 _stat64
  373. #define _wstat _wstat64i32
  374. #define _wstati64 _wstat64
  375. #endif
  376. struct _stat32 {
  377. _dev_t st_dev;
  378. _ino_t st_ino;
  379. unsigned short st_mode;
  380. short st_nlink;
  381. short st_uid;
  382. short st_gid;
  383. _dev_t st_rdev;
  384. _off_t st_size;
  385. __time32_t st_atime;
  386. __time32_t st_mtime;
  387. __time32_t st_ctime;
  388. };
  389. #ifndef NO_OLDNAMES
  390. struct stat {
  391. _dev_t st_dev;
  392. _ino_t st_ino;
  393. unsigned short st_mode;
  394. short st_nlink;
  395. short st_uid;
  396. short st_gid;
  397. _dev_t st_rdev;
  398. _off_t st_size;
  399. time_t st_atime;
  400. time_t st_mtime;
  401. time_t st_ctime;
  402. };
  403. #endif
  404. #if _INTEGRAL_MAX_BITS >= 64
  405. struct _stat32i64 {
  406. _dev_t st_dev;
  407. _ino_t st_ino;
  408. unsigned short st_mode;
  409. short st_nlink;
  410. short st_uid;
  411. short st_gid;
  412. _dev_t st_rdev;
  413. __int64 st_size;
  414. __time32_t st_atime;
  415. __time32_t st_mtime;
  416. __time32_t st_ctime;
  417. };
  418. struct _stat64i32 {
  419. _dev_t st_dev;
  420. _ino_t st_ino;
  421. unsigned short st_mode;
  422. short st_nlink;
  423. short st_uid;
  424. short st_gid;
  425. _dev_t st_rdev;
  426. _off_t st_size;
  427. __time64_t st_atime;
  428. __time64_t st_mtime;
  429. __time64_t st_ctime;
  430. };
  431. struct _stat64 {
  432. _dev_t st_dev;
  433. _ino_t st_ino;
  434. unsigned short st_mode;
  435. short st_nlink;
  436. short st_uid;
  437. short st_gid;
  438. _dev_t st_rdev;
  439. __int64 st_size;
  440. __time64_t st_atime;
  441. __time64_t st_mtime;
  442. __time64_t st_ctime;
  443. };
  444. #endif
  445. #define __stat64 _stat64
  446. #endif
  447. #ifndef _WSTAT_DEFINED
  448. #define _WSTAT_DEFINED
  449. _CRTIMP int __cdecl _wstat32(const wchar_t *_Name,struct _stat32 *_Stat);
  450. #if _INTEGRAL_MAX_BITS >= 64
  451. _CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat);
  452. int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat);
  453. _CRTIMP int __cdecl _wstat64(const wchar_t *_Name,struct _stat64 *_Stat);
  454. #endif
  455. #endif
  456. #endif
  457. #ifndef _WCONIO_DEFINED
  458. #define _WCONIO_DEFINED
  459. #ifndef WEOF
  460. #define WEOF (wint_t)(0xFFFF)
  461. #endif
  462. _CRTIMP wchar_t *_cgetws(wchar_t *_Buffer);
  463. _CRTIMP wint_t __cdecl _getwch(void);
  464. _CRTIMP wint_t __cdecl _getwche(void);
  465. _CRTIMP wint_t __cdecl _putwch(wchar_t _WCh);
  466. _CRTIMP wint_t __cdecl _ungetwch(wint_t _WCh);
  467. _CRTIMP int __cdecl _cputws(const wchar_t *_String);
  468. _CRTIMP int __cdecl _cwprintf(const wchar_t *_Format,...);
  469. _CRTIMP int __cdecl _cwscanf(const wchar_t *_Format,...);
  470. _CRTIMP int __cdecl _cwscanf_l(const wchar_t *_Format,_locale_t _Locale,...);
  471. _CRTIMP int __cdecl _vcwprintf(const wchar_t *_Format,va_list _ArgList);
  472. _CRTIMP int __cdecl _cwprintf_p(const wchar_t *_Format,...);
  473. _CRTIMP int __cdecl _vcwprintf_p(const wchar_t *_Format,va_list _ArgList);
  474. _CRTIMP int __cdecl _cwprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
  475. _CRTIMP int __cdecl _vcwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
  476. _CRTIMP int __cdecl _cwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
  477. _CRTIMP int __cdecl _vcwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
  478. wint_t __cdecl _putwch_nolock(wchar_t _WCh);
  479. wint_t __cdecl _getwch_nolock(void);
  480. wint_t __cdecl _getwche_nolock(void);
  481. wint_t __cdecl _ungetwch_nolock(wint_t _WCh);
  482. #endif
  483. #ifndef _WSTDIO_DEFINED
  484. #define _WSTDIO_DEFINED
  485. #ifndef WEOF
  486. #define WEOF (wint_t)(0xFFFF)
  487. #endif
  488. #ifdef _POSIX_
  489. _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode);
  490. #else
  491. _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag);
  492. #endif
  493. wint_t __cdecl fgetwc(FILE *_File);
  494. _CRTIMP wint_t __cdecl _fgetwchar(void);
  495. wint_t __cdecl fputwc(wchar_t _Ch,FILE *_File);
  496. _CRTIMP wint_t __cdecl _fputwchar(wchar_t _Ch);
  497. wint_t __cdecl getwc(FILE *_File);
  498. wint_t __cdecl getwchar(void);
  499. wint_t __cdecl putwc(wchar_t _Ch,FILE *_File);
  500. wint_t __cdecl putwchar(wchar_t _Ch);
  501. wint_t __cdecl ungetwc(wint_t _Ch,FILE *_File);
  502. wchar_t *__cdecl fgetws(wchar_t *_Dst,int _SizeInWords,FILE *_File);
  503. int __cdecl fputws(const wchar_t *_Str,FILE *_File);
  504. _CRTIMP wchar_t *__cdecl _getws(wchar_t *_String);
  505. _CRTIMP int __cdecl _putws(const wchar_t *_Str);
  506. int __cdecl fwprintf(FILE *_File,const wchar_t *_Format,...);
  507. int __cdecl wprintf(const wchar_t *_Format,...);
  508. _CRTIMP int __cdecl _scwprintf(const wchar_t *_Format,...);
  509. int __cdecl vfwprintf(FILE *_File,const wchar_t *_Format,va_list _ArgList);
  510. int __cdecl vwprintf(const wchar_t *_Format,va_list _ArgList);
  511. _CRTIMP int __cdecl swprintf(wchar_t*, const wchar_t*, ...);
  512. _CRTIMP int __cdecl vswprintf(wchar_t*, const wchar_t*,va_list);
  513. _CRTIMP int __cdecl _swprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,...);
  514. _CRTIMP int __cdecl _vswprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList);
  515. _CRTIMP int __cdecl _snwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,...);
  516. _CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,va_list _Args);
  517. #ifndef __NO_ISOCEXT /* externs in libmingwex.a */
  518. int __cdecl snwprintf (wchar_t *s, size_t n, const wchar_t * format, ...);
  519. __CRT_INLINE int __cdecl vsnwprintf (wchar_t *s, size_t n, const wchar_t *format, va_list arg) { return _vsnwprintf(s,n,format,arg); }
  520. int __cdecl vwscanf (const wchar_t *, va_list);
  521. int __cdecl vfwscanf (FILE *,const wchar_t *,va_list);
  522. int __cdecl vswscanf (const wchar_t *,const wchar_t *,va_list);
  523. #endif
  524. _CRTIMP int __cdecl _fwprintf_p(FILE *_File,const wchar_t *_Format,...);
  525. _CRTIMP int __cdecl _wprintf_p(const wchar_t *_Format,...);
  526. _CRTIMP int __cdecl _vfwprintf_p(FILE *_File,const wchar_t *_Format,va_list _ArgList);
  527. _CRTIMP int __cdecl _vwprintf_p(const wchar_t *_Format,va_list _ArgList);
  528. _CRTIMP int __cdecl _swprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,...);
  529. _CRTIMP int __cdecl _vswprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList);
  530. _CRTIMP int __cdecl _scwprintf_p(const wchar_t *_Format,...);
  531. _CRTIMP int __cdecl _vscwprintf_p(const wchar_t *_Format,va_list _ArgList);
  532. _CRTIMP int __cdecl _wprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
  533. _CRTIMP int __cdecl _wprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
  534. _CRTIMP int __cdecl _vwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
  535. _CRTIMP int __cdecl _vwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
  536. _CRTIMP int __cdecl _fwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
  537. _CRTIMP int __cdecl _fwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
  538. _CRTIMP int __cdecl _vfwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
  539. _CRTIMP int __cdecl _vfwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
  540. _CRTIMP int __cdecl _swprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
  541. _CRTIMP int __cdecl _swprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
  542. _CRTIMP int __cdecl _vswprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
  543. _CRTIMP int __cdecl _vswprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
  544. _CRTIMP int __cdecl _scwprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
  545. _CRTIMP int __cdecl _scwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
  546. _CRTIMP int __cdecl _vscwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
  547. _CRTIMP int __cdecl _snwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
  548. _CRTIMP int __cdecl _vsnwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
  549. _CRTIMP int __cdecl _swprintf(wchar_t *_Dest,const wchar_t *_Format,...);
  550. _CRTIMP int __cdecl _vswprintf(wchar_t *_Dest,const wchar_t *_Format,va_list _Args);
  551. _CRTIMP int __cdecl __swprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,...);
  552. _CRTIMP int __cdecl __vswprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,va_list _Args);
  553. #ifndef RC_INVOKED
  554. #include <vadefs.h>
  555. #endif
  556. #ifdef _CRT_NON_CONFORMING_SWPRINTFS
  557. #ifndef __cplusplus
  558. #define swprintf _swprintf
  559. #define vswprintf _vswprintf
  560. #define _swprintf_l __swprintf_l
  561. #define _vswprintf_l __vswprintf_l
  562. #endif
  563. #endif
  564. _CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix);
  565. _CRTIMP int __cdecl _vscwprintf(const wchar_t *_Format,va_list _ArgList);
  566. _CRTIMP int __cdecl _vscwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
  567. int __cdecl fwscanf(FILE *_File,const wchar_t *_Format,...);
  568. _CRTIMP int __cdecl _fwscanf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
  569. int __cdecl swscanf(const wchar_t *_Src,const wchar_t *_Format,...);
  570. _CRTIMP int __cdecl _swscanf_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...);
  571. _CRTIMP int __cdecl _snwscanf(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...);
  572. _CRTIMP int __cdecl _snwscanf_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
  573. int __cdecl wscanf(const wchar_t *_Format,...);
  574. _CRTIMP int __cdecl _wscanf_l(const wchar_t *_Format,_locale_t _Locale,...);
  575. _CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode);
  576. _CRTIMP FILE *__cdecl _wfopen(const wchar_t *_Filename,const wchar_t *_Mode);
  577. _CRTIMP FILE *__cdecl _wfreopen(const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile);
  578. #ifndef _CRT_WPERROR_DEFINED
  579. #define _CRT_WPERROR_DEFINED
  580. _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
  581. #endif
  582. _CRTIMP FILE *__cdecl _wpopen(const wchar_t *_Command,const wchar_t *_Mode);
  583. #if !defined(NO_OLDNAMES) && !defined(wpopen)
  584. #define wpopen _wpopen
  585. #endif
  586. _CRTIMP int __cdecl _wremove(const wchar_t *_Filename);
  587. _CRTIMP wchar_t *__cdecl _wtmpnam(wchar_t *_Buffer);
  588. _CRTIMP wint_t __cdecl _fgetwc_nolock(FILE *_File);
  589. _CRTIMP wint_t __cdecl _fputwc_nolock(wchar_t _Ch,FILE *_File);
  590. _CRTIMP wint_t __cdecl _ungetwc_nolock(wint_t _Ch,FILE *_File);
  591. #undef _CRT_GETPUTWCHAR_NOINLINE
  592. #if !defined(__cplusplus) || defined(_CRT_GETPUTWCHAR_NOINLINE)
  593. #define getwchar() fgetwc(stdin)
  594. #define putwchar(_c) fputwc((_c),stdout)
  595. #else
  596. __CRT_INLINE wint_t __cdecl getwchar() {return (fgetwc(stdin)); }
  597. __CRT_INLINE wint_t __cdecl putwchar(wchar_t _C) {return (fputwc(_C,stdout)); }
  598. #endif
  599. #define getwc(_stm) fgetwc(_stm)
  600. #define putwc(_c,_stm) fputwc(_c,_stm)
  601. #define _putwc_nolock(_c,_stm) _fputwc_nolock(_c,_stm)
  602. #define _getwc_nolock(_c) _fgetwc_nolock(_c)
  603. #endif
  604. #ifndef _WSTDLIB_DEFINED
  605. #define _WSTDLIB_DEFINED
  606. _CRTIMP wchar_t *__cdecl _itow(int _Value,wchar_t *_Dest,int _Radix);
  607. _CRTIMP wchar_t *__cdecl _ltow(long _Value,wchar_t *_Dest,int _Radix);
  608. _CRTIMP wchar_t *__cdecl _ultow(unsigned long _Value,wchar_t *_Dest,int _Radix);
  609. double __cdecl wcstod(const wchar_t *_Str,wchar_t **_EndPtr);
  610. _CRTIMP double __cdecl _wcstod_l(const wchar_t *_Str,wchar_t **_EndPtr,_locale_t _Locale);
  611. float __cdecl wcstof( const wchar_t *nptr, wchar_t **endptr);
  612. #if !defined __NO_ISOCEXT /* in libmingwex.a */
  613. float __cdecl wcstof (const wchar_t * __restrict__, wchar_t ** __restrict__);
  614. long double __cdecl wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__);
  615. #endif /* __NO_ISOCEXT */
  616. long __cdecl wcstol(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
  617. _CRTIMP long __cdecl _wcstol_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
  618. unsigned long __cdecl wcstoul(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
  619. _CRTIMP unsigned long __cdecl _wcstoul_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
  620. _CRTIMP wchar_t *__cdecl _wgetenv(const wchar_t *_VarName);
  621. #ifndef _CRT_WSYSTEM_DEFINED
  622. #define _CRT_WSYSTEM_DEFINED
  623. _CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
  624. #endif
  625. _CRTIMP double __cdecl _wtof(const wchar_t *_Str);
  626. _CRTIMP double __cdecl _wtof_l(const wchar_t *_Str,_locale_t _Locale);
  627. _CRTIMP int __cdecl _wtoi(const wchar_t *_Str);
  628. _CRTIMP int __cdecl _wtoi_l(const wchar_t *_Str,_locale_t _Locale);
  629. _CRTIMP long __cdecl _wtol(const wchar_t *_Str);
  630. _CRTIMP long __cdecl _wtol_l(const wchar_t *_Str,_locale_t _Locale);
  631. #if _INTEGRAL_MAX_BITS >= 64
  632. _CRTIMP wchar_t *__cdecl _i64tow(__int64 _Val,wchar_t *_DstBuf,int _Radix);
  633. _CRTIMP wchar_t *__cdecl _ui64tow(unsigned __int64 _Val,wchar_t *_DstBuf,int _Radix);
  634. _CRTIMP __int64 __cdecl _wtoi64(const wchar_t *_Str);
  635. _CRTIMP __int64 __cdecl _wtoi64_l(const wchar_t *_Str,_locale_t _Locale);
  636. _CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
  637. _CRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
  638. _CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
  639. _CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
  640. #endif
  641. #endif
  642. #ifndef _POSIX_
  643. #ifndef _WSTDLIBP_DEFINED
  644. #define _WSTDLIBP_DEFINED
  645. _CRTIMP wchar_t *__cdecl _wfullpath(wchar_t *_FullPath,const wchar_t *_Path,size_t _SizeInWords);
  646. _CRTIMP void __cdecl _wmakepath(wchar_t *_ResultPath,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext);
  647. #ifndef _CRT_WPERROR_DEFINED
  648. #define _CRT_WPERROR_DEFINED
  649. _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
  650. #endif
  651. _CRTIMP int __cdecl _wputenv(const wchar_t *_EnvString);
  652. _CRTIMP void __cdecl _wsearchenv(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath);
  653. _CRTIMP void __cdecl _wsplitpath(const wchar_t *_FullPath,wchar_t *_Drive,wchar_t *_Dir,wchar_t *_Filename,wchar_t *_Ext);
  654. #endif
  655. #endif
  656. #ifndef _WSTRING_DEFINED
  657. #define _WSTRING_DEFINED
  658. _CRTIMP wchar_t *__cdecl _wcsdup(const wchar_t *_Str);
  659. wchar_t *__cdecl wcscat(wchar_t *_Dest,const wchar_t *_Source);
  660. _CONST_RETURN wchar_t *__cdecl wcschr(const wchar_t *_Str,wchar_t _Ch);
  661. int __cdecl wcscmp(const wchar_t *_Str1,const wchar_t *_Str2);
  662. wchar_t *__cdecl wcscpy(wchar_t *_Dest,const wchar_t *_Source);
  663. size_t __cdecl wcscspn(const wchar_t *_Str,const wchar_t *_Control);
  664. size_t __cdecl wcslen(const wchar_t *_Str);
  665. size_t __cdecl wcsnlen(const wchar_t *_Src,size_t _MaxCount);
  666. wchar_t *__cdecl wcsncat(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
  667. int __cdecl wcsncmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
  668. wchar_t *__cdecl wcsncpy(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
  669. _CONST_RETURN wchar_t *__cdecl wcspbrk(const wchar_t *_Str,const wchar_t *_Control);
  670. _CONST_RETURN wchar_t *__cdecl wcsrchr(const wchar_t *_Str,wchar_t _Ch);
  671. size_t __cdecl wcsspn(const wchar_t *_Str,const wchar_t *_Control);
  672. _CONST_RETURN wchar_t *__cdecl wcsstr(const wchar_t *_Str,const wchar_t *_SubStr);
  673. wchar_t *__cdecl wcstok(wchar_t *_Str,const wchar_t *_Delim);
  674. _CRTIMP wchar_t *__cdecl _wcserror(int _ErrNum);
  675. _CRTIMP wchar_t *__cdecl __wcserror(const wchar_t *_Str);
  676. _CRTIMP int __cdecl _wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
  677. _CRTIMP int __cdecl _wcsicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
  678. _CRTIMP int __cdecl _wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
  679. _CRTIMP int __cdecl _wcsnicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
  680. _CRTIMP wchar_t *__cdecl _wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount);
  681. _CRTIMP wchar_t *__cdecl _wcsrev(wchar_t *_Str);
  682. _CRTIMP wchar_t *__cdecl _wcsset(wchar_t *_Str,wchar_t _Val);
  683. _CRTIMP wchar_t *__cdecl _wcslwr(wchar_t *_String);
  684. _CRTIMP wchar_t *_wcslwr_l(wchar_t *_String,_locale_t _Locale);
  685. _CRTIMP wchar_t *__cdecl _wcsupr(wchar_t *_String);
  686. _CRTIMP wchar_t *_wcsupr_l(wchar_t *_String,_locale_t _Locale);
  687. size_t __cdecl wcsxfrm(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount);
  688. _CRTIMP size_t __cdecl _wcsxfrm_l(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount,_locale_t _Locale);
  689. int __cdecl wcscoll(const wchar_t *_Str1,const wchar_t *_Str2);
  690. _CRTIMP int __cdecl _wcscoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
  691. _CRTIMP int __cdecl _wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2);
  692. _CRTIMP int __cdecl _wcsicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
  693. _CRTIMP int __cdecl _wcsncoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
  694. _CRTIMP int __cdecl _wcsncoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
  695. _CRTIMP int __cdecl _wcsnicoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
  696. _CRTIMP int __cdecl _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
  697. #ifndef NO_OLDNAMES
  698. wchar_t *__cdecl wcsdup(const wchar_t *_Str);
  699. #define wcswcs wcsstr
  700. int __cdecl wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
  701. int __cdecl wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
  702. wchar_t *__cdecl wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount);
  703. wchar_t *__cdecl wcsrev(wchar_t *_Str);
  704. wchar_t *__cdecl wcsset(wchar_t *_Str,wchar_t _Val);
  705. wchar_t *__cdecl wcslwr(wchar_t *_Str);
  706. wchar_t *__cdecl wcsupr(wchar_t *_Str);
  707. int __cdecl wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2);
  708. #endif
  709. #endif
  710. #ifndef _TM_DEFINED
  711. #define _TM_DEFINED
  712. struct tm {
  713. int tm_sec;
  714. int tm_min;
  715. int tm_hour;
  716. int tm_mday;
  717. int tm_mon;
  718. int tm_year;
  719. int tm_wday;
  720. int tm_yday;
  721. int tm_isdst;
  722. };
  723. #endif
  724. #ifndef _WTIME_DEFINED
  725. #define _WTIME_DEFINED
  726. _CRTIMP wchar_t *__cdecl _wasctime(const struct tm *_Tm);
  727. _CRTIMP wchar_t *__cdecl _wctime32(const __time32_t *_Time);
  728. size_t __cdecl wcsftime(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm);
  729. _CRTIMP size_t __cdecl _wcsftime_l(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm,_locale_t _Locale);
  730. _CRTIMP wchar_t *__cdecl _wstrdate(wchar_t *_Buffer);
  731. _CRTIMP wchar_t *__cdecl _wstrtime(wchar_t *_Buffer);
  732. #if _INTEGRAL_MAX_BITS >= 64
  733. _CRTIMP wchar_t *__cdecl _wctime64(const __time64_t *_Time);
  734. #endif
  735. #if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL)
  736. #define _INC_WTIME_INL
  737. #ifdef _USE_32BIT_TIME_T
  738. __CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime32(_Time); }
  739. #else
  740. __CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_Time); }
  741. #endif
  742. #endif
  743. #endif
  744. typedef int mbstate_t;
  745. typedef wchar_t _Wint_t;
  746. wint_t __cdecl btowc(int);
  747. size_t __cdecl mbrlen(const char *_Ch,size_t _SizeInBytes,mbstate_t *_State);
  748. size_t __cdecl mbrtowc(wchar_t *_DstCh,const char *_SrcCh,size_t _SizeInBytes,mbstate_t *_State);
  749. size_t __cdecl mbsrtowcs(wchar_t *_Dest,const char **_PSrc,size_t _Count,mbstate_t *_State);
  750. size_t __cdecl wcrtomb(char *_Dest,wchar_t _Source,mbstate_t *_State);
  751. size_t __cdecl wcsrtombs(char *_Dest,const wchar_t **_PSource,size_t _Count,mbstate_t *_State);
  752. int __cdecl wctob(wint_t _WCh);
  753. #ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */
  754. wchar_t *__cdecl wmemset(wchar_t *s, wchar_t c, size_t n);
  755. _CONST_RETURN wchar_t *__cdecl wmemchr(const wchar_t *s, wchar_t c, size_t n);
  756. int wmemcmp(const wchar_t *s1, const wchar_t *s2,size_t n);
  757. wchar_t *__cdecl wmemcpy(wchar_t *s1,const wchar_t *s2,size_t n);
  758. wchar_t *__cdecl wmemmove(wchar_t *s1, const wchar_t *s2, size_t n);
  759. long long __cdecl wcstoll(const wchar_t *nptr,wchar_t **endptr, int base);
  760. unsigned long long __cdecl wcstoull(const wchar_t *nptr,wchar_t **endptr, int base);
  761. #endif /* __NO_ISOCEXT */
  762. void *__cdecl memmove(void *_Dst,const void *_Src,size_t _MaxCount);
  763. void *__cdecl memcpy(void *_Dst,const void *_Src,size_t _MaxCount);
  764. __CRT_INLINE int __cdecl fwide(FILE *_F,int _M) { (void)_F; return (_M); }
  765. __CRT_INLINE int __cdecl mbsinit(const mbstate_t *_P) { return (!_P || *_P==0); }
  766. __CRT_INLINE _CONST_RETURN wchar_t *__cdecl wmemchr(const wchar_t *_S,wchar_t _C,size_t _N) { for (;0<_N;++_S,--_N) if (*_S==_C) return (_CONST_RETURN wchar_t *)(_S); return (0); }
  767. __CRT_INLINE int __cdecl wmemcmp(const wchar_t *_S1,const wchar_t *_S2,size_t _N) { for (; 0 < _N; ++_S1,++_S2,--_N) if (*_S1!=*_S2) return (*_S1 < *_S2 ? -1 : +1); return (0); }
  768. __CRT_INLINE wchar_t *__cdecl wmemcpy(wchar_t *_S1,const wchar_t *_S2,size_t _N) { return (wchar_t *)memcpy(_S1,_S2,_N*sizeof(wchar_t)); }
  769. __CRT_INLINE wchar_t *__cdecl wmemmove(wchar_t *_S1,const wchar_t *_S2,size_t _N) { return (wchar_t *)memmove(_S1,_S2,_N*sizeof(wchar_t)); }
  770. __CRT_INLINE wchar_t *__cdecl wmemset(wchar_t *_S,wchar_t _C,size_t _N) {
  771. wchar_t *_Su = _S;
  772. for (;0<_N;++_Su,--_N) {
  773. *_Su = _C;
  774. }
  775. return (_S);
  776. }
  777. #ifdef __cplusplus
  778. }
  779. #endif
  780. #pragma pack(pop)
  781. #include <sec_api/wchar_s.h>
  782. #endif