home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************
- *
- * $Source: /unixb/home/unixlib/source/unixlib37/src/stdio/c/RCS/fflush,v $
- * $Date: 1996/04/19 21:32:42 $
- * $Revision: 1.1 $
- * $State: Rel $
- * $Author: simon $
- *
- * $Log: fflush,v $
- * Revision 1.1 1996/04/19 21:32:42 simon
- * Initial revision
- *
- ***************************************************************************/
-
- static const char rcs_id[] = "$Id: fflush,v 1.1 1996/04/19 21:32:42 simon Rel $";
-
- #include <stdio.h>
-
- __STDIOLIB__
-
- int
- fflush (register FILE * f)
- {
- if (!f)
- {
- register int i;
-
- for (i = 0, f = __iob; i < FOPEN_MAX; i++, f++)
- if (fisopen (f))
- if (fflush (f))
- return (-1);
- return (0);
- }
-
- f->i_cnt = 0;
- return (f->o_base ? __flsbuf (-1, f) : 0);
- }
-