This header file defines the symbol NULL and the type size_t if they haven't been defined already, and provides prototypes for the following functions in the minimal C library:
- atol
- Convert an ASCII decimal number into a long.
- strtol
- Convert an ASCII number into a long.
- strtoul
- Convert an ASCII number into an unsigned long.
- strtod
- Convert ASCII string to double.
- malloc
- Allocate a chunk of memory in the caller's heap.
- mustmalloc
- Like malloc, but calls panic if the allocation fails.
- calloc
- Allocate a zero-filled chunk of memory.
- mustcalloc
- Like calloc, but calls panic if the allocation fails.
- realloc
- Changes the allocated size of a chunk of memory while preserving the contents of that memory.
- free
- Releases a chunk of memory.
- exit
- Cause normal program termination; see Section 9.7.1.
- abort
- Cause abnormal program termination; see Section 9.7.2.
- panic
- Cause abnormal termination and print a message. Not a standard C function; see Section 9.7.3.
- atexit
- Register a function to be called on exit.
- getenv
- Search for a string in the environment.
Prototypes for the following functions are also provided, but they are not implemented in the minimal C library.
- abs
- Compute the absolute value of an integer.
- atoi
- Convert an ASCII decimal number into an int.
- atof
- Convert ASCII string to double.
- qsort
- Sort an array of objects.
- rand
- Compute a pseudo-random integer. Not thread safe; uses static data.
- srand
- Seed the pseudo-random number generator. Not thread safe; uses static data.