/***
*tchar.h - definitions for generic international text functions
*
* Copyright (c) 1991-1997, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Definitions for generic international functions, mostly defines
* which map string/formatted-io/ctype functions to char, wchar_t, or
* MBCS versions. To be used for compatibility between single-byte,
* multi-byte and Unicode text models.
*
* [Public]
*
****/
#if _MSC_VER > 1000 /*IFSTRIP=IGN*/
#pragma once
#endif
#ifndef _INC_TCHAR
#define _INC_TCHAR
#ifdef _MSC_VER
#pragma warning(disable:4514) /* disable unwanted C++ /W4 warning */
/* #pragma warning(default:4514) */ /* use this to reenable, if necessary */
#endif /* _MSC_VER */
#ifdef __cplusplus
extern "C" {
#endif
/* Define __cdecl for non-Microsoft compilers */
#if ( !defined(_MSC_VER) && !defined(__cdecl) )
#define __cdecl
#endif
/* Define _CRTIMP */
#ifndef _CRTIMP
#ifdef CRTDLL
#define _CRTIMP __declspec(dllexport)
#else /* ndef CRTDLL */
#ifdef _DLL
#define _CRTIMP __declspec(dllimport)
#else /* ndef _DLL */
#define _CRTIMP
#endif /* _DLL */
#endif /* CRTDLL */
#endif /* _CRTIMP */
#define _ftcscat _tcscat
#define _ftcschr _tcschr
#define _ftcscpy _tcscpy
#define _ftcscspn _tcscspn
#define _ftcslen _tcslen
#define _ftcsncat _tcsncat
#define _ftcsncpy _tcsncpy
#define _ftcspbrk _tcspbrk
#define _ftcsrchr _tcsrchr
#define _ftcsspn _tcsspn
#define _ftcsstr _tcsstr
#define _ftcstok _tcstok
#define _ftcsdup _tcsdup
#define _ftcsnset _tcsnset
#define _ftcsrev _tcsrev
#define _ftcsset _tcsset
#define _ftcscmp _tcscmp
#define _ftcsicmp _tcsicmp
#define _ftcsnccmp _tcsnccmp
#define _ftcsncmp _tcsncmp
#define _ftcsncicmp _tcsncicmp
#define _ftcsnicmp _tcsnicmp
#define _ftcscoll _tcscoll
#define _ftcsicoll _tcsicoll
#define _ftcsnccoll _tcsnccoll
#define _ftcsncoll _tcsncoll
#define _ftcsncicoll _tcsncicoll
#define _ftcsnicoll _tcsnicoll
/* Redundant "logical-character" mappings */
#define _ftcsclen _tcsclen
#define _ftcsnccat _tcsnccat
#define _ftcsnccpy _tcsnccpy
#define _ftcsncset _tcsncset
#define _ftcsdec _tcsdec
#define _ftcsinc _tcsinc
#define _ftcsnbcnt _tcsnbcnt
#define _ftcsnccnt _tcsnccnt
#define _ftcsnextc _tcsnextc
#define _ftcsninc _tcsninc
#define _ftcsspnp _tcsspnp
#define _ftcslwr _tcslwr
#define _ftcsupr _tcsupr
#define _ftclen _tclen
#define _ftccpy _tccpy
#define _ftccmp _tccmp
#ifdef _UNICODE
#ifdef __cplusplus
} /* ... extern "C" */
#endif
/* ++++++++++++++++++++ UNICODE ++++++++++++++++++++ */
#include <wchar.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _WCTYPE_T_DEFINED
typedef wchar_t wint_t;
typedef wchar_t wctype_t;
#define _WCTYPE_T_DEFINED
#endif
#ifndef __TCHAR_DEFINED
typedef wchar_t _TCHAR;
typedef wchar_t _TSCHAR;
typedef wchar_t _TUCHAR;
typedef wchar_t _TXCHAR;
typedef wint_t _TINT;
#define __TCHAR_DEFINED
#endif
#ifndef _TCHAR_DEFINED
#if !__STDC__
typedef wchar_t TCHAR;
#endif
#define _TCHAR_DEFINED
#endif
#define _TEOF WEOF
#define __T(x) L ## x
/* Program */
#define _tmain wmain
#define _tWinMain wWinMain
#define _tenviron _wenviron
#define __targv __wargv
/* Formatted i/o */
#define _tprintf wprintf
#define _ftprintf fwprintf
#define _stprintf swprintf
#define _sntprintf _snwprintf
#define _vtprintf vwprintf
#define _vftprintf vfwprintf
#define _vstprintf vswprintf
#define _vsntprintf _vsnwprintf
#define _tscanf wscanf
#define _ftscanf fwscanf
#define _stscanf swscanf
/* Unformatted i/o */
#define _fgettc fgetwc
#define _fgettchar _fgetwchar
#define _fgetts fgetws
#define _fputtc fputwc
#define _fputtchar _fputwchar
#define _fputts fputws
#define _gettc getwc
#define _gettchar getwchar
#define _getts _getws
#define _puttc putwc
#define _puttchar putwchar
#define _putts _putws
#define _ungettc ungetwc
/* String conversion functions */
#define _tcstod wcstod
#define _tcstol wcstol
#define _tcstoul wcstoul
#define _itot _itow
#define _ltot _ltow
#define _ultot _ultow
#define _ttoi _wtoi
#define _ttol _wtol
#define _ttoi64 _wtoi64
#define _i64tot _i64tow
#define _ui64tot _ui64tow
/* String functions */
#define _tcscat wcscat
#define _tcschr wcschr
#define _tcscpy wcscpy
#define _tcscspn wcscspn
#define _tcslen wcslen
#define _tcsncat wcsncat
#define _tcsncpy wcsncpy
#define _tcspbrk wcspbrk
#define _tcsrchr wcsrchr
#define _tcsspn wcsspn
#define _tcsstr wcsstr
#define _tcstok wcstok
#define _tcsdup _wcsdup
#define _tcsnset _wcsnset
#define _tcsrev _wcsrev
#define _tcsset _wcsset
#define _tcscmp wcscmp
#define _tcsicmp _wcsicmp
#define _tcsnccmp wcsncmp
#define _tcsncmp wcsncmp
#define _tcsncicmp _wcsnicmp
#define _tcsnicmp _wcsnicmp
#define _tcscoll wcscoll
#define _tcsicoll _wcsicoll
#define _tcsnccoll _wcsncoll
#define _tcsncoll _wcsncoll
#define _tcsncicoll _wcsnicoll
#define _tcsnicoll _wcsnicoll
/* Execute functions */
#define _texecl _wexecl
#define _texecle _wexecle
#define _texeclp _wexeclp
#define _texeclpe _wexeclpe
#define _texecv _wexecv
#define _texecve _wexecve
#define _texecvp _wexecvp
#define _texecvpe _wexecvpe
#define _tspawnl _wspawnl
#define _tspawnle _wspawnle
#define _tspawnlp _wspawnlp
#define _tspawnlpe _wspawnlpe
#define _tspawnv _wspawnv
#define _tspawnve _wspawnve
#define _tspawnvp _wspawnvp
#define _tspawnvp _wspawnvp
#define _tspawnvpe _wspawnvpe
#define _tsystem _wsystem
/* Time functions */
#define _tasctime _wasctime
#define _tctime _wctime
#define _tstrdate _wstrdate
#define _tstrtime _wstrtime
#define _tutime _wutime
#define _tcsftime wcsftime
/* Directory functions */
#define _tchdir _wchdir
#define _tgetcwd _wgetcwd
#define _tgetdcwd _wgetdcwd
#define _tmkdir _wmkdir
#define _trmdir _wrmdir
/* Environment/Path functions */
#define _tfullpath _wfullpath
#define _tgetenv _wgetenv
#define _tmakepath _wmakepath
#define _tputenv _wputenv
#define _tsearchenv _wsearchenv
#define _tsplitpath _wsplitpath
/* Stdio functions */
#define _tfdopen _wfdopen
#define _tfsopen _wfsopen
#define _tfopen _wfopen
#define _tfreopen _wfreopen
#define _tperror _wperror
#define _tpopen _wpopen
#define _ttempnam _wtempnam
#define _ttmpnam _wtmpnam
/* Io functions */
#define _taccess _waccess
#define _tchmod _wchmod
#define _tcreat _wcreat
#define _tfindfirst _wfindfirst
#define _tfindfirsti64 _wfindfirsti64
#define _tfindnext _wfindnext
#define _tfindnexti64 _wfindnexti64
#define _tmktemp _wmktemp
#define _topen _wopen
#define _tremove _wremove
#define _trename _wrename
#define _tsopen _wsopen
#define _tunlink _wunlink
#define _tfinddata_t _wfinddata_t
#define _tfinddatai64_t _wfinddatai64_t
/* Stat functions */
#define _tstat _wstat
#define _tstati64 _wstati64
/* Setlocale functions */
#define _tsetlocale _wsetlocale
/* Redundant "logical-character" mappings */
#define _tcsclen wcslen
#define _tcsnccat wcsncat
#define _tcsnccpy wcsncpy
#define _tcsncset _wcsnset
#define _tcsdec _wcsdec
#define _tcsinc _wcsinc
#define _tcsnbcnt _wcsncnt
#define _tcsnccnt _wcsncnt
#define _tcsnextc _wcsnextc
#define _tcsninc _wcsninc
#define _tcsspnp _wcsspnp
#define _tcslwr _wcsl
- 1
- 2
- 3
前往页