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-12-18 14:00:32 +00:00
|
|
|
#if !defined(_STDLIB_H)
|
|
|
|
#define _STDLIB_H
|
1989-05-16 13:13:53 +00:00
|
|
|
|
1989-12-18 14:00:32 +00:00
|
|
|
#define NULL ((void *)0)
|
1989-05-16 13:13:53 +00:00
|
|
|
|
|
|
|
#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-12-18 14:00:32 +00:00
|
|
|
#if !defined(_SIZE_T)
|
|
|
|
#define _SIZE_T
|
|
|
|
#if _EM_WSIZE == _EM_PSIZE
|
|
|
|
typedef unsigned int size_t; /* type returned by sizeof */
|
|
|
|
#else
|
|
|
|
typedef unsigned long size_t; /* type returned by sizeof */
|
|
|
|
#endif
|
|
|
|
#endif /* _SIZE_T */
|
1989-05-16 13:13:53 +00:00
|
|
|
|
1989-12-18 14:00:32 +00:00
|
|
|
#if !defined(_WCHAR_T)
|
|
|
|
#define _WCHAR_T
|
1989-09-29 15:46:33 +00:00
|
|
|
typedef char wchar_t;
|
1989-12-18 14:00:32 +00:00
|
|
|
#endif /* _WCHAR_T */
|
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-12-18 14:00:32 +00:00
|
|
|
#endif /* _STDLIB_H */
|