blob: d84c3e3b66394a4f77e9c7d414de465710a2ef18 [file] [log] [blame]
Daniel Stenberg7da93d52002-06-15 15:49:32 +00001/*
2 * string.h
3 *
4 * Definitions for memory and string functions.
5 */
6
7#ifndef _STRING_H_
Andree Buschmann0b7dcd62010-02-22 21:24:09 +00008#define _STRING_H_
Daniel Stenberg7da93d52002-06-15 15:49:32 +00009
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14#include "_ansi.h"
Daniel Stenberg7da93d52002-06-15 15:49:32 +000015
Thomas Martitz50a6ca32010-05-06 21:04:40 +000016#if !defined(__size_t_defined)&& !defined(_SIZE_T_) && !defined(size_t) && !defined(_SIZE_T_DECLARED)
17#define __size_t_defined
18#define _SIZE_T
19#define _SIZE_T_
20#define _SIZE_T_DECLARED
21#define size_t size_t
22typedef unsigned long size_t;
23#endif
24
Daniel Stenberg7da93d52002-06-15 15:49:32 +000025#ifndef NULL
Michael Sevakis0b0c23f2007-10-15 07:59:13 +000026#define NULL ((void*)0)
Daniel Stenberg7da93d52002-06-15 15:49:32 +000027#endif
28
Andree Buschmann0b7dcd62010-02-22 21:24:09 +000029_PTR _EXFUN(memchr,(const _PTR, int, size_t));
30int _EXFUN(memcmp,(const _PTR, const _PTR, size_t));
31_PTR _EXFUN(memcpy,(_PTR, const _PTR, size_t));
32_PTR _EXFUN(memmove,(_PTR, const _PTR, size_t));
33_PTR _EXFUN(memset,(_PTR, int, size_t));
34char *_EXFUN(strcat,(char *, const char *));
35char *_EXFUN(strchr,(const char *, int));
36int _EXFUN(strcmp,(const char *, const char *));
37int _EXFUN(strcoll,(const char *, const char *));
38char *_EXFUN(strcpy,(char *, const char *));
39size_t _EXFUN(strcspn,(const char *, const char *));
40char *_EXFUN(strerror,(int));
41size_t _EXFUN(strlen,(const char *));
42char *_EXFUN(strncat,(char *, const char *, size_t));
43int _EXFUN(strncmp,(const char *, const char *, size_t));
44char *_EXFUN(strpbrk,(const char *, const char *));
45char *_EXFUN(strrchr,(const char *, int));
46size_t _EXFUN(strspn,(const char *, const char *));
47char *_EXFUN(strstr,(const char *, const char *));
48char *_EXFUN(strcasestr,(const char *, const char *));
Daniel Stenberg7da93d52002-06-15 15:49:32 +000049
Nils Wallménius3d4701a2009-07-14 13:57:45 +000050size_t strlcpy(char *dst, const char *src, size_t siz);
Torne Wuff6e9af8b2010-01-02 13:31:46 +000051size_t strlcat(char *dst, const char *src, size_t siz);
Nils Wallménius3d4701a2009-07-14 13:57:45 +000052
Daniel Stenberg7da93d52002-06-15 15:49:32 +000053#ifndef _REENT_ONLY
Andree Buschmann0b7dcd62010-02-22 21:24:09 +000054char *_EXFUN(strtok,(char *, const char *));
Daniel Stenberg7da93d52002-06-15 15:49:32 +000055#endif
56
Andree Buschmann0b7dcd62010-02-22 21:24:09 +000057size_t _EXFUN(strxfrm,(char *, const char *, size_t));
Daniel Stenberg7da93d52002-06-15 15:49:32 +000058
59#ifndef __STRICT_ANSI__
Andree Buschmann0b7dcd62010-02-22 21:24:09 +000060char *_EXFUN(strtok_r,(char *, const char *, char **));
Daniel Stenberg7da93d52002-06-15 15:49:32 +000061
Andree Buschmann0b7dcd62010-02-22 21:24:09 +000062_PTR _EXFUN(memccpy,(_PTR, const _PTR, int, size_t));
63int _EXFUN(strcasecmp,(const char *, const char *));
64int _EXFUN(strncasecmp,(const char *, const char *, size_t));
Daniel Stenberga8987282002-06-17 13:34:04 +000065
Daniel Stenberg7da93d52002-06-15 15:49:32 +000066#ifdef __CYGWIN__
Andree Buschmann0b7dcd62010-02-22 21:24:09 +000067#ifndef DEFS_H /* Kludge to work around problem compiling in gdb */
Daniel Stenberg7da93d52002-06-15 15:49:32 +000068const char *_EXFUN(strsignal, (int __signo));
69#endif
70int _EXFUN(strtosigno, (const char *__name));
71#endif
72
73/* These function names are used on Windows and perhaps other systems. */
74#ifndef strcmpi
75#define strcmpi strcasecmp
76#endif
77#ifndef stricmp
78#define stricmp strcasecmp
79#endif
80#ifndef strncmpi
81#define strncmpi strncasecmp
82#endif
83#ifndef strnicmp
84#define strnicmp strncasecmp
85#endif
86
87#endif /* ! __STRICT_ANSI__ */
88
89#ifdef __cplusplus
90}
91#endif
92#endif /* _STRING_H_ */