source: branches/minix3-book/include/string.h@ 20

Last change on this file since 20 was 4, checked in by Mattia Monga, 14 years ago

Importazione sorgenti libro

File size: 2.6 KB
Line 
1/* The <string.h> header contains prototypes for the string handling
2 * functions.
3 */
4
5#ifndef _STRING_H
6#define _STRING_H
7
8#define NULL ((void *)0)
9
10#ifndef _SIZE_T
11#define _SIZE_T
12typedef unsigned int size_t; /* type returned by sizeof */
13#endif /*_SIZE_T */
14
15/* Function Prototypes. */
16#ifndef _ANSI_H
17#include <ansi.h>
18#endif
19
20_PROTOTYPE( void *memchr, (const void *_s, int _c, size_t _n) );
21_PROTOTYPE( int memcmp, (const void *_s1, const void *_s2, size_t _n) );
22_PROTOTYPE( void *memcpy, (void *_s1, const void *_s2, size_t _n) );
23_PROTOTYPE( void *memmove, (void *_s1, const void *_s2, size_t _n) );
24_PROTOTYPE( void *memset, (void *_s, int _c, size_t _n) );
25_PROTOTYPE( char *strcat, (char *_s1, const char *_s2) );
26_PROTOTYPE( char *strchr, (const char *_s, int _c) );
27_PROTOTYPE( int strncmp, (const char *_s1, const char *_s2, size_t _n) );
28_PROTOTYPE( int strcmp, (const char *_s1, const char *_s2) );
29_PROTOTYPE( int strcoll, (const char *_s1, const char *_s2) );
30_PROTOTYPE( char *strcpy, (char *_s1, const char *_s2) );
31_PROTOTYPE( size_t strcspn, (const char *_s1, const char *_s2) );
32_PROTOTYPE( char *strerror, (int _errnum) );
33_PROTOTYPE( size_t strlen, (const char *_s) );
34_PROTOTYPE( char *strncat, (char *_s1, const char *_s2, size_t _n) );
35_PROTOTYPE( char *strncpy, (char *_s1, const char *_s2, size_t _n) );
36_PROTOTYPE( char *strpbrk, (const char *_s1, const char *_s2) );
37_PROTOTYPE( char *strrchr, (const char *_s, int _c) );
38_PROTOTYPE( size_t strspn, (const char *_s1, const char *_s2) );
39_PROTOTYPE( char *strstr, (const char *_s1, const char *_s2) );
40_PROTOTYPE( char *strtok, (char *_s1, const char *_s2) );
41_PROTOTYPE( size_t strxfrm, (char *_s1, const char *_s2, size_t _n) );
42
43#ifdef _POSIX_SOURCE
44/* Open Group Base Specifications Issue 6 (not complete) */
45 char *strdup(const char *_s1);
46#endif
47
48#ifdef _MINIX
49/* For backward compatibility. */
50_PROTOTYPE( char *index, (const char *_s, int _charwanted) );
51_PROTOTYPE( char *rindex, (const char *_s, int _charwanted) );
52_PROTOTYPE( void bcopy, (const void *_src, void *_dst, size_t _length) );
53_PROTOTYPE( int bcmp, (const void *_s1, const void *_s2, size_t _length));
54_PROTOTYPE( void bzero, (void *_dst, size_t _length) );
55_PROTOTYPE( void *memccpy, (char *_dst, const char *_src, int _ucharstop,
56 size_t _size) );
57
58/* Misc. extra functions */
59_PROTOTYPE( int strcasecmp, (const char *_s1, const char *_s2) );
60_PROTOTYPE( int strncasecmp, (const char *_s1, const char *_s2,
61 size_t _len) );
62_PROTOTYPE( size_t strnlen, (const char *_s, size_t _n) );
63#endif
64
65#endif /* _STRING_H */
Note: See TracBrowser for help on using the repository browser.