Lines Matching refs:fp
38 /* Flush a single file, or (if fp is NULL) all files. */
40 fflush(FILE *fp)
43 if (fp == NULL)
45 if ((fp->_flags & (__SWR | __SRW)) == 0) {
49 return (__sflush(fp));
53 __sflush(FILE *fp)
58 t = fp->_flags;
62 if ((p = fp->_bf._base) == NULL)
65 n = fp->_p - p; /* write this much */
71 fp->_p = p;
72 fp->_w = t & (__SLBF|__SNBF) ? 0 : fp->_bf._size;
75 t = (*fp->_write)(fp->_cookie, (char *)p, n);
77 fp->_flags |= __SERR;