Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

691 lines
18 KiB

  1. /***
  2. *wchar.h - declarations for wide character functions
  3. *
  4. * Copyright (c) 1992-1995, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * This file contains the types, macros and function declarations for
  8. * all wide character-related functions. They may also be declared in
  9. * individual header files on a functional basis.
  10. * [ISO]
  11. *
  12. * Note: keep in sync with ctype.h, stdio.h, stdlib.h, string.h, time.h.
  13. *
  14. * [Public]
  15. *
  16. ****/
  17. #if !defined(_M_MPPC) && !defined(_M_M68K)
  18. #ifndef _INC_WCHAR
  19. #define _INC_WCHAR
  20. #if !defined(_WIN32) && !defined(_MAC)
  21. #error ERROR: Only Mac or Win32 targets supported!
  22. #endif
  23. #ifdef _MSC_VER
  24. #pragma pack(push,8)
  25. #endif /* _MSC_VER */
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  30. #ifndef _CRTAPI1
  31. #if _MSC_VER >= 800 && _M_IX86 >= 300
  32. #define _CRTAPI1 __cdecl
  33. #else
  34. #define _CRTAPI1
  35. #endif
  36. #endif
  37. /* Define _CRTAPI2 (for compatibility with the NT SDK) */
  38. #ifndef _CRTAPI2
  39. #if _MSC_VER >= 800 && _M_IX86 >= 300
  40. #define _CRTAPI2 __cdecl
  41. #else
  42. #define _CRTAPI2
  43. #endif
  44. #endif
  45. /* Define _CRTIMP */
  46. #ifndef _CRTIMP
  47. #ifdef _NTSDK
  48. /* definition compatible with NT SDK */
  49. #define _CRTIMP
  50. #else /* ndef _NTSDK */
  51. /* current definition */
  52. #ifdef _DLL
  53. #define _CRTIMP __declspec(dllimport)
  54. #else /* ndef _DLL */
  55. #define _CRTIMP
  56. #endif /* _DLL */
  57. #endif /* _NTSDK */
  58. #endif /* _CRTIMP */
  59. /* Define __cdecl for non-Microsoft compilers */
  60. #if ( !defined(_MSC_VER) && !defined(__cdecl) )
  61. #define __cdecl
  62. #endif
  63. #ifndef _SIZE_T_DEFINED
  64. typedef unsigned int size_t;
  65. #define _SIZE_T_DEFINED
  66. #endif
  67. #ifndef _TIME_T_DEFINED
  68. typedef long time_t;
  69. #define _TIME_T_DEFINED
  70. #endif
  71. #ifndef _WCHAR_T_DEFINED
  72. typedef unsigned short wchar_t;
  73. #define _WCHAR_T_DEFINED
  74. #endif
  75. #ifndef _WCTYPE_T_DEFINED
  76. typedef wchar_t wint_t;
  77. typedef wchar_t wctype_t;
  78. #define _WCTYPE_T_DEFINED
  79. #endif
  80. #ifndef _VA_LIST_DEFINED
  81. #ifdef _M_ALPHA
  82. typedef struct {
  83. char *a0; /* pointer to first homed integer argument */
  84. int offset; /* byte offset of next parameter */
  85. } va_list;
  86. #else
  87. typedef char * va_list;
  88. #endif
  89. #define _VA_LIST_DEFINED
  90. #endif
  91. #ifndef WEOF
  92. #define WEOF (wint_t)(0xFFFF)
  93. #endif
  94. #ifndef _FILE_DEFINED
  95. struct _iobuf {
  96. char *_ptr;
  97. int _cnt;
  98. char *_base;
  99. int _flag;
  100. int _file;
  101. int _charbuf;
  102. int _bufsiz;
  103. char *_tmpfname;
  104. };
  105. typedef struct _iobuf FILE;
  106. #define _FILE_DEFINED
  107. #endif
  108. #ifndef _FSIZE_T_DEFINED
  109. typedef unsigned long _fsize_t; /* Could be 64 bits for Win32 */
  110. #define _FSIZE_T_DEFINED
  111. #endif
  112. #ifndef _WFINDDATA_T_DEFINED
  113. struct _wfinddata_t {
  114. unsigned attrib;
  115. time_t time_create; /* -1 for FAT file systems */
  116. time_t time_access; /* -1 for FAT file systems */
  117. time_t time_write;
  118. _fsize_t size;
  119. wchar_t name[260];
  120. };
  121. #if !defined(_M_MPPC) && !defined(_M_M68K)
  122. #if _INTEGRAL_MAX_BITS >= 64
  123. struct _wfinddatai64_t {
  124. unsigned attrib;
  125. time_t time_create; /* -1 for FAT file systems */
  126. time_t time_access; /* -1 for FAT file systems */
  127. time_t time_write;
  128. __int64 size;
  129. wchar_t name[260];
  130. };
  131. #endif
  132. #endif
  133. #define _WFINDDATA_T_DEFINED
  134. #endif
  135. /* define NULL pointer value */
  136. #ifndef NULL
  137. #ifdef __cplusplus
  138. #define NULL 0
  139. #else
  140. #define NULL ((void *)0)
  141. #endif
  142. #endif
  143. /*
  144. * This declaration allows the user access to the ctype look-up
  145. * array _ctype defined in ctype.obj by simply including ctype.h
  146. */
  147. #ifdef _NTSDK
  148. /* definitions and declarations compatible with NT SDK */
  149. #ifdef _DLL
  150. extern unsigned short * _ctype;
  151. #define _pctype (*_pctype_dll)
  152. extern unsigned short **_pctype_dll;
  153. #define _pwctype (*_pwctype_dll)
  154. extern unsigned short **_pwctype_dll;
  155. #else /* ndef _DLL */
  156. extern unsigned short _ctype[];
  157. extern unsigned short *_pctype;
  158. extern wctype_t *_pwctype;
  159. #endif /* _DLL */
  160. #else /* ndef _NTSDK */
  161. /* current declarations */
  162. _CRTIMP extern unsigned short _ctype[];
  163. #if defined(_DLL) && defined(_M_IX86)
  164. #define _pctype (*__p__pctype())
  165. _CRTIMP unsigned short ** __cdecl __p__pctype(void);
  166. #define _pwctype (*__p__pwctype())
  167. _CRTIMP wctype_t ** __cdecl ___p__pwctype(void);
  168. #else /* !(defined(_DLL) && defined(_M_IX86)) */
  169. _CRTIMP extern unsigned short *_pctype;
  170. _CRTIMP extern wctype_t *_pwctype;
  171. #endif /* defined(_DLL) && defined(_M_IX86) */
  172. #endif /* _NTSDK */
  173. /* set bit masks for the possible character types */
  174. #define _UPPER 0x1 /* upper case letter */
  175. #define _LOWER 0x2 /* lower case letter */
  176. #define _DIGIT 0x4 /* digit[0-9] */
  177. #define _SPACE 0x8 /* tab, carriage return, newline, */
  178. /* vertical tab or form feed */
  179. #define _PUNCT 0x10 /* punctuation character */
  180. #define _CONTROL 0x20 /* control character */
  181. #define _BLANK 0x40 /* space char */
  182. #define _HEX 0x80 /* hexadecimal digit */
  183. #define _LEADBYTE 0x8000 /* multibyte leadbyte */
  184. #define _ALPHA (0x0100|_UPPER|_LOWER) /* alphabetic character */
  185. /* Function prototypes */
  186. #ifndef _WCTYPE_DEFINED
  187. /* Character classification function prototypes */
  188. /* also declared in ctype.h */
  189. _CRTIMP int __cdecl iswalpha(wint_t);
  190. _CRTIMP int __cdecl iswupper(wint_t);
  191. _CRTIMP int __cdecl iswlower(wint_t);
  192. _CRTIMP int __cdecl iswdigit(wint_t);
  193. _CRTIMP int __cdecl iswxdigit(wint_t);
  194. _CRTIMP int __cdecl iswspace(wint_t);
  195. _CRTIMP int __cdecl iswpunct(wint_t);
  196. _CRTIMP int __cdecl iswalnum(wint_t);
  197. _CRTIMP int __cdecl iswprint(wint_t);
  198. _CRTIMP int __cdecl iswgraph(wint_t);
  199. _CRTIMP int __cdecl iswcntrl(wint_t);
  200. _CRTIMP int __cdecl iswascii(wint_t);
  201. _CRTIMP int __cdecl isleadbyte(int);
  202. _CRTIMP wchar_t __cdecl towupper(wchar_t);
  203. _CRTIMP wchar_t __cdecl towlower(wchar_t);
  204. _CRTIMP int __cdecl iswctype(wint_t, wctype_t);
  205. /* --------- The following functions are OBSOLETE --------- */
  206. _CRTIMP int __cdecl is_wctype(wint_t, wctype_t);
  207. /* --------- The preceding functions are OBSOLETE --------- */
  208. #define _WCTYPE_DEFINED
  209. #endif
  210. #ifndef _WDIRECT_DEFINED
  211. /* also declared in direct.h */
  212. _CRTIMP int __cdecl _wchdir(const wchar_t *);
  213. _CRTIMP wchar_t * __cdecl _wgetcwd(wchar_t *, int);
  214. _CRTIMP wchar_t * __cdecl _wgetdcwd(int, wchar_t *, int);
  215. _CRTIMP int __cdecl _wmkdir(const wchar_t *);
  216. _CRTIMP int __cdecl _wrmdir(const wchar_t *);
  217. #define _WDIRECT_DEFINED
  218. #endif
  219. #ifndef _WIO_DEFINED
  220. /* also declared in io.h */
  221. _CRTIMP int __cdecl _waccess(const wchar_t *, int);
  222. _CRTIMP int __cdecl _wchmod(const wchar_t *, int);
  223. _CRTIMP int __cdecl _wcreat(const wchar_t *, int);
  224. _CRTIMP long __cdecl _wfindfirst(wchar_t *, struct _wfinddata_t *);
  225. _CRTIMP int __cdecl _wfindnext(long, struct _wfinddata_t *);
  226. _CRTIMP int __cdecl _wunlink(const wchar_t *);
  227. _CRTIMP int __cdecl _wrename(const wchar_t *, const wchar_t *);
  228. _CRTIMP int __cdecl _wopen(const wchar_t *, int, ...);
  229. _CRTIMP int __cdecl _wsopen(const wchar_t *, int, int, ...);
  230. _CRTIMP wchar_t * __cdecl _wmktemp(wchar_t *);
  231. #if _INTEGRAL_MAX_BITS >= 64
  232. _CRTIMP long __cdecl _wfindfirsti64(wchar_t *, struct _wfinddatai64_t *);
  233. _CRTIMP int __cdecl _wfindnexti64(long, struct _wfinddatai64_t *);
  234. #endif
  235. #define _WIO_DEFINED
  236. #endif
  237. #ifndef _WLOCALE_DEFINED
  238. /* wide function prototypes, also declared in wchar.h */
  239. _CRTIMP wchar_t * __cdecl _wsetlocale(int, const wchar_t *);
  240. #define _WLOCALE_DEFINED
  241. #endif
  242. #ifndef _WPROCESS_DEFINED
  243. /* also declared in process.h */
  244. _CRTIMP int __cdecl _wexecl(const wchar_t *, const wchar_t *, ...);
  245. _CRTIMP int __cdecl _wexecle(const wchar_t *, const wchar_t *, ...);
  246. _CRTIMP int __cdecl _wexeclp(const wchar_t *, const wchar_t *, ...);
  247. _CRTIMP int __cdecl _wexeclpe(const wchar_t *, const wchar_t *, ...);
  248. _CRTIMP int __cdecl _wexecv(const wchar_t *, const wchar_t * const *);
  249. _CRTIMP int __cdecl _wexecve(const wchar_t *, const wchar_t * const *, const wchar_t * const *);
  250. _CRTIMP int __cdecl _wexecvp(const wchar_t *, const wchar_t * const *);
  251. _CRTIMP int __cdecl _wexecvpe(const wchar_t *, const wchar_t * const *, const wchar_t * const *);
  252. _CRTIMP int __cdecl _wspawnl(int, const wchar_t *, const wchar_t *, ...);
  253. _CRTIMP int __cdecl _wspawnle(int, const wchar_t *, const wchar_t *, ...);
  254. _CRTIMP int __cdecl _wspawnlp(int, const wchar_t *, const wchar_t *, ...);
  255. _CRTIMP int __cdecl _wspawnlpe(int, const wchar_t *, const wchar_t *, ...);
  256. _CRTIMP int __cdecl _wspawnv(int, const wchar_t *, const wchar_t * const *);
  257. _CRTIMP int __cdecl _wspawnve(int, const wchar_t *, const wchar_t * const *,
  258. const wchar_t * const *);
  259. _CRTIMP int __cdecl _wspawnvp(int, const wchar_t *, const wchar_t * const *);
  260. _CRTIMP int __cdecl _wspawnvpe(int, const wchar_t *, const wchar_t * const *,
  261. const wchar_t * const *);
  262. _CRTIMP int __cdecl _wsystem(const wchar_t *);
  263. #define _WPROCESS_DEFINED
  264. #endif
  265. #define iswalpha(_c) ( iswctype(_c,_ALPHA) )
  266. #define iswupper(_c) ( iswctype(_c,_UPPER) )
  267. #define iswlower(_c) ( iswctype(_c,_LOWER) )
  268. #define iswdigit(_c) ( iswctype(_c,_DIGIT) )
  269. #define iswxdigit(_c) ( iswctype(_c,_HEX) )
  270. #define iswspace(_c) ( iswctype(_c,_SPACE) )
  271. #define iswpunct(_c) ( iswctype(_c,_PUNCT) )
  272. #define iswalnum(_c) ( iswctype(_c,_ALPHA|_DIGIT) )
  273. #define iswprint(_c) ( iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT) )
  274. #define iswgraph(_c) ( iswctype(_c,_PUNCT|_ALPHA|_DIGIT) )
  275. #define iswcntrl(_c) ( iswctype(_c,_CONTROL) )
  276. #define iswascii(_c) ( (unsigned)(_c) < 0x80 )
  277. #define isleadbyte(_c) (_pctype[(unsigned char)(_c)] & _LEADBYTE)
  278. /* define structure for returning status information */
  279. #ifndef _INO_T_DEFINED
  280. typedef unsigned short _ino_t; /* i-node number (not used on DOS) */
  281. #if !__STDC__
  282. /* Non-ANSI name for compatibility */
  283. #ifdef _NTSDK
  284. #define ino_t _ino_t
  285. #else /* ndef _NTSDK */
  286. typedef unsigned short ino_t;
  287. #endif /* _NTSDK */
  288. #endif
  289. #define _INO_T_DEFINED
  290. #endif
  291. #ifndef _DEV_T_DEFINED
  292. #ifdef _NTSDK
  293. typedef short _dev_t; /* device code */
  294. #else /* ndef _NTSDK */
  295. typedef unsigned int _dev_t; /* device code */
  296. #endif /* _NTSDK */
  297. #if !__STDC__
  298. /* Non-ANSI name for compatibility */
  299. #ifdef _NTSDK
  300. #define dev_t _dev_t
  301. #else /* ndef _NTSDK */
  302. typedef unsigned int dev_t;
  303. #endif /* _NTSDK */
  304. #endif
  305. #define _DEV_T_DEFINED
  306. #endif
  307. #ifndef _OFF_T_DEFINED
  308. typedef long _off_t; /* file offset value */
  309. #if !__STDC__
  310. /* Non-ANSI name for compatibility */
  311. #ifdef _NTSDK
  312. #define off_t _off_t
  313. #else /* ndef _NTSDK */
  314. typedef long off_t;
  315. #endif /* _NTSDK */
  316. #endif
  317. #define _OFF_T_DEFINED
  318. #endif
  319. #ifndef _STAT_DEFINED
  320. struct _stat {
  321. _dev_t st_dev;
  322. _ino_t st_ino;
  323. unsigned short st_mode;
  324. short st_nlink;
  325. short st_uid;
  326. short st_gid;
  327. _dev_t st_rdev;
  328. _off_t st_size;
  329. time_t st_atime;
  330. time_t st_mtime;
  331. time_t st_ctime;
  332. };
  333. #if !__STDC__ && !defined(_NTSDK)
  334. /* Non-ANSI names for compatibility */
  335. struct stat {
  336. _dev_t st_dev;
  337. _ino_t st_ino;
  338. unsigned short st_mode;
  339. short st_nlink;
  340. short st_uid;
  341. short st_gid;
  342. _dev_t st_rdev;
  343. _off_t st_size;
  344. time_t st_atime;
  345. time_t st_mtime;
  346. time_t st_ctime;
  347. };
  348. #endif /* __STDC__ */
  349. #if _INTEGRAL_MAX_BITS >= 64
  350. struct _stati64 {
  351. _dev_t st_dev;
  352. _ino_t st_ino;
  353. unsigned short st_mode;
  354. short st_nlink;
  355. short st_uid;
  356. short st_gid;
  357. _dev_t st_rdev;
  358. __int64 st_size;
  359. time_t st_atime;
  360. time_t st_mtime;
  361. time_t st_ctime;
  362. };
  363. #endif
  364. #define _STAT_DEFINED
  365. #endif
  366. #ifndef _WSTAT_DEFINED
  367. /* also declared in stat.h */
  368. _CRTIMP int __cdecl _wstat(const wchar_t *, struct _stat *);
  369. #if _INTEGRAL_MAX_BITS >= 64
  370. _CRTIMP int __cdecl _wstati64(const wchar_t *, struct _stati64 *);
  371. #endif
  372. #define _WSTAT_DEFINED
  373. #endif
  374. #ifndef _WSTDIO_DEFINED
  375. /* also declared in stdio.h */
  376. #ifdef _POSIX_
  377. _CRTIMP FILE * __cdecl _wfsopen(const wchar_t *, const wchar_t *);
  378. #else
  379. _CRTIMP FILE * __cdecl _wfsopen(const wchar_t *, const wchar_t *, int);
  380. #endif
  381. _CRTIMP wint_t __cdecl fgetwc(FILE *);
  382. _CRTIMP wint_t __cdecl _fgetwchar(void);
  383. _CRTIMP wint_t __cdecl fputwc(wint_t, FILE *);
  384. _CRTIMP wint_t __cdecl _fputwchar(wint_t);
  385. _CRTIMP wint_t __cdecl getwc(FILE *);
  386. _CRTIMP wint_t __cdecl getwchar(void);
  387. _CRTIMP wint_t __cdecl putwc(wint_t, FILE *);
  388. _CRTIMP wint_t __cdecl putwchar(wint_t);
  389. _CRTIMP wint_t __cdecl ungetwc(wint_t, FILE *);
  390. _CRTIMP wchar_t * __cdecl fgetws(wchar_t *, int, FILE *);
  391. _CRTIMP int __cdecl fputws(const wchar_t *, FILE *);
  392. _CRTIMP wchar_t * __cdecl _getws(wchar_t *);
  393. _CRTIMP int __cdecl _putws(const wchar_t *);
  394. _CRTIMP int __cdecl fwprintf(FILE *, const wchar_t *, ...);
  395. _CRTIMP int __cdecl wprintf(const wchar_t *, ...);
  396. _CRTIMP int __cdecl _snwprintf(wchar_t *, size_t, const wchar_t *, ...);
  397. _CRTIMP int __cdecl swprintf(wchar_t *, const wchar_t *, ...);
  398. _CRTIMP int __cdecl vfwprintf(FILE *, const wchar_t *, va_list);
  399. _CRTIMP int __cdecl vwprintf(const wchar_t *, va_list);
  400. _CRTIMP int __cdecl _vsnwprintf(wchar_t *, size_t, const wchar_t *, va_list);
  401. _CRTIMP int __cdecl vswprintf(wchar_t *, const wchar_t *, va_list);
  402. _CRTIMP int __cdecl fwscanf(FILE *, const wchar_t *, ...);
  403. _CRTIMP int __cdecl swscanf(const wchar_t *, const wchar_t *, ...);
  404. _CRTIMP int __cdecl wscanf(const wchar_t *, ...);
  405. #define getwchar() fgetwc(stdin)
  406. #define putwchar(_c) fputwc((_c),stdout)
  407. #define getwc(_stm) fgetwc(_stm)
  408. #define putwc(_c,_stm) fputwc(_c,_stm)
  409. _CRTIMP FILE * __cdecl _wfdopen(int, const wchar_t *);
  410. _CRTIMP FILE * __cdecl _wfopen(const wchar_t *, const wchar_t *);
  411. _CRTIMP FILE * __cdecl _wfreopen(const wchar_t *, const wchar_t *, FILE *);
  412. _CRTIMP void __cdecl _wperror(const wchar_t *);
  413. _CRTIMP FILE * __cdecl _wpopen(const wchar_t *, const wchar_t *);
  414. _CRTIMP int __cdecl _wremove(const wchar_t *);
  415. _CRTIMP wchar_t * __cdecl _wtempnam(const wchar_t *, const wchar_t *);
  416. _CRTIMP wchar_t * __cdecl _wtmpnam(wchar_t *);
  417. #define _WSTDIO_DEFINED
  418. #endif
  419. #ifndef _WSTDLIB_DEFINED
  420. /* also declared in stdlib.h */
  421. _CRTIMP wchar_t * __cdecl _itow (int, wchar_t *, int);
  422. _CRTIMP wchar_t * __cdecl _ltow (long, wchar_t *, int);
  423. _CRTIMP wchar_t * __cdecl _ultow (unsigned long, wchar_t *, int);
  424. _CRTIMP double __cdecl wcstod(const wchar_t *, wchar_t **);
  425. _CRTIMP long __cdecl wcstol(const wchar_t *, wchar_t **, int);
  426. _CRTIMP unsigned long __cdecl wcstoul(const wchar_t *, wchar_t **, int);
  427. _CRTIMP wchar_t * __cdecl _wgetenv(const wchar_t *);
  428. _CRTIMP int __cdecl _wsystem(const wchar_t *);
  429. _CRTIMP int __cdecl _wtoi(const wchar_t *);
  430. _CRTIMP long __cdecl _wtol(const wchar_t *);
  431. #define _WSTDLIB_DEFINED
  432. #endif
  433. #ifndef _POSIX_
  434. #ifndef _WSTDLIBP_DEFINED
  435. /* also declared in stdlib.h */
  436. _CRTIMP wchar_t * __cdecl _wfullpath(wchar_t *, const wchar_t *, size_t);
  437. _CRTIMP void __cdecl _wmakepath(wchar_t *, const wchar_t *, const wchar_t *, const wchar_t *,
  438. const wchar_t *);
  439. _CRTIMP void __cdecl _wperror(const wchar_t *);
  440. _CRTIMP int __cdecl _wputenv(const wchar_t *);
  441. _CRTIMP void __cdecl _wsearchenv(const wchar_t *, const wchar_t *, wchar_t *);
  442. _CRTIMP void __cdecl _wsplitpath(const wchar_t *, wchar_t *, wchar_t *, wchar_t *, wchar_t *);
  443. #define _WSTDLIBP_DEFINED
  444. #endif
  445. #endif /* _POSIX_ */
  446. #ifndef _WSTRING_DEFINED
  447. /* also declared in string.h */
  448. _CRTIMP wchar_t * __cdecl wcscat(wchar_t *, const wchar_t *);
  449. _CRTIMP wchar_t * __cdecl wcschr(const wchar_t *, wchar_t);
  450. _CRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *);
  451. _CRTIMP wchar_t * __cdecl wcscpy(wchar_t *, const wchar_t *);
  452. _CRTIMP size_t __cdecl wcscspn(const wchar_t *, const wchar_t *);
  453. _CRTIMP size_t __cdecl wcslen(const wchar_t *);
  454. _CRTIMP wchar_t * __cdecl wcsncat(wchar_t *, const wchar_t *, size_t);
  455. _CRTIMP int __cdecl wcsncmp(const wchar_t *, const wchar_t *, size_t);
  456. _CRTIMP wchar_t * __cdecl wcsncpy(wchar_t *, const wchar_t *, size_t);
  457. _CRTIMP wchar_t * __cdecl wcspbrk(const wchar_t *, const wchar_t *);
  458. _CRTIMP wchar_t * __cdecl wcsrchr(const wchar_t *, wchar_t);
  459. _CRTIMP size_t __cdecl wcsspn(const wchar_t *, const wchar_t *);
  460. _CRTIMP wchar_t * __cdecl wcsstr(const wchar_t *, const wchar_t *);
  461. _CRTIMP wchar_t * __cdecl wcstok(wchar_t *, const wchar_t *);
  462. _CRTIMP wchar_t * __cdecl _wcsdup(const wchar_t *);
  463. _CRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *);
  464. _CRTIMP int __cdecl _wcsnicmp(const wchar_t *, const wchar_t *, size_t);
  465. _CRTIMP wchar_t * __cdecl _wcsnset(wchar_t *, wchar_t, size_t);
  466. _CRTIMP wchar_t * __cdecl _wcsrev(wchar_t *);
  467. _CRTIMP wchar_t * __cdecl _wcsset(wchar_t *, wchar_t);
  468. _CRTIMP wchar_t * __cdecl _wcslwr(wchar_t *);
  469. _CRTIMP wchar_t * __cdecl _wcsupr(wchar_t *);
  470. _CRTIMP size_t __cdecl wcsxfrm(wchar_t *, const wchar_t *, size_t);
  471. _CRTIMP int __cdecl wcscoll(const wchar_t *, const wchar_t *);
  472. _CRTIMP int __cdecl _wcsicoll(const wchar_t *, const wchar_t *);
  473. _CRTIMP int __cdecl _wcsncoll(const wchar_t *, const wchar_t *, size_t);
  474. _CRTIMP int __cdecl _wcsnicoll(const wchar_t *, const wchar_t *, size_t);
  475. /* Old names */
  476. #define wcswcs wcsstr
  477. #if !__STDC__
  478. #ifdef _NTSDK
  479. /* Non-ANSI names for compatibility */
  480. #define wcsdup _wcsdup
  481. #define wcsicmp _wcsicmp
  482. #define wcsnicmp _wcsnicmp
  483. #define wcsnset _wcsnset
  484. #define wcsrev _wcsrev
  485. #define wcsset _wcsset
  486. #define wcslwr _wcslwr
  487. #define wcsupr _wcsupr
  488. #define wcsicoll _wcsicoll
  489. #else /* ndef _NTSDK */
  490. /* prototypes for oldnames.lib functions */
  491. _CRTIMP wchar_t * __cdecl wcsdup(const wchar_t *);
  492. _CRTIMP int __cdecl wcsicmp(const wchar_t *, const wchar_t *);
  493. _CRTIMP int __cdecl wcsnicmp(const wchar_t *, const wchar_t *, size_t);
  494. _CRTIMP wchar_t * __cdecl wcsnset(wchar_t *, wchar_t, size_t);
  495. _CRTIMP wchar_t * __cdecl wcsrev(wchar_t *);
  496. _CRTIMP wchar_t * __cdecl wcsset(wchar_t *, wchar_t);
  497. _CRTIMP wchar_t * __cdecl wcslwr(wchar_t *);
  498. _CRTIMP wchar_t * __cdecl wcsupr(wchar_t *);
  499. _CRTIMP int __cdecl wcsicoll(const wchar_t *, const wchar_t *);
  500. #endif /* ndef _NTSDK */
  501. #endif /* !__STDC__ */
  502. #define _WSTRING_DEFINED
  503. #endif
  504. #ifndef _TM_DEFINED
  505. struct tm {
  506. int tm_sec; /* seconds after the minute - [0,59] */
  507. int tm_min; /* minutes after the hour - [0,59] */
  508. int tm_hour; /* hours since midnight - [0,23] */
  509. int tm_mday; /* day of the month - [1,31] */
  510. int tm_mon; /* months since January - [0,11] */
  511. int tm_year; /* years since 1900 */
  512. int tm_wday; /* days since Sunday - [0,6] */
  513. int tm_yday; /* days since January 1 - [0,365] */
  514. int tm_isdst; /* daylight savings time flag */
  515. };
  516. #define _TM_DEFINED
  517. #endif
  518. #ifndef _WTIME_DEFINED
  519. /* also declared in time.h */
  520. _CRTIMP wchar_t * __cdecl _wasctime(const struct tm *);
  521. _CRTIMP wchar_t * __cdecl _wctime(const time_t *);
  522. _CRTIMP size_t __cdecl wcsftime(wchar_t *, size_t, const wchar_t *,
  523. const struct tm *);
  524. _CRTIMP wchar_t * __cdecl _wstrdate(wchar_t *);
  525. _CRTIMP wchar_t * __cdecl _wstrtime(wchar_t *);
  526. #define _WTIME_DEFINED
  527. #endif
  528. #ifdef __cplusplus
  529. }
  530. #endif
  531. #ifdef _MSC_VER
  532. #pragma pack(pop)
  533. #endif /* _MSC_VER */
  534. #endif /* _INC_WCHAR */
  535. #endif /* !defined(_M_MPPC) && !defined(_M_M68K) */