X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=includes%2Fstdlib.h;h=4d6fc53c91d1c4107ae27ec9be0083d7d7130488;hb=40491b595bb70b20781cc10e235ebf6f1f7b2455;hp=a83bd1e75fdea86f51b23f41cb86f60f725c7a76;hpb=064097d5ed6eb8c2cfd337c29ac3ebc471e557b8;p=pdclib diff --git a/includes/stdlib.h b/includes/stdlib.h index a83bd1e..4d6fc53 100644 --- a/includes/stdlib.h +++ b/includes/stdlib.h @@ -29,6 +29,11 @@ typedef _PDCLIB_size_t size_t; /* TODO: atof(), strtof(), strtod(), strtold() */ +double atof( const char * nptr ); +double strtod( const char * _PDCLIB_restrict nptr, char * * _PDCLIB_restrict endptr ); +float strtof( const char * _PDCLIB_restrict nptr, char * * _PDCLIB_restrict endptr ); +long double strtold( const char * _PDCLIB_restrict nptr, char * * _PDCLIB_restrict endptr ); + /* Seperate the character array nptr into three parts: A (possibly empty) sequence of whitespace characters, a character representation of an integer to the given base, and trailing invalid characters (including the terminating @@ -86,13 +91,20 @@ void srand( unsigned int seed ); /* Memory management functions */ void * malloc( size_t size ); +void * realloc( void * ptr, size_t size ); void free( void * ptr ); /* Communication with the environment */ +#define EXIT_SUCCESS _PDCLIB_SUCCESS +#define EXIT_FAILURE _PDCLIB_FAILURE + void abort(); +int atexit( void (*func)( void ) ); void exit( int status ); void _Exit( int status ); +char * getenv( const char * name ); +int system( const char * string ); /* Searching and sorting */ @@ -117,7 +129,12 @@ lldiv_t lldiv( long long int numer, long long int denom ); /* TODO: Macro MB_CUR_MAX */ -/* Multibyte / wide string conversion functions */ - +/* +int mblen( const char * s, size_t n ); +int mbtowc( wchar_t * _PDCLIB_restrict pwc, const char * _PDCLIB_restrict s, size_t n ); +int wctomb( char * s, wchar_t wc ); +size_t mbstowcs( wchar_t * _PDCLIB_restrict pwcs, const char * _PDCLIB_restrict s, size_t n ); +size_t wcstombs( char * _PDCLIB_restrict s, const wchar_t * _PDCLIB_restrict pwcs, size_t n ); +*/ #endif