2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #ifndef POSITIONING_BASE_LIBRARY_LIBRARY_INCLUDE_TCHAR_H_
20 #define POSITIONING_BASE_LIBRARY_LIBRARY_INCLUDE_TCHAR_H_
28 #define _T(x) __TEXT(x)
31 /* ++++++++++++++++++++ UNICODE ++++++++++++++++++++ */
38 # define _tWinMain WinMain
40 # define _tWinMain wWinMain
44 #define _tprintf wprintf
45 #define _ftprintf fwprintf
46 #define _stprintf swprintf
47 #define _sntprintf _snwprintf
48 #define _vtprintf vwprintf
49 #define _vftprintf vfwprintf
50 #define _vstprintf vswprintf
51 #define _vsntprintf _vsnwprintf
52 #define _tscanf wscanf
53 #define _ftscanf fwscanf
54 #define _stscanf swscanf
57 #define _fgettc fgetwc
58 #define _fgetts fgetws
59 #define _fputtc fputwc
60 #define _fputts fputws
62 #define _gettchar getwchar
65 #define _puttchar putwchar
67 #define _ungettc ungetwc
69 #define _tfopen _wfopen
70 #define _tfreopen _wfreopen
72 /* String conversion functions */
73 #define _tcstod wcstod
74 #define _tcstol wcstol
75 #define _tcstoul wcstoul
82 #define _ttoi64 _wtoi64
84 /* String functions */
85 #define _tcscat wcscat
86 #define _tcschr wcschr
87 #define _tcscmp wcscmp
88 #define _tcscpy wcscpy
89 #define _tcscspn wcscspn
90 #define _tcslen wcslen
91 #define _tcsclen wcslen
93 #define _tcsncat wcsncat
94 #define _tcsnccat wcsncat
95 #define _tcsnccmp wcsncmp
96 #define _tcsncmp wcsncmp
97 #define _tcsncpy wcsncpy
98 #define _tcsnccpy wcsncpy
99 #define _tcspbrk wcspbrk
100 #define _tcsrchr wcsrchr
101 #define _tcsspn wcsspn
102 #define _tcsstr wcsstr
103 #define _tcstok wcstok
104 #define _tcsdup _wcsdup
105 #define _tcsicmp _wcsicmp
106 #define _tcsncicmp _wcsnicmp
107 #define _tcsnicmp _wcsnicmp
108 #define _tcsnset _wcsnset
109 #define _tcsncset _wcsnset
110 #define _tcsrev _wcsrev
111 #define _tcsset _wcsset
113 #define _tcslwr _wcslwr
114 #define _tcsupr _wcsupr
116 #define _istalpha iswalpha
117 #define _istupper iswupper
118 #define _istlower iswlower
119 #define _istdigit iswdigit
120 #define _istxdigit iswxdigit
121 #define _istspace iswspace
122 #define _istpunct iswpunct
123 #define _istalnum iswalnum
124 #define _istprint iswprint
125 #define _istgraph iswgraph
126 #define _istcntrl iswcntrl
127 #define _istascii iswascii
129 #define _totupper towupper
130 #define _totlower towlower
132 #define _istlegal(_c) (1)
133 #define _istlead(_c) (0)
134 #define _istleadbyte(_c) (0)
136 #else /* ndef UNICODE */
138 /* ++++++++++++++++++++ SBCS (MBCS in Not supported) ++++++++++++++++++++ */
144 #define _tWinMain WinMain
147 #define _tprintf printf
148 #define _ftprintf fprintf
149 #define _stprintf sprintf
150 #define _sntprintf _snprintf
151 #define _vtprintf vprintf
152 #define _vftprintf vfprintf
153 #define _vstprintf vsprintf
154 #define _vsntprintf _vsnprintf
155 #define _tscanf scanf
156 #define _ftscanf fscanf
157 #define _stscanf sscanf
159 /* Unformatted i/o */
160 #define _fgettc fgetc
161 #define _fgetts fgets
162 #define _fputtc fputc
163 #define _fputts fputs
165 #define _gettchar getchar
168 #define _puttchar putchar
170 #define _ungettc ungetc
172 #define _tfopen _wfopen
173 #define _tfreopen _wfreopen
177 #define _tcstod strtod
178 #define _tcstol strtol
179 #define _tcstoul strtoul
184 #define _ultot _ultoa
189 #define _ttoi64 atoi64
192 /* String functions */
193 #define _tcscat strcat
194 #define _tcschr strchr
195 #define _tcscmp strcmp
196 #define _tcscpy strcpy
197 #define _tcscspn strcspn
198 #define _tcslen strlen
199 #define _tcsclen strlen
201 #define _tcsncat strncat
202 #define _tcsnccat strncat
203 #define _tcsnccmp strncmp
204 #define _tcsncmp strncmp
205 #define _tcsncpy strncpy
206 #define _tcsnccpy strncpy
210 #define _tcspbrk strpbrk
211 #define _tcsrchr strrchr
212 #define _tcsspn strspn
215 #define _tcsstr strstr
216 #define _tcstok strtok
220 #define _tcsdup _strdup
221 #define _tcsicmp _stricmp
222 #define _tcsncicmp _strnicmp
223 #define _tcsnicmp _strnicmp
224 #define _tcsnset _strnset
225 #define _tcsncset _strnset
226 #define _tcsrev _strrev
227 #define _tcsset _strset
228 #define _tcslwr _strlwr
229 #define _tcsupr _strupr
234 #define _istalpha isalpha
235 #define _istupper isupper
236 #define _istlower islower
237 #define _istdigit isdigit
238 #define _istxdigit isxdigit
239 #define _istspace isspace
240 #define _istpunct ispunct
241 #define _istalnum isalnum
242 #define _istprint isprint
243 #define _istgraph isgraph
244 #define _istcntrl iscntrl
245 #define _istascii isascii
246 #define _totupper toupper
247 #define _totlower tolower
256 #endif // POSITIONING_BASE_LIBRARY_LIBRARY_INCLUDE_TCHAR_H_