minix/include/string.h

77 lines
3.1 KiB
C
Raw Normal View History

2005-04-21 16:53:53 +02:00
/* The <string.h> header contains prototypes for the string handling
* functions.
*/
#ifndef _STRING_H
#define _STRING_H
/* Not strictly necessary, but some sources, in particular
* llvm, assume the defines in stdint.h are available when
* string.h is include.
*/
#include <stdint.h>
2010-07-21 17:37:42 +02:00
#include <sys/null.h>
2005-04-21 16:53:53 +02:00
#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned int size_t; /* type returned by sizeof */
#endif /*_SIZE_T */
/* Function Prototypes. */
2011-01-28 12:35:02 +01:00
#ifndef _MINIX_ANSI_H
#include <minix/ansi.h>
2005-04-21 16:53:53 +02:00
#endif
_PROTOTYPE( void *memchr, (const void *_s, int _c, size_t _n) );
_PROTOTYPE( int memcmp, (const void *_s1, const void *_s2, size_t _n) );
_PROTOTYPE( void *memcpy, (void *_s1, const void *_s2, size_t _n) );
_PROTOTYPE( void *memmove, (void *_s1, const void *_s2, size_t _n) );
_PROTOTYPE( void *memset, (void *_s, int _c, size_t _n) );
_PROTOTYPE( char *strcat, (char *_s1, const char *_s2) );
_PROTOTYPE( char *strchr, (const char *_s, int _c) );
_PROTOTYPE( int strncmp, (const char *_s1, const char *_s2, size_t _n) );
_PROTOTYPE( int strcmp, (const char *_s1, const char *_s2) );
_PROTOTYPE( int strcoll, (const char *_s1, const char *_s2) );
_PROTOTYPE( char *strcpy, (char *_s1, const char *_s2) );
_PROTOTYPE( size_t strcspn, (const char *_s1, const char *_s2) );
_PROTOTYPE( char *strerror, (int _errnum) );
_PROTOTYPE( size_t strlen, (const char *_s) );
_PROTOTYPE( char *strncat, (char *_s1, const char *_s2, size_t _n) );
_PROTOTYPE( char *strncpy, (char *_s1, const char *_s2, size_t _n) );
_PROTOTYPE( char *strpbrk, (const char *_s1, const char *_s2) );
_PROTOTYPE( char *strrchr, (const char *_s, int _c) );
_PROTOTYPE( size_t strspn, (const char *_s1, const char *_s2) );
_PROTOTYPE( char *strstr, (const char *_s1, const char *_s2) );
_PROTOTYPE( char *strtok, (char *_s1, const char *_s2) );
_PROTOTYPE( size_t strxfrm, (char *_s1, const char *_s2, size_t _n) );
#ifdef _POSIX_SOURCE
/* Open Group Base Specifications Issue 6 (not complete) */
char *strdup(const char *_s1);
#endif
2005-04-21 16:53:53 +02:00
#ifdef _MINIX
/* For backward compatibility. */
_PROTOTYPE( char *index, (const char *_s, int _charwanted) );
_PROTOTYPE( char *rindex, (const char *_s, int _charwanted) );
_PROTOTYPE( void bcopy, (const void *_src, void *_dst, size_t _length) );
_PROTOTYPE( int bcmp, (const void *_s1, const void *_s2, size_t _length));
_PROTOTYPE( void bzero, (void *_dst, size_t _length) );
_PROTOTYPE( void *memccpy, (char *_dst, const char *_src, int _ucharstop,
size_t _size) );
2005-04-21 16:53:53 +02:00
/* Misc. extra functions */
_PROTOTYPE( int strcasecmp, (const char *_s1, const char *_s2) );
_PROTOTYPE( int strncasecmp, (const char *_s1, const char *_s2,
size_t _len) );
_PROTOTYPE( size_t strnlen, (const char *_s, size_t _n) );
2006-06-22 13:47:18 +02:00
_PROTOTYPE( size_t strlcat, (char *_dst, const char *_src, size_t _siz) );
_PROTOTYPE( size_t strlcpy, (char *_dst, const char *_src, size_t _siz) );
_PROTOTYPE( char * strsep, (char **stringp, const char *delim) );
2010-07-19 12:46:49 +02:00
_PROTOTYPE( char *strcasestr, (const char *, const char *));
_PROTOTYPE( char *strnstr, (const char *, const char *, size_t));
2005-04-21 16:53:53 +02:00
#endif
#endif /* _STRING_H */