home *** CD-ROM | disk | FTP | other *** search
- /*
- * string.h -- ANSI
- *
- * Functions, types, and macros for manipulating strings and
- * arbitrary areas of memory.
- *
- * Copyright (c) 1990, MetaWare Incorporated
- */
- #ifndef _STRING_H
- #define _STRING_H
-
- #ifdef __CPLUSPLUS__
- extern "C" {
- #endif
-
- #ifndef _SIZET_H
- #include <sizet.h>
- #endif
-
- #ifndef NULL
- #define NULL ((void *)0)
- #endif
- #define _MAXSTRING (0xffffffff)
-
- /* Copying functions */
- extern void * memcpy(void *__s1, const void *__s2, size_t __n);
- extern void * memmove(void *__s1, const void *__s2, size_t __n);
- extern char * strcpy(char *__s1, const char *__s2);
- extern char * strncpy(char *__s1, const char *__s2, size_t __n);
-
- /* Concatenation functions */
- extern char * strcat(char *__s1, const char *__s2);
- extern char * strncat(char *__s1, const char *__s2, size_t __n);
-
- /* Comparison functions */
- extern int memcmp(const void *__s1, const void *__s2, size_t __n);
- extern int strcmp(const char *__s1, const char *__s2);
- extern int strcoll(const char *__s1, const char *__s2);
- extern int strncmp(const char *__s1, const char *__s2, size_t __n);
- extern size_t strxfrm(char *__s1, const char *__s2, size_t __n);
-
- /* Search functions */
- extern void * memchr(const void *__s, int __c, size_t __n);
- extern char * strchr(const char *__s, int __c);
- extern size_t strcspn(const char *__s1, const char *__s2);
- extern char * strpbrk(const char *__s1, const char *__s2);
- extern char * strrchr(const char *__s, int __c);
- extern size_t strspn(const char *__s1, const char *__s2);
- extern char * strstr(const char *__s1, const char *__s2);
- extern char * strtok(char *__s1, const char *__s2);
-
- /* Miscellaneous functions */
- extern void * memset(void *__s, int __c, size_t __n);
- #ifndef strerror /*strerror may be a macro on Sun and BSD systems*/
- extern char * strerror(int __errnum);
- #endif
- extern size_t strlen(const char *__s);
-
- /* Non-ansi additions */
- extern void *_rmemcpy(void *__d, const void *__s, size_t __len);
- extern char *_rstrcpy(char *__d, const char *__s);
- extern char *_rstrncpy(char *__d, const char *__s, size_t __len);
- extern char *_strncat(char *__s1, const char *__s2, size_t __len);
- extern char *_strcats(int __count, char *__s1, const char *__s2,...);
- extern char *_strrev(char *__s);
- extern void *_memccpy(void *, void *, int, unsigned int);
- extern char *_strnset(char *__s, int __character, size_t __kount);
- extern char *_strset(char *__s, int __c);
- extern char *_strdup(const char *s1);
-
- #if __HIGHC__
- extern void *memccpy(void *, void *, int, unsigned int);
- extern char *strnset(char *__s, int __character, size_t __kount);
- extern char *strset(char *__s, int __c);
- extern char *strdup(const char *s1);
- extern char *strrev(char *__s);
- #endif
-
- #if _MSDOS
- extern char * _strerror(char *);
- extern int _memicmp(void *, void *, unsigned int);
- extern void _movedata(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
- extern int _strcmpi(const char *s1, const char *s2);
- extern int _stricmp(const char *s1, const char *s2);
- extern char *_strlwr(char *s1);
- extern char *_strupr(char *s1);
- extern int _strnicmp(const char *__s1, const char *__s2, size_t __n);
-
- #if __HIGHC__
- #define _compare(s1, s2, n) memcmp(s1, s2, n)
- extern int memicmp(void *, void *, unsigned int);
- extern void movedata(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
- extern int strcmpi(const char *s1, const char *s2);
- extern int stricmp(const char *s1, const char *s2);
- extern char *strlwr(char *s1);
- extern char *strupr(char *s1);
- extern int strnicmp(const char *__s1, const char *__s2, size_t __n);
-
- #endif /*__HIGHC__*/
- #endif /*_MSDOS*/
-
- #ifdef __CPLUSPLUS__
- }
- #endif
- #endif /*_STRING_H*/
-