# 2.11BSD#431 - /usr/src/lib/libc/gen/atoi.c

##### Functions

    atoi              X

       1: #if defined(LIBC_SCCS) && !defined(lint)
       2: static char sccsid[] = "@(#)atoi.c	5.2 (Berkeley) 3/9/86";
       3: #endif LIBC_SCCS and not lint
       4:
       5: atoi(p)
       6: register char *p;
       7: {
       8:     register int n;
       9:     register int f;
      10:
      11:     n = 0;
      12:     f = 0;
      13:     for(;;p++) {
      14:         switch(*p) {
      15:         case ' ':
      16:         case '\t':
      17:             continue;
      18:         case '-':
      19:             f++;
      20:         case '+':
      21:             p++;
      22:         }
      23:         break;
      24:     }
      25:     while(*p >= '0' && *p <= '9')
      26:         n = n*10 + *p++ - '0';
      27:     return(f? -n: n);
      28: }

#### Defined functions

atoi defined in line 5; used 600 times

- in /usr/include/stdlib.h line 73
- in /usr/src/bin/ar/archive.c line 166
- in /usr/src/bin/chgrp.c line 65
- in /usr/src/bin/chpass/chpass.c line 433-436(2)
- in /usr/src/bin/chpass/field.c line 94, 126
- in /usr/src/bin/chpass/util.c line 84-87(2)
- in /usr/src/bin/csh/sh.proc.c line 55, 87, 795, 857, 937
- in /usr/src/bin/date.c line 65, 71
- in /usr/src/bin/diff/diff.c line 80
- in /usr/src/bin/disklabel/disklabel.c line 773, 833, 844, 854, 864, 874, 884, 894, 904, 914, 924, 934, 985
- in /usr/src/bin/kill.c line 41, 65
- in /usr/src/bin/ld/ld.c line 393, 535, 2083
- in /usr/src/bin/mail.c line 461
- in /usr/src/bin/make/files.c line 535
- in /usr/src/bin/mt.c line 86
- in /usr/src/bin/nice.c line 29
- in /usr/src/bin/nm/nm.c line 347
- in /usr/src/bin/ping/ping.c line 163, 183, 192, 216
- in /usr/src/bin/pr.c line 82-86(2), 102, 113
- in /usr/src/bin/ps.c line 221
- in /usr/src/bin/stty/stty.c line 300-305(2)
- in /usr/src/bin/sysctl/sysctl.c line 330
- in /usr/src/bin/tar.c line 211
- in /usr/src/bin/tcsh/ed.screen.c line 608, 737, 752-756(2)
- in /usr/src/bin/tcsh/sh.c line 300
- in /usr/src/bin/tcsh/sh.proc.c line 305, 368, 1344, 1444, 1547
- in /usr/src/bin/tcsh/tc.func.c line 721
- in /usr/src/bin/tcsh/tc.os.c line 341, 473, 550
- in /usr/src/bin/tcsh/tc.os.h line 293
- in /usr/src/bin/tcsh/tc.printf.c line 99, 111
- in /usr/src/bin/tcsh/tc.sched.c line 99, 133-137(2)
- in /usr/src/games/adventure/io.c line 205, 305-310(3), 485
- in /usr/src/games/atc/main.c line 54
- in /usr/src/games/banner.c line 1002
- in /usr/src/games/cribbage/test.c line 41
- in /usr/src/games/hack/hack.end.c line 577, 612
- in /usr/src/games/hack/hack.main.c line 174
- in /usr/src/games/hack/hack.objnam.c line 361, 369, 378
- in /usr/src/games/hack/hack.options.c line 118
- in /usr/src/games/hack/hack.trap.c line 391
- in /usr/src/games/hack/hack.u_init.c line 314
- in /usr/src/games/robots/main.c line 38
- in /usr/src/games/sail/main.c line 64
- in /usr/src/games/snake/snake.c line 112-117(2)
- in /usr/src/games/warp/init.c line 210
- in /usr/src/games/warp/score.c line 80, 157-161(5)
- in /usr/src/games/warp/sm.c line 26
- in /usr/src/games/warp/warp.c line 193, 200, 214, 222, 243, 252, 266
- in /usr/src/games/worm.c line 61
- in /usr/src/games/worms.c line 179, 186
- in /usr/src/lib/libc/gen/disklabel.c line 444
- in /usr/src/lib/libc/gen/fstab.c line 84-86(2), 105-107(2)
- in /usr/src/lib/libc/gen/getgrent.c line 53
- in /usr/src/lib/libc/gen/getpwent.c line 194-197(2)
- in /usr/src/lib/libc/net/getpent.c line 73
- in /usr/src/lib/libc/net/getsent.c line 75
- in /usr/src/libexec/ftpd/ftpcmd.y line 972, 987
- in /usr/src/libexec/ftpd/ftpd.c line 185, 191
- in /usr/src/libexec/identd/src/identd.c line 331, 344, 362, 575
- in /usr/src/libexec/identd/src/itest.c line 139, 147
- in /usr/src/libexec/identd/testdir/test1.c line 88
- in /usr/src/libexec/popper/pop_dele.c line 27
- in /usr/src/libexec/popper/pop_list.c line 29
- in /usr/src/libexec/popper/pop_send.c line 31, 48
- in /usr/src/libexec/rlogind/rlogind.c line 573
- in /usr/src/libexec/telnetd/telnetd.c line 128
- in /usr/src/local/cxref/cxref.c line 113
- in /usr/src/local/cxref/cxrfilt.c line 86-87(2)
- in /usr/src/local/cxref/fmtxref.c line 66
- in /usr/src/local/less/command.c line 126
- in /usr/src/local/mkovmake/mkovmake.c line 117, 148, 155
- in /usr/src/local/mtools/mformat.c line 47-53(3)
- in /usr/src/local/qterm/options.c line 191
- in /usr/src/local/trace.c line 36, 45
- in /usr/src/local/zmodem/rz.c line 313, 321
- in /usr/src/local/zmodem/sz.c line 376, 413, 438, 446, 468, 488
- in /usr/src/new/PORT/B/src/b/retab.c line 42
- in /usr/src/new/PORT/B/src/bed/edit.c line 286
- in /usr/src/new/PORT/B/src/bed/main.c line 111
- in /usr/src/new/PORT/B/src/bint/b3err.c line 89
- in /usr/src/new/PORT/hexdump/hexsyntax.c line 63
- in /usr/src/new/PORT/hexdump/parse.c line 101, 119, 164, 240
- in /usr/src/new/PORT/perl.1.0.0/arg.c line 895, 1939
- in /usr/src/new/PORT/perl.1.0.0/perly.c line 36, 310
- in /usr/src/new/PORT/perl.1.0.0/stab.c line 76
- in /usr/src/new/PORT/perl.1.0.0/x2p/a2py.c line 34, 42, 307
- in /usr/src/new/PORT/perl.1.0.0/x2p/walk.c line 556, 572, 578, 597, 942
- in /usr/src/new/PORT/perl.1.0.10/arg.c line 917, 1967
- in /usr/src/new/PORT/perl.1.0.10/perly.c line 46, 322
- in /usr/src/new/PORT/perl.1.0.10/stab.c line 79
- in /usr/src/new/PORT/perl.1.0.10/x2p/a2py.c line 37, 45, 314
- in /usr/src/new/PORT/perl.1.0.10/x2p/walk.c line 559, 575, 581, 600, 945
- in /usr/src/new/PORT/perl.1.0.16/arg.c line 936, 1991
- in /usr/src/new/PORT/perl.1.0.16/perly.c line 46, 323
- in /usr/src/new/PORT/perl.1.0.16/stab.c line 82
- in /usr/src/new/PORT/perl.1.0.16/x2p/a2py.c line 37, 45, 314
- in /usr/src/new/PORT/perl.1.0.16/x2p/walk.c line 563, 579, 585, 604, 949
- in /usr/src/new/jove/portsrv.c line 125
- in /usr/src/new/jove/recover.c line 307, 723
- in /usr/src/new/kermit5.188/ckcfns.c line 1958-1963(2), 1969-2009(12), 2015-2033(7), 2043-2048(2), 2054, 2060, 2081
- in /usr/src/new/kermit5.188/ckcnet.c line 302, 480
- in /usr/src/new/kermit5.188/ckucmd.c line 570, 592
- in /usr/src/new/kermit5.188/ckudia.c line 2522
- in /usr/src/new/kermit5.188/ckufio.c line 1633, 1674, 1955, 1967, 1982
- in /usr/src/new/kermit5.188/ckutio.c line 1078, 1127, 4951
- in /usr/src/new/kermit5.188/ckuus4.c line 1985, 2012, 2059-2060(2), 2089-2092(3), 2124, 2163
- in /usr/src/new/kermit5.188/ckuus5.c line 3329, 3444
- in /usr/src/new/kermit5.188/ckuus6.c line 1679, 1700
- in /usr/src/new/kermit5.188/ckuusy.c line 330, 371, 383
- in /usr/src/new/nntp/common/clientlib.c line 153
- in /usr/src/new/nntp/inews/inews.c line 88, 122
- in /usr/src/new/nntp/server/common.h line 91
- in /usr/src/new/nntp/server/misc.c line 36, 66, 468
- in /usr/src/new/nntp/server/newgroups.c line 90
- in /usr/src/new/nntp/server/scandir.c line 40
- in /usr/src/new/nntp/server/xhdr.c line 102-107(3)
- in /usr/src/new/nntp/support/mkgrdates.c line 107
- in /usr/src/new/nntp/xmit/get_tcp_conn.c line 250
- in /usr/src/new/nntp/xmit/remote.c line 121, 192
- in /usr/src/new/nntp/xmit/shlock.c line 72-74(2), 219
- in /usr/src/new/notes/src/bnewshead.c line 208
- in /usr/src/new/notes/src/nfadmin.c line 67, 74, 81
- in /usr/src/new/notes/src/nfarchive.c line 76, 89
- in /usr/src/new/notes/src/nfprint.c line 92
- in /usr/src/new/rcs/src/rcsrev.c line 262
- in /usr/src/new/rn/init.c line 263
- in /usr/src/new/rn/intrp.c line 218
- in /usr/src/new/rn/ng.c line 148, 388
- in /usr/src/new/rn/rcstuff.c line 283, 588
- in /usr/src/new/rn/sw.c line 164-165(2), 187, 207-209(2), 243, 270, 311, 325
- in /usr/src/old/512restor.c line 347, 443
- in /usr/src/old/checkobj/checkobj.c line 51
- in /usr/src/old/cu/cu.c line 174
- in /usr/src/old/dump/dumpmain.c line 63
- in /usr/src/old/dump/unctime.c line 36-40(5)
- in /usr/src/old/shortc/shortc.c line 96
- in /usr/src/sbin/clri/clri.c line 50, 66
- in /usr/src/sbin/dump/dumprmt.c line 178
- in /usr/src/sbin/dump/unctime.c line 36-40(5)
- in /usr/src/sbin/fsck/utilities.c line 429-434(2)
- in /usr/src/sbin/gt307/gt307.c line 122
- in /usr/src/sbin/ifconfig/ifconfig.c line 278
- in /usr/src/sbin/init/init.c line 90
- in /usr/src/sbin/mkfs/mkfs.c line 90-96(3), 198-202(2), 208
- in /usr/src/sbin/mkpasswd/mkpasswd.c line 214-217(2)
- in /usr/src/sbin/quotacheck/quotacheck.c line 134
- in /usr/src/sbin/restor/restor.c line 237, 333
- in /usr/src/sbin/route/route.c line 376
- in /usr/src/sbin/savecore/savecore.c line 294
- in /usr/src/sbin/slattach/slattach.c line 36
- in /usr/src/share/zoneinfo/zdump.c line 77
- in /usr/src/sys/autoconfig/read_dtab.c line 64
- in /usr/src/ucb/Mail/cmd1.c line 136, 304, 365
- in /usr/src/ucb/Mail/cmd2.c line 396
- in /usr/src/ucb/PORT/systat/cmds.c line 62-65(2)
- in /usr/src/ucb/PORT/systat/main.c line 64
- in /usr/src/ucb/apply.c line 44
- in /usr/src/ucb/compress/compress.c line 525
- in /usr/src/ucb/error/errorinput.c line 113
- in /usr/src/ucb/ftp/cmds.c line 90, 942
- in /usr/src/ucb/gcore.c line 72
- in /usr/src/ucb/indent/args.c line 249
- in /usr/src/ucb/last.c line 76
- in /usr/src/ucb/leave.c line 53, 64
- in /usr/src/ucb/lock/lock.c line 75
- in /usr/src/ucb/logger.c line 200
- in /usr/src/ucb/msgs/msgs.c line 149-152(2), 693
- in /usr/src/ucb/quota.c line 75
- in /usr/src/ucb/rdist/server.c line 1014, 1028, 1035
- in /usr/src/ucb/telnet.c line 2057, 2067
- in /usr/src/ucb/tftp/main.c line 187, 456, 482
- in /usr/src/ucb/tn3270/tn3270.c line 253
- in /usr/src/ucb/vmstat.c line 302, 434
- in /usr/src/usr.bin/at/at.c line 618, 630
- in /usr/src/usr.bin/at/atrm.c line 205
- in /usr/src/usr.bin/eqn/e.y line 93-96(4)
- in /usr/src/usr.bin/eqn/io.c line 164-165(2)
- in /usr/src/usr.bin/eqn/size.c line 11-15(3), 38-42(3)
- in /usr/src/usr.bin/find/find.c line 232-238(3), 245-249(2), 255-257(2), 613
- in /usr/src/usr.bin/fstat/fstat.c line 145
- in /usr/src/usr.bin/learn/copy.c line 305
- in /usr/src/usr.bin/learn/selsub.c line 46
- in /usr/src/usr.bin/lex/parser.y line 305
- in /usr/src/usr.bin/m4/eval.c line 156, 165, 244, 354, 669, 698, 704
- in /usr/src/usr.bin/patch/patch.c line 427, 445, 465
- in /usr/src/usr.bin/plot/atoplot.c line 20-23(2)
- in /usr/src/usr.bin/plot/crtdriver.c line 29-32(2)
- in /usr/src/usr.bin/plot/debug.c line 18-21(2)
- in /usr/src/usr.bin/plot/driver.c line 24-30(3)
- in /usr/src/usr.bin/plot/plottoa.c line 24-27(2)
- in /usr/src/usr.bin/prof/prof.c line 116
- in /usr/src/usr.bin/refer/flagger.c line 30
- in /usr/src/usr.bin/refer/glue1.c line 101, 109
- in /usr/src/usr.bin/refer/hunt1.c line 88, 94
- in /usr/src/usr.bin/refer/inv1.c line 41
- in /usr/src/usr.bin/refer/mkey1.c line 55-62(3)
- in /usr/src/usr.bin/refer/refer1.c line 29-33(2), 50, 61
- in /usr/src/usr.bin/refer/refer2.c line 70
- in /usr/src/usr.bin/refer/refer5.c line 221
- in /usr/src/usr.bin/refer/refer7.c line 62-65(2), 109-111(2)
- in /usr/src/usr.bin/refer/thash.c line 26
- in /usr/src/usr.bin/renice/renice.c line 38, 67
- in /usr/src/usr.bin/tbl/t4.c line 161
- in /usr/src/usr.bin/tip/cu.c line 46-51(2)
- in /usr/src/usr.bin/tip/tip.c line 78
- in /usr/src/usr.bin/tip/value.c line 142, 314
- in /usr/src/usr.bin/uucp/UUAIDS/uucpsrv.c line 27
- in /usr/src/usr.bin/uucp/aculib/bsdtcp.c line 30
- in /usr/src/usr.bin/uucp/aculib/hys.c line 132
- in /usr/src/usr.bin/uucp/aculib/mic.c line 64
- in /usr/src/usr.bin/uucp/aculib/rvmacs.c line 65
- in /usr/src/usr.bin/uucp/aculib/sy.c line 65, 76, 96-101(2)
- in /usr/src/usr.bin/uucp/aculib/unet.c line 25
- in /usr/src/usr.bin/uucp/aculib/vmacs.c line 66
- in /usr/src/usr.bin/uucp/cico.c line 133, 146, 152, 390, 402
- in /usr/src/usr.bin/uucp/cntrl.c line 291, 380, 537, 726
- in /usr/src/usr.bin/uucp/conn.c line 357, 605
- in /usr/src/usr.bin/uucp/uuclean.c line 61, 70
- in /usr/src/usr.bin/uucp/uucp.c line 90
- in /usr/src/usr.bin/uucp/uusnap.c line 276-278(2)
- in /usr/src/usr.bin/uucp/uux.c line 103
- in /usr/src/usr.bin/uucp/uuxqt.c line 93
- in /usr/src/usr.bin/xargs/xargs.c line 104-108(2)
- in /usr/src/usr.lib/libplot/imagen/linemod.c line 33-37(2)
- in /usr/src/usr.sbin/chown/chown.c line 78, 85
- in /usr/src/usr.sbin/cron/entry.c line 482
- in /usr/src/usr.sbin/edquota/edquota.c line 152
- in /usr/src/usr.sbin/lpr/cmds.c line 107
- in /usr/src/usr.sbin/lpr/displayq.c line 192, 290
- in /usr/src/usr.sbin/lpr/filters/lpf.c line 62-71(3)
- in /usr/src/usr.sbin/lpr/filters/rvcat.c line 366-371(2)
- in /usr/src/usr.sbin/lpr/filters/vcat.c line 352, 358
- in /usr/src/usr.sbin/lpr/filters/vdmp.c line 55-60(2)
- in /usr/src/usr.sbin/lpr/filters/vpf.c line 63-72(3)
- in /usr/src/usr.sbin/lpr/filters/vplotf.c line 81, 92
- in /usr/src/usr.sbin/lpr/filters/vpltdmp.c line 49-54(2)
- in /usr/src/usr.sbin/lpr/filters/vpsf.c line 63-73(3)
- in /usr/src/usr.sbin/lpr/filters/vwidth.c line 252, 261
- in /usr/src/usr.sbin/lpr/lpd.c line 316, 346
- in /usr/src/usr.sbin/lpr/lpq.c line 71, 95
- in /usr/src/usr.sbin/lpr/lpr.c line 195-200(2)
- in /usr/src/usr.sbin/lpr/lprm.c line 85
- in /usr/src/usr.sbin/lpr/lptest.c line 33-37(2)
- in /usr/src/usr.sbin/lpr/pac.c line 183
- in /usr/src/usr.sbin/lpr/rmjob.c line 123
- in /usr/src/usr.sbin/lpr/startdaemon.c line 47
- in /usr/src/usr.sbin/named/named/ns_init.c line 180
- in /usr/src/usr.sbin/named/named/ns_main.c line 200, 211
- in /usr/src/usr.sbin/named/tools/nstest.c line 64, 128, 179
- in /usr/src/usr.sbin/ntp/ntpd.c line 182, 211, 754, 765
- in /usr/src/usr.sbin/rmt/rmt.c line 71, 87, 94, 112, 126-127(2)
- in /usr/src/usr.sbin/sa/sa.c line 349
- in /usr/src/usr.sbin/sendmail.MX/aux/mconnect.c line 71
- in /usr/src/usr.sbin/sendmail.MX/src/deliver.c line 778
- in /usr/src/usr.sbin/sendmail.MX/src/main.c line 373, 580
- in /usr/src/usr.sbin/sendmail.MX/src/parseaddr.c line 812, 874
- in /usr/src/usr.sbin/sendmail.MX/src/readcf.c line 156, 232, 445, 723, 737, 793, 808, 842, 875, 891-899(3), 907-911(2)
- in /usr/src/usr.sbin/sendmail.MX/src/usersmtp.c line 450
- in /usr/src/usr.sbin/sendmail/aux/mconnect.c line 75
- in /usr/src/usr.sbin/sendmail/src/deliver.c line 720
- in /usr/src/usr.sbin/sendmail/src/main.c line 367, 584
- in /usr/src/usr.sbin/sendmail/src/parseaddr.c line 807, 870
- in /usr/src/usr.sbin/sendmail/src/readcf.c line 150, 226, 439, 718, 732, 788, 803, 840, 873, 889-897(3), 905-909(2)
- in /usr/src/usr.sbin/sendmail/src/usersmtp.c line 446
- in /usr/src/usr.sbin/syslogd/syslogd.c line 183, 1091
- in /usr/src/usr.sbin/traceroute/traceroute.c line 293, 304, 312, 331, 342, 377

#### Defined variables

sccsid defined in line 2; never used

Last modified: 1986-03-10 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 852 |