00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _STRING_H
00029 #define _STRING_H
00030
00031 #include <stddef.h>
00032
00033 #define ATTR_MEMSET __attribute__((near))
00034 #define ATTR_MEMCPY __attribute__((near))
00035 #define ATTR_MEMCHR __attribute__((near))
00036 #define ATTR_MEMCMP __attribute__((near))
00037
00038 #define ATTR_STRCPY __attribute__((near))
00039 #define ATTR_STRNCPY __attribute__((near))
00040 #define ATTR_STRCAT __attribute__((near))
00041 #define ATTR_STRNCAT __attribute__((near))
00042 #define ATTR_STRCMP __attribute__((near))
00043 #define ATTR_STRNCMP __attribute__((near))
00044 #define ATTR_STRCASECMP __attribute__((near))
00045 #define ATTR_STRNCASECMP __attribute__((near))
00046 #define ATTR_STRLEN __attribute__((near))
00047 #define ATTR_STRTOK __attribute__((near))
00048
00049 #ifdef __cplusplus
00050 extern "C" {
00051 #endif
00052
00053 extern ATTR_MEMSET void* memset (void * p, int val, size_t len);
00054 extern ATTR_MEMCHR void* memchr (const void * p, int val, size_t len);
00055 extern ATTR_MEMCMP int memcmp (const void * p, const void* s, size_t len);
00056 extern ATTR_MEMCPY void* memcpy (void* to, const void* from, size_t len);
00057 extern ATTR_MEMCPY void* memmove (void* to, const void* from, size_t len);
00058
00059 extern ATTR_STRCPY char* strcpy (char* to, const char* from);
00060 extern ATTR_STRNCPY char* strncpy (char* to, const char* from, size_t len);
00061 extern ATTR_STRCAT char* strcat (char* to, const char* from);
00062 extern ATTR_STRNCAT char* strncat (char* to, const char* from, size_t len);
00063 extern ATTR_STRCMP int strcmp (const char* p, const char* q);
00064 extern ATTR_STRNCMP int strncmp (const char* p, const char* q, size_t len);
00065 extern ATTR_STRCASECMP int strcasecmp (const char* p, const char* q);
00066 extern ATTR_STRNCASECMP int strncasecmp (const char* p, const char* q, size_t len);
00067
00068 extern ATTR_STRLEN int strlen (const char* p);
00069
00070 extern ATTR_STRTOK char *strtok (char *__restrict __s, __const char *__restrict __delim);
00071
00072 #ifdef __cplusplus
00073 }
00074 #endif
00075
00076 #endif