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