SCCS-vsn: lib/libc/stdio/wbuf.c 4.8
-/* @(#)wbuf.c 4.7 (Berkeley) %G% */
+/* @(#)wbuf.c 4.8 (Berkeley) %G% */
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
char *malloc();
_flsbuf(c, iop)
char *malloc();
_flsbuf(c, iop)
register FILE *iop;
{
register char *base;
register FILE *iop;
{
register char *base;
if (iop->_ptr >= base+iop->_bufsiz || c == '\n') {
n = write(fileno(iop), base, rn = iop->_ptr - base);
iop->_ptr = base;
if (iop->_ptr >= base+iop->_bufsiz || c == '\n') {
n = write(fileno(iop), base, rn = iop->_ptr - base);
iop->_ptr = base;
} else if (iop->_flag&_IONBF) {
c1 = c;
rn = 1;
} else if (iop->_flag&_IONBF) {
c1 = c;
rn = 1;