previous fix was wrong; added another
authorceriel <none@none>
Wed, 2 Sep 1987 12:52:44 +0000 (12:52 +0000)
committerceriel <none@none>
Wed, 2 Sep 1987 12:52:44 +0000 (12:52 +0000)
lang/cem/libcc/stdio/freopen.c

index 5711a29..1dcde67 100644 (file)
@@ -51,7 +51,8 @@ register FILE *fp;
                return NULL;
        }
        fp->_count = 0;
-       if (fp->_buf && (flags | IO_WRITEMODE)) fp->_count = BUFSIZ;
+       if (fp->_buf && !(flags & IO_UNBUFF) && (flags & IO_WRITEMODE)) 
+               fp->_count = BUFSIZ;
        fp->_fd = fd;
        fp->_flags = flags;
        return(fp);