# 2.11BSD#431 - /usr/src/lib/libc/stdio/ungetc.c

##### Functions

    ungetc            X

       1: #if defined(LIBC_SCCS) && !defined(lint)
       2: static char sccsid[] = "@(#)ungetc.c	5.3 (Berkeley) 3/26/86";
       3: #endif LIBC_SCCS and not lint
       4:
       5: #include <stdio.h>
       6:
       7: ungetc(c, iop)
       8:     register FILE *iop;
       9: {
      10:     if (c == EOF || (iop->_flag & (_IOREAD|_IORW)) == 0 ||
      11:         iop->_ptr == NULL || iop->_base == NULL)
      12:         return (EOF);
      13:
      14:     if (iop->_ptr == iop->_base)
      15:         if (iop->_cnt == 0)
      16:             iop->_ptr++;
      17:         else
      18:             return (EOF);
      19:
      20:     iop->_cnt++;
      21:     *--iop->_ptr = c;
      22:
      23:     return (c);
      24: }

#### Defined functions

ungetc defined in line 7; used 118 times

- in /usr/ingres/source/support/creatdb.c line 771
- in /usr/src/bin/tcsh/mkprstr.c line 19
- in /usr/src/games/battlestar/mkstr.c line 25
- in /usr/src/games/snake/snake.c line 182, 219, 262
- in /usr/src/games/trek/computer.c line 266
- in /usr/src/games/trek/getpar.c line 206-209(2), 224, 242, 266
- in /usr/src/games/trek/torped.c line 74
- in /usr/src/lib/ccom/cvopt.c line 110, 147, 187, 211, 264, 411, 434
- in /usr/src/lib/libc/stdio/doscan.c line 86, 95, 177, 243
- in /usr/src/lib/mip/scan.c line 224, 387-389(2), 454, 509, 588, 595-600(2), 633, 641, 769, 1003, 1022
- in /usr/src/libexec/identd/src/parse.c line 76
- in /usr/src/libexec/tcpd/options.c line 230
- in /usr/src/new/PORT/B/src/bed/edit.c line 145, 219, 278
- in /usr/src/new/PORT/B/src/bed/vtrm.c line 785
- in /usr/src/new/PORT/B/src/bint/b3sou.c line 523
- in /usr/src/new/PORT/B/src/bsmall/b2sou.c line 242
- in /usr/src/new/PORT/perl.1.0.0/arg.c line 456
- in /usr/src/new/PORT/perl.1.0.10/arg.c line 468
- in /usr/src/new/PORT/perl.1.0.16/arg.c line 487
- in /usr/src/new/kermit5.188/ckwart.c line 267, 280, 556, 562
- in /usr/src/new/m11/macxrf.c line 128
- in /usr/src/new/notes/src/bnewshead.c line 626
- in /usr/src/new/pathalias/parse.y line 305, 316, 376, 402
- in /usr/src/new/rcs/src/ident.c line 147
- in /usr/src/new/rcs/src/rcskeep.c line 109-114(2), 204, 222
- in /usr/src/old/shortc/shortc.c line 320
- in /usr/src/ucb/Mail/aux.c line 186
- in /usr/src/ucb/ctags.c line 384, 530
- in /usr/src/ucb/mkstr.c line 19
- in /usr/src/ucb/more/more.c line 44
- in /usr/src/ucb/rdist/gram.y line 209, 245, 267
- in /usr/src/ucb/sendbug/bugfiler.c line 872
- in /usr/src/ucb/window/scanner.c line 47
- in /usr/src/usr.bin/dc/dc.c line 1145
- in /usr/src/usr.bin/deroff.c line 449, 601
- in /usr/src/usr.bin/f77/lex.c line 303
- in /usr/src/usr.bin/graph/graph.c line 633, 640
- in /usr/src/usr.bin/learn/copy.c line 283
- in /usr/src/usr.bin/learn/learn.c line 74
- in /usr/src/usr.bin/ptx.c line 286
- in /usr/src/usr.bin/refer/flagger.c line 153
- in /usr/src/usr.bin/uucp/fio.c line 418
- in /usr/src/usr.bin/yacc/y2.c line 519, 582, 596, 626, 765
- in /usr/src/usr.lib/lib2648/printg.c line 34-36(2)
- in /usr/src/usr.lib/libI77/lread.c line 35, 60
- in /usr/src/usr.lib/libI77/rsfe.c line 60
- in /usr/src/usr.lib/libI77/rsnmle.c line 41-46(2), 73
- in /usr/src/usr.lib/libmp/mout.c line 46
- in /usr/src/usr.sbin/cron/misc.c line 310
- in /usr/src/usr.sbin/inetd/inetd.c line 873
- in /usr/src/usr.sbin/named/master/atod.y line 59, 93
- in /usr/src/usr.sbin/named/named/db_load.c line 547, 572, 580, 737
- in /usr/src/usr.sbin/quot/quot.c line 108
- in /usr/src/usr.sbin/sendmail.MX/aux/arpa.c line 544
- in /usr/src/usr.sbin/sendmail.MX/src/alias.c line 470
- in /usr/src/usr.sbin/sendmail.MX/src/collect.c line 127
- in /usr/src/usr.sbin/sendmail.MX/src/util.c line 694, 705
- in /usr/src/usr.sbin/sendmail/aux/arpa.c line 544
- in /usr/src/usr.sbin/sendmail/src/alias.c line 472
- in /usr/src/usr.sbin/sendmail/src/collect.c line 121
- in /usr/src/usr.sbin/sendmail/src/util.c line 694, 705

#### Defined variables

sccsid defined in line 2; never used

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