Release 0.9.38.
[wine/wine-kai.git] / include / msvcrt / string.h
blobbf3994f0cbd5768e8db5a69e6b23977c812b4f96
1 /*
2 * String definitions
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 #ifndef __WINE_USE_MSVCRT
11 #define __WINE_USE_MSVCRT
12 #endif
14 #ifndef _WCHAR_T_DEFINED
15 #define _WCHAR_T_DEFINED
16 #ifndef __cplusplus
17 typedef unsigned short wchar_t;
18 #endif
19 #endif
21 #if !defined(_MSC_VER) && !defined(__int64)
22 #define __int64 long long
23 #endif
25 #if defined(__x86_64__) && !defined(_WIN64)
26 #define _WIN64
27 #endif
29 #ifndef _SIZE_T_DEFINED
30 #ifdef _WIN64
31 typedef unsigned __int64 size_t;
32 #else
33 typedef unsigned int size_t;
34 #endif
35 #define _SIZE_T_DEFINED
36 #endif
38 #ifndef _NLSCMP_DEFINED
39 #define _NLSCMPERROR ((unsigned int)0x7fffffff)
40 #define _NLSCMP_DEFINED
41 #endif
43 #ifndef NULL
44 #ifdef __cplusplus
45 #define NULL 0
46 #else
47 #define NULL ((void *)0)
48 #endif
49 #endif
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
55 void* _memccpy(void*,const void*,int,unsigned int);
56 int _memicmp(const void*,const void*,unsigned int);
57 int _strcmpi(const char*,const char*);
58 char* _strdup(const char*);
59 char* _strerror(const char*);
60 int _stricmp(const char*,const char*);
61 int _stricoll(const char*,const char*);
62 char* _strlwr(char*);
63 int _strnicmp(const char*,const char*,size_t);
64 char* _strnset(char*,int,size_t);
65 char* _strrev(char*);
66 char* _strset(char*,int);
67 char* _strupr(char*);
69 void* memchr(const void*,int,size_t);
70 int memcmp(const void*,const void*,size_t);
71 void* memcpy(void*,const void*,size_t);
72 void* memmove(void*,const void*,size_t);
73 void* memset(void*,int,size_t);
74 char* strcat(char*,const char*);
75 char* strchr(const char*,int);
76 int strcmp(const char*,const char*);
77 int strcoll(const char*,const char*);
78 char* strcpy(char*,const char*);
79 size_t strcspn(const char*,const char*);
80 char* strerror(int);
81 size_t strlen(const char*);
82 char* strncat(char*,const char*,size_t);
83 int strncmp(const char*,const char*,size_t);
84 char* strncpy(char*,const char*,size_t);
85 char* strpbrk(const char*,const char*);
86 char* strrchr(const char*,int);
87 size_t strspn(const char*,const char*);
88 char* strstr(const char*,const char*);
89 char* strtok(char*,const char*);
90 size_t strxfrm(char*,const char*,size_t);
92 #ifndef _WSTRING_DEFINED
93 #define _WSTRING_DEFINED
94 wchar_t*_wcsdup(const wchar_t*);
95 int _wcsicmp(const wchar_t*,const wchar_t*);
96 int _wcsicoll(const wchar_t*,const wchar_t*);
97 wchar_t*_wcslwr(wchar_t*);
98 int _wcsnicmp(const wchar_t*,const wchar_t*,size_t);
99 wchar_t*_wcsnset(wchar_t*,wchar_t,size_t);
100 wchar_t*_wcsrev(wchar_t*);
101 wchar_t*_wcsset(wchar_t*,wchar_t);
102 wchar_t*_wcsupr(wchar_t*);
104 wchar_t*wcscat(wchar_t*,const wchar_t*);
105 wchar_t*wcschr(const wchar_t*,wchar_t);
106 int wcscmp(const wchar_t*,const wchar_t*);
107 int wcscoll(const wchar_t*,const wchar_t*);
108 wchar_t*wcscpy(wchar_t*,const wchar_t*);
109 size_t wcscspn(const wchar_t*,const wchar_t*);
110 size_t wcslen(const wchar_t*);
111 wchar_t*wcsncat(wchar_t*,const wchar_t*,size_t);
112 int wcsncmp(const wchar_t*,const wchar_t*,size_t);
113 wchar_t*wcsncpy(wchar_t*,const wchar_t*,size_t);
114 wchar_t*wcspbrk(const wchar_t*,const wchar_t*);
115 wchar_t*wcsrchr(const wchar_t*,wchar_t wcFor);
116 size_t wcsspn(const wchar_t*,const wchar_t*);
117 wchar_t*wcsstr(const wchar_t*,const wchar_t*);
118 wchar_t*wcstok(wchar_t*,const wchar_t*);
119 size_t wcsxfrm(wchar_t*,const wchar_t*,size_t);
120 #endif /* _WSTRING_DEFINED */
122 #ifdef __cplusplus
124 #endif
127 static inline void* memccpy(void *s1, const void *s2, int c, size_t n) { return _memccpy(s1, s2, c, n); }
128 static inline int memicmp(const void* s1, const void* s2, size_t len) { return _memicmp(s1, s2, len); }
129 static inline int strcasecmp(const char* s1, const char* s2) { return _stricmp(s1, s2); }
130 static inline int strcmpi(const char* s1, const char* s2) { return _strcmpi(s1, s2); }
131 static inline char* strdup(const char* buf) { return _strdup(buf); }
132 static inline int stricmp(const char* s1, const char* s2) { return _stricmp(s1, s2); }
133 static inline int stricoll(const char* s1, const char* s2) { return _stricoll(s1, s2); }
134 static inline char* strlwr(char* str) { return _strlwr(str); }
135 static inline int strncasecmp(const char *str1, const char *str2, size_t n) { return _strnicmp(str1, str2, n); }
136 static inline int strnicmp(const char* s1, const char* s2, size_t n) { return _strnicmp(s1, s2, n); }
137 static inline char* strnset(char* str, int value, unsigned int len) { return _strnset(str, value, len); }
138 static inline char* strrev(char* str) { return _strrev(str); }
139 static inline char* strset(char* str, int value) { return _strset(str, value); }
140 static inline char* strupr(char* str) { return _strupr(str); }
142 static inline wchar_t* wcsdup(const wchar_t* str) { return _wcsdup(str); }
143 static inline int wcsicoll(const wchar_t* str1, const wchar_t* str2) { return _wcsicoll(str1, str2); }
144 static inline wchar_t* wcslwr(wchar_t* str) { return _wcslwr(str); }
145 static inline int wcsnicmp(const wchar_t* str1, const wchar_t* str2, size_t n) { return _wcsnicmp(str1, str2, n); }
146 static inline wchar_t* wcsnset(wchar_t* str, wchar_t c, size_t n) { return _wcsnset(str, c, n); }
147 static inline wchar_t* wcsrev(wchar_t* str) { return _wcsrev(str); }
148 static inline wchar_t* wcsset(wchar_t* str, wchar_t c) { return _wcsset(str, c); }
149 static inline wchar_t* wcsupr(wchar_t* str) { return _wcsupr(str); }
151 #endif /* __WINE_STRING_H */