X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=includes%2Fstdlib.h;h=97c85e0fabc9bb00adf8a325f3f95da0a71ed2c4;hb=d865c4403fc91d1f1ac95ba76febcee9f429bb97;hp=026a82a5020cc7ea97b53bd2234619e99a8aeafe;hpb=b08f4b52b1cd1f7a9553c0f357a7c90859fa3e73;p=pdclib diff --git a/includes/stdlib.h b/includes/stdlib.h index 026a82a..97c85e0 100644 --- a/includes/stdlib.h +++ b/includes/stdlib.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* General utilities This file is part of the Public Domain C Library (PDCLib). @@ -9,10 +7,7 @@ #ifndef _PDCLIB_STDLIB_H #define _PDCLIB_STDLIB_H _PDCLIB_STDLIB_H -#ifndef _PDCLIB_INT_H -#define _PDCLIB_INT_H _PDCLIB_INT_H -#include <_PDCLIB_int.h> -#endif +#include "_PDCLIB_int.h" #ifndef _PDCLIB_SIZE_T_DEFINED #define _PDCLIB_SIZE_T_DEFINED _PDCLIB_SIZE_T_DEFINED @@ -52,6 +47,9 @@ long double strtold( const char * _PDCLIB_restrict nptr, char * * _PDCLIB_restri LLONG_MIN, LLONG_MAX, or ULLONG_MAX respectively, depending on the sign of the integer representation and the return type, and errno is set to ERANGE. */ +/* There is strtoimax() and strtoumax() in operating on intmax_t / + uintmax_t, if the long long versions do not suit your needs. +*/ long int strtol( const char * _PDCLIB_restrict nptr, char * * _PDCLIB_restrict endptr, int base ); long long int strtoll( const char * _PDCLIB_restrict nptr, char * * _PDCLIB_restrict endptr, int base ); unsigned long int strtoul( const char * _PDCLIB_restrict nptr, char * * _PDCLIB_restrict endptr, int base ); @@ -140,12 +138,12 @@ void * realloc( void * ptr, size_t size ); */ void abort( void ); -/* Register a function that will be called on exit(), _Exit(), or when main() - returns. At least 32 functions can be registered this way, and will be - called in reverse order of registration (last-in, first-out). +/* Register a function that will be called on exit(), or when main() returns. + At least 32 functions can be registered this way, and will be called in + reverse order of registration (last-in, first-out). Returns zero if registration is successfull, nonzero if it failed. */ -int atexit( void (*func)( void ) ); +int atexit( void (*func)( void ) ); /* Normal process termination. Functions registered by atexit() (see above) are called, streams flushed, files closed and temporary files removed before the