Lines Matching refs:fp
49 * Flush a single file, or (if fp is NULL) all files.
53 fflush(FILE *fp)
57 if (fp == NULL)
59 FLOCKFILE(fp);
72 if ((fp->_flags & (__SWR | __SRW)) == 0) {
76 retval = __sflush(fp);
77 FUNLOCKFILE(fp);
82 * Flush a single file, or (if fp is NULL) all files.
86 __fflush(FILE *fp)
90 if (fp == NULL)
92 if ((fp->_flags & (__SWR | __SRW)) == 0) {
96 retval = __sflush(fp);
101 __sflush(FILE *fp)
106 t = fp->_flags;
110 if ((p = fp->_bf._base) == NULL)
113 n = fp->_p - p; /* write this much */
119 fp->_p = p;
120 fp->_w = t & (__SLBF|__SNBF) ? 0 : fp->_bf._size;
123 t = _swrite(fp, (char *)p, n);
125 fp->_flags |= __SERR;
133 sflush_locked(FILE *fp)
137 FLOCKFILE(fp);
138 ret = __sflush(fp);
139 FUNLOCKFILE(fp);