1 Not finished - 19 Jan 2002 - checkpoint (Steve Kenton)
3 This is a sorted (ignoring leading '_') list of the SDCC library.
4 Sources are in ~sdcc/device/lib/*.c and ~sdcc/device/include/*.h.
5 Except where denoted with MACRO these are implemented as functions.
6 Internal function calls are generated by the compiler to implement
7 IEEE floating point, etc. They are not normally called directly.
10 /*-------------------------------------------------------------------------
12 isalnum - character classification - #include <ctype.h> - all ports
13 char isalnum (unsigned char c); MACRO
14 Return true if c is an ASCII letter or digit
15 'a-z','A-Z', '0'-'9' otherwise return false.
17 isalpha - character classification - #include <ctype.h> - all ports
18 char isalpha (unsigned char c); MACRO
19 Return true if c is an ASCII letter
20 'a-z','A-Z' otherwise return false.
22 iscntrl - character classification - #include <ctype.h> - all ports
23 char iscntrl (unsigned char c);
24 Return true if c is an ASCII control character
25 0x00-0x1F or 0x7F (DEL) otherwise return false.
27 isdigit - character classification - #include <ctype.h> - all ports
28 char isdigit (unsigned char c);
29 Return true if c is an ASCII digit '0'-'9'
30 otherwise return false.
32 isgraph - character classification - #include <ctype.h> - all ports
33 char isgraph (unsigned char c);
34 Return true is c is an ASCII printable graphic
35 excluding space 0x21-0x7E otherwise return false.
37 islower - character classification - #include <ctype.h> - all ports
38 char islower (unsigned char c);
39 Return true if c is an ASCII lower case letter
40 'a'-'z' otherwise return false.
42 isprint - character classification - #include <ctype.h> - all ports
43 char isprint (unsigned char c);
44 Return true is c is an ASCII printable graphic
45 including space 0x20-0x7E otherwise return false.
47 ispunct - character classification - #include <ctype.h> - all ports
48 char ispunct (unsigned char c);
49 Return true if c is ASCII punctuation (isgraph but not isalnum)
50 otherwise return false.
52 isspace - character classification - #include <ctype.h> - all ports
53 char isspace (unsigned char c);
54 Return true if c is an ASCII white space character
55 space, tab, carriage return, newline or vertical tab
56 0x09-0x0D, 0x20 otherwise return false.
58 isupper - character classification - #include <ctype.h> - all ports
59 char isupper (unsigned char c);
60 Return true if c is an ASCII upper case letter
61 'A'-'Z' otherwise return false.
63 isxdigit - character classification - #include <ctype.h> - all ports
64 char isxdigit (unsigned char c);
65 Return true if c is an ASCII hexidecimal digit
66 '0-9','a-f','A-F' otherwise return false.
68 toascii - character classification - #include <ctype.h> - all ports
69 char toascii(unsigned char c); MACRO
70 Convert c from 8-bit to 7-bit ASCII.
72 tolower - character classification - #include <ctype.h> - all ports
73 char _tolower(unsigned char c); MACRO
74 char tolower(unsigned char c); MACRO
75 Convert c from upper case to lower case.
77 toupper - character classification - #include <ctype.h> - all ports
78 char _toupper(unsigned char c); MACRO
79 char toupper(unsigned char c); MACRO
80 Convert c from lower case to upper case.
83 /*-------------------------------------------------------------------------
85 __uchar2fs - IEEE single precision math - #include <float.h> - ??? ports
86 float __uchar2fs (unsigned char uc); INTERNAL
87 Convert an unsigned char to float.
89 __schar2fs - IEEE single precision math - #include <float.h> - ??? ports
90 float __schar2fs (signed char sc); INTERNAL
91 Convert a signed char to float.
93 __uint2fs - IEEE single precision math - #include <float.h> - ??? ports
94 float __uint2fs (unsigned int ui); INTERNAL
95 Convert an unsigned int to float.
97 __sint2fs - IEEE single precision math - #include <float.h> - ??? ports
98 float __sint2fs (signed int si); INTERNAL
99 Convert a signed int to float.
101 __ulong2fs - IEEE single precision math - #include <float.h> - ??? ports
102 float __ulong2fs (unsigned long ul); INTERNAL
103 Convert an unsigned log to float.
105 __slong2fs - IEEE single precision math - #include <float.h> - ??? ports
106 float __slong2fs (signed long sl); INTERNAL
107 Convert a signed long to float.
109 __fs2uchar - IEEE single precision math - #include <float.h> - ??? ports
110 unsigned char __fs2uchar (float f); INTERNAL
111 Convert a float to unsigned char;
113 __fs2schar - IEEE single precision math - #include <float.h> - ??? ports
114 signed char __fs2schar (float f); INTERNAL
115 Convert a float to signed char;
117 __fs2uint - IEEE single precision math - #include <float.h> - ??? ports
118 unsigned int __fs2uint (float f); INTERNAL
119 Convert a float to unsigned int;
121 __fs2sint - IEEE single precision math - #include <float.h> - ??? ports
122 signed int __fs2sint (float f); INTERNAL
123 Convert a float to signed int;
125 __fs2ulong - IEEE single precision math - #include <float.h> - ??? ports
126 unsigned long __fs2ulong (float f); INTERNAL
127 Convert a float to unsigned long;
129 __fs2slong - IEEE single precision math - #include <float.h> - ??? ports
130 signed long __fs2slong (float f); INTERNAL
131 Convert a float to signed long.
133 __fsadd - IEEE single precision math - #include <float.h> - ??? ports
134 float __fsadd (float a1, float a2); INTERNAL
137 __fssub - IEEE single precision math - #include <float.h> - ??? ports
138 float __fssub (float a1, float a2); INTERNAL
141 __fsmul - IEEE single precision math - #include <float.h> - ??? ports
142 float __fsmul (float a1, float a2); INTERNAL
145 __fsdiv - IEEE single precision math - #include <float.h> - ??? ports
146 float __fsdiv (float a1, float a2); INTERNAL
149 __fslt - IEEE single precision math - #include <float.h> - ??? ports
150 char __fslt (float a1, float a2); INTERNAL
151 Compare two floats lt.
153 __fseq - IEEE single precision math - #include <float.h> - ??? ports
154 char __fseq (float a1, float a2); INTERNAL
155 Compare two floats eq.
157 __fsneq - IEEE single precision math - #include <float.h> - ??? ports
158 char __fseq (float a1, float a2); INTERNAL ??? missing in float.h ???
159 Compare two floats neq.
161 __fsgt - IEEE single precision math - #include <float.h> - ??? ports
162 char __fsgt (float a1, float a2); INTERNAL ??? typo in float.h ???
163 Compare two floats gt.
166 /*-------------------------------------------------------------------------
167 malloc - memory allocation - #include <malloc.h> - ??? ports
168 void *malloc (unsigned int);
169 void xdata * malloc (unsigned int );
170 Allocate a block of memory from the heap;
172 free - memory allocation - #include <malloc.h> - ??? ports
174 void free (void xdata * p);
175 Return previously allocated memory to the heap.
177 init_dynamic_memory - memory allocation - #include <malloc.h> - ??? ports
178 void init_dynamic_memory (MEMHEADER xdata * , unsigned int );
179 Initialize the memory allocation system.
182 /*-------------------------------------------------------------------------
184 /* Trigonometric functions */
185 sincosf - ANSI C math - #include <math.h> - all ports
186 float sincosf(const float x, const int iscos); INTERNAL
187 Compute the sine or cosine of x.
189 tancotf - ANSI C math - #include <math.h> - all ports
190 float tancotf(const float x, const int iscot); INTERNAL
191 Compute the tangent or cotangent of x.
193 asincosf - ANSI C math - #include <math.h> - all ports
194 float asincosf(const float x, const int isacos); INTERNAL
195 Compute the arc sine or arc cosine of x.
197 sincoshf - ANSI C math - #include <math.h> - all ports
198 float sincoshf(const float x, const int iscosh); INTERNAL
199 Compute the hyperbolic sine or hyperbolic cosine of x.
201 sinf - ANSI C math - #include <math.h> - all ports
202 float sinf (const float x);
205 cosf - ANSI C math - #include <math.h> - all ports
206 float cosf (const float x);
209 tanf - ANSI C math - #include <math.h> - all ports
210 float tanf (const float x);
211 Compute tangent of x.
213 cotf - ANSI C math - #include <math.h> - all ports
214 float cotf (const float x);
215 Compute cotangent of x.
217 asinf - ANSI C math - #include <math.h> - all ports
218 float asinf (const float x);
219 Compute the arc sine of x.
221 acosf - ANSI C math - #include <math.h> - all ports
222 float acosf (const float x);
223 Compute the arc cosine of x.
225 atanf - ANSI C math - #include <math.h> - all ports
226 float atanf (const float x);
227 Compute the arc tangent of x.
229 atan2f - ANSI C math - #include <math.h> - all ports
230 float atan2f (const float x, const float y); ??? x,y reversed ???
231 Compute the arc tangent of (x/y);
233 /* Hyperbolic functions */
234 sinhf - ANSI C math - #include <math.h> - all ports
235 float sinhf (const float x);
236 Compute the hyperbolic sine of x.
238 coshf - ANSI C math - #include <math.h> - all ports
239 float coshf (const float x);
240 Compute the hyperbolic cosine of x.
242 tanhf - ANSI C math - #include <math.h> - all ports
243 float tanhf (const float x);
244 Compute the hyperbolic tangent of x.
246 /* Exponential, logarithmic and power functions */
247 expf - ANSI C math - #include <math.h> - all ports
248 float expf (const float x);
249 Compute e to the x power.
251 logf - ANSI C math - #include <math.h> - all ports
252 float logf (const float x);
253 Compute log base e of x.
255 log10f - ANSI C math - #include <math.h> - all ports
256 float log10f (const float x);
257 Compute log base 10 of x.
259 powf - ANSI C math - #include <math.h> - all ports
260 float powf (const float x, const float y);
261 Compute x to y power.
263 sqrtf - ANSI C math - #include <math.h> - all ports
264 float sqrtf (const float x);
265 Compute the square root of x.
267 /* Nearest integer, absolute value, and remainder functions */
268 fabsf - ANSI C math - #include <math.h> - all ports
269 float fabsf (const float x);
270 Compute the absolute value of x.
272 frexpf - ANSI C math - #include <math.h> - all ports
273 float frexpf (const float x, int *pw2);
274 Split x in to mantissa and exponent parts.
276 ldexpf - ANSI C math - #include <math.h> - all ports
277 float ldexpf (const float x, const int pw2);
278 Combine mantissa and exponent parts of a float.
280 ceilf - ANSI C math - #include <math.h> - all ports
281 float ceilf (float x);
282 Find the smallest integer not less than x.
284 floorf - ANSI C math - #include <math.h> - all ports
285 float floorf (float x);
286 Find the largest integer not more than x.
288 modff - ANSI C math - #include <math.h> - all ports
289 float modff (float x, float * y);
290 Split x in to integer and fractional parts.
293 /*-------------------------------------------------------------------------
294 setjmp - long jump - #include <setjmp.h> - ??? ports
295 int setjmp (unsigned char * jmpb);
296 Save the return address and sufficient task state
297 to allow implementation of co-routines or error
298 handlers that unwind the stack using longjmp.
299 Returns 0, which is reserved and cannot be used
302 longjmp - long jump - #include <setjmp.h> - ??? ports
303 int longjmp (unsigned char * jmpb, int retval);
304 Return to the the location and task state previously
305 save in the jump buffer. Any integer number except 0
306 may be passed as retval.
309 /*-------------------------------------------------------------------------
310 printf_small - standard character I/O - #include <stdio.h> - all ports
311 void printf_small (char *,...);
313 printf - standard character I/O - #include <stdio.h> - all ports
314 int printf (const char *,...);
316 vprintf - standard character I/O - #include <stdio.h> - all ports
317 int vprintf (const char *, va_list);
319 sprintf - standard character I/O - #include <stdio.h> - all ports
320 int sprintf (const char *, const char *, ...);
322 vsprintf - standard character I/O - #include <stdio.h> - all ports
323 int vsprintf (const char *, const char *, va_list);
325 puts - standard character I/O - #include <stdio.h> - all ports
326 int puts(const char *);
328 gets - standard character I/O - #include <stdio.h> - all ports
331 getchar - standard character I/O - #include <stdio.h> - all ports
334 putchar - standard character I/O - #include <stdio.h> - all ports
338 /*-------------------------------------------------------------------------
339 strcpy - string manipulation - #include <string.h> - all ports
340 char *strcpy (char * d, char * s);
341 Copy the source string s to the destination string d.
343 strncpy - string manipulation - #include <string.h> - all ports
344 char *strncpy(char * d, char * s, int n);
346 strcat - string manipulation - #include <string.h> - all ports
347 char *strcat (char * front, char * back);
349 strncat - string manipulation - #include <string.h> - all ports
350 char *strncat(char * front, char * back, int n);
352 strcmp - string manipulation - #include <string.h> - all ports
353 int strcmp (char * asrc, char * adst);
355 strncmp - string manipulation - #include <string.h> - all ports
356 int strncmp(char * asrc, char * adst, int n);
358 strchr - string manipulation - #include <string.h> - all ports
359 char *strchr (char *, char );
361 strrchr - string manipulation - #include <string.h> - all ports
362 char *strrchr(char *, char );
364 strspn - string manipulation - #include <string.h> - all ports
365 int strspn (char *, char *);
367 strcspn - string manipulation - #include <string.h> - all ports
368 int strcspn(char *, char *);
370 strpbrk - string manipulation - #include <string.h> - all ports
371 char *strpbrk(char *, char *);
373 strstr - string manipulation - #include <string.h> - all ports
374 char *strstr (char *, char *);
376 strlen - string manipulation - #include <string.h> - all ports
377 int strlen (char * );
379 strtok - string manipulation - #include <string.h> - all ports
380 char *strtok (char *, char *);
382 memcpy - string manipulation - #include <string.h> - all ports
383 void *memcpy (void *, void *, int );
385 memcmp - string manipulation - #include <string.h> - all ports
386 int memcmp (void *, void *, int );
388 memset - string manipulation - #include <string.h> - all ports
389 void *memset (void *, unsigned char , int );
392 /*-------------------------------------------------------------------------
394 mktime - time and date - #include <time.h> - all ports
395 time_t mktime(struct tm *timeptr);
397 asctime - time and date - #include <time.h> - all ports
398 char *asctime(struct tm *timeptr);
400 ctime - time and date - #include <time.h> - all ports
401 char *ctime(time_t *timep);