string.h revision 93032
11539Srgrimes/*-
21539Srgrimes * Copyright (c) 1990, 1993
31539Srgrimes *	The Regents of the University of California.  All rights reserved.
41539Srgrimes *
51539Srgrimes * Redistribution and use in source and binary forms, with or without
61539Srgrimes * modification, are permitted provided that the following conditions
71539Srgrimes * are met:
81539Srgrimes * 1. Redistributions of source code must retain the above copyright
91539Srgrimes *    notice, this list of conditions and the following disclaimer.
101539Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111539Srgrimes *    notice, this list of conditions and the following disclaimer in the
121539Srgrimes *    documentation and/or other materials provided with the distribution.
131539Srgrimes * 3. All advertising materials mentioning features or use of this software
141539Srgrimes *    must display the following acknowledgement:
151539Srgrimes *	This product includes software developed by the University of
161539Srgrimes *	California, Berkeley and its contributors.
171539Srgrimes * 4. Neither the name of the University nor the names of its contributors
181539Srgrimes *    may be used to endorse or promote products derived from this software
191539Srgrimes *    without specific prior written permission.
201539Srgrimes *
211539Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
221539Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
231539Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
241539Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
251539Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
261539Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
271539Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
281539Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
291539Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
301539Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
311539Srgrimes * SUCH DAMAGE.
321539Srgrimes *
3384747Sbde *	@(#)string.h	8.1 (Berkeley) 6/2/93
3484699Smike * $FreeBSD: head/include/string.h 93032 2002-03-23 17:24:55Z imp $
351539Srgrimes */
361539Srgrimes
371539Srgrimes#ifndef _STRING_H_
381539Srgrimes#define	_STRING_H_
391539Srgrimes#include <machine/ansi.h>
401539Srgrimes
411539Srgrimes#ifdef	_BSD_SIZE_T_
421539Srgrimestypedef	_BSD_SIZE_T_	size_t;
431539Srgrimes#undef	_BSD_SIZE_T_
441539Srgrimes#endif
451539Srgrimes
461539Srgrimes#ifndef	NULL
471539Srgrimes#define	NULL	0
481539Srgrimes#endif
491539Srgrimes
501539Srgrimes#include <sys/cdefs.h>
511539Srgrimes
521539Srgrimes__BEGIN_DECLS
5393032Simpvoid	*memchr(const void *, int, size_t);
5493032Simpint	 memcmp(const void *, const void *, size_t);
5593032Simpvoid	*memcpy(void *, const void *, size_t);
5693032Simpvoid	*memmove(void *, const void *, size_t);
5793032Simpvoid	*memset(void *, int, size_t);
5893032Simpchar	*strcat(char *, const char *);
5993032Simpchar	*strchr(const char *, int);
6093032Simpint	 strcmp(const char *, const char *);
6193032Simpint	 strcoll(const char *, const char *);
6293032Simpchar	*strcpy(char *, const char *);
6393032Simpsize_t	 strcspn(const char *, const char *);
6493032Simpchar	*strerror(int);
6593032Simpsize_t	 strlen(const char *);
6693032Simpchar	*strncat(char *, const char *, size_t);
6793032Simpint	 strncmp(const char *, const char *, size_t);
6893032Simpchar	*strncpy(char *, const char *, size_t);
6993032Simpchar	*strpbrk(const char *, const char *);
7093032Simpchar	*strrchr(const char *, int);
7193032Simpsize_t	 strspn(const char *, const char *);
7293032Simpchar	*strstr(const char *, const char *);
7393032Simpchar	*strtok(char *, const char *);
7493032Simpsize_t	 strxfrm(char *, const char *, size_t);
751539Srgrimes
761539Srgrimes/* Nonstandard routines */
7720600Simp#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
7893032Simpint	 bcmp(const void *, const void *, size_t);
7993032Simpvoid	 bcopy(const void *, void *, size_t);
8093032Simpvoid	 bzero(void *, size_t);
8193032Simpint	 ffs(int);
8293032Simpchar	*index(const char *, int);
8393032Simpvoid	*memccpy(void *, const void *, int, size_t);
8493032Simpchar	*rindex(const char *, int);
8593032Simpint	 strcasecmp(const char *, const char *);
8693032Simpchar	*strcasestr(const char *, const char *);
8793032Simpchar	*strdup(const char *);
8893032Simpint	 strerror_r(int, char *, size_t);
8993032Simpsize_t	 strlcat(char *, const char *, size_t);
9093032Simpsize_t	 strlcpy(char *, const char *, size_t);
9193032Simpvoid	 strmode(int, char *);
9293032Simpint	 strncasecmp(const char *, const char *, size_t);
9393032Simpchar	*strnstr(const char *, const char *, size_t);
9493032Simpchar	*strsep(char **, const char *);
9593032Simpchar	*strsignal(int);
9693032Simpchar	*strtok_r(char *, const char *, char **);
9793032Simpvoid	 swab(const void *, void *, size_t);
988858Srgrimes#endif
991539Srgrimes__END_DECLS
1001539Srgrimes
1011539Srgrimes#endif /* _STRING_H_ */
102