Move c/h files implementing/defining standard library stuff into a new libc directory...
[kugel-rb.git] / firmware / libc / include / string.h
blob8986bd6a0c18cbccf8c876abc11384594ae99c5c
1 /*
2 * string.h
4 * Definitions for memory and string functions.
5 */
7 #ifndef _STRING_H_
8 #define _STRING_H_
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
14 #include "_ansi.h"
16 #include <stddef.h>
18 #if !defined(__size_t_defined)&& !defined(_SIZE_T_) && !defined(size_t) && !defined(_SIZE_T_DECLARED)
19 #define __size_t_defined
20 #define _SIZE_T
21 #define _SIZE_T_
22 #define _SIZE_T_DECLARED
23 #define size_t size_t
24 typedef unsigned long size_t;
25 #endif
27 #ifndef NULL
28 #define NULL ((void*)0)
29 #endif
31 _PTR _EXFUN(memchr,(const _PTR, int, size_t));
32 int _EXFUN(memcmp,(const _PTR, const _PTR, size_t));
33 _PTR _EXFUN(memcpy,(_PTR, const _PTR, size_t));
34 _PTR _EXFUN(memmove,(_PTR, const _PTR, size_t));
35 _PTR _EXFUN(memset,(_PTR, int, size_t));
36 char *_EXFUN(strcat,(char *, const char *));
37 char *_EXFUN(strchr,(const char *, int));
38 int _EXFUN(strcmp,(const char *, const char *));
39 int _EXFUN(strcoll,(const char *, const char *));
40 char *_EXFUN(strcpy,(char *, const char *));
41 size_t _EXFUN(strcspn,(const char *, const char *));
42 char *_EXFUN(strerror,(int));
43 size_t _EXFUN(strlen,(const char *));
44 char *_EXFUN(strncat,(char *, const char *, size_t));
45 int _EXFUN(strncmp,(const char *, const char *, size_t));
46 char *_EXFUN(strpbrk,(const char *, const char *));
47 char *_EXFUN(strrchr,(const char *, int));
48 size_t _EXFUN(strspn,(const char *, const char *));
49 char *_EXFUN(strstr,(const char *, const char *));
50 char *_EXFUN(strcasestr,(const char *, const char *));
52 size_t strlcpy(char *dst, const char *src, size_t siz);
53 size_t strlcat(char *dst, const char *src, size_t siz);
55 #ifndef _REENT_ONLY
56 char *_EXFUN(strtok,(char *, const char *));
57 #endif
59 size_t _EXFUN(strxfrm,(char *, const char *, size_t));
61 #ifndef __STRICT_ANSI__
62 char *_EXFUN(strtok_r,(char *, const char *, char **));
64 _PTR _EXFUN(memccpy,(_PTR, const _PTR, int, size_t));
65 int _EXFUN(strcasecmp,(const char *, const char *));
66 int _EXFUN(strncasecmp,(const char *, const char *, size_t));
68 #ifdef __CYGWIN__
69 #ifndef DEFS_H /* Kludge to work around problem compiling in gdb */
70 const char *_EXFUN(strsignal, (int __signo));
71 #endif
72 int _EXFUN(strtosigno, (const char *__name));
73 #endif
75 /* These function names are used on Windows and perhaps other systems. */
76 #ifndef strcmpi
77 #define strcmpi strcasecmp
78 #endif
79 #ifndef stricmp
80 #define stricmp strcasecmp
81 #endif
82 #ifndef strncmpi
83 #define strncmpi strncasecmp
84 #endif
85 #ifndef strnicmp
86 #define strnicmp strncasecmp
87 #endif
89 #endif /* ! __STRICT_ANSI__ */
91 #ifdef __cplusplus
93 #endif
94 #endif /* _STRING_H_ */