Lines Matching refs:fp

40 lflush(FILE *fp)  in lflush()  argument
42 if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR)) in lflush()
43 return (__sflush_locked(fp)); /* ignored... */ in lflush()
52 __srefill(FILE *fp) in __srefill() argument
54 fp->_r = 0; /* largely a convenience for callers */ in __srefill()
58 if (fp->_flags & __SEOF) in __srefill()
63 if ((fp->_flags & __SRD) == 0) { in __srefill()
64 if ((fp->_flags & __SRW) == 0) { in __srefill()
66 fp->_flags |= __SERR; in __srefill()
70 if (fp->_flags & __SWR) { in __srefill()
71 if (__sflush(fp)) in __srefill()
73 fp->_flags &= ~__SWR; in __srefill()
74 fp->_w = 0; in __srefill()
75 fp->_lbfsize = 0; in __srefill()
77 fp->_flags |= __SRD; in __srefill()
85 if (HASUB(fp)) { in __srefill()
86 FREEUB(fp); in __srefill()
87 if ((fp->_r = fp->_ur) != 0) { in __srefill()
88 fp->_p = fp->_up; in __srefill()
94 if (fp->_bf._base == NULL) in __srefill()
95 __smakebuf(fp); in __srefill()
102 if (fp->_flags & (__SLBF|__SNBF)) { in __srefill()
104 fp->_flags |= __SIGN; in __srefill()
106 fp->_flags &= ~__SIGN; in __srefill()
109 if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR)) in __srefill()
110 __sflush(fp); in __srefill()
112 fp->_p = fp->_bf._base; in __srefill()
113 fp->_r = (*fp->_read)(fp->_cookie, (char *)fp->_p, fp->_bf._size); in __srefill()
114 fp->_flags &= ~__SMOD; /* buffer contents are again pristine */ in __srefill()
115 if (fp->_r <= 0) { in __srefill()
116 if (fp->_r == 0) in __srefill()
117 fp->_flags |= __SEOF; in __srefill()
119 fp->_r = 0; in __srefill()
120 fp->_flags |= __SERR; in __srefill()