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

##### Functions

    setbuf            X

       1: /*-
       2:  * Copyright (c) 1990, 1993
       3:  *	The Regents of the University of California.  All rights reserved.
       4:  *
       5:  * This code is derived from software contributed to Berkeley by
       6:  * Chris Torek.
       7:  *
       8:  * Redistribution and use in source and binary forms, with or without
       9:  * modification, are permitted provided that the following conditions
      10:  * are met:
      11:  * 1. Redistributions of source code must retain the above copyright
      12:  *    notice, this list of conditions and the following disclaimer.
      13:  * 2. Redistributions in binary form must reproduce the above copyright
      14:  *    notice, this list of conditions and the following disclaimer in the
      15:  *    documentation and/or other materials provided with the distribution.
      16:  * 3. All advertising materials mentioning features or use of this software
      17:  *    must display the following acknowledgement:
      18:  *	This product includes software developed by the University of
      19:  *	California, Berkeley and its contributors.
      20:  * 4. Neither the name of the University nor the names of its contributors
      21:  *    may be used to endorse or promote products derived from this software
      22:  *    without specific prior written permission.
      23:  *
      24:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
      25:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
      26:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
      27:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
      28:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
      29:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
      30:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
      31:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
      32:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
      33:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
      34:  * SUCH DAMAGE.
      35:  */
      36:
      37: #if defined(LIBC_SCCS) && !defined(lint)
      38: static char sccsid[] = "@(#)setbuf.c	8.1.1 (2.11BSD) 1997/7/29";
      39: #endif /* LIBC_SCCS and not lint */
      40:
      41: #include <stdio.h>
      42:
      43: void
      44: setbuf(fp, buf)
      45:     FILE *fp;
      46:     char *buf;
      47: {
      48:     (void) setvbuf(fp, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
      49: }

#### Defined functions

setbuf defined in line 43; used 99 times

- in /usr/ingres/source/monitor/main.c line 159, 203
- in /usr/src/bin/cat.c line 40
- in /usr/src/bin/nm/nm.c line 96
- in /usr/src/bin/ping/ping.c line 180
- in /usr/src/bin/pr.c line 56
- in /usr/src/bin/stty/stty.c line 174
- in /usr/src/games/atc/graphics.c line 76
- in /usr/src/games/battlestar/battlestar.c line 29-30(2)
- in /usr/src/games/boggle/boggle.c line 513
- in /usr/src/games/hack/hack.main.c line 113
- in /usr/src/games/mille/mille.c line 24, 47
- in /usr/src/games/mille/move.c line 409
- in /usr/src/games/mille/varpush.c line 45
- in /usr/src/games/phantasia/func2.c line 540
- in /usr/src/games/phantasia/main.c line 105
- in /usr/src/games/rain.c line 61
- in /usr/src/games/sail/main.c line 26
- in /usr/src/games/snake/snake.c line 125
- in /usr/src/games/worm.c line 64
- in /usr/src/games/worms.c line 168
- in /usr/src/lib/c2/c20.c line 103, 110
- in /usr/src/lib/ccom/c00.c line 81-87(3)
- in /usr/src/lib/ccom/c10.c line 55-60(2), 79
- in /usr/src/lib/cpp/cpp.c line 1150, 1156
- in /usr/src/lib/libc/gen/getpass.c line 25
- in /usr/src/lib/pcc/code.c line 323
- in /usr/src/libexec/tcpd/rfc931.c line 96
- in /usr/src/local/qterm/qterm.c line 437-439(2)
- in /usr/src/local/zmodem/rz.c line 273, 350
- in /usr/src/local/zmodem/sz.c line 390, 526
- in /usr/src/new/OLD/apl/src/cata.c line 85
- in /usr/src/new/PORT/B/src/bed/main.c line 106
- in /usr/src/new/PORT/apl/src/cata.c line 85
- in /usr/src/new/PORT/dungeon/rtim.c line 105-107(2)
- in /usr/src/new/kermit5.188/ckufio.c line 678
- in /usr/src/new/kermit5.188/ckutio.c line 5247
- in /usr/src/new/notes/src/main.c line 42
- in /usr/src/new/pathalias/main.c line 55
- in /usr/src/new/rn/init.c line 67
- in /usr/src/old/dump/dumpoptr.c line 186
- in /usr/src/old/num.c line 33-34(2)
- in /usr/src/old/shortc/shortc.c line 73, 112
- in /usr/src/sbin/dump/dumpoptr.c line 190
- in /usr/src/sbin/shutdown/shutdown.c line 224
- in /usr/src/sys/autoconfig/main.c line 36
- in /usr/src/ucb/PORT/pascal/pxp/main.c line 204
- in /usr/src/ucb/ctags.c line 177, 231
- in /usr/src/ucb/ex/ex.c line 195
- in /usr/src/ucb/ex/expreserve.c line 337
- in /usr/src/ucb/msgs/msgs.c line 136, 584
- in /usr/src/ucb/symcompact.c line 81, 224
- in /usr/src/ucb/symdump.c line 65
- in /usr/src/ucb/symorder.c line 70, 153
- in /usr/src/ucb/telnet.c line 2336-2337(2)
- in /usr/src/ucb/tn3270/tn3270.c line 173
- in /usr/src/ucb/window/main.c line 40-41(2)
- in /usr/src/usr.bin/dc/dc.c line 874
- in /usr/src/usr.bin/learn/learn.c line 42-43(2)
- in /usr/src/usr.bin/lint/lint.c line 832
- in /usr/src/usr.bin/lint/lpass2.c line 110-111(2)
- in /usr/src/usr.bin/patch/patch.c line 130
- in /usr/src/usr.bin/tip/cu.c line 90
- in /usr/src/usr.bin/tip/tip.c line 123
- in /usr/src/usr.bin/tk.c line 60
- in /usr/src/usr.bin/uucp/cico.c line 117, 867
- 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/libplot/aed/open.c line 68
- in /usr/src/usr.sbin/lpr/filters/necf.c line 23
- in /usr/src/usr.sbin/lpr/lptest.c line 31
- in /usr/src/usr.sbin/rmt/rmt.c line 57
- in /usr/src/usr.sbin/sendmail.MX/src/main.c line 192, 328
- in /usr/src/usr.sbin/sendmail/src/main.c line 187, 323

#### Defined variables

sccsid defined in line 38; never used

Last modified: 1997-07-30 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 503 |