/** * stdlib.h * * Defines certain common macros, types, and functions */ #ifndef _STDLIB_H #define _STDLIB_H #ifndef _NULL #define NULL ((void *)0) #endif #define EXIT_FAILURE 1 /* standard error returned from exit() */ #define EXIT_SUCCESS 0 /* successfull return from exit() */ #define RAND_MAX 32767 /* largest value generated by rand() */ #define MB_CUR_MAX 1 /* maximum value of multibyte character */ #ifndef _SIZE_T #define _SIZE_T typedef unsigned int size_t; #endif #ifndef _WCHAR_T #define _WCHAR_T typedef char wchar_t; #endif /*void abort(void);*/ int abs(int number); /*int atexit(void (*_func)(void));*/ /*double atof(const char *_nptr);*/ int atoi(const char *nptr); /*long atol(const char *_nptr);*/ /*void *calloc(size_t _nmemb, size_t _size);*/ /*div_t div(int _numer, int _denom);*/ /*void exit(int _status);*/ void free(void *blk); /*char *getenv(const char *_name);*/ /*long labs(long _j);*/ /*ldiv_t ldiv(long _numer, long _denom);*/ void *malloc(size_t _size); /*int mblen(const char *_s, size_t _n);*/ /*size_t mbstowcs(wchar_t *_pwcs, const char *_s, size_t _n);*/ /*int mbtowc(wchar_t *_pwc, const char *_s, size_t _n);*/ void *realloc(void *blk, size_t size); /*double strtod(const char *_nptr, char **_endptr);*/ /*long strtol(const char *_nptr, char **_endptr, int _base);*/ /*int system(const char *_string);*/ /*size_t wcstombs(char *_s, const wchar_t *_pwcs, size_t _n);*/ /*int wctomb(char *_s, wchar_t _wchar);*/ /*void *bsearch(const void *_key, const void *_base, size_t _nmemb, size_t _size, int (*compar) (const void *, const void *));*/ /*void qsort(void *_base, size_t _nmemb, size_t _size, int (*compar) (const void *, const void *));*/ int rand(void); void srand(unsigned int seed); /*unsigned long int strtoul(const char *_nptr, char **_endptr, int _base);*/ #endif /* _STDLIB_H */