home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
minnie.tuhs.org
/
unixen.tar
/
unixen
/
PDP-11
/
Trees
/
V7
/
usr
/
src
/
libc
/
stdio
/
setbuf.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1979-01-10
|
289 b
|
16 lines
#include <stdio.h>
setbuf(iop, buf)
register struct _iobuf *iop;
char *buf;
{
if (iop->_base != NULL && iop->_flag&_IOMYBUF)
free(iop->_base);
iop->_flag &= ~(_IOMYBUF|_IONBF);
if ((iop->_base = buf) == NULL)
iop->_flag |= _IONBF;
else
iop->_ptr = iop->_base;
iop->_cnt = 0;
}