00001 // EPOS-- String Utility Declarations 00002 00003 // This work is licensed under the Creative Commons 00004 // Attribution-NonCommercial-NoDerivs License. To view a copy of this license, 00005 // visit http://creativecommons.org/licenses/by-nc-nd/2.0/ or send a letter to 00006 // Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. 00007 00008 #ifndef __string_h 00009 #define __string_h 00010 00011 int memcmp(void * d, const void * s, unsigned int n); 00012 void * memcpy(void * d, const void * s, unsigned int n); 00013 void * memset(void * d, int c, unsigned int n); 00014 int strcmp(char * d, const char * s); 00015 int strncmp(char * d, const char * s, unsigned int n); 00016 char * strcpy(char * d, const char * s); 00017 char * strncpy(char * d, const char * s, unsigned int n); 00018 unsigned int strlen(const char * s); 00019 00020 /* 00021 inline int memcmp(void * d, const void * s, unsigned int n) { 00022 return __builtin_memcmp(d, s, n); 00023 } 00024 inline void * memcpy(void * d, const void * s, unsigned int n) { 00025 return __builtin_memcpy(d, s, n); 00026 } 00027 inline void * memset(void * d, int c, unsigned int n) { 00028 return __builtin_memset(d, c, n); 00029 } 00030 inline int strcmp(char * d, const char * s) { 00031 return __builtin_strcmp(d, s); 00032 } 00033 inline int strncmp(char * d, const char * s, unsigned int n) { 00034 return __builtin_memcmp(d, s, n); 00035 } 00036 inline char * strcpy(char * d, const char * s) { 00037 return __builtin_strcpy(d, s); 00038 } 00039 inline char * strncpy(char * d, const char * s, unsigned int n) { 00040 return (char *)__builtin_memcpy(d, s, n); 00041 } 00042 inline unsigned int strlen(const char * s) { 00043 return __builtin_strlen(s); 00044 } 00045 */ 00046 00047 #endif