xref: /original-bsd/include/string.h (revision 5e1b3b90)
1 /*-
2  * Copyright (c) 1990 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)string.h	5.4 (Berkeley) 05/29/90
8  */
9 
10 #ifndef _STRING_H_
11 #define	_STRING_H_
12 #include <machine/machtypes.h>
13 
14 #ifdef	_SIZE_T_
15 typedef	_SIZE_T_	size_t;
16 #undef	_SIZE_T_
17 #endif
18 
19 #ifndef	NULL
20 #define	NULL	0
21 #endif
22 
23 #if __STDC__ || c_plusplus
24 
25 void	*memchr(const void *, int, size_t);
26 int	 memcmp(const void *, const void *, size_t);
27 void	*memcpy(void *, const void *, size_t);
28 void	*memmove(void *, const void *, size_t);
29 void	*memset(void *, int, size_t);
30 char	*strcat(char *, const char *);
31 char	*strchr(const char *, int);
32 int	 strcmp(const char *, const char *);
33 int	 strcoll(const char *, const char *);
34 char	*strcpy(char *, const char *);
35 size_t	 strcspn(const char *, const char *);
36 char	*strerror(int);
37 size_t	 strlen(const char *);
38 char	*strncat(char *, const char *, size_t);
39 int	 strncmp(const char *, const char *, size_t);
40 char	*strncpy(char *, const char *, size_t);
41 char	*strpbrk(const char *, const char *);
42 char	*strrchr(const char *, int);
43 size_t	 strspn(const char *, const char *);
44 char	*strstr(const char *, const char *);
45 char	*strtok(char *, const char *);
46 size_t	 strxfrm(char *, const char *, size_t);
47 
48 #else
49 
50 void	*memchr();
51 int	 memcmp();
52 void	*memcpy();
53 void	*memmove();
54 void	*memset();
55 char	*strcat();
56 char	*strchr();
57 int	 strcmp();
58 int	 strcoll();
59 char	*strcpy();
60 size_t	 strcspn();
61 char	*strerror();
62 size_t	 strlen();
63 char	*strncat();
64 int	 strncmp();
65 char	*strncpy();
66 char	*strpbrk();
67 char	*strrchr();
68 size_t	 strspn();
69 char	*strstr();
70 char	*strtok();
71 size_t	 strxfrm();
72 
73 #endif
74 
75 /* Nonstandard routines */
76 #ifndef _ANSI_SOURCE
77 #if __STDC__ || c_plusplus
78 
79 int	 bcmp(const char *, const char *, size_t);
80 void	 bcopy(const char *, char *, size_t);
81 void	 bzero(char *, size_t);
82 int	 ffs(int);
83 char	*index(const char *, int);
84 void	*memccpy(void *, const void *, int, size_t);
85 char	*rindex(const char *, int);
86 int	 strcasecmp(const char *, const char *);
87 char	*strdup(const char *);
88 void	 strmode(mode_t, char *);
89 int	 strncasecmp(const char *, const char *, size_t);
90 char	*strsep(char *, const char *);
91 void	 swab(const char *, char *, size_t);
92 
93 #else
94 
95 int	 bcmp();
96 void	 bcopy();
97 void	 bzero();
98 int	 ffs();
99 char	*index();
100 void	*memccpy();
101 char	*rindex();
102 int	 strcasecmp();
103 char	*strdup();
104 void	strmode();
105 int	 strncasecmp();
106 char	*strsep();
107 void	 swab();
108 
109 #endif
110 #endif
111 #endif /* _STRING_H_ */
112