comparison packages/language/c/libc/current/include/string.h @ 0:3111d98ba7b3 ecos-v1_1-release

Initial commit of eCos version 1.1
author jlarmour
date Tue, 11 May 1999 11:16:07 +0000
parents
children 443894e2e912
comparison
equal deleted inserted replaced
-1:000000000000 0:3111d98ba7b3
1 #ifndef CYGONCE_LIBC_STRING_H
2 #define CYGONCE_LIBC_STRING_H
3 //===========================================================================
4 //
5 // string.h
6 //
7 // ANSI standard string and memory area manipulation routines
8 //
9 //===========================================================================
10 //####COPYRIGHTBEGIN####
11 //
12 // -------------------------------------------
13 // The contents of this file are subject to the Cygnus eCos Public License
14 // Version 1.0 (the "License"); you may not use this file except in
15 // compliance with the License. You may obtain a copy of the License at
16 // http://sourceware.cygnus.com/ecos
17 //
18 // Software distributed under the License is distributed on an "AS IS"
19 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
20 // License for the specific language governing rights and limitations under
21 // the License.
22 //
23 // The Original Code is eCos - Embedded Cygnus Operating System, released
24 // September 30, 1998.
25 //
26 // The Initial Developer of the Original Code is Cygnus. Portions created
27 // by Cygnus are Copyright (C) 1998 Cygnus Solutions. All Rights Reserved.
28 // -------------------------------------------
29 //
30 //####COPYRIGHTEND####
31 //===========================================================================
32 //#####DESCRIPTIONBEGIN####
33 //
34 // Author(s): jlarmour
35 // Contributors: jlarmour@cygnus.co.uk
36 // Date: 1998-02-13
37 // Purpose:
38 // Description:
39 // Usage: #include <string.h>
40 //
41 //####DESCRIPTIONEND####
42 //
43 //===========================================================================
44
45 // CONFIGURATION
46
47 #include <pkgconf/libc.h> // Configuration header
48
49 // Include the C library?
50 #ifdef CYGPKG_LIBC
51
52 // INCLUDES
53
54 #include <cyg/infra/cyg_type.h> // Standard definitions including externC
55 #include <stddef.h> // Get size_t and NULL definitions from
56 // compiler - for ANSI 7.11.1
57 #include <cyg/error/codes.h> // for strerror()
58
59 // FUNCTION PROTOTYPES
60
61 //===========================================================================
62
63 // 7.11.2 Copying functions
64
65 // memcpy is no longer actually implemented in the C library.
66 // It is now in the HAL
67
68 externC void *
69 memcpy( void *, const void *, size_t );
70
71 externC void *
72 memmove( void *, const void *, size_t );
73
74 externC char *
75 strcpy( char *, const char * );
76
77 externC char *
78 strncpy( char *, const char *, size_t );
79
80 //===========================================================================
81
82 // 7.11.3 Concatenation functions
83
84 externC char *
85 strcat( char *, const char * );
86
87 externC char *
88 strncat( char *, const char *, size_t );
89
90
91 //===========================================================================
92
93 // 7.11.4 Comparison functions
94
95 externC int
96 memcmp( const void *, const void *, size_t );
97
98 externC int
99 strcmp( const char *, const char * );
100
101 externC int
102 strcoll( const char *, const char * );
103
104 externC int
105 strncmp( const char *, const char *, size_t );
106
107 externC size_t
108 strxfrm( char *, const char *, size_t );
109
110
111 //===========================================================================
112
113 // 7.11.5 Search functions
114
115 externC void *
116 memchr( const void *, int, size_t );
117
118 externC char *
119 strchr( const char *, int );
120
121 externC size_t
122 strcspn( const char *, const char * );
123
124 externC char *
125 strpbrk( const char *, const char * );
126
127 externC char *
128 strrchr( const char *, int );
129
130 externC size_t
131 strspn( const char *, const char * );
132
133 externC char *
134 strstr( const char *, const char * );
135
136 externC char *
137 strtok( char *, const char * );
138
139 // POSIX 1003.1 section 8.3.3 strtok_r()
140
141 externC char *
142 strtok_r( char *, const char *, char ** );
143
144
145 //===========================================================================
146
147 // 7.11.6 Miscellaneous functions
148
149 // memset is no longer actually implemented in the C library.
150 // It is now in the HAL
151
152 externC void *
153 memset( void *, int, size_t );
154
155 // strerror() is provided in <cyg/error/codes.h>
156
157 externC size_t
158 strlen( const char * );
159
160
161 // INLINE FUNCTIONS
162
163 #ifdef CYGIMP_LIBC_STRING_INLINES
164 #include <string.inl>
165 #endif
166
167 #endif // ifdef CYGPKG_LIBC
168
169 #endif // CYGONCE_LIBC_STRING_H multiple inclusion protection
170
171 // EOF string.h