Debian Codegraph @

compat/string.h

raw
1 /*
2 * string.h --
3 *
4 * Declarations of ANSI C library procedures for string handling.
5 *
6 * Copyright (c) 1991-1993 The Regents of the University of California.
7 * Copyright (c) 1994-1996 Sun Microsystems, Inc.
8 *
9 * See the file "license.terms" for information on usage and redistribution of
10 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 */
12
13 #ifndef _STRING
14 #define _STRING
15
16 /*
17 * The following #include is needed to define size_t. (This used to include
18 * sys/stdtypes.h but that doesn't exist on older versions of SunOS, e.g.
19 * 4.0.2, so I'm trying sys/types.h now.... hopefully it exists everywhere)
20 */
21
22 #include <sys/types.h>
23
24 #ifdef __APPLE__
25 extern void * memchr(const void *s, int c, size_t n);
26 #else
27 extern char * memchr(const void *s, int c, size_t n);
28 #endif
29 extern int memcmp(const void *s1, const void *s2, size_t n);
30 extern char * memcpy(void *t, const void *f, size_t n);
31 #ifdef NO_MEMMOVE
32 #define memmove(d,s,n) (bcopy((s), (d), (n)))
33 #else
34 extern char * memmove(void *t, const void *f, size_t n);
35 #endif
36 extern char * memset(void *s, int c, size_t n);
37
38 extern int strcasecmp(const char *s1, const char *s2);
39 extern char * strcat(char *dst, const char *src);
40 extern char * strchr(const char *string, int c);
41 extern int strcmp(const char *s1, const char *s2);
42 extern char * strcpy(char *dst, const char *src);
43 extern size_t strcspn(const char *string, const char *chars);
44 extern char * strdup(const char *string);
45 extern char * strerror(int error);
46 extern size_t strlen(const char *string);
47 extern int strncasecmp(const char *s1, const char *s2, size_t n);
48 extern char * strncat(char *dst, const char *src, size_t numChars);
49 extern int strncmp(const char *s1, const char *s2, size_t nChars);
50 extern char * strncpy(char *dst, const char *src, size_t numChars);
51 extern char * strpbrk(const char *string, const char *chars);
52 extern char * strrchr(const char *string, int c);
53 extern size_t strspn(const char *string, const char *chars);
54 extern char * strstr(const char *string, const char *substring);
55 extern char * strtok(char *s, const char *delim);
56
57 #endif /* _STRING */