tchar.h 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #include <crtdefs.h>
  7. #ifndef _INC_TCHAR
  8. #define _INC_TCHAR
  9. #ifdef _STRSAFE_H_INCLUDED_
  10. #error Need to include strsafe.h after tchar.h
  11. #endif
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #ifndef __CYGWIN__
  16. #define _ftcscat _tcscat
  17. #define _ftcschr _tcschr
  18. #define _ftcscpy _tcscpy
  19. #define _ftcscspn _tcscspn
  20. #define _ftcslen _tcslen
  21. #define _ftcsncat _tcsncat
  22. #define _ftcsncpy _tcsncpy
  23. #define _ftcspbrk _tcspbrk
  24. #define _ftcsrchr _tcsrchr
  25. #define _ftcsspn _tcsspn
  26. #define _ftcsstr _tcsstr
  27. #define _ftcstok _tcstok
  28. #define _ftcsdup _tcsdup
  29. #define _ftcsnset _tcsnset
  30. #define _ftcsrev _tcsrev
  31. #define _ftcsset _tcsset
  32. #define _ftcscmp _tcscmp
  33. #define _ftcsicmp _tcsicmp
  34. #define _ftcsnccmp _tcsnccmp
  35. #define _ftcsncmp _tcsncmp
  36. #define _ftcsncicmp _tcsncicmp
  37. #define _ftcsnicmp _tcsnicmp
  38. #define _ftcscoll _tcscoll
  39. #define _ftcsicoll _tcsicoll
  40. #define _ftcsnccoll _tcsnccoll
  41. #define _ftcsncoll _tcsncoll
  42. #define _ftcsncicoll _tcsncicoll
  43. #define _ftcsnicoll _tcsnicoll
  44. #define _ftcsclen _tcsclen
  45. #define _ftcsnccat _tcsnccat
  46. #define _ftcsnccpy _tcsnccpy
  47. #define _ftcsncset _tcsncset
  48. #define _ftcsdec _tcsdec
  49. #define _ftcsinc _tcsinc
  50. #define _ftcsnbcnt _tcsnbcnt
  51. #define _ftcsnccnt _tcsnccnt
  52. #define _ftcsnextc _tcsnextc
  53. #define _ftcsninc _tcsninc
  54. #define _ftcsspnp _tcsspnp
  55. #define _ftcslwr _tcslwr
  56. #define _ftcsupr _tcsupr
  57. #define _ftclen _tclen
  58. #define _ftccpy _tccpy
  59. #define _ftccmp _tccmp
  60. #ifndef _CONST_RETURN
  61. #ifdef __cplusplus
  62. #define _CONST_RETURN const
  63. #define _CRT_CONST_CORRECT_OVERLOADS
  64. #else
  65. #define _CONST_RETURN
  66. #endif
  67. #endif
  68. #define _WConst_return _CONST_RETURN
  69. #endif /* __CYGWIN__ */
  70. #ifdef _UNICODE
  71. #ifdef __cplusplus
  72. }
  73. #endif
  74. #include <wchar.h>
  75. #ifdef __cplusplus
  76. extern "C" {
  77. #endif
  78. #ifndef __CYGWIN__
  79. #ifndef _WCTYPE_T_DEFINED
  80. #define _WCTYPE_T_DEFINED
  81. typedef unsigned short wint_t;
  82. typedef unsigned short wctype_t;
  83. #endif
  84. #endif /* __CYGWIN__ */
  85. #ifndef __TCHAR_DEFINED
  86. #define __TCHAR_DEFINED
  87. typedef wchar_t _TCHAR;
  88. typedef wchar_t _TSCHAR;
  89. typedef wchar_t _TUCHAR;
  90. typedef wchar_t _TXCHAR;
  91. typedef wint_t _TINT;
  92. #endif
  93. #ifndef NO_OLDNAMES
  94. #ifndef _TCHAR_DEFINED
  95. #define _TCHAR_DEFINED
  96. typedef wchar_t TCHAR,*PTCHAR;
  97. typedef wchar_t TBYTE,*PTBYTE;
  98. #endif
  99. #endif
  100. #define _TEOF WEOF
  101. #define __T(x) L##x
  102. #ifndef __CYGWIN__
  103. #define _tmain wmain
  104. #define _tWinMain wWinMain
  105. #define _tenviron _wenviron
  106. #define __targv __wargv
  107. #define _tprintf wprintf
  108. #define _tprintf_l _wprintf_l
  109. #define _tprintf_p _wprintf_p
  110. #define _tprintf_p_l _wprintf_p_l
  111. #define _tcprintf _cwprintf
  112. #define _tcprintf_l _cwprintf_l
  113. #define _tcprintf_p _cwprintf_p
  114. #define _tcprintf_p_l _cwprintf_p_l
  115. #define _vtcprintf _vcwprintf
  116. #define _vtcprintf_l _vcwprintf_l
  117. #define _vtcprintf_p _vcwprintf_p
  118. #define _vtcprintf_p_l _vcwprintf_p_l
  119. #define _ftprintf fwprintf
  120. #define _ftprintf_l _fwprintf_l
  121. #define _ftprintf_p _fwprintf_p
  122. #define _ftprintf_p_l _fwprintf_p_l
  123. #define _stprintf swprintf
  124. #define _stprintf_l __swprintf_l
  125. #define _stprintf_p _swprintf_p
  126. #define _stprintf_p_l _swprintf_p_l
  127. #define _sctprintf _scwprintf
  128. #define _sctprintf_l _scwprintf_l
  129. #define _sctprintf_p _scwprintf_p
  130. #define _sctprintf_p_l _scwprintf_p_l
  131. #define _sntprintf _snwprintf
  132. #define _sntprintf_l _snwprintf_l
  133. #define _vtprintf vwprintf
  134. #define _vtprintf_l _vwprintf_l
  135. #define _vtprintf_p _vwprintf_p
  136. #define _vtprintf_p_l _vwprintf_p_l
  137. #define _vftprintf vfwprintf
  138. #define _vftprintf_l _vfwprintf_l
  139. #define _vftprintf_p _vfwprintf_p
  140. #define _vftprintf_p_l _vfwprintf_p_l
  141. #define _vstprintf vswprintf
  142. #define _vstprintf_l _vswprintf_l
  143. #define _vstprintf_p _vswprintf_p
  144. #define _vstprintf_p_l _vswprintf_p_l
  145. #define _vsctprintf _vscwprintf
  146. #define _vsctprintf_l _vscwprintf_l
  147. #define _vsctprintf_p _vscwprintf_p
  148. #define _vsctprintf_p_l _vscwprintf_p_l
  149. #define _vsntprintf _vsnwprintf
  150. #define _vsntprintf_l _vsnwprintf_l
  151. #define _tscanf wscanf
  152. #define _tscanf_l _wscanf_l
  153. #define _tcscanf _cwscanf
  154. #define _tcscanf_l _cwscanf_l
  155. #define _ftscanf fwscanf
  156. #define _ftscanf_l _fwscanf_l
  157. #define _stscanf swscanf
  158. #define _stscanf_l _swscanf_l
  159. #define _sntscanf _snwscanf
  160. #define _sntscanf_l _snwscanf_l
  161. #define _fgettc fgetwc
  162. #define _fgettchar _fgetwchar
  163. #define _fgetts fgetws
  164. #define _fputtc fputwc
  165. #define _fputtchar _fputwchar
  166. #define _fputts fputws
  167. #define _cputts _cputws
  168. #define _cgetts _cgetws
  169. #define _gettc getwc
  170. #define _gettch _getwch
  171. #define _gettche _getwche
  172. #define _gettchar getwchar
  173. #define _getts _getws
  174. #define _puttc putwc
  175. #define _puttchar putwchar
  176. #define _puttch _putwch
  177. #define _putts _putws
  178. #define _ungettc ungetwc
  179. #define _ungettch _ungetwch
  180. #define _tcstod wcstod
  181. #define _tcstol wcstol
  182. #define _tcstoul wcstoul
  183. #define _tcstoi64 _wcstoi64
  184. #define _tcstoui64 _wcstoui64
  185. #define _tstof _wtof
  186. #define _tstol _wtol
  187. #define _tstoi _wtoi
  188. #define _tstoi64 _wtoi64
  189. #define _tcstod_l _wcstod_l
  190. #define _tcstol_l _wcstol_l
  191. #define _tcstoul_l _wcstoul_l
  192. #define _tcstoi64_l _wcstoi64_l
  193. #define _tcstoui64_l _wcstoui64_l
  194. #define _tstof_l _wtof_l
  195. #define _tstol_l _wtol_l
  196. #define _tstoi_l _wtoi_l
  197. #define _tstoi64_l _wtoi64_l
  198. #define _itot _itow
  199. #define _ltot _ltow
  200. #define _ultot _ultow
  201. #define _ttoi _wtoi
  202. #define _ttol _wtol
  203. #define _ttoi64 _wtoi64
  204. #define _i64tot _i64tow
  205. #define _ui64tot _ui64tow
  206. #define _tcscat wcscat
  207. #define _tcschr wcschr
  208. #define _tcscpy wcscpy
  209. #define _tcscspn wcscspn
  210. #define _tcslen wcslen
  211. #define _tcsnlen wcsnlen
  212. #define _tcsncat wcsncat
  213. #define _tcsncat_l _wcsncat_l
  214. #define _tcsncpy wcsncpy
  215. #define _tcsncpy_l _wcsncpy_l
  216. #define _tcspbrk wcspbrk
  217. #define _tcsrchr wcsrchr
  218. #define _tcsspn wcsspn
  219. #define _tcsstr wcsstr
  220. #define _tcstok wcstok
  221. #define _tcstok_l _wcstok_l
  222. #define _tcserror _wcserror
  223. #define __tcserror __wcserror
  224. #define _tcsdup _wcsdup
  225. #define _tcsnset _wcsnset
  226. #define _tcsnset_l _wcsnset_l
  227. #define _tcsrev _wcsrev
  228. #define _tcsset _wcsset
  229. #define _tcsset_l _wcsset_l
  230. #define _tcscmp wcscmp
  231. #define _tcsicmp _wcsicmp
  232. #define _tcsicmp_l _wcsicmp_l
  233. #define _tcsnccmp wcsncmp
  234. #define _tcsncmp wcsncmp
  235. #define _tcsncicmp _wcsnicmp
  236. #define _tcsncicmp_l _wcsnicmp_l
  237. #define _tcsnicmp _wcsnicmp
  238. #define _tcsnicmp_l _wcsnicmp_l
  239. #define _tcscoll wcscoll
  240. #define _tcscoll_l _wcscoll_l
  241. #define _tcsicoll _wcsicoll
  242. #define _tcsicoll_l _wcsicoll_l
  243. #define _tcsnccoll _wcsncoll
  244. #define _tcsnccoll_l _wcsncoll_l
  245. #define _tcsncoll _wcsncoll
  246. #define _tcsncoll_l _wcsncoll_l
  247. #define _tcsncicoll _wcsnicoll
  248. #define _tcsncicoll_l _wcsnicoll_l
  249. #define _tcsnicoll _wcsnicoll
  250. #define _tcsnicoll_l _wcsnicoll_l
  251. #define _texecl _wexecl
  252. #define _texecle _wexecle
  253. #define _texeclp _wexeclp
  254. #define _texeclpe _wexeclpe
  255. #define _texecv _wexecv
  256. #define _texecve _wexecve
  257. #define _texecvp _wexecvp
  258. #define _texecvpe _wexecvpe
  259. #define _tspawnl _wspawnl
  260. #define _tspawnle _wspawnle
  261. #define _tspawnlp _wspawnlp
  262. #define _tspawnlpe _wspawnlpe
  263. #define _tspawnv _wspawnv
  264. #define _tspawnve _wspawnve
  265. #define _tspawnvp _wspawnvp
  266. #define _tspawnvp _wspawnvp
  267. #define _tspawnvpe _wspawnvpe
  268. #define _tsystem _wsystem
  269. #define _tasctime _wasctime
  270. #define _tctime _wctime
  271. #define _tctime32 _wctime32
  272. #define _tctime64 _wctime64
  273. #define _tstrdate _wstrdate
  274. #define _tstrtime _wstrtime
  275. #define _tutime _wutime
  276. #define _tutime32 _wutime
  277. #define _tutime64 _wutime64
  278. #define _tcsftime wcsftime
  279. #define _tcsftime_l _wcsftime_l
  280. #define _tchdir _wchdir
  281. #define _tgetcwd _wgetcwd
  282. #define _tgetdcwd _wgetdcwd
  283. #define _tmkdir _wmkdir
  284. #define _trmdir _wrmdir
  285. #define _tfullpath _wfullpath
  286. #define _tgetenv _wgetenv
  287. #define _tmakepath _wmakepath
  288. #define _tpgmptr _wpgmptr
  289. #define _get_tpgmptr _get_wpgmptr
  290. #define _tputenv _wputenv
  291. #define _tsearchenv _wsearchenv
  292. #define _tsplitpath _wsplitpath
  293. #define _tfdopen _wfdopen
  294. #define _tfsopen _wfsopen
  295. #define _tfopen _wfopen
  296. #define _tfreopen _wfreopen
  297. #define _tperror _wperror
  298. #define _tpopen _wpopen
  299. #define _ttempnam _wtempnam
  300. #define _ttmpnam _wtmpnam
  301. #define _taccess _waccess
  302. #define _tchmod _wchmod
  303. #define _tcreat _wcreat
  304. #define _tfindfirst _wfindfirst
  305. #define _tfindfirst32 _wfindfirst32
  306. #define _tfindfirst64 _wfindfirst64
  307. #define _tfindfirsti64 _wfindfirsti64
  308. #define _tfindfirst32i64 _wfindfirst32i64
  309. #define _tfindfirst64i32 _wfindfirst64i32
  310. #define _tfindnext _wfindnext
  311. #define _tfindnext32 _wfindnext32
  312. #define _tfindnext64 _wfindnext64
  313. #define _tfindnexti64 _wfindnexti64
  314. #define _tfindnext32i64 _wfindnext32i64
  315. #define _tfindnext64i32 _wfindnext64i32
  316. #define _tmktemp _wmktemp
  317. #define _topen _wopen
  318. #define _tremove _wremove
  319. #define _trename _wrename
  320. #define _tsopen _wsopen
  321. #define _tunlink _wunlink
  322. #define _tfinddata_t _wfinddata_t
  323. #define _tfinddata32_t _wfinddata32_t
  324. #define _tfinddata64_t _wfinddata64_t
  325. #define _tfinddatai64_t _wfinddatai64_t
  326. #define _tfinddata32i64_t _wfinddata32i64_t
  327. #define _tfinddata64i32_t _wfinddata64i32_t
  328. #define _tstat _wstat
  329. #define _tstat32 _wstat32
  330. #define _tstat32i64 _wstat32i64
  331. #define _tstat64 _wstat64
  332. #define _tstat64i32 _wstat64i32
  333. #define _tstati64 _wstati64
  334. #define _tsetlocale _wsetlocale
  335. #define _tcsclen wcslen
  336. #define _tcscnlen wcsnlen
  337. #define _tcsclen_l(_String,_Locale) wcslen(_String)
  338. #define _tcscnlen_l(_String,_Max_count,_Locale) wcsnlen_l((_String),(_Max_count))
  339. #define _tcsnccat wcsncat
  340. #define _tcsnccat_l _wcsncat_l
  341. #define _tcsnccpy wcsncpy
  342. #define _tcsnccpy_l _wcsncpy_l
  343. #define _tcsncset _wcsnset
  344. #define _tcsdec _wcsdec
  345. #define _tcsinc _wcsinc
  346. #define _tcsnbcnt _wcsncnt
  347. #define _tcsnccnt _wcsncnt
  348. #define _tcsnextc _wcsnextc
  349. #define _tcsninc _wcsninc
  350. #define _tcsspnp _wcsspnp
  351. #define _tcslwr _wcslwr
  352. #define _tcslwr_l _wcslwr_l
  353. #define _tcsupr _wcsupr
  354. #define _tcsupr_l _wcsupr_l
  355. #define _tcsxfrm wcsxfrm
  356. #define _tcsxfrm_l _wcsxfrm_l
  357. #define _tclen(_pc) (1)
  358. #define _tccpy(_pc1,_cpc2) ((*(_pc1) = *(_cpc2)))
  359. #define _tccmp(_cpc1,_cpc2) ((*(_cpc1))-(*(_cpc2)))
  360. #define _istalnum iswalnum
  361. #define _istalnum_l _iswalnum_l
  362. #define _istalpha iswalpha
  363. #define _istalpha_l _iswalpha_l
  364. #define _istascii iswascii
  365. #define _istcntrl iswcntrl
  366. #define _istcntrl_l _iswcntrl_l
  367. #define _istdigit iswdigit
  368. #define _istdigit_l _iswdigit_l
  369. #define _istgraph iswgraph
  370. #define _istgraph_l _iswgraph_l
  371. #define _istlower iswlower
  372. #define _istlower_l _iswlower_l
  373. #define _istprint iswprint
  374. #define _istprint_l _iswprint_l
  375. #define _istpunct iswpunct
  376. #define _istpunct_l _iswpunct_l
  377. #define _istspace iswspace
  378. #define _istspace_l _iswspace_l
  379. #define _istupper iswupper
  380. #define _istupper_l _iswupper_l
  381. #define _istxdigit iswxdigit
  382. #define _istxdigit_l _iswxdigit_l
  383. #define _totupper towupper
  384. #define _totupper_l _towupper_l
  385. #define _totlower towlower
  386. #define _totlower_l _towlower_l
  387. #define _istlegal(_Char) (1)
  388. #define _istlead(_Char) (0)
  389. #define _istleadbyte(_Char) (0)
  390. #define _istleadbyte_l(_Char,_Locale) (0)
  391. #define _wcsdec(_cpc1,_cpc2) ((_cpc1)>=(_cpc2) ? NULL : (_cpc2)-1)
  392. #define _wcsinc(_pc) ((_pc)+1)
  393. #define _wcsnextc(_cpc) ((unsigned int) *(_cpc))
  394. #define _wcsninc(_pc,_sz) (((_pc)+(_sz)))
  395. _CRTIMP size_t __cdecl __wcsncnt(const wchar_t *_Str,size_t _MaxCount);
  396. #define _wcsncnt(_cpc,_sz) (__wcsncnt(_cpc,_sz))
  397. #define _wcsspnp(_cpc1,_cpc2) (!_cpc1 ? NULL : ((*((_cpc1)+wcsspn(_cpc1,_cpc2))) ? ((_cpc1)+wcsspn(_cpc1,_cpc2)) : NULL))
  398. #define _wcsncpy_l(_Destination,_Source,_Count,_Locale) (wcsncpy(_Destination,_Source,_Count))
  399. #define _wcsncat_l(_Destination,_Source,_Count,_Locale) (wcsncat(_Destination,_Source,_Count))
  400. #define _wcstok_l(_String,_Delimiters,_Locale) (wcstok(_String,_Delimiters))
  401. #define _wcsnset_l(_Destination,_Value,_Count,_Locale) (_wcsnset(_Destination,_Value,_Count))
  402. #define _wcsset_l(_Destination,_Value,_Locale) (_wcsset(_Destination,_Value))
  403. /* dirent structures and functions */
  404. #define _tdirent _wdirent
  405. #define _TDIR _WDIR
  406. #define _topendir _wopendir
  407. #define _tclosedir _wclosedir
  408. #define _treaddir _wreaddir
  409. #define _trewinddir _wrewinddir
  410. #define _ttelldir _wtelldir
  411. #define _tseekdir _wseekdir
  412. #endif /* __CYGWIN__ */
  413. #else
  414. #ifdef __cplusplus
  415. }
  416. #endif
  417. #include <string.h>
  418. #ifdef __cplusplus
  419. extern "C" {
  420. #endif
  421. #define _TEOF EOF
  422. #define __T(x) x
  423. #ifndef __CYGWIN__
  424. #define _tmain main
  425. #define _tWinMain WinMain
  426. #ifdef _POSIX_
  427. #define _tenviron environ
  428. #else
  429. #define _tenviron _environ
  430. #endif
  431. #define __targv __argv
  432. #define _tprintf printf
  433. #define _tprintf_l _printf_l
  434. #define _tprintf_p _printf_p
  435. #define _tprintf_p_l _printf_p_l
  436. #define _tcprintf _cprintf
  437. #define _tcprintf_l _cprintf_l
  438. #define _tcprintf_p _cprintf_p
  439. #define _tcprintf_p_l _cprintf_p_l
  440. #define _vtcprintf _vcprintf
  441. #define _vtcprintf_l _vcprintf_l
  442. #define _vtcprintf_p _vcprintf_p
  443. #define _vtcprintf_p_l _vcprintf_p_l
  444. #define _ftprintf fprintf
  445. #define _ftprintf_l _fprintf_l
  446. #define _ftprintf_p _fprintf_p
  447. #define _ftprintf_p_l _fprintf_p_l
  448. #define _stprintf sprintf
  449. #define _stprintf_l _sprintf_l
  450. #define _stprintf_p _sprintf_p
  451. #define _stprintf_p_l _sprintf_p_l
  452. #define _sctprintf _scprintf
  453. #define _sctprintf_l _scprintf_l
  454. #define _sctprintf_p _scprintf_p
  455. #define _sctprintf_p_l _scprintf_p_l
  456. #define _sntprintf _snprintf
  457. #define _sntprintf_l _snprintf_l
  458. #define _vtprintf vprintf
  459. #define _vtprintf_l _vprintf_l
  460. #define _vtprintf_p _vprintf_p
  461. #define _vtprintf_p_l _vprintf_p_l
  462. #define _vftprintf vfprintf
  463. #define _vftprintf_l _vfprintf_l
  464. #define _vftprintf_p _vfprintf_p
  465. #define _vftprintf_p_l _vfprintf_p_l
  466. #define _vstprintf vsprintf
  467. #define _vstprintf_l _vsprintf_l
  468. #define _vstprintf_p _vsprintf_p
  469. #define _vstprintf_p_l _vsprintf_p_l
  470. #define _vsctprintf _vscprintf
  471. #define _vsctprintf_l _vscprintf_l
  472. #define _vsctprintf_p _vscprintf_p
  473. #define _vsctprintf_p_l _vscprintf_p_l
  474. #define _vsntprintf _vsnprintf
  475. #define _vsntprintf_l _vsnprintf_l
  476. #define _tscanf scanf
  477. #define _tscanf_l _scanf_l
  478. #define _tcscanf _cscanf
  479. #define _tcscanf_l _cscanf_l
  480. #define _ftscanf fscanf
  481. #define _ftscanf_l _fscanf_l
  482. #define _stscanf sscanf
  483. #define _stscanf_l _sscanf_l
  484. #define _sntscanf _snscanf
  485. #define _sntscanf_l _snscanf_l
  486. #define _fgettc fgetc
  487. #define _fgettchar _fgetchar
  488. #define _fgetts fgets
  489. #define _fputtc fputc
  490. #define _fputtchar _fputchar
  491. #define _fputts fputs
  492. #define _cputts _cputs
  493. #define _gettc getc
  494. #define _gettch _getch
  495. #define _gettche _getche
  496. #define _gettchar getchar
  497. #define _getts gets
  498. #define _cgetts _cgets
  499. #define _puttc putc
  500. #define _puttchar putchar
  501. #define _puttch _putch
  502. #define _putts puts
  503. #define _ungettc ungetc
  504. #define _ungettch _ungetch
  505. #define _tcstod strtod
  506. #define _tcstol strtol
  507. #define _tcstoul strtoul
  508. #define _tstof atof
  509. #define _tstol atol
  510. #define _tstoi atoi
  511. #define _tstoi64 _atoi64
  512. #define _tcstod_l _strtod_l
  513. #define _tcstol_l _strtol_l
  514. #define _tcstoul_l _strtoul_l
  515. #define _tstof_l _atof_l
  516. #define _tstol_l _atol_l
  517. #define _tstoi_l _atoi_l
  518. #define _tstoi64_l _atoi64_l
  519. #define _itot _itoa
  520. #define _ltot _ltoa
  521. #define _ultot _ultoa
  522. #define _ttoi atoi
  523. #define _ttol atol
  524. #define _ttoi64 _atoi64
  525. #define _tcstoi64 _strtoi64
  526. #define _tcstoi64_l _strtoi64_l
  527. #define _tcstoui64 _strtoui64
  528. #define _tcstoui64_l _strtoui64_l
  529. #define _i64tot _i64toa
  530. #define _ui64tot _ui64toa
  531. #define _tcscat strcat
  532. #define _tcscpy strcpy
  533. #define _tcsdup _strdup
  534. #define _tcslen strlen
  535. #define _tcsnlen strnlen
  536. #define _tcsxfrm strxfrm
  537. #define _tcsxfrm_l _strxfrm_l
  538. #define _tcserror strerror
  539. #define __tcserror _strerror
  540. #define _texecl _execl
  541. #define _texecle _execle
  542. #define _texeclp _execlp
  543. #define _texeclpe _execlpe
  544. #define _texecv _execv
  545. #define _texecve _execve
  546. #define _texecvp _execvp
  547. #define _texecvpe _execvpe
  548. #define _tspawnl _spawnl
  549. #define _tspawnle _spawnle
  550. #define _tspawnlp _spawnlp
  551. #define _tspawnlpe _spawnlpe
  552. #define _tspawnv _spawnv
  553. #define _tspawnve _spawnve
  554. #define _tspawnvp _spawnvp
  555. #define _tspawnvpe _spawnvpe
  556. #define _tsystem system
  557. #define _tasctime asctime
  558. #define _tctime ctime
  559. #define _tctime32 _ctime32
  560. #define _tctime64 _ctime64
  561. #define _tstrdate _strdate
  562. #define _tstrtime _strtime
  563. #define _tutime _utime
  564. #define _tutime32 _utime32
  565. #define _tutime64 _utime64
  566. #define _tcsftime strftime
  567. #define _tcsftime_l _strftime_l
  568. #define _tchdir _chdir
  569. #define _tgetcwd _getcwd
  570. #define _tgetdcwd _getdcwd
  571. #define _tmkdir _mkdir
  572. #define _trmdir _rmdir
  573. #define _tfullpath _fullpath
  574. #define _tgetenv getenv
  575. #define _tmakepath _makepath
  576. #define _tpgmptr _pgmptr
  577. #define _get_tpgmptr _get_pgmptr
  578. #define _tputenv _putenv
  579. #define _tsearchenv _searchenv
  580. #define _tsplitpath _splitpath
  581. #ifdef _POSIX_
  582. #define _tfdopen fdopen
  583. #else
  584. #define _tfdopen _fdopen
  585. #endif
  586. #define _tfsopen _fsopen
  587. #define _tfopen fopen
  588. #define _tfreopen freopen
  589. #define _tperror perror
  590. #define _tpopen _popen
  591. #define _ttempnam _tempnam
  592. #define _ttmpnam tmpnam
  593. #define _tchmod _chmod
  594. #define _tcreat _creat
  595. #define _tfindfirst _findfirst
  596. #define _tfindfirst32 _findfirst32
  597. #define _tfindfirst64 _findfirst64
  598. #define _tfindfirsti64 _findfirsti64
  599. #define _tfindfirst32i64 _findfirst32i64
  600. #define _tfindfirst64i32 _findfirst64i32
  601. #define _tfindnext _findnext
  602. #define _tfindnext32 _findnext32
  603. #define _tfindnext64 _findnext64
  604. #define _tfindnexti64 _findnexti64
  605. #define _tfindnext32i64 _findnext32i64
  606. #define _tfindnext64i32 _findnext64i32
  607. #define _tmktemp _mktemp
  608. #ifdef _POSIX_
  609. #define _topen open
  610. #define _taccess access
  611. #else
  612. #define _topen _open
  613. #define _taccess _access
  614. #endif
  615. #define _tremove remove
  616. #define _trename rename
  617. #define _tsopen _sopen
  618. #define _tunlink _unlink
  619. #define _tfinddata_t _finddata_t
  620. #define _tfinddata32_t _finddata32_t
  621. #define _tfinddata64_t __finddata64_t
  622. #define _tfinddatai64_t _finddatai64_t
  623. #define _tfinddata32i64_t _finddata32i64_t
  624. #define _tfinddata64i32_t _finddata64i32_t
  625. #define _istascii __isascii
  626. #define _istcntrl iscntrl
  627. #define _istcntrl_l _iscntrl_l
  628. #define _istxdigit isxdigit
  629. #define _istxdigit_l _isxdigit_l
  630. #define _tstat _stat
  631. #define _tstat32 _stat32
  632. #define _tstat32i64 _stat32i64
  633. #define _tstat64 _stat64
  634. #define _tstat64i32 _stat64i32
  635. #define _tstati64 _stati64
  636. #define _tsetlocale setlocale
  637. #if __MSVCRT_VERSION__ >= 0x800
  638. #define _fgettc_nolock _fgetwc_nolock
  639. #define _fputtc_nolock _fputwc_nolock
  640. #define _gettc_nolock _getwc_nolock
  641. #define _gettch_nolock _getwch_nolock
  642. #define _gettche_nolock _getwche_nolock
  643. #define _gettchar_nolock _getwchar_nolock
  644. #define _puttc_nolock _putwc_nolock
  645. #define _puttchar_nolock _putwchar_nolock
  646. #define _puttch_nolock _putwch_nolock
  647. #define _ungettc_nolock _ungetwc_nolock
  648. #define _ungettch_nolock _ungetwch_nolock
  649. #define _tgetdcwd_nolock _wgetdcwd_nolock
  650. #define _fgettc_nolock _fgetc_nolock
  651. #define _fputtc_nolock _fputc_nolock
  652. #define _gettc_nolock _getc_nolock
  653. #define _gettch_nolock _getch_nolock
  654. #define _gettche_nolock _getche_nolock
  655. #define _gettchar_nolock _getchar_nolock
  656. #define _puttc_nolock _putc_nolock
  657. #define _puttchar_nolock _putchar_nolock
  658. #define _puttch_nolock _putch_nolock
  659. #define _ungettc_nolock _ungetc_nolock
  660. #define _ungettch_nolock _ungetch_nolock
  661. #define _tgetdcwd_nolock _getdcwd_nolock
  662. #endif
  663. #endif /* __CYGWIN__ */
  664. #ifdef _MBCS
  665. #ifdef __cplusplus
  666. }
  667. #endif
  668. #ifndef __CYGWIN__
  669. #include <mbstring.h>
  670. #ifdef __cplusplus
  671. extern "C" {
  672. #endif
  673. #ifndef __TCHAR_DEFINED
  674. typedef char _TCHAR;
  675. typedef signed char _TSCHAR;
  676. typedef unsigned char _TUCHAR;
  677. typedef unsigned char _TXCHAR;
  678. typedef unsigned int _TINT;
  679. #define __TCHAR_DEFINED
  680. #endif
  681. #ifndef NO_OLDNAMES
  682. #ifndef _TCHAR_DEFINED
  683. #define _TCHAR_DEFINED
  684. typedef char TCHAR,*PTCHAR;
  685. typedef unsigned char TBYTE,*PTBYTE;
  686. #endif
  687. #endif
  688. #ifdef _MB_MAP_DIRECT
  689. #define _tcschr _mbschr
  690. #define _tcscspn _mbscspn
  691. #define _tcsncat _mbsnbcat
  692. #define _tcsncat_l _mbsnbcat_l
  693. #define _tcsncpy _mbsnbcpy
  694. #define _tcsncpy_l _mbsnbcpy_l
  695. #define _tcspbrk _mbspbrk
  696. #define _tcsrchr _mbsrchr
  697. #define _tcsspn _mbsspn
  698. #define _tcsstr _mbsstr
  699. #define _tcstok _mbstok
  700. #define _tcstok_l _mbstok_l
  701. #define _tcsnset _mbsnbset
  702. #define _tcsnset_l _mbsnbset_l
  703. #define _tcsrev _mbsrev
  704. #define _tcsset _mbsset
  705. #define _tcsset_l _mbsset_l
  706. #define _tcscmp _mbscmp
  707. #define _tcsicmp _mbsicmp
  708. #define _tcsicmp_l _mbsicmp_l
  709. #define _tcsnccmp _mbsncmp
  710. #define _tcsncmp _mbsnbcmp
  711. #define _tcsncicmp _mbsnicmp
  712. #define _tcsncicmp_l _mbsnicmp_l
  713. #define _tcsnicmp _mbsnbicmp
  714. #define _tcsnicmp_l _mbsnbicmp_l
  715. #define _tcscoll _mbscoll
  716. #define _tcscoll_l _mbscoll_l
  717. #define _tcsicoll _mbsicoll
  718. #define _tcsicoll_l _mbsicoll_l
  719. #define _tcsnccoll _mbsncoll
  720. #define _tcsnccoll_l _mbsncoll_l
  721. #define _tcsncoll _mbsnbcoll
  722. #define _tcsncoll_l _mbsnbcoll_l
  723. #define _tcsncicoll _mbsnicoll
  724. #define _tcsncicoll_l _mbsnicoll_l
  725. #define _tcsnicoll _mbsnbicoll
  726. #define _tcsnicoll_l _mbsnbicoll_l
  727. #define _tcsclen _mbslen
  728. #define _tcscnlen _mbsnlen
  729. #define _tcsclen_l _mbslen_l
  730. #define _tcscnlen_l _mbsnlen_l
  731. #define _tcsnccat _mbsncat
  732. #define _tcsnccat_l _mbsncat_l
  733. #define _tcsnccpy _mbsncpy
  734. #define _tcsnccpy_l _mbsncpy_l
  735. #define _tcsncset _mbsnset
  736. #define _tcsncset_l _mbsnset_l
  737. #define _tcsdec _mbsdec
  738. #define _tcsinc _mbsinc
  739. #define _tcsnbcnt _mbsnbcnt
  740. #define _tcsnccnt _mbsnccnt
  741. #define _tcsnextc _mbsnextc
  742. #define _tcsninc _mbsninc
  743. #define _tcsspnp _mbsspnp
  744. #define _tcslwr _mbslwr
  745. #define _tcslwr_l _mbslwr_l
  746. #define _tcsupr _mbsupr
  747. #define _tcsupr_l _mbsupr_l
  748. #define _tclen _mbclen
  749. #define _tccpy _mbccpy
  750. #define _tccpy_l _mbccpy_l
  751. #else
  752. _CRTIMP _CONST_RETURN char *__cdecl _tcschr(const char *_Str,unsigned int _Val);
  753. _CRTIMP size_t __cdecl _tcscspn(const char *_Str,const char *_Control);
  754. _CRTIMP char *__cdecl _tcsncat(char *_Dst,const char *_Src,size_t _MaxCount);
  755. _CRTIMP char *__cdecl _tcsncat_l(char *_Dst,const char *_Src,size_t _MaxCount,_locale_t _Locale);
  756. _CRTIMP char *__cdecl _tcsncpy(char *_Dst,const char *_Src,size_t _MaxCount);
  757. _CRTIMP char *__cdecl _tcsncpy_l(char *_Dst,const char *_Src,size_t _MaxCount,_locale_t _Locale);
  758. _CRTIMP _CONST_RETURN char *__cdecl _tcspbrk(const char *_Str,const char *_Control);
  759. _CRTIMP _CONST_RETURN char *__cdecl _tcsrchr(const char *_Str,unsigned int _Ch);
  760. _CRTIMP size_t __cdecl _tcsspn(const char *_Str,const char *_Control);
  761. _CRTIMP _CONST_RETURN char *__cdecl _tcsstr(const char *_Str,const char *_Substr);
  762. _CRTIMP char *__cdecl _tcstok(char *_Str,const char *_Delim);
  763. _CRTIMP char *__cdecl _tcstok_l(char *_Str,const char *_Delim,_locale_t _Locale);
  764. _CRTIMP char *__cdecl _tcsnset(char *_Str,unsigned int _Val,size_t _MaxCount);
  765. _CRTIMP char *__cdecl _tcsrev(char *_Str);
  766. _CRTIMP char *__cdecl _tcsset(char *_Str,unsigned int _Val);
  767. _CRTIMP char *__cdecl _tcsset_l(char *_Str,unsigned int _Val,_locale_t _Locale);
  768. _CRTIMP int __cdecl _tcscmp(const char *_Str1,const char *_Str);
  769. _CRTIMP int __cdecl _tcsicmp(const char *_Str1,const char *_Str2);
  770. _CRTIMP int __cdecl _tcsicmp_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
  771. _CRTIMP int __cdecl _tcsnccmp(const char *_Str1,const char *_Str2,size_t _MaxCount);
  772. _CRTIMP int __cdecl _tcsncmp(const char *_Str1,const char *_Str2,size_t _MaxCount);
  773. _CRTIMP int __cdecl _tcsncicmp(const char *_Str1,const char *_Str2,size_t _MaxCount);
  774. _CRTIMP int __cdecl _tcsncicmp_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
  775. _CRTIMP int __cdecl _tcsnicmp(const char *_Str1,const char *_Str2,size_t _MaxCount);
  776. _CRTIMP int __cdecl _tcsnicmp_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
  777. _CRTIMP int __cdecl _tcscoll(const char *_Str1,const char *_Str2);
  778. _CRTIMP int __cdecl _tcscoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
  779. _CRTIMP int __cdecl _tcsicoll(const char *_Str1,const char *_Str2);
  780. _CRTIMP int __cdecl _tcsicoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
  781. _CRTIMP int __cdecl _tcsnccoll(const char *_Str1,const char *_Str2,size_t _MaxCount);
  782. _CRTIMP int __cdecl _tcsnccoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
  783. _CRTIMP int __cdecl _tcsncoll(const char *_Str1,const char *_Str2,size_t _MaxCount);
  784. _CRTIMP int __cdecl _tcsncoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
  785. _CRTIMP int __cdecl _tcsncicoll(const char *_Str1,const char *_Str2,size_t _MaxCount);
  786. _CRTIMP int __cdecl _tcsncicoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
  787. _CRTIMP int __cdecl _tcsnicoll(const char *_Str1,const char *_Str2,size_t _MaxCount);
  788. _CRTIMP int __cdecl _tcsnicoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
  789. _CRTIMP size_t __cdecl _tcsclen(const char *_Str);
  790. _CRTIMP size_t __cdecl _tcscnlen(const char *_Str,size_t _MaxCount);
  791. _CRTIMP size_t __cdecl _tcsclen_l(const char *_Str,_locale_t _Locale);
  792. _CRTIMP size_t __cdecl _tcscnlen_l(const char *_Str,size_t _MaxCount,_locale_t _Locale);
  793. _CRTIMP char *__cdecl _tcsnccat(char *_Dst,const char *_Src,size_t _MaxCount);
  794. _CRTIMP char *__cdecl _tcsnccat_l(char *_Dst,const char *_Src,size_t _MaxCount,_locale_t _Locale);
  795. _CRTIMP char *__cdecl _tcsnccpy(char *_Dst,const char *_Src,size_t _MaxCount);
  796. _CRTIMP char *__cdecl _tcsnccpy_l(char *_Dst,const char *_Src,size_t _MaxCount,_locale_t _Locale);
  797. _CRTIMP char *__cdecl _tcsncset(char *_Str,unsigned int _Val,size_t _MaxCount);
  798. _CRTIMP char *__cdecl _tcsdec(const char *_Start,const char *_Pos);
  799. _CRTIMP char *__cdecl _tcsinc(const char *_Ptr);
  800. _CRTIMP size_t __cdecl _tcsnbcnt(const char *_Str,size_t _MaxCount);
  801. _CRTIMP size_t __cdecl _tcsnccnt(const char *_Str,size_t _MaxCount);
  802. _CRTIMP unsigned int __cdecl _tcsnextc (const char *_Str);
  803. _CRTIMP char *__cdecl _tcsninc(const char *_Ptr,size_t _Count);
  804. _CRTIMP char *__cdecl _tcsspnp(const char *_Str1,const char *_Str2);
  805. _CRTIMP char *__cdecl _tcslwr(char *_Str);
  806. _CRTIMP char *__cdecl _tcslwr_l(char *_Str,_locale_t _Locale);
  807. _CRTIMP char *__cdecl _tcsupr(char *_Str);
  808. _CRTIMP char *__cdecl _tcsupr_l(char *_Str,_locale_t _Locale);
  809. _CRTIMP size_t __cdecl _tclen(const char *_Str);
  810. _CRTIMP void __cdecl _tccpy(char *_DstCh,const char *_SrcCh);
  811. #ifdef __cplusplus
  812. #ifndef _CPP_TCHAR_INLINES_DEFINED
  813. #define _CPP_TCHAR_INLINES_DEFINED
  814. extern "C++" {
  815. extern inline char *__cdecl _tcschr(char *_S,unsigned int _C) { return ((char *)_tcschr((const char *)_S,_C)); }
  816. extern inline char *__cdecl _tcspbrk(char *_S,const char *_P) { return ((char *)_tcspbrk((const char *)_S,_P)); }
  817. extern inline char *__cdecl _tcsrchr(char *_S,unsigned int _C) { return ((char *)_tcsrchr((const char *)_S,_C)); }
  818. extern inline char *__cdecl _tcsstr(char *_S,const char *_P) { return ((char *)_tcsstr((const char *)_S,_P)); }
  819. }
  820. #endif
  821. #endif
  822. #endif
  823. #define _tccmp(_cp1,_cp2) _tcsnccmp(_cp1,_cp2,1)
  824. #define _istalnum _ismbcalnum
  825. #define _istalnum_l _ismbcalnum_l
  826. #define _istalpha _ismbcalpha
  827. #define _istalpha_l _ismbcalpha_l
  828. #define _istdigit _ismbcdigit
  829. #define _istdigit_l _ismbcdigit_l
  830. #define _istgraph _ismbcgraph
  831. #define _istgraph_l _ismbcgraph_l
  832. #define _istlegal _ismbclegal
  833. #define _istlegal_l _ismbclegal_l
  834. #define _istlower _ismbclower
  835. #define _istlower_l _ismbclower_l
  836. #define _istprint _ismbcprint
  837. #define _istprint_l _ismbcprint_l
  838. #define _istpunct _ismbcpunct
  839. #define _istpunct_l _ismbcpunct_l
  840. #define _istspace _ismbcspace
  841. #define _istspace_l _ismbcspace_l
  842. #define _istupper _ismbcupper
  843. #define _istupper_l _ismbcupper_l
  844. #define _totupper _mbctoupper
  845. #define _totupper_l _mbctoupper_l
  846. #define _totlower _mbctolower
  847. #define _totlower_l _mbctolower_l
  848. #define _istlead _ismbblead
  849. #define _istleadbyte isleadbyte
  850. #define _istleadbyte_l _isleadbyte_l
  851. #endif /* __CYGWIN__ */
  852. #else
  853. #ifndef __TCHAR_DEFINED
  854. #define __TCHAR_DEFINED
  855. typedef char _TCHAR;
  856. typedef signed char _TSCHAR;
  857. typedef unsigned char _TUCHAR;
  858. typedef char _TXCHAR;
  859. typedef int _TINT;
  860. #endif
  861. #ifndef NO_OLDNAMES
  862. #ifndef _TCHAR_DEFINED
  863. #define _TCHAR_DEFINED
  864. typedef char TCHAR,*PTCHAR;
  865. typedef unsigned char TBYTE,*PTBYTE;
  866. #endif
  867. #endif
  868. #ifndef __CYGWIN__
  869. #define _tcschr strchr
  870. #define _tcscspn strcspn
  871. #define _tcsncat strncat
  872. #define _tcsncat_l _strncat_l
  873. #define _tcsncpy strncpy
  874. #define _tcsncpy_l _strncpy_l
  875. #define _tcspbrk strpbrk
  876. #define _tcsrchr strrchr
  877. #define _tcsspn strspn
  878. #define _tcsstr strstr
  879. #define _tcstok strtok
  880. #define _tcstok_l _strtok_l
  881. #define _tcsnset _strnset
  882. #define _tcsnset_l _strnset_l
  883. #define _tcsrev _strrev
  884. #define _tcsset _strset
  885. #define _tcscmp strcmp
  886. #define _tcsicmp _stricmp
  887. #define _tcsicmp_l _stricmp_l
  888. #define _tcsnccmp strncmp
  889. #define _tcsncmp strncmp
  890. #define _tcsncicmp _strnicmp
  891. #define _tcsncicmp_l _strnicmp_l
  892. #define _tcsnicmp _strnicmp
  893. #define _tcsnicmp_l _strnicmp_l
  894. #define _tcscoll strcoll
  895. #define _tcscoll_l _strcoll_l
  896. #define _tcsicoll _stricoll
  897. #define _tcsicoll_l _stricoll_l
  898. #define _tcsnccoll _strncoll
  899. #define _tcsnccoll_l _strncoll_l
  900. #define _tcsncoll _strncoll
  901. #define _tcsncoll_l _strncoll_l
  902. #define _tcsncicoll _strnicoll
  903. #define _tcsncicoll_l _strnicoll_l
  904. #define _tcsnicoll _strnicoll
  905. #define _tcsnicoll_l _strnicoll_l
  906. #define _tcsclen strlen
  907. #define _tcscnlen strnlen
  908. #define _tcsclen_l(_String,_Locale) strlen(_String)
  909. #define _tcscnlen_l(_String,_Max_count,_Locale) strnlen_l((_String),(_Max_count))
  910. #define _tcsnccat strncat
  911. #define _tcsnccat_l _strncat_l
  912. #define _tcsnccpy strncpy
  913. #define _tcsnccpy_l _strncpy_l
  914. #define _tcsncset _strnset
  915. #define _tcsdec _strdec
  916. #define _tcsinc _strinc
  917. #define _tcsnbcnt _strncnt
  918. #define _tcsnccnt _strncnt
  919. #define _tcsnextc _strnextc
  920. #define _tcsninc _strninc
  921. #define _tcsspnp _strspnp
  922. #define _tcslwr _strlwr
  923. #define _tcslwr_l _strlwr_l
  924. #define _tcsupr _strupr
  925. #define _tcsupr_l _strupr_l
  926. #define _tcsxfrm strxfrm
  927. #define _tcsxfrm_l _strxfrm_l
  928. #define _istlead(_Char) (0)
  929. #define _istleadbyte(_Char) (0)
  930. #define _istleadbyte_l(_Char,_Locale) (0)
  931. #define _tclen(_pc) (1)
  932. #define _tccpy(_pc1,_cpc2) (*(_pc1) = *(_cpc2))
  933. #define _tccmp(_cpc1,_cpc2) (((unsigned char)*(_cpc1))-((unsigned char)*(_cpc2)))
  934. /* dirent structures and functions */
  935. #define _tdirent dirent
  936. #define _TDIR DIR
  937. #define _topendir opendir
  938. #define _tclosedir closedir
  939. #define _treaddir readdir
  940. #define _trewinddir rewinddir
  941. #define _ttelldir telldir
  942. #define _tseekdir seekdir
  943. #define _istalnum isalnum
  944. #define _istalnum_l _isalnum_l
  945. #define _istalpha isalpha
  946. #define _istalpha_l _isalpha_l
  947. #define _istdigit isdigit
  948. #define _istdigit_l _isdigit_l
  949. #define _istgraph isgraph
  950. #define _istgraph_l _isgraph_l
  951. #define _istlower islower
  952. #define _istlower_l _islower_l
  953. #define _istprint isprint
  954. #define _istprint_l _isprint_l
  955. #define _istpunct ispunct
  956. #define _istpunct_l _ispunct_l
  957. #define _istspace isspace
  958. #define _istspace_l _isspace_l
  959. #define _istupper isupper
  960. #define _istupper_l _isupper_l
  961. #define _totupper toupper
  962. #define _totupper_l _toupper_l
  963. #define _totlower tolower
  964. #define _totlower_l _tolower_l
  965. #define _istlegal(_c) (1)
  966. #ifndef NULL
  967. #ifdef __cplusplus
  968. #ifndef _WIN64
  969. #define NULL 0
  970. #else
  971. #define NULL 0LL
  972. #endif /* W64 */
  973. #else
  974. #define NULL ((void *)0)
  975. #endif
  976. #endif
  977. #define _strdec(_cpc1,_cpc2) ((_cpc1)>=(_cpc2) ? NULL : (_cpc2)-1)
  978. #define _strinc(_pc) ((_pc)+1)
  979. #define _strnextc(_cpc) ((unsigned int) *(const unsigned char *)(_cpc))
  980. #define _strninc(_pc,_sz) (((_pc)+(_sz)))
  981. _CRTIMP size_t __cdecl __strncnt(const char *_Str,size_t _Cnt);
  982. #define _strncnt(_cpc,_sz) (__strncnt(_cpc,_sz))
  983. #define _strspnp(_cpc1,_cpc2) (!_cpc1 ? NULL : ((*((_cpc1)+strspn(_cpc1,_cpc2))) ? ((_cpc1)+strspn(_cpc1,_cpc2)) : NULL))
  984. #define _strncpy_l(_Destination,_Source,_Count,_Locale) (strncpy(_Destination,_Source,_Count))
  985. #define _strncat_l(_Destination,_Source,_Count,_Locale) (strncat(_Destination,_Source,_Count))
  986. #define _strtok_l(_String,_Delimiters,_Locale) (strtok(_String,_Delimiters))
  987. #define _strnset_l(_Destination,_Value,_Count,_Locale) (_strnset(_Destination,_Value,_Count))
  988. #define _strset_l(_Destination,_Value,_Locale) (_strset(_Destination,_Value))
  989. #endif
  990. #endif
  991. #endif /* __CYGWIN__ */
  992. #define _T(x) __T(x)
  993. #define _TEXT(x) __T(x)
  994. #ifdef __cplusplus
  995. }
  996. #endif
  997. #ifndef __CYGWIN__
  998. #include <sec_api/tchar_s.h>
  999. #endif /* __CYGWIN__ */
  1000. #endif