| | 1 | = The stdlib library = |
| | 2 | |
| | 3 | The [source:soft/giet_vm/giet_libs/stdlib.c stdlib.c] and [source:soft/giet_vm/giet_libs/stdlib.h stdlib.h] |
| | 4 | files define a set of useful functions that does not require a system call. |
| | 5 | |
| | 6 | * '''int atoi( char * string )''' |
| | 7 | This function translate a character string to a signed integer. All characters (but the first) must be digits. |
| | 8 | For a negative value, the first character must be the '-' (minus) character. |
| | 9 | |
| | 10 | *'''void* memcpy( void* dst, const void* src, unsigned int size )''' |
| | 11 | This function copies ''size'' bytes from the ''src'' source buffer to the ''dst'' destination buffer. |
| | 12 | |
| | 13 | * '''void* memset( void* dst, int s, unsigned int size )''' |
| | 14 | This function initializes ''size'' bytes in the ''dst'' destination buffer, with the value defined by ''(char)s''. |