start of an ANSI C library
[unix-history] / usr / src / include / string.h
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
* %sccs.include.redist.c%
*
* @(#)string.h 5.3 (Berkeley) %G%
*/
#ifndef _STRING_H_
#define _STRING_H_
#include <machine/machtypes.h>
#ifdef _SIZE_T_
typedef _SIZE_T_ size_t;
#undef _SIZE_T_
#endif
#ifndef NULL
#define NULL 0
#endif
/* ANSI C standard routines */
#ifdef __STDC__
void *memchr(const void *, int, size_t);
int memcmp(const void *, const void *, size_t);
void *memcpy(void *, const void *, size_t);
void *memmove(void *, const void *, size_t);
void *memset(void *, int, size_t);
char *strcat(char *, const char *);
char *strchr(const char *, int);
int strcmp(const char *, const char *);
int strcoll(const char *, const char *);
char *strcpy(char *, const char *);
size_t strcspn(const char *, const char *);
char *strerror(int);
size_t strlen(const char *);
char *strncat(char *, const char *, size_t);
int strncmp(const char *, const char *, size_t);
char *strncpy(char *, const char *, size_t);
char *strpbrk(const char *, const char *);
char *strrchr(const char *, int);
size_t strspn(const char *, const char *);
char *strstr(const char *, const char *);
char *strtok(char *, const char *);
size_t strxfrm(char *, const char *, size_t);
#else /* !__STDC__ */
void *memchr();
int memcmp();
void *memcpy();
void *memmove();
void *memset();
char *strcat();
char *strchr();
int strcmp();
int strcoll();
char *strcpy();
size_t strcspn();
char *strerror();
size_t strlen();
char *strncat();
int strncmp();
char *strncpy();
char *strpbrk();
char *strrchr();
size_t strspn();
char *strstr();
char *strtok();
size_t strxfrm();
#endif /* __STDC__ */
/* Nonstandard routines */
#ifndef _ANSI_SOURCE
#ifdef __STDC__ */
int bcmp(const char *, const char *, size_t);
void bcopy(const char *, char *, size_t);
void bzero(char *, size_t);
int ffs(int);
char *index(const char *, int);
void *memccpy(void *, const void *, int, size_t);
char *rindex(const char *, int);
int strcasecmp(const char *, const char *);
char *strdup(const char *);
void strmode(mode_t, char *);
int strncasecmp(const char *, const char *, size_t);
char *strsep(char *, const char *);
void swab(const char *, char *, size_t);
#else /* !__STDC__ */
int bcmp();
void bcopy();
void bzero();
int ffs();
char *index();
void *memccpy();
char *rindex();
int strcasecmp();
char *strdup();
void strmode();
int strncasecmp();
char *strsep();
void swab();
#endif /* __STDC__ */
#endif /* _ANSI_SOURCE */
#endif /* _STRING_H_ */