Fixed some issues found by winapi_check.
[wine] / include / msvcrt / string.h
1 /*
2  * String definitions
3  *
4  * Derived from the mingw header written by Colin Peters.
5  * Modified for Wine use by Jon Griffiths and Francois Gouget.
6  * This file is in the public domain.
7  */
8 #ifndef __WINE_STRING_H
9 #define __WINE_STRING_H
10
11 #include "winnt.h"
12
13 #ifdef USE_MSVCRT_PREFIX
14 #define MSVCRT(x)    MSVCRT_##x
15 #else
16 #define MSVCRT(x)    x
17 #endif
18
19
20 #ifndef MSVCRT_SIZE_T_DEFINED
21 typedef unsigned int MSVCRT(size_t);
22 #define MSVCRT_SIZE_T_DEFINED
23 #endif
24
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 unsigned char* _mbschr(const unsigned char*,unsigned int);
31 unsigned char* _mbsncat(unsigned char*,const unsigned char*,MSVCRT(size_t));
32 unsigned char* _mbstok(unsigned char*,unsigned char*);
33 void*       _memccpy(void*,const void*,int,MSVCRT(size_t));
34 int         _memicmp(const void*,const void*,MSVCRT(size_t));
35 int         _strcmpi(const char*,const char*);
36 char*       _strdup(const char*);
37 char*       _strerror(int);
38 int         _stricmp(const char*,const char*);
39 int         _stricoll(const char*,const char*);
40 char*       _strlwr(char*);
41 int         _strnicmp(const char*,const char*,MSVCRT(size_t));
42 char*       _strnset(char*,int,MSVCRT(size_t));
43 char*       _strrev(char*);
44 char*       _strset(char*,int);
45 char*       _strupr(char*);
46
47 void*       MSVCRT(memchr)(const void*,int,MSVCRT(size_t));
48 int         MSVCRT(memcmp)(const void*,const void*,MSVCRT(size_t));
49 void*       MSVCRT(memcpy)(void*,const void*,MSVCRT(size_t));
50 void*       MSVCRT(memmove)(void*,const void*,MSVCRT(size_t));
51 void*       MSVCRT(memset)(void*,int,MSVCRT(size_t));
52 char*       MSVCRT(strcat)(char*,const char*);
53 char*       MSVCRT(strchr)(const char*,int);
54 int         MSVCRT(strcmp)(const char*,const char*);
55 int         MSVCRT(strcoll)(const char*,const char*);
56 char*       MSVCRT(strcpy)(char*,const char*);
57 MSVCRT(size_t) MSVCRT(strcspn)(const char*,const char*);
58 char*       MSVCRT(strerror)(int);
59 MSVCRT(size_t) MSVCRT(strlen)(const char*);
60 char*       MSVCRT(strncat)(char*,const char*,MSVCRT(size_t));
61 int         MSVCRT(strncmp)(const char*,const char*,MSVCRT(size_t));
62 char*       MSVCRT(strncpy)(char*,const char*,MSVCRT(size_t));
63 char*       MSVCRT(strpbrk)(const char*,const char*);
64 char*       MSVCRT(strrchr)(const char*,int);
65 MSVCRT(size_t) MSVCRT(strspn)(const char*,const char*);
66 char*       MSVCRT(strstr)(const char*,const char*);
67 char*       MSVCRT(strtok)(char*,const char*);
68 MSVCRT(size_t) MSVCRT(strxfrm)(char*,const char*,MSVCRT(size_t));
69
70 WCHAR*      _wcsdup(const WCHAR*);
71 int         _wcsicmp(const WCHAR*,const WCHAR*);
72 int         _wcsicoll(const WCHAR*,const WCHAR*);
73 WCHAR*      _wcslwr(WCHAR*);
74 int         _wcsnicmp(const WCHAR*,const WCHAR*,MSVCRT(size_t));
75 WCHAR*      _wcsnset(WCHAR*,WCHAR,MSVCRT(size_t));
76 WCHAR*      _wcsrev(WCHAR*);
77 WCHAR*      _wcsset(WCHAR*,WCHAR);
78 WCHAR*      _wcsupr(WCHAR*);
79
80 WCHAR*      MSVCRT(wcscat)(WCHAR*,const WCHAR*);
81 WCHAR*      MSVCRT(wcschr)(const WCHAR*,WCHAR);
82 int         MSVCRT(wcscmp)(const WCHAR*,const WCHAR*);
83 int         MSVCRT(wcscoll)(const WCHAR*,const WCHAR*);
84 WCHAR*      MSVCRT(wcscpy)(WCHAR*,const WCHAR*);
85 MSVCRT(size_t) MSVCRT(wcscspn)(const WCHAR*,const WCHAR*);
86 MSVCRT(size_t) MSVCRT(wcslen)(const WCHAR*);
87 WCHAR*      MSVCRT(wcsncat)(WCHAR*,const WCHAR*,MSVCRT(size_t));
88 int         MSVCRT(wcsncmp)(const WCHAR*,const WCHAR*,MSVCRT(size_t));
89 WCHAR*      MSVCRT(wcsncpy)(WCHAR*,const WCHAR*,MSVCRT(size_t));
90 WCHAR*      MSVCRT(wcspbrk)(const WCHAR*,const WCHAR*);
91 WCHAR*      MSVCRT(wcsrchr)(const WCHAR*,WCHAR wcFor);
92 MSVCRT(size_t) MSVCRT(wcsspn)(const WCHAR*,const WCHAR*);
93 WCHAR*      MSVCRT(wcsstr)(const WCHAR*,const WCHAR*);
94 WCHAR*      MSVCRT(wcstok)(WCHAR*,const WCHAR*);
95 MSVCRT(size_t) MSVCRT(wcsxfrm)(WCHAR*,const WCHAR*,MSVCRT(size_t));
96
97 #ifdef __cplusplus
98 }
99 #endif
100
101
102 #ifndef USE_MSVCRT_PREFIX
103 #define memccpy _memccpy
104 #define memicmp _memicmp
105 #define strcasecmp _strcasecmp
106 #define strcmpi _strcmpi
107 #define strdup _strdup
108 #define stricmp _stricmp
109 #define stricoll _stricoll
110 #define strlwr _strlwr
111 #define strncasecmp _strncasecmp
112 #define strnicmp _strnicmp
113 #define strnset _strnset
114 #define strrev _strrev
115 #define strset _strset
116 #define strupr _strupr
117
118 #define wcsdup _wcsdup
119 #define wcsicoll _wcsicoll
120 #define wcslwr _wcslwr
121 #define wcsnicmp _wcsnicmp
122 #define wcsnset _wcsnset
123 #define wcsrev _wcsrev
124 #define wcsset _wcsset
125 #define wcsupr _wcsupr
126 #endif /* USE_MSVCRT_PREFIX */
127
128 #endif /* __WINE_STRING_H */