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