# 2.11BSD#431 - /usr/include/stdlib.h

##### Macros

    EXIT_FAILURE      X
    EXIT_SUCCESS      X
    NULL              X
    RAND_MAX          X
    _STDLIB_H_        X

       1: /*-
       2:  * Copyright (c) 1990, 1993
       3:  *	The Regents of the University of California.  All rights reserved.
       4:  *
       5:  * Redistribution and use in source and binary forms, with or without
       6:  * modification, are permitted provided that the following conditions
       7:  * are met:
       8:  * 1. Redistributions of source code must retain the above copyright
       9:  *    notice, this list of conditions and the following disclaimer.
      10:  * 2. Redistributions in binary form must reproduce the above copyright
      11:  *    notice, this list of conditions and the following disclaimer in the
      12:  *    documentation and/or other materials provided with the distribution.
      13:  * 3. All advertising materials mentioning features or use of this software
      14:  *    must display the following acknowledgement:
      15:  *	This product includes software developed by the University of
      16:  *	California, Berkeley and its contributors.
      17:  * 4. Neither the name of the University nor the names of its contributors
      18:  *    may be used to endorse or promote products derived from this software
      19:  *    without specific prior written permission.
      20:  *
      21:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
      22:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
      23:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
      24:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
      25:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
      26:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
      27:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
      28:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
      29:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
      30:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
      31:  * SUCH DAMAGE.
      32:  *
      33:  *	@(#)stdlib.h	8.3.2 (2.11BSD) 1996/1/12
      34:  *
      35:  * Adapted from the 4.4-Lite CD.  The odds of a ANSI C compiler for 2.11BSD
      36:  * being slipped under the door are not distinguishable from 0 - so the
      37:  * prototypes and ANSI ifdefs have been removed from this file.
      38:  *
      39:  * Some functions (strtoul for example) do not exist yet but are retained in
      40:  * this file because additions to libc.a are anticipated shortly.
      41:  */
      42:
      43: #ifndef _STDLIB_H_
      44: #define _STDLIB_H_
      45:
      46: /* #include <machine/ansi.h> */
      47:
      48: #ifdef  notyet
      49: typedef struct {
      50:     int quot;       /* quotient */
      51:     int rem;        /* remainder */
      52: } div_t;
      53:
      54: typedef struct {
      55:     long quot;      /* quotient */
      56:     long rem;       /* remainder */
      57: } ldiv_t;
      58: #endif
      59:
      60: #ifndef NULL
      61: #define NULL    0
      62: #endif
      63:
      64: #define EXIT_FAILURE    1
      65: #define EXIT_SUCCESS    0
      66:
      67: #define RAND_MAX    0x7fff
      68:
      69: void    abort();
      70: int abs();
      71: int atexit();
      72: double  atof();
      73: int atoi();
      74: long    atol();
      75: void    *calloc();
      76: void    exit();
      77: void    free();
      78: char    *getenv();
      79: void    *malloc();
      80: void    qsort();
      81: int rand();
      82: void    *realloc();
      83: void    srand();
      84: double  strtod();
      85: long    strtol();
      86: unsigned long strtoul();
      87: int system();
      88:
      89: int putenv();
      90: int setenv();
      91:
      92: void    *alloca();
      93:
      94: int daemon();
      95: char    *devname();
      96: int getloadavg();
      97:
      98: extern char *optarg;            /* getopt(3) external variables */
      99: extern int opterr, optind, optopt;
     100: int getopt();
     101:
     102: extern char *suboptarg;         /* getsubopt(3) external variable */
     103: int getsubopt();
     104:
     105: long    random();
     106: char    *setstate();
     107: void    srandom();
     108: void    unsetenv();
     109:
     110: #endif /* _STDLIB_H_ */

#### Defined macros

EXIT_FAILURE defined in line 64; never used
EXIT_SUCCESS defined in line 65; never used
NULL defined in line 61; used 216 times

- in line 60
- in /usr/src/bin/chpass/chpass.c line 52-53(2), 64, 391, 415
- in /usr/src/bin/ld/ld.c line 340, 477, 488, 651, 673, 847, 944, 1291, 1385, 2041, 2121
- in /usr/src/bin/stty/stty.c line 294
- in /usr/src/bin/write.c line 56, 63, 144, 231
- in /usr/src/lib/libc/gen/syserrlst.c line 49
- in /usr/src/lib/libc/net/ruserpass.c line 60, 89, 98, 144-148(2), 720-723(4), 731, 761-764(3), 789, 806
- in /usr/src/lib/libc/stdio/setvbuf.c line 89-95(3), 106-110(2)
- in /usr/src/lib/libc/stdlib/getsubopt.c line 55
- in /usr/src/libexec/identd/src/itest.c line 46-47(2), 124-127(4), 133, 142
- in /usr/src/libexec/identd/src/parse.c line 90, 115, 297
- in /usr/src/new/kermit5.188/ckcdeb.h line 1295
- in /usr/src/new/kermit5.188/ckcmdb.c line 84, 99, 327
- in /usr/src/new/kermit5.188/ckufio.c line 497(7), 619-620(2), 671, 678, 684, 706, 955-959(2), 1155-1157(3), 1207, 1315-1318(2), 1351, 1398-1403(3), 1415, 1450, 1456, 1465, 1474, 1615, 1643, 1952, 2212, 2304-2314(5), 2386-2389(4), 2448-2451(2), 2526, 2555, 2664, 2691, 2736-2738(2), 2748-2750(2), 2759-2767(3), 2806, 2817, 2851, 2874, 2898, 2908, 2917-2920(3), 2958
- in /usr/src/sbin/newfs/newfs.c line 142, 218
- in /usr/src/sbin/quotacheck/preen.c line 95, 142-150(3), 160-162(2), 206-214(4), 232-241(4)
- in /usr/src/sys/pdpstand/makesimtape.c line 37(2)
- in /usr/src/ucb/ftp/ruserpass.c line 75-79(2), 86, 108-113(2)
- in /usr/src/usr.sbin/accton/accton.c line 80, 87, 94, 195
- in /usr/src/usr.sbin/catman/catman.c line 47, 124, 158, 171, 180, 190
- in /usr/src/usr.sbin/quotaon/quotaon.c line 97, 141, 192
- in /usr/src/usr.sbin/sa/sa.c line 419, 439, 593, 812, 831
- in /usr/src/usr.sbin/sendmail.MX/src/util.c line 51, 147, 182, 192, 214, 263, 308, 445, 475, 523, 613, 625, 631-632(2), 645-648(2), 713, 756, 890, 916-920(2), 927, 933, 944
- in /usr/src/usr.sbin/sendmail/src/util.c line 51, 147, 182, 192, 214, 263, 308, 445, 475, 523, 613, 625, 631-632(2), 645-648(2), 713, 756, 890, 916-920(2), 927, 933, 944
- in /usr/src/usr.sbin/vipw/vipw.c line 225, 246

RAND_MAX defined in line 67; never used
_STDLIB_H_ defined in line 44; used 1 times

- in line 43

#### Usage of this include

stdlib.h used 80 times

- in /usr/src/bin/chpass/chpass.c line 38
- in /usr/src/bin/date.c line 29
- in /usr/src/bin/df.c line 55
- in /usr/src/bin/disklabel/disklabel.c line 56
- in /usr/src/bin/ld/ld.c line 68
- in /usr/src/bin/mail.c line 18
- in /usr/src/bin/stty/stty.c line 23
- in /usr/src/bin/su.c line 19
- in /usr/src/bin/tcsh/sh.h line 168
- in /usr/src/bin/write.c line 17
- in /usr/src/games/hack/hack.main.c line 6
- in /usr/src/games/hack/hack.pager.c line 10
- in /usr/src/lib/libc/gen/abort.c line 39
- in /usr/src/lib/libc/gen/fstab.c line 41
- in /usr/src/lib/libc/gen/getmntinfo.c line 40
- in /usr/src/lib/libc/gen/getpwent.c line 24
- in /usr/src/lib/libc/gen/setmode.c line 48
- in /usr/src/lib/libc/gen/syserrlst.c line 19
- in /usr/src/lib/libc/gen/timezone.c line 12
- in /usr/src/lib/libc/net/ruserpass.c line 19
- in /usr/src/lib/libc/stdio/setvbuf.c line 42
- in /usr/src/lib/libc/stdlib/getopt.c line 39
- in /usr/src/lib/libc/stdlib/getsubopt.c line 38
- in /usr/src/lib/libc/stdlib/strtol.c line 41
- in /usr/src/lib/libc/stdlib/strtoul.c line 41
- in /usr/src/libexec/acctd/acctd.c line 13
- in /usr/src/libexec/comsat/comsat.c line 22
- in /usr/src/libexec/identd/src/identd.c line 71
- in /usr/src/libexec/identd/src/itest.c line 25
- in /usr/src/libexec/identd/src/parse.c line 46
- in /usr/src/libexec/rshd/rshd.c line 52
- in /usr/src/local/zmodem/sz.c line 139
- in /usr/src/new/kermit5.188/ckcdeb.h line 1241, 1284
- in /usr/src/new/kermit5.188/ckufio.c line 99
- in /usr/src/sbin/badsect/badsect.c line 15
- in /usr/src/sbin/gt307/gt307.c line 28
- in /usr/src/sbin/mkfs/mkfs.c line 29
- in /usr/src/sbin/mkpasswd/mkpasswd.c line 32
- in /usr/src/sbin/mount/getmntopts.c line 43
- in /usr/src/sbin/mount/mount.c line 50
- in /usr/src/sbin/mount/mount_ufs.c line 47
- in /usr/src/sbin/newfs/newfs.c line 38
- in /usr/src/sbin/quotacheck/preen.c line 44
- in /usr/src/sbin/quotacheck/quotacheck.c line 62
- in /usr/src/sbin/shutdown/shutdown.c line 23
- in /usr/src/sbin/umount/umount.c line 47
- in /usr/src/sys/pdpstand/makesimtape.c line 15
- in /usr/src/ucb/ftp/cmds.c line 39
- in /usr/src/ucb/ftp/main.c line 42
- in /usr/src/ucb/ftp/ruserpass.c line 33
- in /usr/src/ucb/lastcomm.c line 28
- in /usr/src/ucb/leave.c line 18
- in /usr/src/ucb/more/more.c line 34
- in /usr/src/ucb/tset/tset.c line 233
- in /usr/src/ucb/window/ww.h line 13
- in /usr/src/usr.bin/id/id.c line 49
- in /usr/src/usr.bin/mkerrlst/mkerrlst.c line 27
- in /usr/src/usr.bin/uucp/uucp.h line 5
- in /usr/src/usr.bin/whereis/whereis.c line 48
- in /usr/src/usr.bin/xinstall/xinstall.c line 53
- in /usr/src/usr.lib/libident/id_close.c line 12
- in /usr/src/usr.lib/libident/id_open.c line 17
- in /usr/src/usr.lib/libident/id_parse.c line 18
- in /usr/src/usr.lib/libident/id_query.c line 16
- in /usr/src/usr.lib/libident/ident-tester.c line 18
- in /usr/src/usr.lib/libident/ident.c line 15
- in /usr/src/usr.lib/libident/lookup-tester.c line 14
- in /usr/src/usr.lib/libident/support.c line 11
- in /usr/src/usr.sbin/accton/accton.c line 12
- in /usr/src/usr.sbin/catman/catman.c line 27
- in /usr/src/usr.sbin/cron/externs.h line 18
- in /usr/src/usr.sbin/dev_mkdb/dev_mkdb.c line 42
- in /usr/src/usr.sbin/inetd/inetd.c line 108
- in /usr/src/usr.sbin/quotaon/quotaon.c line 54
- in /usr/src/usr.sbin/rmt/rmt.c line 24
- in /usr/src/usr.sbin/sa/sa.c line 25
- in /usr/src/usr.sbin/sendmail.MX/src/sendmail.h line 34
- in /usr/src/usr.sbin/sendmail/src/sendmail.h line 34
- in /usr/src/usr.sbin/vipw/vipw.c line 36

Last modified: 1996-01-13 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 795 |