string.h revision 84699
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 * 3384699Smike * From: @(#)string.h 8.1 (Berkeley) 6/2/93 3484699Smike * $FreeBSD: head/include/string.h 84699 2001-10-09 01:29:56Z mike $ 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 531539Srgrimesvoid *memchr __P((const void *, int, size_t)); 541539Srgrimesint memcmp __P((const void *, const void *, size_t)); 551539Srgrimesvoid *memcpy __P((void *, const void *, size_t)); 561539Srgrimesvoid *memmove __P((void *, const void *, size_t)); 571539Srgrimesvoid *memset __P((void *, int, size_t)); 581539Srgrimeschar *strcat __P((char *, const char *)); 591539Srgrimeschar *strchr __P((const char *, int)); 601539Srgrimesint strcmp __P((const char *, const char *)); 611539Srgrimesint strcoll __P((const char *, const char *)); 621539Srgrimeschar *strcpy __P((char *, const char *)); 631539Srgrimessize_t strcspn __P((const char *, const char *)); 641539Srgrimeschar *strerror __P((int)); 651539Srgrimessize_t strlen __P((const char *)); 661539Srgrimeschar *strncat __P((char *, const char *, size_t)); 671539Srgrimesint strncmp __P((const char *, const char *, size_t)); 681539Srgrimeschar *strncpy __P((char *, const char *, size_t)); 691539Srgrimeschar *strpbrk __P((const char *, const char *)); 701539Srgrimeschar *strrchr __P((const char *, int)); 711539Srgrimessize_t strspn __P((const char *, const char *)); 721539Srgrimeschar *strstr __P((const char *, const char *)); 731539Srgrimeschar *strtok __P((char *, const char *)); 741539Srgrimessize_t strxfrm __P((char *, const char *, size_t)); 751539Srgrimes 761539Srgrimes/* Nonstandard routines */ 7720600Simp#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) 781539Srgrimesint bcmp __P((const void *, const void *, size_t)); 791539Srgrimesvoid bcopy __P((const void *, void *, size_t)); 801539Srgrimesvoid bzero __P((void *, size_t)); 811539Srgrimesint ffs __P((int)); 821539Srgrimeschar *index __P((const char *, int)); 831539Srgrimesvoid *memccpy __P((void *, const void *, int, size_t)); 841539Srgrimeschar *rindex __P((const char *, int)); 851539Srgrimesint strcasecmp __P((const char *, const char *)); 861539Srgrimeschar *strdup __P((const char *)); 8749875Simpsize_t strlcat __P((char *, const char *, size_t)); 8849875Simpsize_t strlcpy __P((char *, const char *, size_t)); 891539Srgrimesvoid strmode __P((int, char *)); 901539Srgrimesint strncasecmp __P((const char *, const char *, size_t)); 9184699Smikechar *strnstr __P((const char *, const char *, size_t)); 921539Srgrimeschar *strsep __P((char **, const char *)); 9347289Speterchar *strsignal __P((int)); 9442913Sjdpchar *strtok_r __P((char *, const char *, char **)); 951539Srgrimesvoid swab __P((const void *, void *, size_t)); 968858Srgrimes#endif 971539Srgrimes__END_DECLS 981539Srgrimes 991539Srgrimes#endif /* _STRING_H_ */ 100