Changed _xdata, _near, etc and removed _generic from library files
[fw/sdcc] / device / include / string.h
1 /*-------------------------------------------------------------------------
2    string.h - ANSI functions forward declarations    
3   
4        Written By -  Sandeep Dutta . sandeep.dutta@usa.net (1998)
5
6    This program is free software; you can redistribute it and/or modify it
7    under the terms of the GNU General Public License as published by the
8    Free Software Foundation; either version 2, or (at your option) any
9    later version.
10    
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15    
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19    
20    In other words, you are welcome to use, share and improve this program.
21    You are forbidden to forbid anyone else to use, share and improve
22    what you give them.   Help stamp out software-hoarding!  
23 -------------------------------------------------------------------------*/
24
25
26 #ifndef __SDC51_STRING_H
27 #define __SDC51_STRING_H 1
28
29 #ifndef SDCC_mcs51
30 #define reentrant
31 #endif
32
33 #define memmove memcpy
34
35 #ifdef SDCC_STACK_AUTO
36 #ifdef SDCC_mcs51
37 #warning Make sure you recompiled _str*.c and _mem*.c library functions as 'reentrant'
38 #endif
39
40 extern char *strcpy (char *, char *) reentrant ;
41 extern char *strncpy(char *, char *,int ) reentrant ;
42 extern char *strcat (char *, char *) reentrant ;
43 extern char *strncat(char *, char *,int ) reentrant ;
44 extern int   strcmp (char *, char *) reentrant ;
45 extern int   strncmp(char *, char *,int ) reentrant ;
46 extern char *strchr (char *, char  ) reentrant ;
47 extern char *strrchr(char *, char  ) reentrant ;
48 extern int   strspn (char *, char *) reentrant ;
49 extern int   strcspn(char *, char *) reentrant ;
50 extern char *strpbrk(char *, char *) reentrant ;
51 extern char *strstr (char *, char *) reentrant ;
52 extern int   strlen (char *        ) reentrant ;
53 extern char *strtok (char *, char *) reentrant ;
54 extern void *memcpy (void *, void *, int ) reentrant ;
55 extern int   memcmp (void *, void *, int ) reentrant ;
56 extern void *memset (void *, unsigned char  , int ) reentrant ;
57  
58 #else
59
60 extern char *strcpy (char *, char *)  ;
61 extern char *strncpy(char *, char *,int )  ;
62 extern char *strcat (char *, char *)  ;
63 extern char *strncat(char *, char *,int )  ;
64 extern int   strcmp (char *, char *)  ;
65 extern int   strncmp(char *, char *,int )  ;
66 extern char *strchr (char *, char  )  ;
67 extern char *strrchr(char *, char  )  ;
68 extern int   strspn (char *, char *)  ;
69 extern int   strcspn(char *, char *)  ;
70 extern char *strpbrk(char *, char *)  ;
71 extern char *strstr (char *, char *)  ;
72 extern int   strlen (char *  )  ;
73 extern char *strtok (char *, char *)  ;
74 extern void *memcpy (void *, void *, int )  ;
75 extern int   memcmp (void *, void *, int )  ;
76 extern void *memset (void *, unsigned char  , int )  ;
77
78 #if SDCC_ds390
79 extern void xdata * memcpyx(void xdata *, void xdata *, int) _naked;
80 #endif
81
82 #endif
83
84 #endif