Added Nitfol and Frotz source code.
[projects/chimara/chimara.git] / interpreters / nitfol / portfunc.h
1 /* This is a Cfunctions (version 0.24) generated header file.
2    Cfunctions is a free program for extracting headers from C files.
3    Get Cfunctions from `http://www.hayamasa.demon.co.uk/cfunctions'. */
4
5 /* This file was generated with:
6 `cfunctions -i portfunc.c' */
7 #ifndef CFH_PORTFUNC_H
8 #define CFH_PORTFUNC_H
9
10 /* From `portfunc.c': */
11 void * n_malloc (int size );
12 void * n_calloc (int nmemb , int size );
13 void * n_realloc (void *ptr , int size );
14 void n_free (void *ptr );
15 void * n_rmmalloc (int size );
16 void n_rmfree (void);
17 void n_rmfreeone (void *m );
18 BOOL n_strmatch (const char *target , const char *starting , unsigned len );
19 int n_to_decimal (char *buffer , unsigned n );
20 const char * n_static_number (const char *preface , glui32 n );
21 char * n_strdup (const char *s );
22 void n_memswap (void *a , void *b , int n );
23 strid_t n_file_prompt (glui32 usage , glui32 fmode );
24 strid_t n_file_name (glui32 usage , glui32 fmode , const char *name );
25 strid_t n_file_name_or_prompt (glui32 usage , glui32 fmode , const char *name );
26 void w_glk_put_string (const char *s );
27 void w_glk_put_string_stream (strid_t str , const char *s );
28 void w_glk_put_buffer (const char *buf , glui32 len );
29 void w_glk_put_buffer_stream (strid_t str , const char *buf , glui32 len );
30 void w_glk_put_char (int ch );
31
32 #ifndef NULL
33 #define NULL 0
34
35 #endif
36
37 #ifndef NO_LIBC
38 #include <string.h>
39 #define n_strlen(s)        strlen(s)
40 #define n_strcpy(d, s)     strcpy(d, s)
41 #define n_strncpy(d, s, n) strncpy(d, s, n)
42 #define n_memcpy(d, s, n)  memcpy(d, s, n)
43 #define n_memmove(d, s, n) memmove(d, s, n)
44 #define n_memset(s, c, n)  memset(s, c, n)
45 #define n_strcmp(a, b)     strcmp(a, b)
46 #define n_strncmp(a, b, n) strncmp(a, b, n)
47 #define n_memcmp(a, b, n)  memcmp(a, b, n)
48 #define n_strchr(a, c)     strchr(a, c)
49 #define n_strcat(d, s)     strcat(d, s)
50 #define n_strpbrk(s, a)    strpbrk(s, a)
51 #define n_strspn(s, a)     strspn(s, a)
52 #define n_strtok(s, d)     strtok(s, d)
53 #define n_strstr(h, n)     strstr(h, n)
54 #define n_strtol(n, e, b)  strtol(n, e, b)
55 #define n_strrchr(s, c)    strrchr(s, c)
56 #include <stdlib.h>
57 #define n_qsort(b, n, s, c) qsort(b, n, s, c)
58 #define n_bsearch(k, b, n, s, c) bsearch(k, b, n, s, c)
59
60 #endif
61
62 #if defined(__USE_BSD) || defined(__USE_GNU)
63 #define n_strcasecmp(a, b) strcasecmp(a, b)
64 #define n_strncasecmp(a, b, n) strncasecmp(a, b, n)
65
66 #endif
67
68 #ifdef __USE_GNU
69 #define n_lfind(k, b, n, s, c) lfind(k, b, n, s, c)
70
71 #endif
72
73 #ifndef n_strlen
74 unsigned n_strlen (const char *s );
75
76 #endif
77
78 #ifndef n_strcpy
79 char * n_strcpy (char *dest , const char *src );
80
81 #endif
82
83 #ifndef n_strncpy
84 char * n_strncpy (char *dest , const char *src , int len );
85
86 #endif
87
88 #ifndef n_memcpy
89 void * n_memcpy (void *dest , const void *src , int n );
90
91 #endif
92
93 #ifndef n_memmove
94 void * n_memmove (void *dest , const void *src , int n );
95
96 #endif
97
98 #ifndef n_memset
99 void * n_memset (void *s , int c , int n );
100
101 #endif
102
103 #ifndef n_strcmp
104 int n_strcmp (const char *a , const char *b );
105
106 #endif
107
108 #ifndef n_strncmp
109 int n_strncmp (const char *a , const char *b , int n );
110
111 #endif
112
113 #ifndef n_memcmp
114 int n_memcmp (const void *s1 , const void *s2 , int n );
115
116 #endif
117
118 #ifndef n_strcasecmp
119 int n_strcasecmp (const char *a , const char *b );
120
121 #endif
122
123 #ifndef n_strncasecmp
124 int n_strncasecmp (const char *a , const char *b , int n );
125
126 #endif
127
128 #ifndef n_strlower
129 char * n_strlower (char *s );
130
131 #endif
132
133 #ifndef n_strupper
134 char * n_strupper (char *s );
135
136 #endif
137
138 #ifndef n_strchr
139 char * n_strchr (const char *s , int c );
140
141 #endif
142
143 #ifndef n_lfind
144 void * n_lfind (const void *key , const void *base , int *nmemb , int size , int ( *compar ) ( const void * , const void * ) );
145
146 #endif
147
148 #ifndef n_qsort
149 void n_qsort (void *basep , int nelems , int size , int ( *comp ) ( const void * , const void * ) );
150
151 #endif
152
153 #ifndef n_strcat
154 char * n_strcat (char *dest , const char *src );
155
156 #endif
157
158 #ifndef n_strpbrk
159 char * n_strpbrk (const char *s , const char *accept );
160
161 #endif
162
163 #ifndef n_strspn
164 int n_strspn (const char *s , const char *accept );
165
166 #endif
167
168 #ifndef n_strtok
169 char * n_strtok (char *s , const char *delim );
170
171 #endif
172
173 #ifndef n_strstr
174 char * n_strstr (const char *haystack , const char *needle );
175
176 #endif
177
178 #ifndef n_strtol
179 long int n_strtol (const char *nptr , char **endptr , int base );
180
181 #endif
182
183 #ifndef n_strrchr
184 char * n_strrchr (const char *s , int c );
185
186 #endif
187
188 #ifndef n_bsearch
189 void * n_bsearch (const void *key , const void *base , int nmemb , int size , int ( *compar ) ( const void * , const void * ) );
190
191 #endif
192
193 #endif /* CFH_PORTFUNC_H */