[9] | 1 | /* The <string.h> header contains prototypes for the string handling
|
---|
| 2 | * functions.
|
---|
| 3 | */
|
---|
| 4 |
|
---|
| 5 | #ifndef _STRING_H
|
---|
| 6 | #define _STRING_H
|
---|
| 7 |
|
---|
| 8 | #define NULL ((void *)0)
|
---|
| 9 |
|
---|
| 10 | #ifndef _SIZE_T
|
---|
| 11 | #define _SIZE_T
|
---|
| 12 | typedef unsigned int size_t; /* type returned by sizeof */
|
---|
| 13 | #endif /*_SIZE_T */
|
---|
| 14 |
|
---|
| 15 | /* Function Prototypes. */
|
---|
| 16 | #ifndef _ANSI_H
|
---|
| 17 | #include <ansi.h>
|
---|
| 18 | #endif
|
---|
| 19 |
|
---|
| 20 | _PROTOTYPE( void *memchr, (const void *_s, int _c, size_t _n) );
|
---|
| 21 | _PROTOTYPE( int memcmp, (const void *_s1, const void *_s2, size_t _n) );
|
---|
| 22 | _PROTOTYPE( void *memcpy, (void *_s1, const void *_s2, size_t _n) );
|
---|
| 23 | _PROTOTYPE( void *memmove, (void *_s1, const void *_s2, size_t _n) );
|
---|
| 24 | _PROTOTYPE( void *memset, (void *_s, int _c, size_t _n) );
|
---|
| 25 | _PROTOTYPE( char *strcat, (char *_s1, const char *_s2) );
|
---|
| 26 | _PROTOTYPE( char *strchr, (const char *_s, int _c) );
|
---|
| 27 | _PROTOTYPE( int strncmp, (const char *_s1, const char *_s2, size_t _n) );
|
---|
| 28 | _PROTOTYPE( int strcmp, (const char *_s1, const char *_s2) );
|
---|
| 29 | _PROTOTYPE( int strcoll, (const char *_s1, const char *_s2) );
|
---|
| 30 | _PROTOTYPE( char *strcpy, (char *_s1, const char *_s2) );
|
---|
| 31 | _PROTOTYPE( size_t strcspn, (const char *_s1, const char *_s2) );
|
---|
| 32 | _PROTOTYPE( char *strerror, (int _errnum) );
|
---|
| 33 | _PROTOTYPE( size_t strlen, (const char *_s) );
|
---|
| 34 | _PROTOTYPE( char *strncat, (char *_s1, const char *_s2, size_t _n) );
|
---|
| 35 | _PROTOTYPE( char *strncpy, (char *_s1, const char *_s2, size_t _n) );
|
---|
| 36 | _PROTOTYPE( char *strpbrk, (const char *_s1, const char *_s2) );
|
---|
| 37 | _PROTOTYPE( char *strrchr, (const char *_s, int _c) );
|
---|
| 38 | _PROTOTYPE( size_t strspn, (const char *_s1, const char *_s2) );
|
---|
| 39 | _PROTOTYPE( char *strstr, (const char *_s1, const char *_s2) );
|
---|
| 40 | _PROTOTYPE( char *strtok, (char *_s1, const char *_s2) );
|
---|
| 41 | _PROTOTYPE( size_t strxfrm, (char *_s1, const char *_s2, size_t _n) );
|
---|
| 42 |
|
---|
| 43 | #ifdef _POSIX_SOURCE
|
---|
| 44 | /* Open Group Base Specifications Issue 6 (not complete) */
|
---|
| 45 | char *strdup(const char *_s1);
|
---|
| 46 | #endif
|
---|
| 47 |
|
---|
| 48 | #ifdef _MINIX
|
---|
| 49 | /* For backward compatibility. */
|
---|
| 50 | _PROTOTYPE( char *index, (const char *_s, int _charwanted) );
|
---|
| 51 | _PROTOTYPE( char *rindex, (const char *_s, int _charwanted) );
|
---|
| 52 | _PROTOTYPE( void bcopy, (const void *_src, void *_dst, size_t _length) );
|
---|
| 53 | _PROTOTYPE( int bcmp, (const void *_s1, const void *_s2, size_t _length));
|
---|
| 54 | _PROTOTYPE( void bzero, (void *_dst, size_t _length) );
|
---|
| 55 | _PROTOTYPE( void *memccpy, (char *_dst, const char *_src, int _ucharstop,
|
---|
| 56 | size_t _size) );
|
---|
| 57 |
|
---|
| 58 | /* Misc. extra functions */
|
---|
| 59 | _PROTOTYPE( int strcasecmp, (const char *_s1, const char *_s2) );
|
---|
| 60 | _PROTOTYPE( int strncasecmp, (const char *_s1, const char *_s2,
|
---|
| 61 | size_t _len) );
|
---|
| 62 | _PROTOTYPE( size_t strnlen, (const char *_s, size_t _n) );
|
---|
| 63 | #endif
|
---|
| 64 |
|
---|
| 65 | #endif /* _STRING_H */
|
---|