• Home
  • Raw
  • Download

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)); in lflush()
48 fread(void *buf, size_t size, size_t count, FILE *fp) in fread() argument
62 FLOCKFILE(fp); in fread()
63 if (fp->_r < 0) in fread()
64 fp->_r = 0; in fread()
69 if (fp->_flags & __SNBF && fp->_ur == 0) in fread()
79 fp->_r = 0; /* largely a convenience for callers */ in fread()
82 if (fp->_flags & __SEOF) { in fread()
83 FUNLOCKFILE(fp); in fread()
88 if ((fp->_flags & __SRD) == 0) { in fread()
89 if ((fp->_flags & __SRW) == 0) { in fread()
90 fp->_flags |= __SERR; in fread()
91 FUNLOCKFILE(fp); in fread()
96 if (fp->_flags & __SWR) { in fread()
97 if (__sflush(fp)) { in fread()
98 FUNLOCKFILE(fp); in fread()
101 fp->_flags &= ~__SWR; in fread()
102 fp->_w = 0; in fread()
103 fp->_lbfsize = 0; in fread()
105 fp->_flags |= __SRD; in fread()
113 if (HASUB(fp)) { in fread()
114 FREEUB(fp); in fread()
124 if (fp->_flags & (__SLBF|__SNBF)) { in fread()
126 fp->_flags |= __SIGN; in fread()
128 fp->_flags &= ~__SIGN; in fread()
131 if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR)) in fread()
132 __sflush(fp); in fread()
136 int len = (*fp->_read)(fp->_cookie, p, resid ); in fread()
137 fp->_flags &= ~__SMOD; in fread()
140 fp->_flags |= __SEOF; in fread()
142 fp->_flags |= __SERR; in fread()
144 FUNLOCKFILE(fp); in fread()
150 FUNLOCKFILE(fp); in fread()
156 while (resid > (size_t)(r = fp->_r)) { in fread()
157 (void)memcpy((void *)p, (void *)fp->_p, (size_t)r); in fread()
158 fp->_p += r; in fread()
162 if (__srefill(fp)) { in fread()
164 FUNLOCKFILE(fp); in fread()
170 (void)memcpy((void *)p, (void *)fp->_p, resid); in fread()
171 fp->_r -= resid; in fread()
172 fp->_p += resid; in fread()
173 FUNLOCKFILE(fp); in fread()