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.
8 #ifndef __WINE_STRING_H
9 #define __WINE_STRING_H
10 #ifndef __WINE_USE_MSVCRT
11 #define __WINE_USE_MSVCRT
14 #ifndef _WCHAR_T_DEFINED
15 #define _WCHAR_T_DEFINED
17 typedef unsigned short wchar_t;
23 # define __int64 long long
27 #ifndef _SIZE_T_DEFINED
29 typedef unsigned __int64
size_t;
31 typedef unsigned int size_t;
33 #define _SIZE_T_DEFINED
36 #ifndef _NLSCMP_DEFINED
37 #define _NLSCMPERROR ((unsigned int)0x7fffffff)
38 #define _NLSCMP_DEFINED
45 #define NULL ((void *)0)
53 void* _memccpy(void*,const void*,int,unsigned int);
54 int _memicmp(const void*,const void*,unsigned int);
55 int _strcmpi(const char*,const char*);
56 char* _strdup(const char*);
57 char* _strerror(const char*);
58 int _stricmp(const char*,const char*);
59 int _stricoll(const char*,const char*);
61 int _strnicmp(const char*,const char*,size_t);
62 char* _strnset(char*,int,size_t);
64 char* _strset(char*,int);
67 void* memchr(const void*,int,size_t);
68 int memcmp(const void*,const void*,size_t);
69 void* memcpy(void*,const void*,size_t);
70 void* memmove(void*,const void*,size_t);
71 void* memset(void*,int,size_t);
72 char* strcat(char*,const char*);
73 char* strchr(const char*,int);
74 int strcmp(const char*,const char*);
75 int strcoll(const char*,const char*);
76 char* strcpy(char*,const char*);
77 size_t strcspn(const char*,const char*);
79 size_t strlen(const char*);
80 char* strncat(char*,const char*,size_t);
81 int strncmp(const char*,const char*,size_t);
82 char* strncpy(char*,const char*,size_t);
83 char* strpbrk(const char*,const char*);
84 char* strrchr(const char*,int);
85 size_t strspn(const char*,const char*);
86 char* strstr(const char*,const char*);
87 char* strtok(char*,const char*);
88 size_t strxfrm(char*,const char*,size_t);
90 #ifndef _WSTRING_DEFINED
91 #define _WSTRING_DEFINED
92 wchar_t*_wcsdup(const wchar_t*);
93 int _wcsicmp(const wchar_t*,const wchar_t*);
94 int _wcsicoll(const wchar_t*,const wchar_t*);
95 wchar_t*_wcslwr(wchar_t*);
96 int _wcsnicmp(const wchar_t*,const wchar_t*,size_t);
97 wchar_t*_wcsnset(wchar_t*,wchar_t,size_t);
98 wchar_t*_wcsrev(wchar_t*);
99 wchar_t*_wcsset(wchar_t*,wchar_t);
100 wchar_t*_wcsupr(wchar_t*);
102 wchar_t*wcscat(wchar_t*,const wchar_t*);
103 wchar_t*wcschr(const wchar_t*,wchar_t);
104 int wcscmp(const wchar_t*,const wchar_t*);
105 int wcscoll(const wchar_t*,const wchar_t*);
106 wchar_t*wcscpy(wchar_t*,const wchar_t*);
107 size_t wcscspn(const wchar_t*,const wchar_t*);
108 size_t wcslen(const wchar_t*);
109 wchar_t*wcsncat(wchar_t*,const wchar_t*,size_t);
110 int wcsncmp(const wchar_t*,const wchar_t*,size_t);
111 wchar_t*wcsncpy(wchar_t*,const wchar_t*,size_t);
112 wchar_t*wcspbrk(const wchar_t*,const wchar_t*);
113 wchar_t*wcsrchr(const wchar_t*,wchar_t wcFor
);
114 size_t wcsspn(const wchar_t*,const wchar_t*);
115 wchar_t*wcsstr(const wchar_t*,const wchar_t*);
116 wchar_t*wcstok(wchar_t*,const wchar_t*);
117 size_t wcsxfrm(wchar_t*,const wchar_t*,size_t);
118 #endif /* _WSTRING_DEFINED */
125 static inline void* memccpy(void *s1
, const void *s2
, int c
, size_t n
) { return _memccpy(s1
, s2
, c
, n
); }
126 static inline int memicmp(const void* s1
, const void* s2
, size_t len
) { return _memicmp(s1
, s2
, len
); }
127 static inline int strcasecmp(const char* s1
, const char* s2
) { return _stricmp(s1
, s2
); }
128 static inline int strcmpi(const char* s1
, const char* s2
) { return _strcmpi(s1
, s2
); }
129 static inline char* strdup(const char* buf
) { return _strdup(buf
); }
130 static inline int stricmp(const char* s1
, const char* s2
) { return _stricmp(s1
, s2
); }
131 static inline int stricoll(const char* s1
, const char* s2
) { return _stricoll(s1
, s2
); }
132 static inline char* strlwr(char* str
) { return _strlwr(str
); }
133 static inline int strncasecmp(const char *str1
, const char *str2
, size_t n
) { return _strnicmp(str1
, str2
, n
); }
134 static inline int strnicmp(const char* s1
, const char* s2
, size_t n
) { return _strnicmp(s1
, s2
, n
); }
135 static inline char* strnset(char* str
, int value
, unsigned int len
) { return _strnset(str
, value
, len
); }
136 static inline char* strrev(char* str
) { return _strrev(str
); }
137 static inline char* strset(char* str
, int value
) { return _strset(str
, value
); }
138 static inline char* strupr(char* str
) { return _strupr(str
); }
140 static inline wchar_t* wcsdup(const wchar_t* str
) { return _wcsdup(str
); }
141 static inline int wcsicoll(const wchar_t* str1
, const wchar_t* str2
) { return _wcsicoll(str1
, str2
); }
142 static inline wchar_t* wcslwr(wchar_t* str
) { return _wcslwr(str
); }
143 static inline int wcsnicmp(const wchar_t* str1
, const wchar_t* str2
, size_t n
) { return _wcsnicmp(str1
, str2
, n
); }
144 static inline wchar_t* wcsnset(wchar_t* str
, wchar_t c
, size_t n
) { return _wcsnset(str
, c
, n
); }
145 static inline wchar_t* wcsrev(wchar_t* str
) { return _wcsrev(str
); }
146 static inline wchar_t* wcsset(wchar_t* str
, wchar_t c
) { return _wcsset(str
, c
); }
147 static inline wchar_t* wcsupr(wchar_t* str
) { return _wcsupr(str
); }
149 #endif /* __WINE_STRING_H */