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.
11 #ifdef _STRSAFE_H_INCLUDED_
12 #error Need to include strsafe.h after tchar.h
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
32 #define _ftcsdup _tcsdup
33 #define _ftcsnset _tcsnset
34 #define _ftcsrev _tcsrev
35 #define _ftcsset _tcsset
37 #define _ftcscmp _tcscmp
38 #define _ftcsicmp _tcsicmp
39 #define _ftcsnccmp _tcsnccmp
40 #define _ftcsncmp _tcsncmp
41 #define _ftcsncicmp _tcsncicmp
42 #define _ftcsnicmp _tcsnicmp
44 #define _ftcscoll _tcscoll
45 #define _ftcsicoll _tcsicoll
46 #define _ftcsnccoll _tcsnccoll
47 #define _ftcsncoll _tcsncoll
48 #define _ftcsncicoll _tcsncicoll
49 #define _ftcsnicoll _tcsnicoll
51 #define _ftcsclen _tcsclen
52 #define _ftcsnccat _tcsnccat
53 #define _ftcsnccpy _tcsnccpy
54 #define _ftcsncset _tcsncset
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
64 #define _ftcslwr _tcslwr
65 #define _ftcsupr _tcsupr
67 #define _ftclen _tclen
68 #define _ftccpy _tccpy
69 #define _ftccmp _tccmp
73 #define _CONST_RETURN const
74 #define _CRT_CONST_CORRECT_OVERLOADS
80 #define _WConst_return _CONST_RETURN
88 /** UNICODE ******************************************************************/
96 #ifndef _WCTYPE_T_DEFINED
97 #define _WCTYPE_T_DEFINED
98 typedef unsigned short wint_t;
99 typedef unsigned short wctype_t;
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
;
112 #ifndef _TCHAR_DEFINED
113 #define _TCHAR_DEFINED
114 typedef wchar_t TCHAR
,*PTCHAR
;
115 typedef wchar_t TBYTE
,*PTBYTE
;
124 #define _tWinMain wWinMain
125 #define _tenviron _wenviron
126 #define __targv __wargv
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
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
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
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
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
215 #define _tcstod wcstod
216 #define _tcstol wcstol
217 #define _tcstoul wcstoul
218 #define _tcstoi64 _wcstoi64
219 #define _tcstoui64 _wcstoui64
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
236 #define _ultot _ultow
240 #define _ttoi64 _wtoi64
241 #define _i64tot _i64tow
242 #define _ui64tot _ui64tow
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
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
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
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
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
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
313 #define _tsystem _wsystem
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
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
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
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
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
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
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
389 #define _tstat _wstat
390 #define _tstat32 _wstat32
391 #define _tstat32i64 _wstat32i64
392 #define _tstat64 _wstat64
393 #define _tstat64i32 _wstat64i32
394 #define _tstati64 _wstati64
396 #define _tsetlocale _wsetlocale
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
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
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
423 #define _tclen(_pc) (1)
424 #define _tccpy(_pc1,_cpc2) ((*(_pc1) = *(_cpc2)))
425 #define _tccmp(_cpc1,_cpc2) ((*(_cpc1))-(*(_cpc2)))
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
451 #define _totupper towupper
452 #define _totupper_l _towupper_l
453 #define _totlower towlower
454 #define _totlower_l _towlower_l
456 #define _istlegal(_Char) (1)
457 #define _istlead(_Char) (0)
458 #define _istleadbyte(_Char) (0)
459 #define _istleadbyte_l(_Char,_Locale) (0)
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))
474 /* dirent structures and functions */
475 #define _tdirent _wdirent
477 #define _topendir _wopendir
478 #define _tclosedir _wclosedir
479 #define _treaddir _wreaddir
480 #define _trewinddir _wrewinddir
481 #define _ttelldir _wtelldir
482 #define _tseekdir _wseekdir
485 /** ANSI *********************************************************************/
498 #define _tWinMain WinMain
500 #define _tenviron environ
502 #define _tenviron _environ
504 #define __targv __argv
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
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
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
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
580 #define _cgetts _cgets
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
588 #define _ungettc ungetc
589 #define _ungettc_nolock _ungetc_nolock
590 #define _ungettch _ungetch
591 #define _ungettch_nolock _ungetch_nolock
593 #define _tcstod strtod
594 #define _tcstol strtol
595 #define _tcstoul strtoul
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
610 #define _ultot _ultoa
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
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
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
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
651 #define _tsystem system
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
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
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
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
690 #define _tfdopen fdopen
692 #define _tfdopen _fdopen
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
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
720 #define _taccess access
723 #define _taccess _access
726 #define _tremove remove
727 #define _trename rename
728 #define _tsopen _sopen
729 #define _tunlink _unlink
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
738 #define _istascii __isascii
739 #define _istcntrl iscntrl
740 #define _istcntrl_l _iscntrl_l
741 #define _istxdigit isxdigit
742 #define _istxdigit_l _isxdigit_l
745 #define _tstat32 _stat32
746 #define _tstat32i64 _stat32i64
747 #define _tstat64 _stat64
748 #define _tstat64i32 _stat64i32
749 #define _tstati64 _stati64
751 #define _tsetlocale setlocale
754 /** MBCS *********************************************************************/
760 #include <mbstring.h>
766 #ifndef __TCHAR_DEFINED
768 typedef signed char _TSCHAR
;
769 typedef unsigned char _TUCHAR
;
770 typedef unsigned char _TXCHAR
;
771 typedef unsigned int _TINT
;
772 #define __TCHAR_DEFINED
776 #ifndef _TCHAR_DEFINED
777 #define _TCHAR_DEFINED
778 typedef char TCHAR
,*PTCHAR
;
779 typedef unsigned char TBYTE
,*PTBYTE
;
783 #ifdef _MB_MAP_DIRECT
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
798 #define _tcsnset _mbsnbset
799 #define _tcsnset_l _mbsnbset_l
800 #define _tcsrev _mbsrev
801 #define _tcsset _mbsset
802 #define _tcsset_l _mbsset_l
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
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
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
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
846 #define _tcslwr _mbslwr
847 #define _tcslwr_l _mbslwr_l
848 #define _tcsupr _mbsupr
849 #define _tcsupr_l _mbsupr_l
851 #define _tclen _mbclen
852 #define _tccpy _mbccpy
853 #define _tccpy_l _mbccpy_l
856 #else /* !_MB_MAP_DIRECT */
864 _In_z_
const char *_Str
,
865 _In_
unsigned int _Val
);
872 _In_z_
const char *_Str
,
873 _In_z_
const char *_Control
);
879 _Inout_updates_z_(_MaxCount
) char *_Dst
,
880 _In_z_
const char *_Src
,
881 _In_
size_t _MaxCount
);
887 _Inout_updates_z_(_MaxCount
) char *_Dst
,
888 _In_z_
const char *_Src
,
889 _In_
size_t _MaxCount
,
890 _In_opt_ _locale_t _Locale
);
896 _Out_writes_(_MaxCount
) _Post_maybez_
char *_Dst
,
897 _In_z_
const char *_Src
,
898 _In_
size_t _MaxCount
);
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
);
915 _In_z_
const char *_Str
,
916 _In_z_
const char *_Control
);
924 _In_z_
const char *_Str
,
925 _In_
unsigned int _Ch
);
932 _In_z_
const char *_Str
,
933 _In_z_
const char *_Control
);
941 _In_z_
const char *_Str
,
942 _In_z_
const char *_Substr
);
949 _Inout_opt_
char *_Str
,
950 _In_z_
const char *_Delim
);
957 _Inout_opt_
char *_Str
,
958 _In_z_
const char *_Delim
,
959 _In_opt_ _locale_t _Locale
);
965 _Inout_z_
char *_Str
,
966 _In_
unsigned int _Val
,
967 _In_
size_t _MaxCount
);
973 _Inout_z_
char *_Str
);
979 _Inout_z_
char *_Str
,
980 _In_
unsigned int _Val
);
986 _Inout_z_
char *_Str
,
987 _In_
unsigned int _Val
,
988 _In_opt_ _locale_t _Locale
);
995 _In_z_
const char *_Str1
,
996 _In_z_
const char *_Str
);
1003 _In_z_
const char *_Str1
,
1004 _In_z_
const char *_Str2
);
1011 _In_z_
const char *_Str1
,
1012 _In_z_
const char *_Str2
,
1013 _In_opt_ _locale_t _Locale
);
1020 _In_z_
const char *_Str1
,
1021 _In_z_
const char *_Str2
,
1022 _In_
size_t _MaxCount
);
1029 _In_z_
const char *_Str1
,
1030 _In_z_
const char *_Str2
,
1031 _In_
size_t _MaxCount
);
1038 _In_z_
const char *_Str1
,
1039 _In_z_
const char *_Str2
,
1040 _In_
size_t _MaxCount
);
1047 _In_z_
const char *_Str1
,
1048 _In_z_
const char *_Str2
,
1049 _In_
size_t _MaxCount
,
1050 _In_opt_ _locale_t _Locale
);
1057 _In_z_
const char *_Str1
,
1058 _In_z_
const char *_Str2
,
1059 _In_
size_t _MaxCount
);
1066 _In_z_
const char *_Str1
,
1067 _In_z_
const char *_Str2
,
1068 _In_
size_t _MaxCount
,
1069 _In_opt_ _locale_t _Locale
);
1076 _In_z_
const char *_Str1
,
1077 _In_z_
const char *_Str2
);
1084 _In_z_
const char *_Str1
,
1085 _In_z_
const char *_Str2
,
1086 _In_opt_ _locale_t _Locale
);
1093 _In_z_
const char *_Str1
,
1094 _In_z_
const char *_Str2
);
1101 _In_z_
const char *_Str1
,
1102 _In_z_
const char *_Str2
,
1103 _In_opt_ _locale_t _Locale
);
1110 _In_z_
const char *_Str1
,
1111 _In_z_
const char *_Str2
,
1112 _In_
size_t _MaxCount
);
1119 _In_z_
const char *_Str1
,
1120 _In_z_
const char *_Str2
,
1121 _In_
size_t _MaxCount
,
1122 _In_opt_ _locale_t _Locale
);
1129 _In_z_
const char *_Str1
,
1130 _In_z_
const char *_Str2
,
1131 _In_
size_t _MaxCount
);
1138 _In_z_
const char *_Str1
,
1139 _In_z_
const char *_Str2
,
1140 _In_
size_t _MaxCount
,
1141 _In_opt_ _locale_t _Locale
);
1148 _In_z_
const char *_Str1
,
1149 _In_z_
const char *_Str2
,
1150 _In_
size_t _MaxCount
);
1157 _In_z_
const char *_Str1
,
1158 _In_z_
const char *_Str2
,
1159 _In_
size_t _MaxCount
,
1160 _In_opt_ _locale_t _Locale
);
1167 _In_z_
const char *_Str1
,
1168 _In_z_
const char *_Str2
,
1169 _In_
size_t _MaxCount
);
1176 _In_z_
const char *_Str1
,
1177 _In_z_
const char *_Str2
,
1178 _In_
size_t _MaxCount
,
1179 _In_opt_ _locale_t _Locale
);
1186 _In_z_
const char *_Str
);
1193 _In_z_
const char *_Str
,
1194 _In_
size_t _MaxCount
);
1201 _In_z_
const char *_Str
,
1202 _In_opt_ _locale_t _Locale
);
1209 _In_z_
const char *_Str
,
1210 _In_
size_t _MaxCount
,
1211 _In_opt_ _locale_t _Locale
);
1218 _In_z_
const char *_Src
,
1219 _In_
size_t _MaxCount
);
1226 _In_z_
const char *_Src
,
1227 _In_
size_t _MaxCount
,
1228 _In_opt_ _locale_t _Locale
);
1234 _Out_writes_(_MaxCount
) _Post_maybez_
char *_Dst
,
1235 _In_z_
const char *_Src
,
1236 _In_
size_t _MaxCount
);
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
);
1251 _Inout_updates_z_(_MaxCount
) char *_Str
,
1252 _In_
unsigned int _Val
,
1253 _In_
size_t _MaxCount
);
1259 _In_reads_z_(_Pos
-_Start
+ 1) const char *_Start
,
1260 _In_z_
const char *_Pos
);
1266 _In_z_
const char *_Ptr
);
1272 _In_reads_(_MaxCount
) _Pre_z_
const char *_Str
,
1273 _In_
size_t _MaxCount
);
1279 _In_reads_(_MaxCount
) _Pre_z_
const char *_Str
,
1280 _In_
size_t _MaxCount
);
1286 _In_z_
const char *_Str
);
1292 _In_reads_(_Count
) _Pre_z_
const char *_Ptr
,
1293 _In_
size_t _Count
);
1299 _In_z_
const char *_Str1
,
1300 _In_z_
const char *_Str2
);
1306 _Inout_
char *_Str
);
1313 _In_opt_ _locale_t _Locale
);
1319 _Inout_
char *_Str
);
1326 _In_opt_ _locale_t _Locale
);
1333 _In_z_
const char *_Str
);
1339 _Pre_notnull_ _Post_z_
char *_DstCh
,
1340 _In_z_
const char *_SrcCh
);
1343 #ifndef _CPP_TCHAR_INLINES_DEFINED
1344 #define _CPP_TCHAR_INLINES_DEFINED
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
)); }
1355 #define _tccmp(_cp1,_cp2) _tcsnccmp(_cp1,_cp2,1)
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
1378 #define _totupper _mbctoupper
1379 #define _totupper_l _mbctoupper_l
1380 #define _totlower _mbctolower
1381 #define _totlower_l _mbctolower_l
1383 #define _istlead _ismbblead
1384 #define _istleadbyte isleadbyte
1385 #define _istleadbyte_l _isleadbyte_l
1388 /** SBCS *********************************************************************/
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
;
1399 #ifndef _TCHAR_DEFINED
1400 #define _TCHAR_DEFINED
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
1419 #define _tcsnset _strnset
1420 #define _tcsnset_l _strnset_l
1421 #define _tcsrev _strrev
1422 #define _tcsset _strset
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
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
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
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
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
1472 #define _istlead(_Char) (0)
1473 #define _istleadbyte(_Char) (0)
1474 #define _istleadbyte_l(_Char,_Locale) (0)
1476 #define _tclen(_pc) (1)
1477 #define _tccpy(_pc1,_cpc2) (*(_pc1) = *(_cpc2))
1478 #define _tccmp(_cpc1,_cpc2) (((unsigned char)*(_cpc1))-((unsigned char)*(_cpc2)))
1480 /* dirent structures and functions */
1481 #define _tdirent dirent
1483 #define _topendir opendir
1484 #define _tclosedir closedir
1485 #define _treaddir readdir
1486 #define _trewinddir rewinddir
1487 #define _ttelldir telldir
1488 #define _tseekdir seekdir
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
1509 #define _totupper toupper
1510 #define _totupper_l _toupper_l
1511 #define _totlower tolower
1512 #define _totlower_l _tolower_l
1514 #define _istlegal(_c) (1)
1520 #define NULL ((void *)0)
1524 #define _strdec(_cpc1,_cpc2) ((_cpc1)>=(_cpc2) ? NULL : (_cpc2)-1)
1525 #define _strinc(_pc) ((_pc)+1)
1526 #define _strnextc(_cpc) ((unsigned int) *(const unsigned char *)(_cpc))
1527 #define _strninc(_pc,_sz) (((_pc)+(_sz)))
1528 _CRTIMP
size_t __cdecl
__strncnt(const char *_Str
,size_t _Cnt
);
1529 #define _strncnt(_cpc,_sz) (__strncnt(_cpc,_sz))
1530 #define _strspnp(_cpc1,_cpc2) (!_cpc1 ? NULL : ((*((_cpc1)+strspn(_cpc1,_cpc2))) ? ((_cpc1)+strspn(_cpc1,_cpc2)) : NULL))
1532 #define _strncpy_l(_Destination,_Source,_Count,_Locale) (strncpy(_Destination,_Source,_Count))
1533 #define _strncat_l(_Destination,_Source,_Count,_Locale) (strncat(_Destination,_Source,_Count))
1534 #define _strtok_l(_String,_Delimiters,_Locale) (strtok(_String,_Delimiters))
1535 #define _strnset_l(_Destination,_Value,_Count,_Locale) (_strnset(_Destination,_Value,_Count))
1536 #define _strset_l(_Destination,_Value,_Locale) (_strset(_Destination,_Value))
1539 #endif /* !UNICODE */
1540 /*****************************************************************************/
1542 #define _T(x) __T(x)
1543 #define _TEXT(x) __T(x)
1549 #include <sec_api/tchar_s.h>