|
|
1.1 ! root 1: /* (-lgl ! 2: * COHERENT Version 4.0.2 ! 3: * Copyright (c) 1982, 1993 by Mark Williams Company. ! 4: * All rights reserved. May not be copied without permission. ! 5: -lgl) */ ! 6: /* ! 7: * stdlib.h ! 8: * C general utilities library header. ! 9: * Draft Proposed ANSI C Standard, Section 4.10, 12/7/88 draft. ! 10: */ ! 11: ! 12: #ifndef __STDLIB_H__ ! 13: #define __STDLIB_H__ ! 14: ! 15: /* Macros. */ ! 16: #define _ATEXITN 32 /* number of atexit()-registered fns */ ! 17: #define EXIT_FAILURE 1 ! 18: #define EXIT_SUCCESS 0 ! 19: #define MB_CUR_MAX 1 ! 20: #define RAND_MAX 32767 ! 21: ! 22: /* Types. */ ! 23: typedef struct { int quot; int rem; } div_t; /* div result type */ ! 24: typedef struct { long quot; long rem; } ldiv_t; /* ldiv result type */ ! 25: #ifndef _SIZE_T ! 26: #define _SIZE_T ! 27: typedef unsigned int size_t; /* sizeof result type */ ! 28: #endif ! 29: #ifndef _WCHAR_T ! 30: #define _WCHAR_T ! 31: typedef char wchar_t; /* extended character set type */ ! 32: #endif ! 33: #define Void char /* Use "Void *" as generic pointer type */ ! 34: #define const /* Ignore type modifier "const" */ ! 35: #ifndef NULL ! 36: #define NULL ((char *)0) /* null pointer constant */ ! 37: #endif ! 38: ! 39: /* ! 40: * Functions in /lib/libc.a corresponding to ANSI <stdlib.h>. ! 41: * N.B. The behavior of these functions is not guaranteed to ! 42: * comply with the ANSI standard; ! 43: * see the COHERENT documentation for details on each function. ! 44: */ ! 45: extern void abort( /* void */ ); ! 46: extern int abs( /* int j */ ); ! 47: extern int atexit( /* void (*func)(void) */ ); ! 48: extern double atof( /* const char *nptr */ ); ! 49: extern int atoi( /* const char *nptr */ ); ! 50: extern long int atol( /* const char *nptr */ ); ! 51: extern Void *bsearch( /* const void *key, ! 52: const void *base, ! 53: size_t nmemb, ! 54: size_t size, ! 55: int (*compar)(const void *, const void *) */ ); ! 56: extern Void *calloc( /* size_t nmemb, size_t size */ ); ! 57: extern div_t div( /* int numer, int denom */ ); ! 58: extern void exit( /* int status */ ); ! 59: extern void free( /* Void *ptr */ ); ! 60: extern char *getenv( /* const char *name */ ); ! 61: extern long int labs( /* long int j */ ); ! 62: extern ldiv_t ldiv( /* long int numer, long int denom */ ); ! 63: extern Void *malloc( /* size_t size */ ); ! 64: extern void qsort( /* void *base, size_t nmemb, size_t size, ! 65: int (*compar)(const void *, const void *) */ ); ! 66: extern int rand( /* void */ ); ! 67: extern Void *realloc( /* void *ptr, size_t size */ ); ! 68: extern void srand( /* unsigned int seed */ ); ! 69: extern double strtod( /* const char *nptr, char **endptr */ ); ! 70: extern long int strtol( /* const char *nptr, char **endptr, int base */ ); ! 71: extern unsigned long strtoul( /* const char *nptr, char **endptr, int base */ ); ! 72: extern int system( /* const char *string */ ); ! 73: ! 74: #if 0 ! 75: /* ! 76: * Functions in ANSI <stdlib.h> not currently implemented in COHERENT libc.a. ! 77: */ ! 78: extern int mblen( /* const char *s, size_t n */ ); ! 79: extern int mbtowc( /* wchar_t *pwc, const char *s, size_t n */ ); ! 80: extern size_t mbstowcs(/* wchar_t *pwcs, const char *s, size_t n */ ); ! 81: extern size_t wcstombs(/* char *s, const wchar_t *pwcs, size_t n */ ); ! 82: extern int wctomb( /* char *s, wchar_t wchar */ ); ! 83: #endif ! 84: ! 85: /* Internal data and functions. */ ! 86: extern int _atexitn; ! 87: extern void (**_atexitfp)(); ! 88: extern double _pow10 (); ! 89: ! 90: #endif ! 91: ! 92: /* end of stdlib.h */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.