History

win32 merge

bellard committed 21 years ago

Commit 48217021 parent d733dc782 files · +23836 −13Browse files

Showing the changes to win32/include/string.h (1 of 82 files). Show all

Unified · Split

win32/include/string.h+206−0
@@ -0,0 +1,206 @@
1/*
2 * string.h
3 *
4 * Definitions for memory and string functions.
5 *
6 * This file is part of the Mingw32 package.
7 *
8 * Contributors:
9 * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 * $Revision: 1.1 $
22 * $Author: bellard $
23 * $Date: 2005/04/14 23:49:21 $
24 *
25 */
26
27#ifndef _STRING_H_
28#define _STRING_H_
29
30/* All the headers include this file. */
31#include <_mingw.h>
32
33/*
34 * Define size_t, wchar_t and NULL
35 */
36#define __need_size_t
37#define __need_wchar_t
38#define __need_NULL
39#ifndef RC_INVOKED
40#include <stddef.h>
41#endif /* Not RC_INVOKED */
42
43#ifndef RC_INVOKED
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49/*
50 * Prototypes of the ANSI Standard C library string functions.
51 */
52void* memchr (const void*, int, size_t);
53int memcmp (const void*, const void*, size_t);
54void* memcpy (void*, const void*, size_t);
55void* memmove (void*, const void*, size_t);
56void* memset (void*, int, size_t);
57char* strcat (char*, const char*);
58char* strchr (const char*, int);
59int strcmp (const char*, const char*);
60int strcoll (const char*, const char*); /* Compare using locale */
61char* strcpy (char*, const char*);
62size_t strcspn (const char*, const char*);
63char* strerror (int); /* NOTE: NOT an old name wrapper. */
64char* _strerror (const char *);
65size_t strlen (const char*);
66char* strncat (char*, const char*, size_t);
67int strncmp (const char*, const char*, size_t);
68char* strncpy (char*, const char*, size_t);
69char* strpbrk (const char*, const char*);
70char* strrchr (const char*, int);
71size_t strspn (const char*, const char*);
72char* strstr (const char*, const char*);
73char* strtok (char*, const char*);
74size_t strxfrm (char*, const char*, size_t);
75
76#ifndef __STRICT_ANSI__
77/*
78 * Extra non-ANSI functions provided by the CRTDLL library
79 */
80void* _memccpy (void*, const void*, int, size_t);
81int _memicmp (const void*, const void*, size_t);
82char* _strdup (const char*);
83int _strcmpi (const char*, const char*);
84int _stricmp (const char*, const char*);
85int _stricoll (const char*, const char*);
86char* _strlwr (char*);
87int _strnicmp (const char*, const char*, size_t);
88char* _strnset (char*, int, size_t);
89char* _strrev (char*);
90char* _strset (char*, int);
91char* _strupr (char*);
92void _swab (const char*, char*, size_t);
93
94/*
95 * Multi-byte character functions
96 */
97unsigned char* _mbschr (unsigned char*, unsigned char*);
98unsigned char* _mbsncat (unsigned char*, const unsigned char*, size_t);
99unsigned char* _mbstok (unsigned char*, unsigned char*);
100
101#ifdef __MSVCRT__
102int _strncoll(const char*, const char*, size_t);
103int _strnicoll(const char*, const char*, size_t);
104#endif
105
106#endif /* Not __STRICT_ANSI__ */
107
108/*
109 * Unicode versions of the standard calls.
110 */
111wchar_t* wcscat (wchar_t*, const wchar_t*);
112wchar_t* wcschr (const wchar_t*, wchar_t);
113int wcscmp (const wchar_t*, const wchar_t*);
114int wcscoll (const wchar_t*, const wchar_t*);
115wchar_t* wcscpy (wchar_t*, const wchar_t*);
116size_t wcscspn (const wchar_t*, const wchar_t*);
117/* Note: No wcserror in CRTDLL. */
118size_t wcslen (const wchar_t*);
119wchar_t* wcsncat (wchar_t*, const wchar_t*, size_t);
120int wcsncmp(const wchar_t*, const wchar_t*, size_t);
121wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t);
122wchar_t* wcspbrk(const wchar_t*, const wchar_t*);
123wchar_t* wcsrchr(const wchar_t*, wchar_t);
124size_t wcsspn(const wchar_t*, const wchar_t*);
125wchar_t* wcsstr(const wchar_t*, const wchar_t*);
126wchar_t* wcstok(wchar_t*, const wchar_t*);
127size_t wcsxfrm(wchar_t*, const wchar_t*, size_t);
128
129#ifndef __STRICT_ANSI__
130/*
131 * Unicode versions of non-ANSI functions provided by CRTDLL.
132 */
133
134/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
135#define _wcscmpi _wcsicmp
136
137wchar_t* _wcsdup (wchar_t*);
138int _wcsicmp (const wchar_t*, const wchar_t*);
139int _wcsicoll (const wchar_t*, const wchar_t*);
140wchar_t* _wcslwr (wchar_t*);
141int _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
142wchar_t* _wcsnset (wchar_t*, wchar_t, size_t);
143wchar_t* _wcsrev (wchar_t*);
144wchar_t* _wcsset (wchar_t*, wchar_t);
145wchar_t* _wcsupr (wchar_t*);
146
147#ifdef __MSVCRT__
148int _wcsncoll(const wchar_t*, const wchar_t*, size_t);
149int _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
150#endif
151
152
153#endif /* Not __STRICT_ANSI__ */
154
155
156#ifndef __STRICT_ANSI__
157#ifndef _NO_OLDNAMES
158
159/*
160 * Non-underscored versions of non-ANSI functions. They live in liboldnames.a
161 * and provide a little extra portability. Also a few extra UNIX-isms like
162 * strcasecmp.
163 */
164
165void* memccpy (void*, const void*, int, size_t);
166int memicmp (const void*, const void*, size_t);
167char* strdup (const char*);
168int strcmpi (const char*, const char*);
169int stricmp (const char*, const char*);
170int strcasecmp (const char*, const char*);
171int stricoll (const char*, const char*);
172char* strlwr (char*);
173int strnicmp (const char*, const char*, size_t);
174int strncasecmp (const char*, const char*, size_t);
175char* strnset (char*, int, size_t);
176char* strrev (char*);
177char* strset (char*, int);
178char* strupr (char*);
179#ifndef _UWIN
180void swab (const char*, char*, size_t);
181#endif /* _UWIN */
182
183/* NOTE: There is no _wcscmpi, but this is for compatibility. */
184int wcscmpi (const wchar_t*, const wchar_t*);
185wchar_t* wcsdup (wchar_t*);
186int wcsicmp (const wchar_t*, const wchar_t*);
187int wcsicoll (const wchar_t*, const wchar_t*);
188wchar_t* wcslwr (wchar_t*);
189int wcsnicmp (const wchar_t*, const wchar_t*, size_t);
190wchar_t* wcsnset (wchar_t*, wchar_t, size_t);
191wchar_t* wcsrev (wchar_t*);
192wchar_t* wcsset (wchar_t*, wchar_t);
193wchar_t* wcsupr (wchar_t*);
194
195#endif /* Not _NO_OLDNAMES */
196#endif /* Not strict ANSI */
197
198
199#ifdef __cplusplus
200}
201#endif
202
203#endif /* Not RC_INVOKED */
204
205#endif /* Not _STRING_H_ */
206

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t