Main Page | Alphabetical List | Class List | File List | Class Members | File Members

string.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------
00002  * /
00003  * / apeNEXT string functions for nlcc
00004  * /
00005  * / $Id: string.h,v 1.16 2005/10/27 20:04:45 morinl Exp $
00006  * /
00007  * /
00008  * / ISO/IEC 9899:1999 (E) Standard
00009  * / Extended multibyte and wide character utilities <wchar.h>
00010  * /
00011  * /
00012  * / IMPLEMENTATION for APEnext: partly implementable 
00013  * /-----------------------------------------------------------------*/
00014 
00015 #ifndef __STRING_H_
00016 #define __STRING_H_
00017 
00018 #include <nlibc.h>
00019 #include <stddef.h> // for NULL
00020 #include <errno.h>  // for sys_errlist and N_ERRNO
00021 
00025 #include <string/memcpy.h>
00026 
00027 
00028 void *memmove(void *s1, const void *s2, size_t n);
00029 char *strcpy(char * restrict s1, const char * restrict s2); 
00030 char *strncpy(char * restrict s1, const char * restrict s2, size_t n); 
00031 char *strcat(char * restrict s1, const char * restrict s2); 
00032 char *strncat(char * restrict s1, const char * restrict s2, size_t n); 
00033 int memcmp(const void *s1, const void *s2, size_t n); 
00034 int strcoll(const char *s1, const char *s2); 
00035 size_t strxfrm(char * restrict s1, const char * restrict s2, size_t n); 
00036 void *memchr(const void *s, int c, size_t n); 
00037 char *strchr(const char *s, int c); 
00038 size_t strcspn(const char *s1, const char *s2); 
00039 char *strpbrk(const char *s1, const char *s2); 
00040 char *strrchr(const char *s, int c); 
00041 size_t strspn(const char *s1, const char *s2); 
00042 char *strstr(const char *s1, const char *s2); 
00043 char *strtok(char * restrict s1, const char * restrict s2); 
00044 
00048 #include <string/memset.h>
00049 
00050 // NOTE: the order of inclusion below is important 
00051 #include <string/strlen.h>
00052 #include <string/stringexpand.h>
00053 
00057 #include <string/strcmp.h>
00058 #include <string/strncmp.h>
00059 
00083 #if !defined(__cflow_processed) || defined(_uses_strerror_string_h)
00084 inline char *strerror(int errnum) {
00085         register char *ptr;
00086         where( errnum<1 || errnum>=N_ERRNO )
00087                 ptr=NULL;
00088         else 
00089                 ptr=(char *)sys_errlist[errnum];
00090         return ptr;
00091 }
00092 #endif // strerror()
00093 
00094 
00095 #endif // __STRING_H_

Generated on Tue Jan 10 12:43:39 2006 for nlibc by doxygen 1.3.5