/*
 * |-----------------------------------------------------------|
 * | Copyright (c) 1991, 1990 MIPS Computer Systems, Inc.      |
 * | All Rights Reserved                                       |
 * |-----------------------------------------------------------|
 * |          Restricted Rights Legend                         |
 * | Use, duplication, or disclosure by the Government is      |
 * | subject to restrictions as set forth in                   |
 * | subparagraph (c)(1)(ii) of the Rights in Technical        |
 * | Data and Computer Software Clause of DFARS 252.227-7013.  |
 * |         MIPS Computer Systems, Inc.                       |
 * |         950 DeGuigne Avenue                               |
 * |         Sunnyvale, California 94088-3650, USA             |
 * |-----------------------------------------------------------|
 */
/* $Header: string.h,v 1.13.2.1 92/06/24 13:57:13 marker Exp $ */

#ifndef	_STRING_
#define	_STRING_	1


/*	Copyright (c) 1984 AT&T	*/
/*	  All Rights Reserved  	*/

/*	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T	*/
/*	The copyright notice above does not evidence any   	*/
/*	actual or intended publication of such source code.	*/


#ifndef	NULL
#define NULL 	0
#endif

#ifndef _SIZE_T
#define _SIZE_T
typedef	unsigned int	size_t;
#endif

/*  Copying functions  */
#if defined(__STDC__)
extern void *memcpy(void *, const void *, size_t);
extern void *memmove(void *, const void *, size_t);
extern char *strcpy(char *, const char *);
extern char *strncpy(char *, const char *, size_t);
#else   /* __STDC__ */
extern char *memcpy();
extern void *memmove();
extern char *strcpy();
extern char *strncpy();
#endif  /* __STDC__ */

/*  Concatenation functions  */
#if defined(__STDC__)
extern char *strcat(char *, const char *);
extern char *strncat(char *, const char *, size_t);
#else   /* __STDC__ */
extern char *strcat();
extern char *strncat();
#endif  /* __STDC__ */

/*  Comparison functions  */
#if defined(__STDC__)
extern int memcmp(const void *, const void *, size_t);
extern int strcmp(const char *, const char *);
extern int strcoll(const char *, const char *);
extern int strncmp(const char *, const char *, size_t);
/* The following functions will be supported later */
extern size_t strxfrm(char *, const char *, size_t);
#else  /* __STDC__ */
extern int memcmp();
extern int strcmp();
/* This function will be supported later */
/* extern int strcoll(); */
extern int strncmp();
#endif  /* __STDC__ */

/*  Search functions  */
#if defined(__STDC__)
extern void *memchr(const void *, int, size_t);
extern char *strchr(const char *, int );
extern char *strpbrk(const char *, const char *);
extern char *strrchr(const char *, int c);
extern char *strstr(const char *, const char *);
extern char *strtok(char *, const char *);
#else   /* __STDC__ */
extern char *memchr();
extern char *strchr();
extern char *strpbrk();
extern char *strrchr();
extern char *strstr();
extern char *strtok();
#endif  /* __STDC__ */

/*  Miscellaneous functions  */
#if defined(__STDC__)
extern char *strerror(int);
extern void *memset(void *, int, size_t);
#else /* __STDC__ */
extern char *memset();
#endif  /* __STDC__ */


/*  Search functions  */
#if defined(__STDC__)

extern  size_t	strcspn(const char *, const char *);
extern  size_t	strspn(const char *, const char *);

/*  Miscellaneous function  */
extern  size_t	strlen(const char *);

#if (__STDC__ == 0)
extern  char    *strdup(char *);
extern  char    *memccpy(char *, char *, int, int);
#endif

#else  /* __STDC__ */

extern int strspn();
extern int strcspn();
extern int strlen();
extern char *strdup();
extern char *memccpy();

#endif  /* __STDC__ */

/* cause strcpy to be inlined */
#if defined(__STDC__)
#  ifndef _NO_INTRINSICS
#    pragma intrinsic(strcpy)
#  endif
#else
#  ifdef _INTRINSICS
#    pragma intrinsic(strcpy)
#  endif
#endif

#endif	/* _STRING_ */
