fixed setbuf. count field was set wrong
authorceriel <none@none>
Fri, 14 Aug 1987 20:32:08 +0000 (20:32 +0000)
committerceriel <none@none>
Fri, 14 Aug 1987 20:32:08 +0000 (20:32 +0000)
lang/cem/libcc/stdio/setbuf.c
lang/cem/libcc/stdio/timezone.c

index 83cefc5..64ff3ef 100644 (file)
@@ -1,7 +1,6 @@
 /* $Header$ */
 #include       <stdio.h>
 
-
 setbuf(iop, buffer)
 register FILE *iop;
 char *buffer;
@@ -13,9 +12,11 @@ char *buffer;
 
        iop->_buf = (unsigned char *) buffer;
 
+       iop->_count = 0;
        if ( iop->_buf == NULL )
                iop->_flags |= IO_UNBUFF;
+       else
+               iop->_count = BUFSIZ;
 
        iop->_ptr = iop->_buf;
-       iop->_count = 0;
 }
index b57813e..818c854 100644 (file)
@@ -1,4 +1,5 @@
 /* $Header$ */
+#ifndef __USG
 static struct zonetable {
        int     offset;
        char    *stdzone;
@@ -58,3 +59,4 @@ timezone(zone, dst)
        *c = '\0';
        return buf;
 }
+#endif