home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / AutoPC / apcsdk10.exe / data1.cab / Emulation_Include_Files / string.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-13  |  8.5 KB  |  346 lines

  1. /***
  2. *string.h - declarations for string manipulation functions
  3. *
  4. *    Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *    This file contains the function declarations for the string
  8. *    manipulation functions.
  9. *    [ANSI/System V]
  10. *
  11. ****/
  12.  
  13. #ifndef _INC_STRING
  14.  
  15. #ifdef UNDER_CE
  16. #include <windef.h>
  17. #endif
  18.  
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22.  
  23.  
  24. #ifdef UNDER_CE
  25.  
  26. /*
  27.  * Conditional macro definition for function calling type and variable type
  28.  * qualifiers.
  29.  */
  30. #if   ( (_MSC_VER >= 800) && (_M_IX86 >= 300) )
  31.  
  32. /*
  33.  * Definitions for MS C8-32 (386/486) compiler
  34.  */
  35. #define _CRTAPI1 __cdecl
  36. #define _CRTAPI2 __cdecl
  37.  
  38. #else
  39.  
  40. /*
  41.  * Other compilers (e.g., MIPS)
  42.  */
  43. #define _CRTAPI1
  44. #define _CRTAPI2
  45.  
  46. #endif
  47.  
  48. #else /* UNDER_CE */
  49.  
  50. #define _CRTAPI1
  51. #define _CRTAPI2
  52.  
  53. #endif    /* UNDER_CE */
  54.  
  55.  
  56. #ifndef _WCHAR_T_DEFINED
  57. typedef unsigned short wchar_t;
  58. #define _WCHAR_T_DEFINED
  59. #endif
  60.  
  61.  
  62. /* define NULL pointer value */
  63.  
  64. #ifndef NULL
  65. #ifdef __cplusplus
  66. #define NULL    0
  67. #else
  68. #define NULL    ((void *)0)
  69. #endif
  70. #endif
  71.  
  72.  
  73. /* function prototypes */
  74.  
  75. #ifdef UNDER_CE
  76.  
  77. #ifndef _WSTRING_DEFINED
  78. #ifndef COREDLL
  79. extern __declspec(dllimport)
  80. #endif
  81. wchar_t * _CRTAPI1 wcscat(wchar_t *, const wchar_t *);
  82.  
  83. #ifndef COREDLL
  84. extern __declspec(dllimport)
  85. #endif
  86. wchar_t * _CRTAPI1 wcschr(const wchar_t *, wchar_t);
  87.  
  88. #ifndef COREDLL
  89. extern __declspec(dllimport)
  90. #endif
  91. int _CRTAPI1 wcscmp(const wchar_t *, const wchar_t *);
  92.  
  93. #ifndef COREDLL
  94. extern __declspec(dllimport)
  95. #endif
  96. wchar_t * _CRTAPI1 wcscpy(wchar_t *, const wchar_t *);
  97.  
  98. #ifndef COREDLL
  99. extern __declspec(dllimport)
  100. #endif
  101. size_t _CRTAPI1 wcscspn(const wchar_t *, const wchar_t *);
  102.  
  103. #ifndef COREDLL
  104. extern __declspec(dllimport)
  105. #endif
  106. size_t _CRTAPI1 wcslen(const wchar_t *); 
  107.  
  108. #ifndef COREDLL
  109. extern __declspec(dllimport)
  110. #endif
  111. size_t _CRTAPI1 mbstowcs(wchar_t *wcstr, const char *mbstr, size_t count);
  112.  
  113. #ifndef COREDLL
  114. extern __declspec(dllimport)
  115. #endif
  116. size_t _CRTAPI1 wcstombs(char *mbstr, const wchar_t *wcstr, size_t count);
  117.  
  118. #ifndef COREDLL
  119. extern __declspec(dllimport)
  120. #endif
  121. wchar_t * _CRTAPI1 wcsncat(wchar_t *, const wchar_t *, size_t);
  122.  
  123. #ifndef COREDLL
  124. extern __declspec(dllimport)
  125. #endif
  126. int _CRTAPI1 wcsncmp(const wchar_t *, const wchar_t *, size_t);
  127.  
  128. #ifndef COREDLL
  129. extern __declspec(dllimport)
  130. #endif
  131. wchar_t * _CRTAPI1 wcsncpy(wchar_t *, const wchar_t *, size_t);
  132.  
  133. #ifndef COREDLL
  134. extern __declspec(dllimport)
  135. #endif
  136. wchar_t * _CRTAPI1 wcspbrk(const wchar_t *, const wchar_t *);
  137.  
  138. #ifndef COREDLL
  139. extern __declspec(dllimport)
  140. #endif
  141. wchar_t * _CRTAPI1 wcsrchr(const wchar_t *, wchar_t);
  142.  
  143. #ifndef COREDLL
  144. extern __declspec(dllimport)
  145. #endif
  146. size_t _CRTAPI1 wcsspn(const wchar_t *, const wchar_t *);
  147.  
  148. #ifndef COREDLL
  149. extern __declspec(dllimport)
  150. #endif
  151. wchar_t * _CRTAPI1 wcsstr(const wchar_t *, const wchar_t *);
  152.  
  153. #ifndef COREDLL
  154. extern __declspec(dllimport)
  155. #endif
  156. wchar_t * _CRTAPI1 wcstok(wchar_t *, const wchar_t *);
  157.  
  158. #ifndef COREDLL
  159. extern __declspec(dllimport)
  160. #endif
  161. wchar_t * _CRTAPI1 _wcsdup(const wchar_t *);
  162.  
  163.  
  164. #ifndef COREDLL
  165. extern __declspec(dllimport)
  166. #endif
  167. int _CRTAPI1 _wcsicmp(const wchar_t *, const wchar_t *);
  168.  
  169. #ifndef COREDLL
  170. extern __declspec(dllimport)
  171. #endif
  172. int _CRTAPI1 _wcsnicmp(const wchar_t *, const wchar_t *, size_t);
  173.  
  174.  
  175. #ifndef COREDLL
  176. extern __declspec(dllimport)
  177. #endif
  178. wchar_t * _CRTAPI1 _wcsnset(wchar_t *, wchar_t, size_t);
  179.  
  180.  
  181. #ifndef COREDLL
  182. extern __declspec(dllimport)
  183. #endif
  184. wchar_t * _CRTAPI1 _wcsrev(wchar_t *);
  185.  
  186.  
  187. #ifndef COREDLL
  188. extern __declspec(dllimport)
  189. #endif
  190. wchar_t * _CRTAPI1 _wcsset(wchar_t *, wchar_t);
  191.  
  192. #ifndef COREDLL
  193. extern __declspec(dllimport)
  194. #endif
  195. wchar_t * _CRTAPI1 _wcslwr(wchar_t *);
  196.  
  197. #ifndef COREDLL
  198. extern __declspec(dllimport)
  199. #endif
  200. wchar_t * _CRTAPI1 _wcsupr(wchar_t *);
  201.  
  202. #define _wtoi _wtol
  203.  
  204. #ifndef COREDLL
  205. extern __declspec(dllimport)
  206. #endif
  207. long _CRTAPI1 _wtol(const wchar_t *);
  208.  
  209. #ifndef COREDLL
  210. extern __declspec(dllimport)
  211. #endif
  212. __int64 _CRTAPI1 _wtoll(const wchar_t *);
  213.  
  214. #define _WSTRING_DEFINED
  215. #endif
  216.  
  217. #endif        /* UNDER_CE */
  218.  
  219.  
  220. #ifndef _CRTIMP
  221. #ifdef _DLL
  222. #ifndef COREDLL
  223. #define _CRTIMP __declspec(dllimport)
  224. #else
  225. #define _CRTIMP
  226. #endif
  227. #else
  228. #define _CRTIMP
  229. #endif
  230. #endif
  231.  
  232. #ifndef _SIZE_T_DEFINED
  233. typedef unsigned int size_t;
  234. #define _SIZE_T_DEFINED
  235. #endif
  236.  
  237.  
  238. /* function prototypes */
  239.  
  240. #ifndef UNDER_CE
  241. _CRTIMP int __cdecl _strcmpi(const char *, const char *);
  242. _CRTIMP int __cdecl _stricmp(const char *, const char *);
  243. _CRTIMP int __cdecl strcoll(const char *, const char *);
  244. _CRTIMP int __cdecl _stricoll(const char *, const char *);
  245. _CRTIMP char * __cdecl _strlwr(char *);
  246. _CRTIMP char * __cdecl _strupr(char *);
  247. _CRTIMP size_t __cdecl strxfrm (char *, const char *, size_t);
  248. _CRTIMP char * __cdecl _strerror(const char *);
  249. _CRTIMP char * __cdecl strerror(int);
  250. _CRTIMP int __cdecl _strnicmp(const char *, const char *, size_t);
  251. _CRTIMP char * __cdecl _strdup(const char *);
  252. _CRTIMP char * __cdecl _strnset(char *, int, size_t);
  253. _CRTIMP char * __cdecl _strrev(char *);
  254.     char * __cdecl _strset(char *, int);
  255.  
  256. #endif
  257.  
  258. _CRTIMP void * __cdecl _memccpy(void *, const void *, int, unsigned int);
  259. _CRTIMP int __cdecl _memicmp(const void *, const void *, unsigned int);
  260.     void * _CRTAPI1 memchr(const void *, int, size_t);
  261.     int __cdecl memcmp(const void *, const void *, size_t);
  262.     void * __cdecl memcpy(void *, const void *, size_t);
  263.     void * __cdecl memset(void *, int, size_t);
  264. _CRTIMP void * _CRTAPI1 memmove(void *, const void *, size_t);
  265.     char * __cdecl strcat(char *, const char *);
  266. _CRTIMP char * __cdecl strchr(const char *, int);
  267.     int __cdecl strcmp(const char *, const char *);
  268.  
  269.     char * __cdecl strcpy(char *, const char *);
  270. _CRTIMP size_t __cdecl strcspn(const char *, const char *);
  271.     size_t __cdecl strlen(const char *);
  272. _CRTIMP char * __cdecl strncat(char *, const char *, size_t);
  273. _CRTIMP int __cdecl strncmp(const char *, const char *, size_t);
  274. _CRTIMP char * __cdecl strncpy(char *, const char *, size_t);
  275. _CRTIMP char * __cdecl strstr(const char *, const char *);
  276. _CRTIMP char * __cdecl strtok(char *, const char *);
  277.  
  278. #ifndef _WSTRING_DEFINED
  279. _CRTIMP wchar_t * __cdecl wcscat(wchar_t *, const wchar_t *);
  280. _CRTIMP wchar_t * __cdecl wcschr(const wchar_t *, wchar_t);
  281. _CRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *);
  282. _CRTIMP wchar_t * __cdecl wcscpy(wchar_t *, const wchar_t *);
  283. _CRTIMP size_t __cdecl wcscspn(const wchar_t *, const wchar_t *);
  284. _CRTIMP size_t __cdecl wcslen(const wchar_t *);
  285. _CRTIMP wchar_t * __cdecl wcsncat(wchar_t *, const wchar_t *, size_t);
  286. _CRTIMP int __cdecl wcsncmp(const wchar_t *, const wchar_t *, size_t);
  287. _CRTIMP wchar_t * __cdecl wcsncpy(wchar_t *, const wchar_t *, size_t);
  288. _CRTIMP wchar_t * __cdecl wcspbrk(const wchar_t *, const wchar_t *);
  289. _CRTIMP wchar_t * __cdecl wcsrchr(const wchar_t *, wchar_t);
  290. _CRTIMP size_t __cdecl wcsspn(const wchar_t *, const wchar_t *);
  291. _CRTIMP wchar_t * __cdecl wcsstr(const wchar_t *, const wchar_t *);
  292. _CRTIMP wchar_t * __cdecl wcstok(wchar_t *, const wchar_t *);
  293.  
  294. _CRTIMP wchar_t * __cdecl _wcsdup(const wchar_t *);
  295. _CRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *);
  296. _CRTIMP int __cdecl _wcsnicmp(const wchar_t *, const wchar_t *, size_t);
  297. _CRTIMP wchar_t * __cdecl _wcsnset(wchar_t *, wchar_t, size_t);
  298. _CRTIMP wchar_t * __cdecl _wcsrev(wchar_t *);
  299. _CRTIMP wchar_t * __cdecl _wcsset(wchar_t *, wchar_t);
  300.  
  301. #ifndef UNDER_CE
  302. _CRTIMP wchar_t * __cdecl _wcslwr(wchar_t *);
  303. _CRTIMP wchar_t * __cdecl _wcsupr(wchar_t *);
  304. _CRTIMP size_t __cdecl wcsxfrm(wchar_t *, const wchar_t *, size_t);
  305. _CRTIMP int __cdecl wcscoll(const wchar_t *, const wchar_t *);
  306. _CRTIMP int __cdecl _wcsicoll(const wchar_t *, const wchar_t *);
  307. #endif
  308.  
  309. /* old names */
  310. #define wcswcs wcsstr
  311.  
  312. #define _WSTRING_DEFINED
  313. #endif
  314.  
  315. #if !__STDC__
  316.  
  317. #ifndef UNDER_CE
  318. _CRTIMP void * __cdecl memccpy(void *, const void *, int, unsigned int);
  319. _CRTIMP int __cdecl memicmp(const void *, const void *, unsigned int);
  320. _CRTIMP int __cdecl strnicmp(const char *, const char *, size_t);
  321. _CRTIMP int __cdecl stricmp(const char *, const char *);
  322. _CRTIMP int __cdecl strcmpi(const char *, const char *);
  323. #endif
  324.  
  325. _CRTIMP char * __cdecl strupr(char *);
  326.  
  327. #define wcsdup    _wcsdup
  328. #define wcsicmp    _wcsicmp
  329. #define wcsnicmp _wcsnicmp
  330. #define wcsnset    _wcsnset
  331. #define wcsrev    _wcsrev
  332. #define wcsset    _wcsset
  333. #define wcslwr    _wcslwr
  334. #define wcsupr    _wcsupr
  335. #define wcsicoll _wcsicoll
  336. #endif    /* !__STDC__ */
  337.  
  338.  
  339. #ifdef __cplusplus
  340. }
  341. #endif
  342.  
  343.  
  344. #define _INC_STRING
  345. #endif    /* _INC_STRING */
  346.