root / prex-0.9.0 / usr / include / string.h @ 03e9c04a
History | View | Annotate | Download (3.35 KB)
1 |
/*-
|
---|---|
2 |
* Copyright (c) 1990, 1993
|
3 |
* The Regents of the University of California. All rights reserved.
|
4 |
*
|
5 |
* Redistribution and use in source and binary forms, with or without
|
6 |
* modification, are permitted provided that the following conditions
|
7 |
* are met:
|
8 |
* 1. Redistributions of source code must retain the above copyright
|
9 |
* notice, this list of conditions and the following disclaimer.
|
10 |
* 2. Redistributions in binary form must reproduce the above copyright
|
11 |
* notice, this list of conditions and the following disclaimer in the
|
12 |
* documentation and/or other materials provided with the distribution.
|
13 |
* 3. Neither the name of the University nor the names of its contributors
|
14 |
* may be used to endorse or promote products derived from this software
|
15 |
* without specific prior written permission.
|
16 |
*
|
17 |
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
18 |
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
19 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
20 |
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
21 |
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
22 |
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
23 |
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
24 |
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
25 |
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
26 |
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
27 |
* SUCH DAMAGE.
|
28 |
*
|
29 |
* @(#)string.h 8.1 (Berkeley) 6/2/93
|
30 |
*/
|
31 |
|
32 |
#ifndef _STRING_H_
|
33 |
#define _STRING_H_
|
34 |
|
35 |
#if !defined(_SIZE_T)
|
36 |
#define _SIZE_T
|
37 |
typedef unsigned int size_t; /* size of something in bytes */ |
38 |
#endif
|
39 |
|
40 |
#ifndef NULL |
41 |
#define NULL 0 |
42 |
#endif
|
43 |
|
44 |
#include <sys/cdefs.h> |
45 |
|
46 |
__BEGIN_DECLS |
47 |
void *memchr(const void *, int, size_t); |
48 |
int memcmp(const void *, const void *, size_t); |
49 |
void *memcpy(void *, const void *, size_t); |
50 |
void *memmove(void *, const void *, size_t); |
51 |
void *memset(void *, int, size_t); |
52 |
char *strcat(char *, const char *); |
53 |
char *strchr(const char *, int); |
54 |
int strcmp(const char *, const char *); |
55 |
int strcoll(const char *, const char *); |
56 |
char *strcpy(char *, const char *); |
57 |
size_t strcspn(const char *, const char *); |
58 |
char *strerror(int); |
59 |
size_t strlen(const char *); |
60 |
char *strncat(char *, const char *, size_t); |
61 |
int strncmp(const char *, const char *, size_t); |
62 |
char *strncpy(char *, const char *, size_t); |
63 |
char *strpbrk(const char *, const char *); |
64 |
char *strrchr(const char *, int); |
65 |
size_t strspn(const char *, const char *); |
66 |
char *strstr(const char *, const char *); |
67 |
char *strtok(char *, const char *); |
68 |
char *strtok_r(char *, const char *, char **); |
69 |
size_t strxfrm(char *, const char *, size_t); |
70 |
|
71 |
/* Nonstandard routines */
|
72 |
#ifndef _ANSI_SOURCE
|
73 |
int bcmp(const void *, const void *, size_t); |
74 |
void bcopy(const void *, void *, size_t); |
75 |
void bzero(void *, size_t); |
76 |
int ffs(int); |
77 |
char *index(const char *, int); |
78 |
void *memccpy(void *, const void *, int, size_t); |
79 |
char *rindex(const char *, int); |
80 |
int strcasecmp(const char *, const char *); |
81 |
char *strdup(const char *); |
82 |
int strncasecmp(const char *, const char *, size_t); |
83 |
char *strsep(char **, const char *); |
84 |
void swab(const void *, void *, size_t); |
85 |
#endif
|
86 |
|
87 |
size_t strlcat(char *, const char *, size_t); |
88 |
size_t strlcpy(char *, const char *, size_t); |
89 |
__END_DECLS |
90 |
|
91 |
#endif /* _STRING_H_ */ |