00001 /* string.h stdc header 00002 Copyright (C) 2000, 2003 Free Software Foundation, Inc. 00003 Written by Stephane Carrez (stcarrez@nerim.fr) 00004 00005 This file is free software; you can redistribute it and/or modify it 00006 under the terms of the GNU General Public License as published by the 00007 Free Software Foundation; either version 2, or (at your option) any 00008 later version. 00009 00010 In addition to the permissions in the GNU General Public License, the 00011 Free Software Foundation gives you unlimited permission to link the 00012 compiled version of this file with other programs, and to distribute 00013 those programs without any restriction coming from the use of this 00014 file. (The General Public License restrictions do apply in other 00015 respects; for example, they cover modification of the file, and 00016 distribution when not linked into another program.) 00017 00018 This file is distributed in the hope that it will be useful, but 00019 WITHOUT ANY WARRANTY; without even the implied warranty of 00020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00021 General Public License for more details. 00022 00023 You should have received a copy of the GNU General Public License 00024 along with this program; see the file COPYING. If not, write to 00025 the Free Software Foundation, 59 Temple Place - Suite 330, 00026 Boston, MA 02111-1307, USA. */ 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