1: /*
2: * Copyright (c) 1987 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: */
6:
7: #ifdef LIBC_SCCS
8: <@(#)fgetc.s 1.1 (Berkeley) 2/4/87\0>
9: .even
10: #endif LIBC_SCCS
11:
12: #include "DEFS.h"
13: #include "STDIO.h"
14:
15: .globl __filbuf
16:
17: /*
18: * fgetc(iop)
19: * FILE *iop;
20: *
21: * Return next character from stream fp or EOF on end of file.
22: *
23: */
24: ENTRY(fgetc)
25: mov 2(sp),r1 / grab iop
26: dec _CNT(r1) / any characters available?
27: blt 1f
28: clr r0 / do an unsigned
29: bisb *_PTR(r1),r0 / movb to a register
30: inc _PTR(r1) / bop the pointer on one place,
31: rts pc
32: 1:
33: jmp __filbuf / let _filbuf(iop) handle it
Defined functions
_fgetc
defined in line
24; used 78 times
- in /usr/ingres/source/monitor/eval.c line
23,
40
- in /usr/ingres/source/monitor/go.c line
30,
51
- in /usr/ingres/source/monitor/trapquery.c line
58,
84
- in /usr/src/lib/libc/gen/getpwent.c line
185
- in /usr/src/libexec/tcpd/options.c line
228
- in /usr/src/local/mtools/file_write.c line
90
- in /usr/src/new/PORT/B/src/bint/b3fil.c line
63
- in /usr/src/new/PORT/B/src/bsmall/b2fil.c line
53
- in /usr/src/new/nntp/xmit/remote.c line
398
- in /usr/src/new/rcs/src/rcssyn.c line
500
- in /usr/src/ucb/PORT/pascal/eyacc/ey2.c line
166,
299-311(6),
321-325(2),
333,
347(2),
361,
394,
427-441(5),
452,
469,
476,
482,
502,
508-511(2),
527-531(2)
- in /usr/src/ucb/pascal/eyacc/ey2.c line
155,
288-300(6),
310-314(2),
322,
336(2),
350,
383,
416-430(5),
441,
458,
465,
471,
491,
497-500(2),
516-520(2)
- in /usr/src/usr.bin/at/atrun.c line
434
- in /usr/src/usr.bin/learn/copy.c line
96
- in /usr/src/usr.lib/libI77/err.c line
107-110(2)
- in /usr/src/usr.sbin/ntp/ntpd.c line
1000
- in /usr/src/usr.sbin/sendmail.MX/aux/mconnect.c line
118
- in /usr/src/usr.sbin/sendmail.MX/src/alias.c line
468
- in /usr/src/usr.sbin/sendmail/aux/mconnect.c line
129
- in /usr/src/usr.sbin/sendmail/src/alias.c line
470