From ac6df1c0f2bf9465d76ac7af172304ae25a7eb1a Mon Sep 17 00:00:00 2001 From: skenton Date: Sun, 20 Jan 2002 04:46:26 +0000 Subject: [PATCH] added libdoc.txt git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1821 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- doc/libdoc.txt | 402 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 402 insertions(+) create mode 100644 doc/libdoc.txt diff --git a/doc/libdoc.txt b/doc/libdoc.txt new file mode 100644 index 00000000..654216cb --- /dev/null +++ b/doc/libdoc.txt @@ -0,0 +1,402 @@ +Not finished - 19 Jan 2002 - checkpoint (Steve Kenton) + +This is a sorted (ignoring leading '_') list of the SDCC library. +Sources are in ~sdcc/device/lib/*.c and ~sdcc/device/include/*.h. +Except where denoted with MACRO these are implemented as functions. +Internal function calls are generated by the compiler to implement +IEEE floating point, etc. They are not normally called directly. + +ctype.h +/*------------------------------------------------------------------------- + +isalnum - character classification - #include - all ports + char isalnum (unsigned char c); MACRO + Return true if c is an ASCII letter or digit + 'a-z','A-Z', '0'-'9' otherwise return false. + +isalpha - character classification - #include - all ports + char isalpha (unsigned char c); MACRO + Return true if c is an ASCII letter + 'a-z','A-Z' otherwise return false. + +iscntrl - character classification - #include - all ports + char iscntrl (unsigned char c); + Return true if c is an ASCII control character + 0x00-0x1F or 0x7F (DEL) otherwise return false. + +isdigit - character classification - #include - all ports + char isdigit (unsigned char c); + Return true if c is an ASCII digit '0'-'9' + otherwise return false. + +isgraph - character classification - #include - all ports + char isgraph (unsigned char c); + Return true is c is an ASCII printable graphic + excluding space 0x21-0x7E otherwise return false. + +islower - character classification - #include - all ports + char islower (unsigned char c); + Return true if c is an ASCII lower case letter + 'a'-'z' otherwise return false. + +isprint - character classification - #include - all ports + char isprint (unsigned char c); + Return true is c is an ASCII printable graphic + including space 0x20-0x7E otherwise return false. + +ispunct - character classification - #include - all ports + char ispunct (unsigned char c); + Return true if c is ASCII punctuation (isgraph but not isalnum) + otherwise return false. + +isspace - character classification - #include - all ports + char isspace (unsigned char c); + Return true if c is an ASCII white space character + space, tab, carriage return, newline or vertical tab + 0x09-0x0D, 0x20 otherwise return false. + +isupper - character classification - #include - all ports + char isupper (unsigned char c); + Return true if c is an ASCII upper case letter + 'A'-'Z' otherwise return false. + +isxdigit - character classification - #include - all ports + char isxdigit (unsigned char c); + Return true if c is an ASCII hexidecimal digit + '0-9','a-f','A-F' otherwise return false. + +toascii - character classification - #include - all ports + char toascii(unsigned char c); MACRO + Convert c from 8-bit to 7-bit ASCII. + +tolower - character classification - #include - all ports + char _tolower(unsigned char c); MACRO + char tolower(unsigned char c); MACRO + Convert c from upper case to lower case. + +toupper - character classification - #include - all ports + char _toupper(unsigned char c); MACRO + char toupper(unsigned char c); MACRO + Convert c from lower case to upper case. + +float.h +/*------------------------------------------------------------------------- + +__uchar2fs - IEEE single precision math - #include - ??? ports + float __uchar2fs (unsigned char uc); INTERNAL + Convert an unsigned char to float. + +__schar2fs - IEEE single precision math - #include - ??? ports + float __schar2fs (signed char sc); INTERNAL + Convert a signed char to float. + +__uint2fs - IEEE single precision math - #include - ??? ports + float __uint2fs (unsigned int ui); INTERNAL + Convert an unsigned int to float. + +__sint2fs - IEEE single precision math - #include - ??? ports + float __sint2fs (signed int si); INTERNAL + Convert a signed int to float. + +__ulong2fs - IEEE single precision math - #include - ??? ports + float __ulong2fs (unsigned long ul); INTERNAL + Convert an unsigned log to float. + +__slong2fs - IEEE single precision math - #include - ??? ports + float __slong2fs (signed long sl); INTERNAL + Convert a signed long to float. + +__fs2uchar - IEEE single precision math - #include - ??? ports + unsigned char __fs2uchar (float f); INTERNAL + Convert a float to unsigned char; + +__fs2schar - IEEE single precision math - #include - ??? ports + signed char __fs2schar (float f); INTERNAL + Convert a float to signed char; + +__fs2uint - IEEE single precision math - #include - ??? ports + unsigned int __fs2uint (float f); INTERNAL + Convert a float to unsigned int; + +__fs2sint - IEEE single precision math - #include - ??? ports + signed int __fs2sint (float f); INTERNAL + Convert a float to signed int; + +__fs2ulong - IEEE single precision math - #include - ??? ports + unsigned long __fs2ulong (float f); INTERNAL + Convert a float to unsigned long; + +__fs2slong - IEEE single precision math - #include - ??? ports + signed long __fs2slong (float f); INTERNAL + Convert a float to signed long. + +__fsadd - IEEE single precision math - #include - ??? ports + float __fsadd (float a1, float a2); INTERNAL + Add two floats. + +__fssub - IEEE single precision math - #include - ??? ports + float __fssub (float a1, float a2); INTERNAL + Subtract two floats. + +__fsmul - IEEE single precision math - #include - ??? ports + float __fsmul (float a1, float a2); INTERNAL + Multiply two floats. + +__fsdiv - IEEE single precision math - #include - ??? ports + float __fsdiv (float a1, float a2); INTERNAL + Divide two floats. + +__fslt - IEEE single precision math - #include - ??? ports + char __fslt (float a1, float a2); INTERNAL + Compare two floats lt. + +__fseq - IEEE single precision math - #include - ??? ports + char __fseq (float a1, float a2); INTERNAL + Compare two floats eq. + +__fsneq - IEEE single precision math - #include - ??? ports + char __fseq (float a1, float a2); INTERNAL ??? missing in float.h ??? + Compare two floats neq. + +__fsgt - IEEE single precision math - #include - ??? ports + char __fsgt (float a1, float a2); INTERNAL ??? typo in float.h ??? + Compare two floats gt. + +malloc.h +/*------------------------------------------------------------------------- +malloc - memory allocation - #include - ??? ports + void *malloc (unsigned int); + void xdata * malloc (unsigned int ); + Allocate a block of memory from the heap; + +free - memory allocation - #include - ??? ports + void free (void *p); + void free (void xdata * p); + Return previously allocated memory to the heap. + +init_dynamic_memory - memory allocation - #include - ??? ports + void init_dynamic_memory (MEMHEADER xdata * , unsigned int ); + Initialize the memory allocation system. + +math.h +/*------------------------------------------------------------------------- + +/* Trigonometric functions */ +sincosf - ANSI C math - #include - all ports + float sincosf(const float x, const int iscos); INTERNAL + Compute the sine or cosine of x. + +tancotf - ANSI C math - #include - all ports + float tancotf(const float x, const int iscot); INTERNAL + Compute the tangent or cotangent of x. + +asincosf - ANSI C math - #include - all ports + float asincosf(const float x, const int isacos); INTERNAL + Compute the arc sine or arc cosine of x. + +sincoshf - ANSI C math - #include - all ports + float sincoshf(const float x, const int iscosh); INTERNAL + Compute the hyperbolic sine or hyperbolic cosine of x. + +sinf - ANSI C math - #include - all ports + float sinf (const float x); + Compute sine of x. + +cosf - ANSI C math - #include - all ports + float cosf (const float x); + Compute cosine of x. + +tanf - ANSI C math - #include - all ports + float tanf (const float x); + Compute tangent of x. + +cotf - ANSI C math - #include - all ports + float cotf (const float x); + Compute cotangent of x. + +asinf - ANSI C math - #include - all ports + float asinf (const float x); + Compute the arc sine of x. + +acosf - ANSI C math - #include - all ports + float acosf (const float x); + Compute the arc cosine of x. + +atanf - ANSI C math - #include - all ports + float atanf (const float x); + Compute the arc tangent of x. + +atan2f - ANSI C math - #include - all ports + float atan2f (const float x, const float y); ??? x,y reversed ??? + Compute the arc tangent of (x/y); + +/* Hyperbolic functions */ +sinhf - ANSI C math - #include - all ports + float sinhf (const float x); + Compute the hyperbolic sine of x. + +coshf - ANSI C math - #include - all ports + float coshf (const float x); + Compute the hyperbolic cosine of x. + +tanhf - ANSI C math - #include - all ports + float tanhf (const float x); + Compute the hyperbolic tangent of x. + +/* Exponential, logarithmic and power functions */ +expf - ANSI C math - #include - all ports + float expf (const float x); + Compute e to the x power. + +logf - ANSI C math - #include - all ports + float logf (const float x); + Compute log base e of x. + +log10f - ANSI C math - #include - all ports + float log10f (const float x); + Compute log base 10 of x. + +powf - ANSI C math - #include - all ports + float powf (const float x, const float y); + Compute x to y power. + +sqrtf - ANSI C math - #include - all ports + float sqrtf (const float x); + Compute the square root of x. + +/* Nearest integer, absolute value, and remainder functions */ +fabsf - ANSI C math - #include - all ports + float fabsf (const float x); + Compute the absolute value of x. + +frexpf - ANSI C math - #include - all ports + float frexpf (const float x, int *pw2); + Split x in to mantissa and exponent parts. + +ldexpf - ANSI C math - #include - all ports + float ldexpf (const float x, const int pw2); + Combine mantissa and exponent parts of a float. + +ceilf - ANSI C math - #include - all ports + float ceilf (float x); + Find the smallest integer not less than x. + +floorf - ANSI C math - #include - all ports + float floorf (float x); + Find the largest integer not more than x. + +modff - ANSI C math - #include - all ports + float modff (float x, float * y); + Split x in to integer and fractional parts. + +setjmp.h +/*------------------------------------------------------------------------- +setjmp - long jump - #include - ??? ports + int setjmp (unsigned char * jmpb); + Save the return address and sufficient task state + to allow implementation of co-routines or error + handlers that unwind the stack using longjmp. + Returns 0, which is reserved and cannot be used + by longjmp. + +longjmp - long jump - #include - ??? ports + int longjmp (unsigned char * jmpb, int retval); + Return to the the location and task state previously + save in the jump buffer. Any integer number except 0 + may be passed as retval. + +stdio.h +/*------------------------------------------------------------------------- +printf_small - standard character I/O - #include - all ports + void printf_small (char *,...); + +printf - standard character I/O - #include - all ports + int printf (const char *,...); + +vprintf - standard character I/O - #include - all ports + int vprintf (const char *, va_list); + +sprintf - standard character I/O - #include - all ports + int sprintf (const char *, const char *, ...); + +vsprintf - standard character I/O - #include - all ports + int vsprintf (const char *, const char *, va_list); + +puts - standard character I/O - #include - all ports + int puts(const char *); + +gets - standard character I/O - #include - all ports + char *gets(char *); + +getchar - standard character I/O - #include - all ports + char getchar(void); + +putchar - standard character I/O - #include - all ports + void putchar(char); + +string.h +/*------------------------------------------------------------------------- +strcpy - string manipulation - #include - all ports + char *strcpy (char * d, char * s); + Copy the source string s to the destination string d. + +strncpy - string manipulation - #include - all ports + char *strncpy(char * d, char * s, int n); + +strcat - string manipulation - #include - all ports + char *strcat (char * front, char * back); + +strncat - string manipulation - #include - all ports + char *strncat(char * front, char * back, int n); + +strcmp - string manipulation - #include - all ports + int strcmp (char * asrc, char * adst); + +strncmp - string manipulation - #include - all ports + int strncmp(char * asrc, char * adst, int n); + +strchr - string manipulation - #include - all ports + char *strchr (char *, char ); + +strrchr - string manipulation - #include - all ports + char *strrchr(char *, char ); + +strspn - string manipulation - #include - all ports + int strspn (char *, char *); + +strcspn - string manipulation - #include - all ports + int strcspn(char *, char *); + +strpbrk - string manipulation - #include - all ports + char *strpbrk(char *, char *); + +strstr - string manipulation - #include - all ports + char *strstr (char *, char *); + +strlen - string manipulation - #include - all ports + int strlen (char * ); + +strtok - string manipulation - #include - all ports + char *strtok (char *, char *); + +memcpy - string manipulation - #include - all ports + void *memcpy (void *, void *, int ); + +memcmp - string manipulation - #include - all ports + int memcmp (void *, void *, int ); + +memset - string manipulation - #include - all ports + void *memset (void *, unsigned char , int ); + +time.h +/*------------------------------------------------------------------------- + +mktime - time and date - #include - all ports + time_t mktime(struct tm *timeptr); + +asctime - time and date - #include - all ports + char *asctime(struct tm *timeptr); + +ctime - time and date - #include - all ports + char *ctime(time_t *timep); + -- 2.30.2