Annotation of 43BSDReno/include/stdlib.h, revision 1.1.1.1

1.1       root        1: /*-
                      2:  * Copyright (c) 1990 The Regents of the University of California.
                      3:  * All rights reserved.
                      4:  *
                      5:  * Redistribution and use in source and binary forms are permitted
                      6:  * provided that: (1) source distributions retain this entire copyright
                      7:  * notice and comment, and (2) distributions including binaries display
                      8:  * the following acknowledgement:  ``This product includes software
                      9:  * developed by the University of California, Berkeley and its contributors''
                     10:  * in the documentation or other materials provided with the distribution
                     11:  * and in all advertising materials mentioning features or use of this
                     12:  * software. Neither the name of the University nor the names of its
                     13:  * contributors may be used to endorse or promote products derived
                     14:  * from this software without specific prior written permission.
                     15:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
                     16:  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
                     17:  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     18:  *
                     19:  *     @(#)stdlib.h    5.3 (Berkeley) 5/29/90
                     20:  */
                     21: 
                     22: #ifndef _STDLIB_H_
                     23: #define _STDLIB_H_
                     24: #include <machine/machtypes.h>
                     25: 
                     26: #ifdef _SIZE_T_
                     27: typedef        _SIZE_T_        size_t;
                     28: #undef _SIZE_T_
                     29: #endif
                     30: 
                     31: #ifdef _WCHAR_T_
                     32: typedef        _WCHAR_T_       wchar_t;
                     33: #undef _WCHAR_T_
                     34: #endif
                     35: 
                     36: typedef struct {
                     37:        int quot;               /* quotient */
                     38:        int rem;                /* remainder */
                     39: } div_t;
                     40: typedef struct {
                     41:        long quot;              /* quotient */
                     42:        long rem;               /* remainder */
                     43: } ldiv_t;
                     44: 
                     45: #define        EXIT_FAILURE    1
                     46: #define        EXIT_SUCCESS    0
                     47: 
                     48: #define        RAND_MAX        0x7ffffffff
                     49: 
                     50: #define        MB_CUR_MAX      1       /* XXX */
                     51: 
                     52: #if __STDC__ || c_plusplus
                     53: 
                     54: void    abort(void);
                     55: int     abs(int);
                     56: int     atexit(void (*_func)(void));
                     57: double  atof(const char *_nptr);
                     58: int     atoi(const char *_nptr);
                     59: long    atol(const char *_nptr);
                     60: void   *bsearch(const void *_key, const void *_base, size_t _nmemb,
                     61:            size_t _size, int (*_compar)(const void *, const void *));
                     62: void   *calloc(size_t _nmemb, size_t _size);
                     63: div_t   div(int _numer, int _denom);
                     64: void    exit(int _status);
                     65: void    free(void *_ptr);
                     66: char   *getenv(const char *_string);
                     67: long    labs(long);
                     68: ldiv_t  ldiv(long _numer, long _denom);
                     69: void   *malloc(size_t _size);
                     70: void    qsort(void *_base, size_t _nmemb, size_t _size,
                     71:            int (*_compar)(const void *, const void *));
                     72: int     rand(void);
                     73: void   *realloc(void *_ptr, size_t _size);
                     74: void    srand(unsigned _seed);
                     75: long    strtol(const char *_nptr, char **_endptr, int _base);
                     76: unsigned long
                     77:         strtoul(const char *_nptr, char **_endptr, int _base);
                     78: int     system(const char *_string);
                     79: 
                     80: #ifndef _ANSI_SOURCE
                     81: void    cfree(void *_ptr);
                     82: int    putenv(const char *_string);
                     83: int    setenv(const char *_string, const char *_value, int _overwrite);
                     84: #endif
                     85: 
                     86: #ifdef NOT_YET_IMPLEMENTED
                     87: int    mblen(const char *_s, size_t _n);
                     88: size_t mbstowcs(wchar_t *_pwcs, const char *_s, size_t _n);
                     89: int    wctomb(char *_s, wchar_t _wchar);
                     90: int    mbtowc(wchar_t *_pwc, const char *_s, size_t _n);
                     91: double strtod(const char *_nptr, char **_endptr);
                     92: size_t wcstombs(char *_s, const wchar_t *_pwcs, size_t _n);
                     93: #endif
                     94: 
                     95: #else
                     96: 
                     97: void    abort();
                     98: int     abs();
                     99: int     atexit();
                    100: double  atof();
                    101: int     atoi();
                    102: long    atol();
                    103: void   *bsearch();
                    104: void   *calloc();
                    105: div_t   div();
                    106: void    exit();
                    107: void    free();
                    108: char   *getenv();
                    109: long    labs();
                    110: ldiv_t  ldiv();
                    111: void   *malloc();
                    112: void    qsort();
                    113: int     rand();
                    114: void   *realloc();
                    115: void    srand();
                    116: long    strtol();
                    117: unsigned long
                    118:         strtoul();
                    119: int     system();
                    120: 
                    121: #ifndef _ANSI_SOURCE
                    122: void    cfree();
                    123: int    putenv();
                    124: int    setenv();
                    125: #endif
                    126: 
                    127: #ifdef NOT_YET_IMPLEMENTED
                    128: int    mblen();
                    129: size_t mbstowcs();
                    130: int    wctomb();
                    131: int    mbtowc();
                    132: double strtod();
                    133: size_t wcstombs();
                    134: #endif
                    135: 
                    136: #endif
                    137: 
                    138: #endif /* _STDLIB_H_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.