home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 4
/
DATAFILE_PDCD4.iso
/
unix
/
unixlib36d
/
clib
/
h
/
stdlib
< prev
next >
Wrap
Text File
|
1994-02-26
|
2KB
|
86 lines
/* stdlib.h (c) Copyright 1990 H.Rogers */
#ifndef __STDLIB_H
#define __STDLIB_H
#ifndef __SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define EXIT_SUCCESS 0
#define EXIT_FAILURE (-1)
extern void abort(void);
extern int atexit(void (*)(void));
extern void exit(int);
extern void _exit(int);
extern char *getenv(const char *);
extern int putenv(char *);
extern int system(const char *);
#define __MAX_AXCNT 33
/* NB ANSI requires 32, C++ requires 1 extra */
extern void (*__ax[__MAX_AXCNT])(void); /* atexit() functions */
extern int __axcnt; /* atexit() function count */
extern void *calloc(size_t,size_t);
extern void free(void *);
extern void *malloc(size_t);
extern void *realloc(void *,size_t);
extern void __allocinit(void);
#define RAND_MAX 0x7fffffff
#define rand() ((int)lrand())
#define lrand48() lrand()
#define srand48(s) srand(s)
#define random() lrand()
#define srandom(s) srand(s)
extern int (rand)(void);
extern long lrand(void);
extern void srand(long);
extern long (lrand48)(void);
extern void (srand48)(long);
extern long (random)(void);
extern void (srandom)(long);
extern int abs(int);
extern long int labs(long int);
extern div_t div(int,int);
extern ldiv_t ldiv(long,long);
#define atof(s) strtod(s,0)
#define atoi(s) ((int)strtol(s,0,10))
#define atol(s) strtol(s,0,10)
extern double (atof)(const char *);
extern int (atoi)(const char *);
extern long (atol)(const char *);
extern double strtod(const char *,char **);
extern long strtol(const char *,char **,int);
extern unsigned long strtoul(const char *,char **,int);
extern void *bsearch(const void *,const void *,size_t,size_t,
int (*)(const void *,const void *));
extern void qsort(void *,size_t,size_t,
int (*)(const void *,const void *));
extern int mblen(const char *,size_t);
extern size_t mbstowcs(wchar_t *,const char *,size_t);
extern int mbtowc(wchar_t *,const char *,size_t);
extern size_t wcstombs(char *,const wchar_t *,size_t);
extern int wctomb(char *,wchar_t);
#ifdef __cplusplus
}
#endif
#endif