1: /*
2: * Copyright (c) 1980 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: #if defined(LIBC_SCCS) && !defined(lint)
8: static char sccsid[] = "@(#)setbuf.c 5.2 (Berkeley) 3/9/86";
9: #endif LIBC_SCCS and not lint
10:
11: #include <stdio.h>
12:
13: setbuf(iop, buf)
14: register FILE *iop;
15: char *buf;
16: {
17: if (iop->_base != NULL && iop->_flag&_IOMYBUF)
18: free(iop->_base);
19: iop->_flag &= ~(_IOMYBUF|_IONBF|_IOLBF);
20: if ((iop->_base = buf) == NULL) {
21: iop->_flag |= _IONBF;
22: iop->_bufsiz = NULL;
23: } else {
24: iop->_ptr = iop->_base;
25: iop->_bufsiz = BUFSIZ;
26: }
27: iop->_cnt = 0;
28: }
Defined functions
setbuf
defined in line
13; used 132 times
- in /usr/ingres/source/ctlmod/main.c line
253
- in /usr/ingres/source/gutil/set_si_buf.c line
30
- in /usr/ingres/source/gutil/set_so_buf.c line
38
- in /usr/ingres/source/monitor/ttymon.c line
162,
190
- in /usr/ingres/source/support/ildr.c line
57
- in /usr/src/bin/cat.c line
40
- in /usr/src/bin/pr.c line
56
- in /usr/src/bin/stty.c line
181
- in /usr/src/bin/who.c line
45
- in /usr/src/etc/dump.4.1/dumpoptr.c line
209
- in /usr/src/etc/dump/dumpoptr.c line
209
- in /usr/src/etc/rmt.c line
62
- in /usr/src/etc/shutdown.c line
232
- in /usr/src/etc/vipw.c line
49
- in /usr/src/games/boggle/boggle.c line
516
- in /usr/src/games/mille/mille.c line
24,
49
- in /usr/src/games/mille/move.c line
409
- in /usr/src/games/mille/varpush.c line
45
- in /usr/src/games/rain.c line
61
- in /usr/src/games/sail/main.c line
28
- in /usr/src/games/snake/snake.c line
127
- in /usr/src/games/worm.c line
64
- in /usr/src/games/worms.c line
168
- in /usr/src/lib/libc/gen/getpass.c line
25
- in /usr/src/lib/pcc/code.c line
384
- in /usr/src/new/B/src/bed/main.c line
106
- in /usr/src/new/apl/src/cata.c line
85
- in /usr/src/new/dipress/src/bin/dipress/main.c line
48
- in /usr/src/new/emacs/src/sysdep.c line
481
- in /usr/src/new/help/help.c line
174-175(2)
- in /usr/src/new/icon/functions/open.c line
117-124(3)
- in /usr/src/new/icon/iconx/init.c line
354-358(2),
364-368(2),
374-378(2)
- in /usr/src/new/icon/link/ilink.c line
66,
85,
135,
151
- in /usr/src/new/icon/pilib/init.c line
354-358(2),
364-368(2),
374-378(2)
- in /usr/src/new/icon/rt/host.c line
67
- in /usr/src/new/icon/tran/itran.c line
135,
151,
158
- in /usr/src/new/kermit/ckufio.c line
246
- in /usr/src/new/kermit/ckutio.c line
1511
- in /usr/src/new/mh/miscellany/patch/patch.c line
221
- in /usr/src/new/mh/uip/slocal.c line
284
- in /usr/src/new/mh/zotnet/mf/musift.c line
19
- in /usr/src/new/mh/zotnet/mf/umsift.c line
19
- in /usr/src/new/news/src/expire.c line
145
- in /usr/src/new/news/src/readnews.c line
193
- in /usr/src/new/news/src/unbatch.c line
45,
57
- in /usr/src/new/news/src/visual.c line
180
- in /usr/src/new/nntp/rrn/init.c line
57
- in /usr/src/new/notes/src/main.c line
40
- in /usr/src/new/patch/patch.c line
223
- in /usr/src/new/rn/init.c line
59
- in /usr/src/new/tools/src/jot.c line
60,
275
- in /usr/src/new/tools/src/lam.c line
39,
171
- in /usr/src/new/tools/src/rs.c line
60
- in /usr/src/new/xns/examples/auth/getXNSpass.c line
26
- in /usr/src/new/xns/examples/authchtest/getXNSpass.c line
26
- in /usr/src/new/xns/examples/gap/gaptelnet.c line
130-131(2)
- in /usr/src/new/xns/morexnslib/auth/getXNSpass.c line
42
- in /usr/src/old/analyze.c line
154
- in /usr/src/old/berknet/mach.c line
489
- in /usr/src/old/berknet/netq.c line
32
- in /usr/src/old/berknet/prmail.c line
61
- in /usr/src/old/berknet/v6mail.c line
186
- in /usr/src/old/dnd.c line
47
- in /usr/src/old/fed/fed.c line
29
- in /usr/src/old/fed/subr.c line
42
- in /usr/src/old/num.c line
29-30(2)
- in /usr/src/old/sdb/fio.c line
75
- in /usr/src/old/sdb/main.c line
57-58(2)
- in /usr/src/old/vpr/vpf.c line
38
- in /usr/src/old/vpr/vpq.c line
31
- in /usr/src/old/vpr/vprm.c line
16
- in /usr/src/ucb/dbx/main.c line
98
- in /usr/src/ucb/ex/ex.c line
197
- in /usr/src/ucb/ex/expreserve.c line
339
- in /usr/src/ucb/ftp/getpass.c line
40
- in /usr/src/ucb/lisp/franz/lisp.c line
41
- in /usr/src/ucb/msgs/msgs.c line
136,
584
- in /usr/src/ucb/pascal/pxp/main.c line
204
- in /usr/src/ucb/sysline/sysline.c line
261
- in /usr/src/ucb/telnet.c line
2336-2337(2)
- in /usr/src/undoc/addr.c line
32
- in /usr/src/undoc/enteraddr.c line
32
- in /usr/src/undoc/sps/sps.c line
302
- in /usr/src/usr.bin/dc/dc.c line
873
- in /usr/src/usr.bin/learn/learn.c line
42-43(2)
- in /usr/src/usr.bin/tip/cu.c line
88
- in /usr/src/usr.bin/tip/tip.c line
119
- in /usr/src/usr.bin/tk.c line
60
- in /usr/src/usr.bin/uucp/cico.c line
116,
866
- in /usr/src/usr.bin/uucp/uulog.c line
19
- in /usr/src/usr.bin/uucp/uusnap.c line
52
- in /usr/src/usr.lib/libpc/APPEND.c line
19
- in /usr/src/usr.lib/libpc/BUFF.c line
17-19(2)
- in /usr/src/usr.lib/libpc/PFCLOSE.c line
23
- in /usr/src/usr.lib/libpc/RESET.c line
44
- in /usr/src/usr.lib/libpc/REWRITE.c line
22
- in /usr/src/usr.lib/libplot/aed/open.c line
68
- in /usr/src/usr.lib/lpr/filters/necf.c line
24
- in /usr/src/usr.lib/lpr/lptest.c line
31
- in /usr/src/usr.lib/sendmail/src/main.c line
187,
325
Defined variables
sccsid
defined in line
8;
never used