- Put output from MSVC into the relevant output-i386 / obj-i386 files
[reactos.git] / reactos / w32api / include / tchar.h
1
2 #ifndef _TCHAR_H_
3 #define _TCHAR_H_
4
5 #include <string.h>
6
7 #ifdef _UNICODE
8
9 #define __T(q) L##q
10
11 #ifndef _TCHAR_DEFINED
12 #ifndef RC_INVOKED
13 typedef wchar_t TCHAR;
14 typedef wchar_t _TCHAR;
15 #endif /* Not RC_INVOKED */
16 #define _TCHAR_DEFINED
17 #endif
18
19 #define _TINT wint_t
20 #define _TSCHAR wchar_t
21 #define _TUCHAR wchar_t
22 #define _TXCHAR wchar_t
23 #define _TEOF WEOF
24 #define _tenviron _wenviron
25 #define _tfinddata_t _wfinddata_t
26
27 /* dirent structures and functions */
28 #define _tdirent _wdirent
29 #define _TDIR _WDIR
30 #define _topendir _wopendir
31 #define _tclosedir _wclosedir
32 #define _treaddir _wreaddir
33 #define _trewinddir _wrewinddir
34 #define _ttelldir _wtelldir
35 #define _tseekdir _wseekdir
36
37 #define _ttoi64 _wtoi64
38 #define _i64tot _i64tow
39 #define _ui64tot _ui64tow
40 #define _tcsnccoll _wstrncoll
41 #define _tcsncoll _wstrncoll
42 #define _tcsncicoll _wstrnicoll
43 #define _tfindfirsti64 _wfindfirsti64
44 #define _tfindnexti64 _wfindnexti64
45 #define _tfinddatai64_t _wfinddatai64_t
46
47 #define _tunlink _wunlink
48 #define _tgetdcwd _wgetdcwd
49
50 #define _fgettc fgetwc
51 #define _fgettchar _fgetwchar
52 #define _fgetts fgetws
53 #define _fputtc fputwc
54 #define _fputtchar _fputwchar
55 #define _fputts fputws
56 #define _ftprintf fwprintf
57 #define _ftscanf fwscanf
58 #define _gettc getwc
59 #define _gettchar getwchar
60 #define _getts getws
61 #define _istalnum iswalnum
62 #define _istalpha iswalpha
63 #define _istascii iswascii
64 #define _istcntrl iswcntrl
65 #define _istdigit iswdigit
66 #define _istgraph iswgraph
67 #define _istlead(c) 0
68 #define _istleadbyte(c) 0
69 #define _istlegal(c) 1
70 #define _istlower iswlower
71 #define _istprint iswprint
72 #define _istpunct iswpunct
73 #define _istspace iswspace
74 #define _istupper iswupper
75 #define _istxdigit iswxdigit
76 #define _itot _itow
77 #define _ltot _ltow
78 #define _puttc putwc
79 #define _puttchar putwchar
80 #define _putts putws
81 #define _tmain wmain
82 #define _sntprintf _snwprintf
83 #define _stprintf swprintf
84 #define _stscanf swscanf
85 #define _taccess _waccess
86 #define _tasctime _wasctime
87 #define _tccpy(d,s) (*(d)=*(s))
88 #define _tchdir _wchdir
89 #define _tclen(c) 2
90 #define _tchmod _wchmod
91 #define _tcreat _wcreat
92 #define _tcscat wcscat
93 #define _tcschr wcschr
94 #define _tcsclen wcslen
95 #define _tcscmp wcscmp
96 #define _tcscoll wcscoll
97 #define _tcscpy wcscpy
98 #define _tcscspn wcscspn
99 #define _tcsdec _wcsdec
100 #define _tcsdup _wcsdup
101 #define _tcsftime wcsftime
102 #define _tcsicmp _wcsicmp
103 #define _tcsicoll _wcsicoll
104 #define _tcsinc _wcsinc
105 #define _tcslen wcslen
106 #define _tcslwr _wcslwr
107 #define _tcsnbcnt _wcnscnt
108 #define _tcsncat wcsncat
109 #define _tcsnccat wcsncat
110 #define _tcsncmp wcsncmp
111 #define _tcsnccmp wcsncmp
112 #define _tcsnccnt _wcsncnt
113 #define _tcsnccpy wcsncpy
114 #define _tcsncicmp _wcsnicmp
115 #define _tcsncpy wcsncpy
116 #define _tcsncset _wcsnset
117 #define _tcsnextc _wcsnextc
118 #define _tcsnicmp _wcsnicmp
119 #define _tcsnicoll _wcsnicoll
120 #define _tcsninc _wcsninc
121 #define _tcsnccnt _wcsncnt
122 #define _tcsnset _wcsnset
123 #define _tcspbrk wcspbrk
124 #define _tcsspnp _wcsspnp
125 #define _tcsrchr wcsrchr
126 #define _tcsrev _wcsrev
127 #define _tcsset _wcsset
128 #define _tcsspn wcsspn
129 #define _tcsstr wcsstr
130 #define _tcstod wcstod
131 #define _tcstok wcstok
132 #define _tcstol wcstol
133 #define _tcstoul wcstoul
134 #define _tcsupr _wcsupr
135 #define _tcsxfrm wcsxfrm
136 #define _tctime _wctime
137 #define _texecl _wexecl
138 #define _texecle _wexecle
139 #define _texeclp _wexeclp
140 #define _texeclpe _wexeclpe
141 #define _texecv _wexecv
142 #define _texecve _wexecve
143 #define _texecvp _wexecvp
144 #define _texecvpe _wexecvpe
145 #define _tfdopen _wfdopen
146 #define _tfindfirst _wfindfirst
147 #define _tfindnext _wfindnext
148 #define _tfopen _wfopen
149 #define _tfreopen _wfreopen
150 #define _tfsopen _wfsopen
151 #define _tfullpath _wfullpath
152 #define _tgetcwd _wgetcwd
153 #define _tgetenv _wgetenv
154 #define _tmain wmain
155 #define _tmakepath _wmakepath
156 #define _tmkdir _wmkdir
157 #define _tmktemp _wmktemp
158 #define _tperror _wperror
159 #define _topen _wopen
160 #define _totlower towlower
161 #define _totupper towupper
162 #define _tpopen _wpopen
163 #define _tprintf wprintf
164 #define _tremove _wremove
165 #define _trename _wrename
166 #define _trmdir _wrmdir
167 #define _tsearchenv _wsearchenv
168 #define _tscanf wscanf
169 #define _tsetlocale _wsetlocale
170 #define _tsopen _wsopen
171 #define _tspawnl _wspawnl
172 #define _tspawnle _wspawnle
173 #define _tspawnlp _wspawnlp
174 #define _tspawnlpe _wspawnlpe
175 #define _tspawnv _wspawnv
176 #define _tspawnve _wspawnve
177 #define _tspawnvp _wspawnvp
178 #define _tspawnvpe _wspawnvpe
179 #define _tsplitpath _wsplitpath
180 #define _tstat _wstat
181 #define _tstrdate _wstrdate
182 #define _tstrtime _wstrtime
183 #define _tsystem _wsystem
184 #define _ttempnam _wtempnam
185 #define _ttmpnam _wtmpnam
186 #define _ttoi _wtoi
187 #define _ttol _wtol
188 #define _tutime _wutime
189 #define _tWinMain wWinMain
190 #define _ultot _ultow
191 #define _ungettc ungetwc
192 #define _vftprintf vfwprintf
193 #define _vsntprintf _vsnwprintf
194 #define _vstprintf vswprintf
195 #define _vtprintf vwprintf
196
197 #define _wcsdec(_wcs1, _wcs2) ((_wcs1)>=(_wcs2) ? NULL : (_wcs2)-1)
198 #define _wcsinc(_wcs) ((_wcs)+1)
199 #define _wcsnextc(_wcs) ((unsigned int) *(_wcs))
200 #define _wcsninc(_wcs, _inc) (((_wcs)+(_inc)))
201 #define _wcsncnt(_wcs, _cnt) ((wcslen(_wcs)>_cnt) ? _count : wcslen(_wcs))
202 #define _wcsspnp(_wcs1, _wcs2) ((*((_wcs1)+wcsspn(_wcs1,_wcs2))) ? ((_wcs1)+wcsspn(_wcs1,_wcs2)) : NULL)
203
204 #else
205
206 #define __T(q) q
207
208 #ifndef _TCHAR_DEFINED
209 #ifndef RC_INVOKED
210 typedef char TCHAR;
211 typedef char _TCHAR;
212 #endif
213 #define _TCHAR_DEFINED
214 #endif
215
216 #define _TINT int
217 #define _TSCHAR signed char
218 #define _TUCHAR unsigned char
219 #define _TXCHAR char
220 #define _TEOF EOF
221 #define _tenviron _environ
222 #define _tfinddata_t _finddata_t
223
224 /* dirent structures and functions */
225 #define _tdirent dirent
226 #define _TDIR DIR
227 #define _topendir opendir
228 #define _tclosedir closedir
229 #define _treaddir readdir
230 #define _trewinddir rewinddir
231 #define _ttelldir telldir
232 #define _tseekdir seekdir
233
234 #define _ttoi64 _atoi64
235 #define _i64tot _i64toa
236 #define _ui64tot _ui64toa
237 #define _tcsnccoll _strncoll
238 #define _tcsncoll _strncoll
239 #define _tcsncicoll _strnicoll
240 #define _tfindfirsti64 _findfirsti64
241 #define _tfindnexti64 _findnexti64
242 #define _tfinddatai64_t _finddatai64_t
243
244 #define _tunlink _unlink
245 #define _tgetdcwd _getdcwd
246
247 #define _fgettc fgetc
248 #define _fgettchar fgetchar
249 #define _fgetts fgets
250 #define _fputtc fputc
251 #define _fputtchar fputchar
252 #define _fputts fputs
253 #define _ftprintf fprintf
254 #define _ftscanf fscanf
255 #define _gettc getc
256 #define _gettchar getchar
257 #define _getts gets
258 #define _istalnum isalnum
259 #define _istalpha isalpha
260 #define _istascii __isascii
261 #define _istcntrl iscntrl
262 #define _istdigit isdigit
263 #define _istgraph isgraph
264 #define _istlead(c) 0
265 #define _istleadbyte(c) 0
266 #define _istlegal(c) 1
267 #define _istlower islower
268 #define _istprint isprint
269 #define _istpunct ispunct
270 #define _istspace isspace
271 #define _istupper isupper
272 #define _istxdigit isxdigit
273 #define _itot _itoa
274 #define _ltot _ltoa
275 #define _puttc putc
276 #define _puttchar putchar
277 #define _putts puts
278 #define _tmain main
279 #define _sntprintf _snprintf
280 #define _stprintf sprintf
281 #define _stscanf sscanf
282 #define _taccess _access
283 #define _tasctime asctime
284 #define _tccpy(d,s) (*(d)=*(s))
285 #define _tchdir _chdir
286 #define _tclen(c) 1
287 #define _tchmod _chmod
288 #define _tcreat _creat
289 #define _tcscat strcat
290 #define _tcschr strchr
291 #define _tcsclen strlen
292 #define _tcscmp strcmp
293 #define _tcscoll strcoll
294 #define _tcscpy strcpy
295 #define _tcscspn strcspn
296 #define _tcsdec _strdec
297 #define _tcsdup _strdup
298 #define _tcsftime strftime
299 #define _tcsicmp _stricmp
300 #define _tcsicoll _stricoll
301 #define _tcsinc _strinc
302 #define _tcslen strlen
303 #define _tcslwr _strlwr
304 #define _tcsnbcnt _strncnt
305 #define _tcsncat strncat
306 #define _tcsnccat strncat
307 #define _tcsncmp strncmp
308 #define _tcsnccmp strncmp
309 #define _tcsnccnt _strncnt
310 #define _tcsnccpy strncpy
311 #define _tcsncicmp _strnicmp
312 #define _tcsncpy strncpy
313 #define _tcsncset _strnset
314 #define _tcsnextc _strnextc
315 #define _tcsnicmp _strnicmp
316 #define _tcsnicoll _strnicoll
317 #define _tcsninc _strninc
318 #define _tcsnccnt _strncnt
319 #define _tcsnset _strnset
320 #define _tcspbrk strpbrk
321 #define _tcsspnp _strspnp
322 #define _tcsrchr strrchr
323 #define _tcsrev _strrev
324 #define _tcsset _strset
325 #define _tcsspn strspn
326 #define _tcsstr strstr
327 #define _tcstod strtod
328 #define _tcstok strtok
329 #define _tcstol strtol
330 #define _tcstoul strtoul
331 #define _tcsupr _strupr
332 #define _tcsxfrm strxfrm
333 #define _tctime ctime
334 #define _texecl _execl
335 #define _texecle _execle
336 #define _texeclp _execlp
337 #define _texeclpe _execlpe
338 #define _texecv _execv
339 #define _texecve _execve
340 #define _texecvp _execvp
341 #define _texecvpe _execvpe
342 #define _tfdopen _fdopen
343 #define _tfindfirst _findfirst
344 #define _tfindnext _findnext
345 #define _tfopen fopen
346 #define _tfreopen freopen
347 #define _tfsopen _fsopen
348 #define _tfullpath _fullpath
349 #define _tgetcwd _getcwd
350 #define _tgetenv getenv
351 #define _tmain main
352 #define _tmakepath _makepath
353 #define _tmkdir _mkdir
354 #define _tmktemp _mktemp
355 #define _tperror perror
356 #define _topen _open
357 #define _totlower tolower
358 #define _totupper toupper
359 #define _tpopen _popen
360 #define _tprintf printf
361 #define _tremove remove
362 #define _trename rename
363 #define _trmdir _rmdir
364 #define _tsearchenv _searchenv
365 #define _tscanf scanf
366 #define _tsetlocale setlocale
367 #define _tsopen _sopen
368 #define _tspawnl _spawnl
369 #define _tspawnle _spawnle
370 #define _tspawnlp _spawnlp
371 #define _tspawnlpe _spawnlpe
372 #define _tspawnv _spawnv
373 #define _tspawnve _spawnve
374 #define _tspawnvp _spawnvp
375 #define _tspawnvpe _spawnvpe
376 #define _tsplitpath _splitpath
377 #define _tstat _stat
378 #define _tstrdate _strdate
379 #define _tstrtime _strtime
380 #define _tsystem system
381 #define _ttempnam _tempnam
382 #define _ttmpnam tmpnam
383 #define _ttoi atoi
384 #define _ttol atol
385 #define _tutime _utime
386 #define _tWinMain WinMain
387 #define _ultot _ultoa
388 #define _ungettc ungetc
389 #define _vftprintf vfprintf
390 #define _vsntprintf _vsnprintf
391 #define _vstprintf vsprintf
392 #define _vtprintf vprintf
393
394 #define _strdec(_str1, _str2) ((_str1)>=(_str2) ? NULL : (_str2)-1)
395 #define _strinc(_str) ((_str)+1)
396 #define _strnextc(_str) ((unsigned int) *(_str))
397 #define _strninc(_str, _inc) (((_str)+(_inc)))
398 #define _strncnt(_str, _cnt) ((strlen(_str)>_cnt) ? _count : strlen(_str))
399 #define _strspnp(_str1, _str2) ((*((_str1)+strspn(_str1,_str2))) ? ((_str1)+strspn(_str1,_str2)) : NULL)
400
401 #endif
402
403
404
405
406 #define _TEXT(x) __T(x)
407 #define _T(x) __T(x)
408
409 #endif /* _TCHAR_H_ */
410