string.h

Go to the documentation of this file.
00001 /*-
00002  * Copyright (c) 1990, 1993
00003  *      The Regents of the University of California.  All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  * 3. All advertising materials mentioning features or use of this software
00014  *    must display the following acknowledgement:
00015  *      This product includes software developed by the University of
00016  *      California, Berkeley and its contributors.
00017  * 4. Neither the name of the University nor the names of its contributors
00018  *    may be used to endorse or promote products derived from this software
00019  *    without specific prior written permission.
00020  *
00021  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00022  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00023  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00024  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00025  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00026  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00027  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00028  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00029  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00030  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00031  * SUCH DAMAGE.
00032  *
00033  *      @(#)string.h    8.1 (Berkeley) 6/2/93
00034  * $FreeBSD: src/include/string.h,v 1.21.2.1 2005/08/29 18:46:39 andre Exp $
00035  *  © Portions copyright (c) 2005-2006  Nokia Corporation.  All rights reserved.
00036  */
00037 
00038 #ifndef _STRING_H_
00039 #define _STRING_H_
00040 
00041 #include <sys/cdefs.h>
00042 #include <sys/_null.h>
00043 #include <sys/_types.h>
00044 
00045 #ifdef __SYMBIAN32__
00046 #include <_ansi.h>
00047 #endif
00048 /*
00049  * Prototype functions which were historically defined in <string.h>, but
00050  * are required by POSIX to be prototyped in <strings.h>.
00051  */
00052 #if __BSD_VISIBLE
00053 #include <strings.h>
00054 #endif
00055 
00056 #ifndef _SIZE_T_DECLARED
00057 typedef __size_t        size_t;
00058 #define _SIZE_T_DECLARED
00059 #endif
00060 
00061 __BEGIN_DECLS
00062 #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
00063 IMPORT_C 
00064 void    *memccpy(void * __restrict, const void * __restrict, int, size_t);
00065 #endif
00066 IMPORT_C 
00067 void    *memchr(const void *, int, size_t) __pure;
00068 IMPORT_C 
00069 int      memcmp(const void *, const void *, size_t) __pure;
00070 IMPORT_C 
00071 void    *memcpy(void * __restrict, const void * __restrict, size_t);
00072 IMPORT_C 
00073 void    *memmove(void *, const void *, size_t);
00074 IMPORT_C 
00075 void    *memset(void *, int, size_t);
00076 #if __BSD_VISIBLE
00077 IMPORT_C 
00078 char    *stpcpy(char *, const char *);
00079 IMPORT_C 
00080 char    *strcasestr(const char *, const char *) __pure;
00081 #endif
00082 IMPORT_C 
00083 char    *strcat(char * __restrict, const char * __restrict);
00084 IMPORT_C 
00085 char    *strchr(const char *, int) __pure;
00086 IMPORT_C 
00087 int      strcmp(const char *, const char *) __pure;
00088 IMPORT_C 
00089 int      strcoll(const char *, const char *);
00090 IMPORT_C 
00091 char    *strcpy(char * __restrict, const char * __restrict);
00092 IMPORT_C 
00093 size_t   strcspn(const char *, const char *) __pure;
00094 #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
00095 IMPORT_C 
00096 char    *strdup(const char *);
00097 #endif
00098 IMPORT_C 
00099 char    *strndup(const char *,size_t);
00100 IMPORT_C 
00101 size_t strnlen(const char *,size_t);
00102 IMPORT_C 
00103 char    *strerror(int);
00104 #if __POSIX_VISIBLE >= 200112
00105 IMPORT_C 
00106 int      strerror_r(int, char *, size_t);
00107 #endif
00108 #if __BSD_VISIBLE
00109 IMPORT_C size_t  strlcat(char *, const char *, size_t);
00110 IMPORT_C size_t  strlcpy(char *, const char *, size_t);
00111 #endif
00112 IMPORT_C 
00113 size_t   strlen(const char *) __pure;
00114 IMPORT_C 
00115 char    *strncat(char * __restrict, const char * __restrict, size_t);
00116 IMPORT_C 
00117 int      strncmp(const char *, const char *, size_t) __pure;
00118 IMPORT_C 
00119 char    *strncpy(char * __restrict, const char * __restrict, size_t);
00120 #if __BSD_VISIBLE
00121 char    *strnstr(const char *, const char *, size_t) __pure;
00122 #endif
00123 IMPORT_C 
00124 char    *strpbrk(const char *, const char *) __pure;
00125 IMPORT_C 
00126 char    *strrchr(const char *, int) __pure;
00127 #if __BSD_VISIBLE
00128 IMPORT_C 
00129 char    *strsep(char **, const char *);
00130 #endif
00131 IMPORT_C 
00132 size_t   strspn(const char *, const char *) __pure;
00133 IMPORT_C 
00134 char    *strstr(const char *, const char *) __pure;
00135 IMPORT_C 
00136 char    *strtok(char * __restrict, const char * __restrict);
00137 #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 500
00138 IMPORT_C 
00139 char    *strtok_r(char *, const char *, char **);
00140 #endif
00141 IMPORT_C 
00142 size_t   strxfrm(char * __restrict, const char * __restrict, size_t);
00143 #if __BSD_VISIBLE
00144 
00145 #ifndef _SWAB_DECLARED
00146 #define _SWAB_DECLARED
00147 
00148 #ifndef _SSIZE_T_DECLARED
00149 typedef __ssize_t       ssize_t;
00150 #define _SSIZE_T_DECLARED
00151 #endif /* _SIZE_T_DECLARED */
00152 
00153 IMPORT_C 
00154 void     swab(const void * __restrict, void * __restrict, ssize_t);
00155 #endif /* _SWAB_DECLARED */
00156 
00157 #endif /* __BSD_VISIBLE */
00158 __END_DECLS
00159 
00160 #endif /* _STRING_H_ */

Copyright © Nokia Corporation 2001-2008
Back to top