1989-05-16 13:13:53 +00:00
|
|
|
/*
|
|
|
|
* stdlib.h - standard library
|
|
|
|
*
|
|
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
|
*/
|
|
|
|
/* $Header$ */
|
|
|
|
|
1989-09-29 15:46:33 +00:00
|
|
|
#if !defined(__STDLIB_HEADER__)
|
|
|
|
#define __STDLIB_HEADER__
|
1989-05-16 13:13:53 +00:00
|
|
|
|
1989-09-29 15:46:33 +00:00
|
|
|
#if !defined(NULL)
|
1989-05-16 13:13:53 +00:00
|
|
|
#define NULL 0
|
|
|
|
#endif /* NULL */
|
|
|
|
|
|
|
|
#define EXIT_FAILURE 1
|
|
|
|
#define EXIT_SUCCESS 0
|
|
|
|
#define RAND_MAX 32767
|
|
|
|
#define MB_CUR_MAX 1
|
|
|
|
|
|
|
|
typedef struct { int quot, rem; } div_t;
|
|
|
|
typedef struct { long quot, rem; } ldiv_t;
|
|
|
|
|
1989-09-29 15:46:33 +00:00
|
|
|
#if !defined(__TYPE_SIZE__)
|
|
|
|
#define __TYPE_SIZE__
|
1989-05-16 13:13:53 +00:00
|
|
|
typedef unsigned int size_t;
|
1989-09-29 15:46:33 +00:00
|
|
|
#endif /* __TYPE_SIZE__ */
|
1989-05-16 13:13:53 +00:00
|
|
|
|
1989-09-29 15:46:33 +00:00
|
|
|
#if !defined(__TYPE_WCHAR__)
|
|
|
|
#define __TYPE_WCHAR__
|
|
|
|
typedef char wchar_t;
|
|
|
|
#endif /* __TYPE_WCHAR__ */
|
1989-05-16 13:13:53 +00:00
|
|
|
|
1989-09-29 15:46:33 +00:00
|
|
|
double atof(const char *__nptr);
|
|
|
|
int atoi(const char *__nptr);
|
|
|
|
long atol(const char *__nptr);
|
|
|
|
double strtod(const char *__nptr, char **__endptr);
|
|
|
|
long strtol(const char *__nptr, char **__endptr, int __base);
|
|
|
|
unsigned long int strtoul(const char *__nptr, char **__endptr, int __base);
|
1989-05-16 13:13:53 +00:00
|
|
|
int rand(void);
|
1989-09-29 15:46:33 +00:00
|
|
|
void srand(unsigned int __seed);
|
|
|
|
void *calloc(size_t __nmemb, size_t __size);
|
|
|
|
void free(void *__ptr);
|
|
|
|
void *malloc(size_t __size);
|
|
|
|
void *realloc(void *__ptr, size_t __size);
|
1989-05-16 13:13:53 +00:00
|
|
|
void abort(void);
|
1989-09-29 15:46:33 +00:00
|
|
|
int atexit(void (*__func)(void));
|
|
|
|
void exit(int __status);
|
|
|
|
char *getenv(const char *__name);
|
|
|
|
int system(const char *__string);
|
|
|
|
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 abs(int __j);
|
|
|
|
div_t div(int __numer, int __denom);
|
|
|
|
long labs(long __j);
|
|
|
|
ldiv_t ldiv(long __numer, long __denom);
|
|
|
|
int mblen(const char *__s, size_t __n);
|
|
|
|
int mbtowc(wchar_t *__pwc, const char *__s, size_t __n);
|
|
|
|
int wctomb(char *__s, wchar_t __wchar);
|
|
|
|
size_t mbstowcs(wchar_t *__pwcs, const char *__s, size_t __n);
|
|
|
|
size_t wcstombs(char *__s, const wchar_t *__pwcs, size_t __n);
|
1989-05-16 13:13:53 +00:00
|
|
|
|
1989-09-29 15:46:33 +00:00
|
|
|
#endif /* __STDLIB_HEADER__ */
|