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.

639 lines
17 KiB

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