fixed bug
authorceriel <none@none>
Fri, 12 Jun 1987 19:10:12 +0000 (19:10 +0000)
committerceriel <none@none>
Fri, 12 Jun 1987 19:10:12 +0000 (19:10 +0000)
lang/cem/libcc/stdio/freopen.c

index 85d2215..81f233f 100644 (file)
@@ -8,11 +8,11 @@ FILE *freopen(name,mode,fp)
 char *name , *mode;
 FILE *fp;
 {
-       FILE *fp;
        char *malloc();
        int fd,
        flags = 0;
 
+       fflush(fp);
        close(fileno(fp));
        if (io_testflag(fp, IO_MYBUF) && fp->_buf) free(fp->_buf);