xref: /reactos/sdk/include/crt/tchar.h (revision 6f6b8317)
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 #include <corecrt.h>
7 
8 #ifndef _INC_TCHAR
9 #define _INC_TCHAR
10 
11 #ifdef _STRSAFE_H_INCLUDED_
12 #error Need to include strsafe.h after tchar.h
13 #endif
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 #define _ftcscat _tcscat
20 #define _ftcschr _tcschr
21 #define _ftcscpy _tcscpy
22 #define _ftcscspn _tcscspn
23 #define _ftcslen _tcslen
24 #define _ftcsncat _tcsncat
25 #define _ftcsncpy _tcsncpy
26 #define _ftcspbrk _tcspbrk
27 #define _ftcsrchr _tcsrchr
28 #define _ftcsspn _tcsspn
29 #define _ftcsstr _tcsstr
30 #define _ftcstok _tcstok
31 
32 #define _ftcsdup _tcsdup
33 #define _ftcsnset _tcsnset
34 #define _ftcsrev _tcsrev
35 #define _ftcsset _tcsset
36 
37 #define _ftcscmp _tcscmp
38 #define _ftcsicmp _tcsicmp
39 #define _ftcsnccmp _tcsnccmp
40 #define _ftcsncmp _tcsncmp
41 #define _ftcsncicmp _tcsncicmp
42 #define _ftcsnicmp _tcsnicmp
43 
44 #define _ftcscoll _tcscoll
45 #define _ftcsicoll _tcsicoll
46 #define _ftcsnccoll _tcsnccoll
47 #define _ftcsncoll _tcsncoll
48 #define _ftcsncicoll _tcsncicoll
49 #define _ftcsnicoll _tcsnicoll
50 
51 #define _ftcsclen _tcsclen
52 #define _ftcsnccat _tcsnccat
53 #define _ftcsnccpy _tcsnccpy
54 #define _ftcsncset _tcsncset
55 
56 #define _ftcsdec _tcsdec
57 #define _ftcsinc _tcsinc
58 #define _ftcsnbcnt _tcsnbcnt
59 #define _ftcsnccnt _tcsnccnt
60 #define _ftcsnextc _tcsnextc
61 #define _ftcsninc _tcsninc
62 #define _ftcsspnp _tcsspnp
63 
64 #define _ftcslwr _tcslwr
65 #define _ftcsupr _tcsupr
66 
67 #define _ftclen _tclen
68 #define _ftccpy _tccpy
69 #define _ftccmp _tccmp
70 
71 #ifndef _CONST_RETURN
72 #ifdef __cplusplus
73 #define _CONST_RETURN const
74 #define _CRT_CONST_CORRECT_OVERLOADS
75 #else
76 #define _CONST_RETURN
77 #endif
78 #endif
79 
80 #define _WConst_return _CONST_RETURN
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 
87 #ifdef _UNICODE
88 /** UNICODE ******************************************************************/
89 
90 #include <wchar.h>
91 
92 #ifdef __cplusplus
93 extern "C" {
94 #endif
95 
96 #ifndef _WCTYPE_T_DEFINED
97 #define _WCTYPE_T_DEFINED
98   typedef unsigned short wint_t;
99   typedef unsigned short wctype_t;
100 #endif
101 
102 #ifndef __TCHAR_DEFINED
103 #define __TCHAR_DEFINED
104   typedef wchar_t _TCHAR;
105   typedef wchar_t _TSCHAR;
106   typedef wchar_t _TUCHAR;
107   typedef wchar_t _TXCHAR;
108   typedef wint_t _TINT;
109 #endif
110 
111 #ifndef NO_OLDNAMES
112 #ifndef _TCHAR_DEFINED
113 #define _TCHAR_DEFINED
114   typedef wchar_t TCHAR,*PTCHAR;
115   typedef wchar_t TBYTE,*PTBYTE;
116 #endif
117 #endif
118 
119 #define _TEOF WEOF
120 
121 #define __T(x) L##x
122 
123 #define _tmain wmain
124 #define _tWinMain wWinMain
125 #define _tenviron _wenviron
126 #define __targv __wargv
127 
128 #define _tprintf wprintf
129 #define _tprintf_l _wprintf_l
130 #define _tprintf_p _wprintf_p
131 #define _tprintf_p_l _wprintf_p_l
132 #define _tcprintf _cwprintf
133 #define _tcprintf_l _cwprintf_l
134 #define _tcprintf_p _cwprintf_p
135 #define _tcprintf_p_l _cwprintf_p_l
136 #define _vtcprintf _vcwprintf
137 #define _vtcprintf_l _vcwprintf_l
138 #define _vtcprintf_p _vcwprintf_p
139 #define _vtcprintf_p_l _vcwprintf_p_l
140 #define _ftprintf fwprintf
141 #define _ftprintf_l _fwprintf_l
142 #define _ftprintf_p _fwprintf_p
143 #define _ftprintf_p_l _fwprintf_p_l
144 #define _stprintf swprintf
145 #define _stprintf_l __swprintf_l
146 #define _stprintf_p _swprintf_p
147 #define _stprintf_p_l _swprintf_p_l
148 #define _sctprintf _scwprintf
149 #define _sctprintf_l _scwprintf_l
150 #define _sctprintf_p _scwprintf_p
151 #define _sctprintf_p_l _scwprintf_p_l
152 #define _sntprintf _snwprintf
153 #define _sntprintf_l _snwprintf_l
154 #define _vtprintf vwprintf
155 #define _vtprintf_l _vwprintf_l
156 #define _vtprintf_p _vwprintf_p
157 #define _vtprintf_p_l _vwprintf_p_l
158 #define _vftprintf vfwprintf
159 #define _vftprintf_l _vfwprintf_l
160 #define _vftprintf_p _vfwprintf_p
161 #define _vftprintf_p_l _vfwprintf_p_l
162 #define _vstprintf vswprintf
163 #define _vstprintf_l _vswprintf_l
164 #define _vstprintf_p _vswprintf_p
165 #define _vstprintf_p_l _vswprintf_p_l
166 #define _vsctprintf _vscwprintf
167 #define _vsctprintf_l _vscwprintf_l
168 #define _vsctprintf_p _vscwprintf_p
169 #define _vsctprintf_p_l _vscwprintf_p_l
170 #define _vsntprintf _vsnwprintf
171 #define _vsntprintf_l _vsnwprintf_l
172 
173 #define _tscanf wscanf
174 #define _tscanf_l _wscanf_l
175 #define _tcscanf _cwscanf
176 #define _tcscanf_l _cwscanf_l
177 #define _ftscanf fwscanf
178 #define _ftscanf_l _fwscanf_l
179 #define _stscanf swscanf
180 #define _stscanf_l _swscanf_l
181 #define _sntscanf _snwscanf
182 #define _sntscanf_l _snwscanf_l
183 
184 #define _fgettc fgetwc
185 #define _fgettc_nolock _fgetwc_nolock
186 #define _fgettchar _fgetwchar
187 #define _fgetts fgetws
188 #define _fputtc fputwc
189 #define _fputtc_nolock _fputwc_nolock
190 #define _fputtchar _fputwchar
191 #define _fputts fputws
192 #define _cputts _cputws
193 #define _cgetts _cgetws
194 #define _gettc getwc
195 #define _gettc_nolock _getwc_nolock
196 #define _gettch _getwch
197 #define _gettch_nolock _getwch_nolock
198 #define _gettche _getwche
199 #define _gettche_nolock _getwche_nolock
200 #define _gettchar getwchar
201 #define _gettchar_nolock _getwchar_nolock
202 #define _getts _getws
203 #define _puttc putwc
204 #define _puttc_nolock _putwc_nolock
205 #define _puttchar putwchar
206 #define _puttchar_nolock _putwchar_nolock
207 #define _puttch _putwch
208 #define _puttch_nolock _putwch_nolock
209 #define _putts _putws
210 #define _ungettc ungetwc
211 #define _ungettc_nolock _ungetwc_nolock
212 #define _ungettch _ungetwch
213 #define _ungettch_nolock _ungetwch_nolock
214 
215 #define _tcstod wcstod
216 #define _tcstol wcstol
217 #define _tcstoul wcstoul
218 #define _tcstoi64 _wcstoi64
219 #define _tcstoui64 _wcstoui64
220 #define _tstof _wtof
221 #define _tstol _wtol
222 #define _tstoi _wtoi
223 #define _tstoi64 _wtoi64
224 #define _tcstod_l _wcstod_l
225 #define _tcstol_l _wcstol_l
226 #define _tcstoul_l _wcstoul_l
227 #define _tcstoi64_l _wcstoi64_l
228 #define _tcstoui64_l _wcstoui64_l
229 #define _tstof_l _wtof_l
230 #define _tstol_l _wtol_l
231 #define _tstoi_l _wtoi_l
232 #define _tstoi64_l _wtoi64_l
233 
234 #define _itot _itow
235 #define _ltot _ltow
236 #define _ultot _ultow
237 #define _ttoi _wtoi
238 #define _ttol _wtol
239 
240 #define _ttoi64 _wtoi64
241 #define _i64tot _i64tow
242 #define _ui64tot _ui64tow
243 
244 #define _tcscat wcscat
245 #define _tcschr wcschr
246 #define _tcscpy wcscpy
247 #define _tcscpy_s wcscpy_s
248 #define _tcscspn wcscspn
249 #define _tcslen wcslen
250 #define _tcsnlen wcsnlen
251 #define _tcsncat wcsncat
252 #define _tcsncat_l _wcsncat_l
253 #define _tcsncpy wcsncpy
254 #define _tcsncpy_l _wcsncpy_l
255 #define _tcspbrk wcspbrk
256 #define _tcsrchr wcsrchr
257 #define _tcsspn wcsspn
258 #define _tcsstr wcsstr
259 #define _tcstok wcstok
260 #define _tcstok_l _wcstok_l
261 #define _tcserror _wcserror
262 #define __tcserror __wcserror
263 
264 #define _tcsdup _wcsdup
265 #define _tcsnset _wcsnset
266 #define _tcsnset_l _wcsnset_l
267 #define _tcsrev _wcsrev
268 #define _tcsset _wcsset
269 #define _tcsset_l _wcsset_l
270 
271 #define _tcscmp wcscmp
272 #define _tcsicmp _wcsicmp
273 #define _tcsicmp_l _wcsicmp_l
274 #define _tcsnccmp wcsncmp
275 #define _tcsncmp wcsncmp
276 #define _tcsncicmp _wcsnicmp
277 #define _tcsncicmp_l _wcsnicmp_l
278 #define _tcsnicmp _wcsnicmp
279 #define _tcsnicmp_l _wcsnicmp_l
280 
281 #define _tcscoll wcscoll
282 #define _tcscoll_l _wcscoll_l
283 #define _tcsicoll _wcsicoll
284 #define _tcsicoll_l _wcsicoll_l
285 #define _tcsnccoll _wcsncoll
286 #define _tcsnccoll_l _wcsncoll_l
287 #define _tcsncoll _wcsncoll
288 #define _tcsncoll_l _wcsncoll_l
289 #define _tcsncicoll _wcsnicoll
290 #define _tcsncicoll_l _wcsnicoll_l
291 #define _tcsnicoll _wcsnicoll
292 #define _tcsnicoll_l _wcsnicoll_l
293 
294 #define _texecl _wexecl
295 #define _texecle _wexecle
296 #define _texeclp _wexeclp
297 #define _texeclpe _wexeclpe
298 #define _texecv _wexecv
299 #define _texecve _wexecve
300 #define _texecvp _wexecvp
301 #define _texecvpe _wexecvpe
302 
303 #define _tspawnl _wspawnl
304 #define _tspawnle _wspawnle
305 #define _tspawnlp _wspawnlp
306 #define _tspawnlpe _wspawnlpe
307 #define _tspawnv _wspawnv
308 #define _tspawnve _wspawnve
309 #define _tspawnvp _wspawnvp
310 #define _tspawnvp _wspawnvp
311 #define _tspawnvpe _wspawnvpe
312 
313 #define _tsystem _wsystem
314 
315 #define _tasctime _wasctime
316 #define _tctime _wctime
317 #define _tctime32 _wctime32
318 #define _tctime64 _wctime64
319 #define _tstrdate _wstrdate
320 #define _tstrtime _wstrtime
321 #define _tutime _wutime
322 #define _tutime32 _wutime32
323 #define _tutime64 _wutime64
324 #define _tcsftime wcsftime
325 #define _tcsftime_l _wcsftime_l
326 
327 #define _tasctime_s   _wasctime_s
328 #define _tctime_s     _wctime_s
329 #define _tctime32_s   _wctime32_s
330 #define _tctime64_s   _wctime64_s
331 #define _tstrdate_s   _wstrdate_s
332 #define _tstrtime_s   _wstrtime_s
333 
334 #define _tchdir _wchdir
335 #define _tgetcwd _wgetcwd
336 #define _tgetdcwd _wgetdcwd
337 #define _tgetdcwd_nolock _wgetdcwd_nolock
338 #define _tmkdir _wmkdir
339 #define _trmdir _wrmdir
340 
341 #define _tfullpath _wfullpath
342 #define _tgetenv _wgetenv
343 #define _tmakepath _wmakepath
344 #define _tpgmptr _wpgmptr
345 #define _get_tpgmptr _get_wpgmptr
346 #define _tputenv _wputenv
347 #define _tsearchenv _wsearchenv
348 #define _tsplitpath _wsplitpath
349 #define _tsplitpath_s _wsplitpath_s
350 
351 #define _tfdopen _wfdopen
352 #define _tfsopen _wfsopen
353 #define _tfopen _wfopen
354 #define _tfreopen _wfreopen
355 #define _tperror _wperror
356 #define _tpopen _wpopen
357 #define _ttempnam _wtempnam
358 #define _ttmpnam _wtmpnam
359 
360 #define _taccess _waccess
361 #define _tchmod _wchmod
362 #define _tcreat _wcreat
363 #define _tfindfirst _wfindfirst
364 #define _tfindfirst32 _wfindfirst32
365 #define _tfindfirst64 _wfindfirst64
366 #define _tfindfirsti64 _wfindfirsti64
367 #define _tfindfirst32i64 _wfindfirst32i64
368 #define _tfindfirst64i32 _wfindfirst64i32
369 #define _tfindnext _wfindnext
370 #define _tfindnext32 _wfindnext32
371 #define _tfindnext64 _wfindnext64
372 #define _tfindnexti64 _wfindnexti64
373 #define _tfindnext32i64 _wfindnext32i64
374 #define _tfindnext64i32 _wfindnext64i32
375 #define _tmktemp _wmktemp
376 #define _topen _wopen
377 #define _tremove _wremove
378 #define _trename _wrename
379 #define _tsopen _wsopen
380 #define _tunlink _wunlink
381 
382 #define _tfinddata_t _wfinddata_t
383 #define _tfinddata32_t _wfinddata32_t
384 #define _tfinddata64_t _wfinddata64_t
385 #define _tfinddatai64_t _wfinddatai64_t
386 #define _tfinddata32i64_t _wfinddata32i64_t
387 #define _tfinddata64i32_t _wfinddata64i32_t
388 
389 #define _tstat _wstat
390 #define _tstat32 _wstat32
391 #define _tstat32i64 _wstat32i64
392 #define _tstat64 _wstat64
393 #define _tstat64i32 _wstat64i32
394 #define _tstati64 _wstati64
395 
396 #define _tsetlocale _wsetlocale
397 
398 #define _tcsclen wcslen
399 #define _tcscnlen wcsnlen
400 #define _tcsclen_l(_String,_Locale) wcslen(_String)
401 #define _tcscnlen_l(_String,_Max_count,_Locale) wcsnlen_l((_String),(_Max_count))
402 #define _tcsnccat wcsncat
403 #define _tcsnccat_l _wcsncat_l
404 #define _tcsnccpy wcsncpy
405 #define _tcsnccpy_l _wcsncpy_l
406 #define _tcsncset _wcsnset
407 
408 #define _tcsdec _wcsdec
409 #define _tcsinc _wcsinc
410 #define _tcsnbcnt _wcsncnt
411 #define _tcsnccnt _wcsncnt
412 #define _tcsnextc _wcsnextc
413 #define _tcsninc _wcsninc
414 #define _tcsspnp _wcsspnp
415 
416 #define _tcslwr _wcslwr
417 #define _tcslwr_l _wcslwr_l
418 #define _tcsupr _wcsupr
419 #define _tcsupr_l _wcsupr_l
420 #define _tcsxfrm wcsxfrm
421 #define _tcsxfrm_l _wcsxfrm_l
422 
423 #define _tclen(_pc) (1)
424 #define _tccpy(_pc1,_cpc2) ((*(_pc1) = *(_cpc2)))
425 #define _tccmp(_cpc1,_cpc2) ((*(_cpc1))-(*(_cpc2)))
426 
427 #define _istalnum iswalnum
428 #define _istalnum_l _iswalnum_l
429 #define _istalpha iswalpha
430 #define _istalpha_l _iswalpha_l
431 #define _istascii iswascii
432 #define _istcntrl iswcntrl
433 #define _istcntrl_l _iswcntrl_l
434 #define _istdigit iswdigit
435 #define _istdigit_l _iswdigit_l
436 #define _istgraph iswgraph
437 #define _istgraph_l _iswgraph_l
438 #define _istlower iswlower
439 #define _istlower_l _iswlower_l
440 #define _istprint iswprint
441 #define _istprint_l _iswprint_l
442 #define _istpunct iswpunct
443 #define _istpunct_l _iswpunct_l
444 #define _istspace iswspace
445 #define _istspace_l _iswspace_l
446 #define _istupper iswupper
447 #define _istupper_l _iswupper_l
448 #define _istxdigit iswxdigit
449 #define _istxdigit_l _iswxdigit_l
450 
451 #define _totupper towupper
452 #define _totupper_l _towupper_l
453 #define _totlower towlower
454 #define _totlower_l _towlower_l
455 
456 #define _istlegal(_Char) (1)
457 #define _istlead(_Char) (0)
458 #define _istleadbyte(_Char) (0)
459 #define _istleadbyte_l(_Char,_Locale) (0)
460 
461 #define _wcsdec(_cpc1,_cpc2) ((_cpc1)>=(_cpc2) ? NULL : (_cpc2)-1)
462 #define _wcsinc(_pc) ((_pc)+1)
463 #define _wcsnextc(_cpc) ((unsigned int) *(_cpc))
464 #define _wcsninc(_pc,_sz) (((_pc)+(_sz)))
465   _CRTIMP size_t __cdecl __wcsncnt(const wchar_t *_Str,size_t _MaxCount);
466 #define _wcsncnt(_cpc,_sz) (__wcsncnt(_cpc,_sz))
467 #define _wcsspnp(_cpc1,_cpc2) (!_cpc1 ? NULL : ((*((_cpc1)+wcsspn(_cpc1,_cpc2))) ? ((_cpc1)+wcsspn(_cpc1,_cpc2)) : NULL))
468 #define _wcsncpy_l(_Destination,_Source,_Count,_Locale) (wcsncpy(_Destination,_Source,_Count))
469 #define _wcsncat_l(_Destination,_Source,_Count,_Locale) (wcsncat(_Destination,_Source,_Count))
470 #define _wcstok_l(_String,_Delimiters,_Locale) (wcstok(_String,_Delimiters))
471 #define _wcsnset_l(_Destination,_Value,_Count,_Locale) (_wcsnset(_Destination,_Value,_Count))
472 #define _wcsset_l(_Destination,_Value,_Locale) (_wcsset(_Destination,_Value))
473 
474   /* dirent structures and functions */
475 #define _tdirent	_wdirent
476 #define _TDIR 		_WDIR
477 #define _topendir	_wopendir
478 #define _tclosedir	_wclosedir
479 #define _treaddir	_wreaddir
480 #define _trewinddir	_wrewinddir
481 #define _ttelldir	_wtelldir
482 #define _tseekdir	_wseekdir
483 
484 #else
485 /** ANSI *********************************************************************/
486 
487 #include <string.h>
488 
489 #ifdef __cplusplus
490 extern "C" {
491 #endif
492 
493 #define _TEOF EOF
494 
495 #define __T(x) x
496 
497 #define _tmain main
498 #define _tWinMain WinMain
499 #ifdef _POSIX_
500 #define _tenviron environ
501 #else
502 #define _tenviron _environ
503 #endif
504 #define __targv __argv
505 
506 #define _tprintf printf
507 #define _tprintf_l _printf_l
508 #define _tprintf_p _printf_p
509 #define _tprintf_p_l _printf_p_l
510 #define _tcprintf _cprintf
511 #define _tcprintf_l _cprintf_l
512 #define _tcprintf_p _cprintf_p
513 #define _tcprintf_p_l _cprintf_p_l
514 #define _vtcprintf _vcprintf
515 #define _vtcprintf_l _vcprintf_l
516 #define _vtcprintf_p _vcprintf_p
517 #define _vtcprintf_p_l _vcprintf_p_l
518 #define _ftprintf fprintf
519 #define _ftprintf_l _fprintf_l
520 #define _ftprintf_p _fprintf_p
521 #define _ftprintf_p_l _fprintf_p_l
522 #define _stprintf sprintf
523 #define _stprintf_l _sprintf_l
524 #define _stprintf_p _sprintf_p
525 #define _stprintf_p_l _sprintf_p_l
526 #define _sctprintf _scprintf
527 #define _sctprintf_l _scprintf_l
528 #define _sctprintf_p _scprintf_p
529 #define _sctprintf_p_l _scprintf_p_l
530 #define _sntprintf _snprintf
531 #define _sntprintf_l _snprintf_l
532 #define _vtprintf vprintf
533 #define _vtprintf_l _vprintf_l
534 #define _vtprintf_p _vprintf_p
535 #define _vtprintf_p_l _vprintf_p_l
536 #define _vftprintf vfprintf
537 #define _vftprintf_l _vfprintf_l
538 #define _vftprintf_p _vfprintf_p
539 #define _vftprintf_p_l _vfprintf_p_l
540 #define _vstprintf vsprintf
541 #define _vstprintf_l _vsprintf_l
542 #define _vstprintf_p _vsprintf_p
543 #define _vstprintf_p_l _vsprintf_p_l
544 #define _vsctprintf _vscprintf
545 #define _vsctprintf_l _vscprintf_l
546 #define _vsctprintf_p _vscprintf_p
547 #define _vsctprintf_p_l _vscprintf_p_l
548 #define _vsntprintf _vsnprintf
549 #define _vsntprintf_l _vsnprintf_l
550 
551 #define _tscanf scanf
552 #define _tscanf_l _scanf_l
553 #define _tcscanf _cscanf
554 #define _tcscanf_l _cscanf_l
555 #define _ftscanf fscanf
556 #define _ftscanf_l _fscanf_l
557 #define _stscanf sscanf
558 #define _stscanf_l _sscanf_l
559 #define _sntscanf _snscanf
560 #define _sntscanf_l _snscanf_l
561 
562 #define _fgettc fgetc
563 #define _fgettc_nolock _fgetc_nolock
564 #define _fgettchar _fgetchar
565 #define _fgetts fgets
566 #define _fputtc fputc
567 #define _fputtc_nolock _fputc_nolock
568 #define _fputtchar _fputchar
569 #define _fputts fputs
570 #define _cputts _cputs
571 #define _gettc getc
572 #define _gettc_nolock _getc_nolock
573 #define _gettch _getch
574 #define _gettch_nolock _getch_nolock
575 #define _gettche _getche
576 #define _gettche_nolock _getche_nolock
577 #define _gettchar getchar
578 #define _gettchar_nolock _getchar_nolock
579 #define _getts gets
580 #define _cgetts _cgets
581 #define _puttc putc
582 #define _puttc_nolock _putc_nolock
583 #define _puttchar putchar
584 #define _puttchar_nolock _putchar_nolock
585 #define _puttch _putch
586 #define _puttch_nolock _putch_nolock
587 #define _putts puts
588 #define _ungettc ungetc
589 #define _ungettc_nolock _ungetc_nolock
590 #define _ungettch _ungetch
591 #define _ungettch_nolock _ungetch_nolock
592 
593 #define _tcstod strtod
594 #define _tcstol strtol
595 #define _tcstoul strtoul
596 #define _tstof atof
597 #define _tstol atol
598 #define _tstoi atoi
599 #define _tstoi64 _atoi64
600 #define _tcstod_l _strtod_l
601 #define _tcstol_l _strtol_l
602 #define _tcstoul_l _strtoul_l
603 #define _tstof_l _atof_l
604 #define _tstol_l _atol_l
605 #define _tstoi_l _atoi_l
606 #define _tstoi64_l _atoi64_l
607 
608 #define _itot _itoa
609 #define _ltot _ltoa
610 #define _ultot _ultoa
611 #define _ttoi atoi
612 #define _ttol atol
613 
614 #define _ttoi64 _atoi64
615 #define _tcstoi64 _strtoi64
616 #define _tcstoi64_l _strtoi64_l
617 #define _tcstoui64 _strtoui64
618 #define _tcstoui64_l _strtoui64_l
619 #define _i64tot _i64toa
620 #define _ui64tot _ui64toa
621 
622 #define _tcscat strcat
623 #define _tcscpy strcpy
624 #define _tcscpy_s strcpy_s
625 #define _tcsdup _strdup
626 #define _tcslen strlen
627 #define _tcsnlen strnlen
628 #define _tcsxfrm strxfrm
629 #define _tcsxfrm_l _strxfrm_l
630 #define _tcserror strerror
631 #define __tcserror _strerror
632 
633 #define _texecl _execl
634 #define _texecle _execle
635 #define _texeclp _execlp
636 #define _texeclpe _execlpe
637 #define _texecv _execv
638 #define _texecve _execve
639 #define _texecvp _execvp
640 #define _texecvpe _execvpe
641 
642 #define _tspawnl _spawnl
643 #define _tspawnle _spawnle
644 #define _tspawnlp _spawnlp
645 #define _tspawnlpe _spawnlpe
646 #define _tspawnv _spawnv
647 #define _tspawnve _spawnve
648 #define _tspawnvp _spawnvp
649 #define _tspawnvpe _spawnvpe
650 
651 #define _tsystem system
652 
653 #define _tasctime asctime
654 #define _tctime ctime
655 #define _tctime32 _ctime32
656 #define _tctime64 _ctime64
657 #define _tstrdate _strdate
658 #define _tstrtime _strtime
659 #define _tutime _utime
660 #define _tutime32 _utime32
661 #define _tutime64 _utime64
662 #define _tcsftime strftime
663 #define _tcsftime_l _strftime_l
664 
665 #define _tasctime_s   asctime_s
666 #define _tctime_s     ctime_s
667 #define _tctime32_s   _ctime32_s
668 #define _tctime64_s   _ctime64_s
669 #define _tstrdate_s   _strdate_s
670 #define _tstrtime_s   _strtime_s
671 
672 #define _tchdir _chdir
673 #define _tgetcwd _getcwd
674 #define _tgetdcwd _getdcwd
675 #define _tgetdcwd_nolock _getdcwd_nolock
676 #define _tmkdir _mkdir
677 #define _trmdir _rmdir
678 
679 #define _tfullpath _fullpath
680 #define _tgetenv getenv
681 #define _tmakepath _makepath
682 #define _tpgmptr _pgmptr
683 #define _get_tpgmptr _get_pgmptr
684 #define _tputenv _putenv
685 #define _tsearchenv _searchenv
686 #define _tsplitpath _splitpath
687 #define _tsplitpath_s _splitpath_s
688 
689 #ifdef _POSIX_
690 #define _tfdopen fdopen
691 #else
692 #define _tfdopen _fdopen
693 #endif
694 #define _tfsopen _fsopen
695 #define _tfopen fopen
696 #define _tfreopen freopen
697 #define _tperror perror
698 #define _tpopen _popen
699 #define _ttempnam _tempnam
700 #define _ttmpnam tmpnam
701 
702 #define _tchmod _chmod
703 #define _tcreat _creat
704 #define _tfindfirst _findfirst
705 #define _tfindfirst32 _findfirst32
706 #define _tfindfirst64 _findfirst64
707 #define _tfindfirsti64 _findfirsti64
708 #define _tfindfirst32i64 _findfirst32i64
709 #define _tfindfirst64i32 _findfirst64i32
710 #define _tfindnext _findnext
711 #define _tfindnext32 _findnext32
712 #define _tfindnext64 _findnext64
713 #define _tfindnexti64 _findnexti64
714 #define _tfindnext32i64 _findnext32i64
715 #define _tfindnext64i32 _findnext64i32
716 #define _tmktemp _mktemp
717 
718 #ifdef _POSIX_
719 #define _topen open
720 #define _taccess access
721 #else
722 #define _topen _open
723 #define _taccess _access
724 #endif
725 
726 #define _tremove remove
727 #define _trename rename
728 #define _tsopen _sopen
729 #define _tunlink _unlink
730 
731 #define _tfinddata_t _finddata_t
732 #define _tfinddata32_t _finddata32_t
733 #define _tfinddata64_t __finddata64_t
734 #define _tfinddatai64_t _finddatai64_t
735 #define _tfinddata32i64_t _finddata32i64_t
736 #define _tfinddata64i32_t _finddata64i32_t
737 
738 #define _istascii __isascii
739 #define _istcntrl iscntrl
740 #define _istcntrl_l _iscntrl_l
741 #define _istxdigit isxdigit
742 #define _istxdigit_l _isxdigit_l
743 
744 #define _tstat _stat
745 #define _tstat32 _stat32
746 #define _tstat32i64 _stat32i64
747 #define _tstat64 _stat64
748 #define _tstat64i32 _stat64i32
749 #define _tstati64 _stati64
750 
751 #define _tsetlocale setlocale
752 
753 #ifdef _MBCS
754 /** MBCS *********************************************************************/
755 
756 #ifdef __cplusplus
757 }
758 #endif
759 
760 #include <mbstring.h>
761 
762 #ifdef __cplusplus
763 extern "C" {
764 #endif
765 
766 #ifndef __TCHAR_DEFINED
767   typedef char _TCHAR;
768   typedef signed char _TSCHAR;
769   typedef unsigned char _TUCHAR;
770   typedef unsigned char _TXCHAR;
771   typedef unsigned int _TINT;
772 #define __TCHAR_DEFINED
773 #endif
774 
775 #ifndef NO_OLDNAMES
776 #ifndef _TCHAR_DEFINED
777 #define _TCHAR_DEFINED
778   typedef char TCHAR,*PTCHAR;
779   typedef unsigned char TBYTE,*PTBYTE;
780 #endif
781 #endif
782 
783 #ifdef _MB_MAP_DIRECT
784 
785 #define _tcschr _mbschr
786 #define _tcscspn _mbscspn
787 #define _tcsncat _mbsnbcat
788 #define _tcsncat_l _mbsnbcat_l
789 #define _tcsncpy _mbsnbcpy
790 #define _tcsncpy_l _mbsnbcpy_l
791 #define _tcspbrk _mbspbrk
792 #define _tcsrchr _mbsrchr
793 #define _tcsspn _mbsspn
794 #define _tcsstr _mbsstr
795 #define _tcstok _mbstok
796 #define _tcstok_l _mbstok_l
797 
798 #define _tcsnset _mbsnbset
799 #define _tcsnset_l _mbsnbset_l
800 #define _tcsrev _mbsrev
801 #define _tcsset _mbsset
802 #define _tcsset_l _mbsset_l
803 
804 #define _tcscmp _mbscmp
805 #define _tcsicmp _mbsicmp
806 #define _tcsicmp_l _mbsicmp_l
807 #define _tcsnccmp _mbsncmp
808 #define _tcsncmp _mbsnbcmp
809 #define _tcsncicmp _mbsnicmp
810 #define _tcsncicmp_l _mbsnicmp_l
811 #define _tcsnicmp _mbsnbicmp
812 #define _tcsnicmp_l _mbsnbicmp_l
813 
814 #define _tcscoll _mbscoll
815 #define _tcscoll_l _mbscoll_l
816 #define _tcsicoll _mbsicoll
817 #define _tcsicoll_l _mbsicoll_l
818 #define _tcsnccoll _mbsncoll
819 #define _tcsnccoll_l _mbsncoll_l
820 #define _tcsncoll _mbsnbcoll
821 #define _tcsncoll_l _mbsnbcoll_l
822 #define _tcsncicoll _mbsnicoll
823 #define _tcsncicoll_l _mbsnicoll_l
824 #define _tcsnicoll _mbsnbicoll
825 #define _tcsnicoll_l _mbsnbicoll_l
826 
827 #define _tcsclen _mbslen
828 #define _tcscnlen _mbsnlen
829 #define _tcsclen_l _mbslen_l
830 #define _tcscnlen_l _mbsnlen_l
831 #define _tcsnccat _mbsncat
832 #define _tcsnccat_l _mbsncat_l
833 #define _tcsnccpy _mbsncpy
834 #define _tcsnccpy_l _mbsncpy_l
835 #define _tcsncset _mbsnset
836 #define _tcsncset_l _mbsnset_l
837 
838 #define _tcsdec _mbsdec
839 #define _tcsinc _mbsinc
840 #define _tcsnbcnt _mbsnbcnt
841 #define _tcsnccnt _mbsnccnt
842 #define _tcsnextc _mbsnextc
843 #define _tcsninc _mbsninc
844 #define _tcsspnp _mbsspnp
845 
846 #define _tcslwr _mbslwr
847 #define _tcslwr_l _mbslwr_l
848 #define _tcsupr _mbsupr
849 #define _tcsupr_l _mbsupr_l
850 
851 #define _tclen _mbclen
852 #define _tccpy _mbccpy
853 #define _tccpy_l _mbccpy_l
854 
855 
856 #else /* !_MB_MAP_DIRECT */
857 
858   _Check_return_
859   _CRTIMP
860   _CONST_RETURN
861   char*
862   __cdecl
863   _tcschr(
864     _In_z_ const char *_Str,
865     _In_ unsigned int _Val);
866 
867   _Check_return_
868   _CRTIMP
869   size_t
870   __cdecl
871   _tcscspn(
872     _In_z_ const char *_Str,
873     _In_z_ const char *_Control);
874 
875   _CRTIMP
876   char*
877   __cdecl
878   _tcsncat(
879     _Inout_updates_z_(_MaxCount) char *_Dst,
880     _In_z_ const char *_Src,
881     _In_ size_t _MaxCount);
882 
883   _CRTIMP
884   char*
885   __cdecl
886   _tcsncat_l(
887     _Inout_updates_z_(_MaxCount) char *_Dst,
888     _In_z_ const char *_Src,
889     _In_ size_t _MaxCount,
890     _In_opt_ _locale_t _Locale);
891 
892   _CRTIMP
893   char*
894   __cdecl
895   _tcsncpy(
896     _Out_writes_(_MaxCount) _Post_maybez_ char *_Dst,
897     _In_z_ const char *_Src,
898     _In_ size_t _MaxCount);
899 
900   _CRTIMP
901   char*
902   __cdecl
903   _tcsncpy_l(
904     _Out_writes_(_MaxCount) _Post_maybez_ char *_Dst,
905     _In_z_ const char *_Src,
906     _In_ size_t _MaxCount,
907     _In_opt_ _locale_t _Locale);
908 
909   _Check_return_
910   _CRTIMP
911   _CONST_RETURN
912   char*
913   __cdecl
914   _tcspbrk(
915     _In_z_ const char *_Str,
916     _In_z_ const char *_Control);
917 
918   _Check_return_
919   _CRTIMP
920   _CONST_RETURN
921   char*
922   __cdecl
923   _tcsrchr(
924     _In_z_ const char *_Str,
925     _In_ unsigned int _Ch);
926 
927   _Check_return_
928   _CRTIMP
929   size_t
930   __cdecl
931   _tcsspn(
932     _In_z_ const char *_Str,
933     _In_z_ const char *_Control);
934 
935   _Check_return_
936   _CRTIMP
937   _CONST_RETURN
938   char*
939   __cdecl
940   _tcsstr(
941     _In_z_ const char *_Str,
942     _In_z_ const char *_Substr);
943 
944   _Check_return_
945   _CRTIMP
946   char*
947   __cdecl
948   _tcstok(
949     _Inout_opt_ char *_Str,
950     _In_z_ const char *_Delim);
951 
952   _Check_return_
953   _CRTIMP
954   char*
955   __cdecl
956   _tcstok_l(
957     _Inout_opt_ char *_Str,
958     _In_z_ const char *_Delim,
959     _In_opt_ _locale_t _Locale);
960 
961   _CRTIMP
962   char*
963   __cdecl
964   _tcsnset(
965     _Inout_z_ char *_Str,
966     _In_ unsigned int _Val,
967     _In_ size_t _MaxCount);
968 
969   _CRTIMP
970   char*
971   __cdecl
972   _tcsrev(
973     _Inout_z_ char *_Str);
974 
975   _CRTIMP
976   char*
977   __cdecl
978   _tcsset(
979     _Inout_z_ char *_Str,
980     _In_ unsigned int _Val);
981 
982   _CRTIMP
983   char*
984   __cdecl
985   _tcsset_l(
986     _Inout_z_ char *_Str,
987     _In_ unsigned int _Val,
988     _In_opt_ _locale_t _Locale);
989 
990   _Check_return_
991   _CRTIMP
992   int
993   __cdecl
994   _tcscmp(
995     _In_z_ const char *_Str1,
996     _In_z_ const char *_Str);
997 
998   _Check_return_
999   _CRTIMP
1000   int
1001   __cdecl
1002   _tcsicmp(
1003     _In_z_ const char *_Str1,
1004     _In_z_ const char *_Str2);
1005 
1006   _Check_return_
1007   _CRTIMP
1008   int
1009   __cdecl
1010   _tcsicmp_l(
1011     _In_z_ const char *_Str1,
1012     _In_z_ const char *_Str2,
1013     _In_opt_ _locale_t _Locale);
1014 
1015   _Check_return_
1016   _CRTIMP
1017   int
1018   __cdecl
1019   _tcsnccmp(
1020     _In_z_ const char *_Str1,
1021     _In_z_ const char *_Str2,
1022     _In_ size_t _MaxCount);
1023 
1024   _Check_return_
1025   _CRTIMP
1026   int
1027   __cdecl
1028   _tcsncmp(
1029     _In_z_ const char *_Str1,
1030     _In_z_ const char *_Str2,
1031     _In_ size_t _MaxCount);
1032 
1033   _Check_return_
1034   _CRTIMP
1035   int
1036   __cdecl
1037   _tcsncicmp(
1038     _In_z_ const char *_Str1,
1039     _In_z_ const char *_Str2,
1040     _In_ size_t _MaxCount);
1041 
1042   _Check_return_
1043   _CRTIMP
1044   int
1045   __cdecl
1046   _tcsncicmp_l(
1047     _In_z_ const char *_Str1,
1048     _In_z_ const char *_Str2,
1049     _In_ size_t _MaxCount,
1050     _In_opt_ _locale_t _Locale);
1051 
1052   _Check_return_
1053   _CRTIMP
1054   int
1055   __cdecl
1056   _tcsnicmp(
1057     _In_z_ const char *_Str1,
1058     _In_z_ const char *_Str2,
1059     _In_ size_t _MaxCount);
1060 
1061   _Check_return_
1062   _CRTIMP
1063   int
1064   __cdecl
1065   _tcsnicmp_l(
1066     _In_z_ const char *_Str1,
1067     _In_z_ const char *_Str2,
1068     _In_ size_t _MaxCount,
1069     _In_opt_ _locale_t _Locale);
1070 
1071   _Check_return_
1072   _CRTIMP
1073   int
1074   __cdecl
1075   _tcscoll(
1076     _In_z_ const char *_Str1,
1077     _In_z_ const char *_Str2);
1078 
1079   _Check_return_
1080   _CRTIMP
1081   int
1082   __cdecl
1083   _tcscoll_l(
1084     _In_z_ const char *_Str1,
1085     _In_z_ const char *_Str2,
1086     _In_opt_ _locale_t _Locale);
1087 
1088   _Check_return_
1089   _CRTIMP
1090   int
1091   __cdecl
1092   _tcsicoll(
1093     _In_z_ const char *_Str1,
1094     _In_z_ const char *_Str2);
1095 
1096   _Check_return_
1097   _CRTIMP
1098   int
1099   __cdecl
1100   _tcsicoll_l(
1101     _In_z_ const char *_Str1,
1102     _In_z_ const char *_Str2,
1103     _In_opt_ _locale_t _Locale);
1104 
1105   _Check_return_
1106   _CRTIMP
1107   int
1108   __cdecl
1109   _tcsnccoll(
1110     _In_z_ const char *_Str1,
1111     _In_z_ const char *_Str2,
1112     _In_ size_t _MaxCount);
1113 
1114   _Check_return_
1115   _CRTIMP
1116   int
1117   __cdecl
1118   _tcsnccoll_l(
1119     _In_z_ const char *_Str1,
1120     _In_z_ const char *_Str2,
1121     _In_ size_t _MaxCount,
1122     _In_opt_ _locale_t _Locale);
1123 
1124   _Check_return_
1125   _CRTIMP
1126   int
1127   __cdecl
1128   _tcsncoll(
1129     _In_z_ const char *_Str1,
1130     _In_z_ const char *_Str2,
1131     _In_ size_t _MaxCount);
1132 
1133   _Check_return_
1134   _CRTIMP
1135   int
1136   __cdecl
1137   _tcsncoll_l(
1138     _In_z_ const char *_Str1,
1139     _In_z_ const char *_Str2,
1140     _In_ size_t _MaxCount,
1141     _In_opt_ _locale_t _Locale);
1142 
1143   _Check_return_
1144   _CRTIMP
1145   int
1146   __cdecl
1147   _tcsncicoll(
1148     _In_z_ const char *_Str1,
1149     _In_z_ const char *_Str2,
1150     _In_ size_t _MaxCount);
1151 
1152   _Check_return_
1153   _CRTIMP
1154   int
1155   __cdecl
1156   _tcsncicoll_l(
1157     _In_z_ const char *_Str1,
1158     _In_z_ const char *_Str2,
1159     _In_ size_t _MaxCount,
1160     _In_opt_ _locale_t _Locale);
1161 
1162   _Check_return_
1163   _CRTIMP
1164   int
1165   __cdecl
1166   _tcsnicoll(
1167     _In_z_ const char *_Str1,
1168     _In_z_ const char *_Str2,
1169     _In_ size_t _MaxCount);
1170 
1171   _Check_return_
1172   _CRTIMP
1173   int
1174   __cdecl
1175   _tcsnicoll_l(
1176     _In_z_ const char *_Str1,
1177     _In_z_ const char *_Str2,
1178     _In_ size_t _MaxCount,
1179     _In_opt_ _locale_t _Locale);
1180 
1181   _Check_return_
1182   _CRTIMP
1183   size_t
1184   __cdecl
1185   _tcsclen(
1186     _In_z_ const char *_Str);
1187 
1188   _Check_return_
1189   _CRTIMP
1190   size_t
1191   __cdecl
1192   _tcscnlen(
1193     _In_z_ const char *_Str,
1194     _In_ size_t _MaxCount);
1195 
1196   _Check_return_
1197   _CRTIMP
1198   size_t
1199   __cdecl
1200   _tcsclen_l(
1201     _In_z_ const char *_Str,
1202     _In_opt_ _locale_t _Locale);
1203 
1204   _Check_return_
1205   _CRTIMP
1206   size_t
1207   __cdecl
1208   _tcscnlen_l(
1209     _In_z_ const char *_Str,
1210     _In_ size_t _MaxCount,
1211     _In_opt_ _locale_t _Locale);
1212 
1213   _CRTIMP
1214   char*
1215   __cdecl
1216   _tcsnccat(
1217     _Inout_ char *_Dst,
1218     _In_z_ const char *_Src,
1219     _In_ size_t _MaxCount);
1220 
1221   _CRTIMP
1222   char*
1223   __cdecl
1224   _tcsnccat_l(
1225     _Inout_ char *_Dst,
1226     _In_z_ const char *_Src,
1227     _In_ size_t _MaxCount,
1228     _In_opt_ _locale_t _Locale);
1229 
1230   _CRTIMP
1231   char*
1232   __cdecl
1233   _tcsnccpy(
1234     _Out_writes_(_MaxCount) _Post_maybez_ char *_Dst,
1235     _In_z_ const char *_Src,
1236     _In_ size_t _MaxCount);
1237 
1238   _CRTIMP
1239   char*
1240   __cdecl
1241   _tcsnccpy_l(
1242     _Out_writes_(_MaxCount) _Post_maybez_ char *_Dst,
1243     _In_z_ const char *_Src,
1244     _In_ size_t _MaxCount,
1245     _In_opt_ _locale_t _Locale);
1246 
1247   _CRTIMP
1248   char*
1249   __cdecl
1250   _tcsncset(
1251     _Inout_updates_z_(_MaxCount) char *_Str,
1252     _In_ unsigned int _Val,
1253     _In_ size_t _MaxCount);
1254 
1255   _CRTIMP
1256   char*
1257   __cdecl
1258   _tcsdec(
1259     _In_reads_z_(_Pos-_Start + 1) const char *_Start,
1260     _In_z_ const char *_Pos);
1261 
1262   _CRTIMP
1263   char*
1264   __cdecl
1265   _tcsinc(
1266     _In_z_ const char *_Ptr);
1267 
1268   _CRTIMP
1269   size_t
1270   __cdecl
1271   _tcsnbcnt(
1272     _In_reads_(_MaxCount) _Pre_z_ const char *_Str,
1273     _In_ size_t _MaxCount);
1274 
1275   _CRTIMP
1276   size_t
1277   __cdecl
1278   _tcsnccnt(
1279     _In_reads_(_MaxCount) _Pre_z_ const char *_Str,
1280     _In_ size_t _MaxCount);
1281 
1282   _CRTIMP
1283   unsigned int
1284   __cdecl
1285   _tcsnextc(
1286     _In_z_ const char *_Str);
1287 
1288   _CRTIMP
1289   char*
1290   __cdecl
1291   _tcsninc(
1292     _In_reads_(_Count) _Pre_z_ const char *_Ptr,
1293     _In_ size_t _Count);
1294 
1295   _CRTIMP
1296   char*
1297   __cdecl
1298   _tcsspnp(
1299     _In_z_ const char *_Str1,
1300     _In_z_ const char *_Str2);
1301 
1302   _CRTIMP
1303   char*
1304   __cdecl
1305   _tcslwr(
1306     _Inout_ char *_Str);
1307 
1308   _CRTIMP
1309   char*
1310   __cdecl
1311   _tcslwr_l(
1312     _Inout_ char *_Str,
1313     _In_opt_ _locale_t _Locale);
1314 
1315   _CRTIMP
1316   char*
1317   __cdecl
1318   _tcsupr(
1319     _Inout_ char *_Str);
1320 
1321   _CRTIMP
1322   char*
1323   __cdecl
1324   _tcsupr_l(
1325     _Inout_ char *_Str,
1326     _In_opt_ _locale_t _Locale);
1327 
1328   _Check_return_
1329   _CRTIMP
1330   size_t
1331   __cdecl
1332   _tclen(
1333     _In_z_ const char *_Str);
1334 
1335   _CRTIMP
1336   void
1337   __cdecl
1338   _tccpy(
1339     _Pre_notnull_ _Post_z_ char *_DstCh,
1340     _In_z_ const char *_SrcCh);
1341 
1342 #ifdef __cplusplus
1343 #ifndef _CPP_TCHAR_INLINES_DEFINED
1344 #define _CPP_TCHAR_INLINES_DEFINED
1345   extern "C++" {
1346     extern inline char *__cdecl _tcschr(char *_S,unsigned int _C) { return ((char *)_tcschr((const char *)_S,_C)); }
1347     extern inline char *__cdecl _tcspbrk(char *_S,const char *_P) { return ((char *)_tcspbrk((const char *)_S,_P)); }
1348     extern inline char *__cdecl _tcsrchr(char *_S,unsigned int _C) { return ((char *)_tcsrchr((const char *)_S,_C)); }
1349     extern inline char *__cdecl _tcsstr(char *_S,const char *_P) { return ((char *)_tcsstr((const char *)_S,_P)); }
1350   }
1351 #endif
1352 #endif
1353 #endif
1354 
1355 #define _tccmp(_cp1,_cp2) _tcsnccmp(_cp1,_cp2,1)
1356 
1357 #define _istalnum _ismbcalnum
1358 #define _istalnum_l _ismbcalnum_l
1359 #define _istalpha _ismbcalpha
1360 #define _istalpha_l _ismbcalpha_l
1361 #define _istdigit _ismbcdigit
1362 #define _istdigit_l _ismbcdigit_l
1363 #define _istgraph _ismbcgraph
1364 #define _istgraph_l _ismbcgraph_l
1365 #define _istlegal _ismbclegal
1366 #define _istlegal_l _ismbclegal_l
1367 #define _istlower _ismbclower
1368 #define _istlower_l _ismbclower_l
1369 #define _istprint _ismbcprint
1370 #define _istprint_l _ismbcprint_l
1371 #define _istpunct _ismbcpunct
1372 #define _istpunct_l _ismbcpunct_l
1373 #define _istspace _ismbcspace
1374 #define _istspace_l _ismbcspace_l
1375 #define _istupper _ismbcupper
1376 #define _istupper_l _ismbcupper_l
1377 
1378 #define _totupper _mbctoupper
1379 #define _totupper_l _mbctoupper_l
1380 #define _totlower _mbctolower
1381 #define _totlower_l _mbctolower_l
1382 
1383 #define _istlead _ismbblead
1384 #define _istleadbyte isleadbyte
1385 #define _istleadbyte_l _isleadbyte_l
1386 
1387 #else /* !_MBCS */
1388 /** SBCS *********************************************************************/
1389 
1390 #ifndef __TCHAR_DEFINED
1391 #define __TCHAR_DEFINED
1392   typedef char _TCHAR;
1393   typedef signed char _TSCHAR;
1394   typedef unsigned char _TUCHAR;
1395   typedef char _TXCHAR;
1396   typedef int _TINT;
1397 #endif
1398 
1399 #ifndef _TCHAR_DEFINED
1400 #define _TCHAR_DEFINED
1401 #ifndef	NO_OLDNAMES
1402   typedef char TCHAR;
1403 #endif
1404 #endif
1405 
1406 #define _tcschr strchr
1407 #define _tcscspn strcspn
1408 #define _tcsncat strncat
1409 #define _tcsncat_l _strncat_l
1410 #define _tcsncpy strncpy
1411 #define _tcsncpy_l _strncpy_l
1412 #define _tcspbrk strpbrk
1413 #define _tcsrchr strrchr
1414 #define _tcsspn strspn
1415 #define _tcsstr strstr
1416 #define _tcstok strtok
1417 #define _tcstok_l _strtok_l
1418 
1419 #define _tcsnset _strnset
1420 #define _tcsnset_l _strnset_l
1421 #define _tcsrev _strrev
1422 #define _tcsset _strset
1423 
1424 #define _tcscmp strcmp
1425 #define _tcsicmp _stricmp
1426 #define _tcsicmp_l _stricmp_l
1427 #define _tcsnccmp strncmp
1428 #define _tcsncmp strncmp
1429 #define _tcsncicmp _strnicmp
1430 #define _tcsncicmp_l _strnicmp_l
1431 #define _tcsnicmp _strnicmp
1432 #define _tcsnicmp_l _strnicmp_l
1433 
1434 #define _tcscoll strcoll
1435 #define _tcscoll_l _strcoll_l
1436 #define _tcsicoll _stricoll
1437 #define _tcsicoll_l _stricoll_l
1438 #define _tcsnccoll _strncoll
1439 #define _tcsnccoll_l _strncoll_l
1440 #define _tcsncoll _strncoll
1441 #define _tcsncoll_l _strncoll_l
1442 #define _tcsncicoll _strnicoll
1443 #define _tcsncicoll_l _strnicoll_l
1444 #define _tcsnicoll _strnicoll
1445 #define _tcsnicoll_l _strnicoll_l
1446 
1447 #define _tcsclen strlen
1448 #define _tcscnlen strnlen
1449 #define _tcsclen_l(_String,_Locale) strlen(_String)
1450 #define _tcscnlen_l(_String,_Max_count,_Locale) strnlen_l((_String),(_Max_count))
1451 #define _tcsnccat strncat
1452 #define _tcsnccat_l _strncat_l
1453 #define _tcsnccpy strncpy
1454 #define _tcsnccpy_l _strncpy_l
1455 #define _tcsncset _strnset
1456 
1457 #define _tcsdec _strdec
1458 #define _tcsinc _strinc
1459 #define _tcsnbcnt _strncnt
1460 #define _tcsnccnt _strncnt
1461 #define _tcsnextc _strnextc
1462 #define _tcsninc _strninc
1463 #define _tcsspnp _strspnp
1464 
1465 #define _tcslwr _strlwr
1466 #define _tcslwr_l _strlwr_l
1467 #define _tcsupr _strupr
1468 #define _tcsupr_l _strupr_l
1469 #define _tcsxfrm strxfrm
1470 #define _tcsxfrm_l _strxfrm_l
1471 
1472 #define _istlead(_Char) (0)
1473 #define _istleadbyte(_Char) (0)
1474 #define _istleadbyte_l(_Char,_Locale) (0)
1475 
1476 #define _tclen(_pc) (1)
1477 #define _tccpy(_pc1,_cpc2) (*(_pc1) = *(_cpc2))
1478 #define _tccmp(_cpc1,_cpc2) (((unsigned char)*(_cpc1))-((unsigned char)*(_cpc2)))
1479 
1480   /* dirent structures and functions */
1481 #define _tdirent	dirent
1482 #define _TDIR 		DIR
1483 #define _topendir	opendir
1484 #define _tclosedir	closedir
1485 #define _treaddir	readdir
1486 #define _trewinddir	rewinddir
1487 #define _ttelldir	telldir
1488 #define _tseekdir	seekdir
1489 
1490 #define _istalnum isalnum
1491 #define _istalnum_l _isalnum_l
1492 #define _istalpha isalpha
1493 #define _istalpha_l _isalpha_l
1494 #define _istdigit isdigit
1495 #define _istdigit_l _isdigit_l
1496 #define _istgraph isgraph
1497 #define _istgraph_l _isgraph_l
1498 #define _istlower islower
1499 #define _istlower_l _islower_l
1500 #define _istprint isprint
1501 #define _istprint_l _isprint_l
1502 #define _istpunct ispunct
1503 #define _istpunct_l _ispunct_l
1504 #define _istspace isspace
1505 #define _istspace_l _isspace_l
1506 #define _istupper isupper
1507 #define _istupper_l _isupper_l
1508 
1509 #define _totupper toupper
1510 #define _totupper_l _toupper_l
1511 #define _totlower tolower
1512 #define _totlower_l _tolower_l
1513 
1514 #define _istlegal(_c) (1)
1515 
1516 #define _strdec(_cpc1,_cpc2) ((_cpc1)>=(_cpc2) ? NULL : (_cpc2)-1)
1517 #define _strinc(_pc) ((_pc)+1)
1518 #define _strnextc(_cpc) ((unsigned int) *(const unsigned char *)(_cpc))
1519 #define _strninc(_pc,_sz) (((_pc)+(_sz)))
1520   _CRTIMP size_t __cdecl __strncnt(const char *_Str,size_t _Cnt);
1521 #define _strncnt(_cpc,_sz) (__strncnt(_cpc,_sz))
1522 #define _strspnp(_cpc1,_cpc2) (!_cpc1 ? NULL : ((*((_cpc1)+strspn(_cpc1,_cpc2))) ? ((_cpc1)+strspn(_cpc1,_cpc2)) : NULL))
1523 
1524 #define _strncpy_l(_Destination,_Source,_Count,_Locale) (strncpy(_Destination,_Source,_Count))
1525 #define _strncat_l(_Destination,_Source,_Count,_Locale) (strncat(_Destination,_Source,_Count))
1526 #define _strtok_l(_String,_Delimiters,_Locale) (strtok(_String,_Delimiters))
1527 #define _strnset_l(_Destination,_Value,_Count,_Locale) (_strnset(_Destination,_Value,_Count))
1528 #define _strset_l(_Destination,_Value,_Locale) (_strset(_Destination,_Value))
1529 
1530 #endif /* !_MBCS */
1531 #endif  /* !UNICODE */
1532 /*****************************************************************************/
1533 
1534 #define _T(x) __T(x)
1535 #define _TEXT(x) __T(x)
1536 
1537 #ifdef __cplusplus
1538 }
1539 #endif
1540 
1541 #include <sec_api/tchar_s.h>
1542 #endif
1543