Lines Matching refs:fp
90 register FILE *fp, in fseeko64() argument
104 if (!(fp->_flags & __SL64)) in fseeko64()
111 return (_off64_t) fseeko (fp, offset, whence); in fseeko64()
116 CHECK_INIT (ptr, fp); in fseeko64()
118 _newlib_flockfile_start (fp); in fseeko64()
120 curoff = fp->_offset; in fseeko64()
125 if (fp->_flags & __SAPP && fp->_flags & __SWR) in fseeko64()
128 fflush (fp); in fseeko64()
133 if ((seekfn = fp->_seek64) == NULL) in fseeko64()
136 _newlib_flockfile_exit(fp); in fseeko64()
153 fflush (fp); /* may adjust seek offset on append stream */ in fseeko64()
154 if (fp->_flags & __SOFF) in fseeko64()
155 curoff = fp->_offset; in fseeko64()
158 curoff = seekfn (fp->_cookie, (_fpos64_t) 0, SEEK_CUR); in fseeko64()
161 _newlib_flockfile_exit(fp); in fseeko64()
165 if (fp->_flags & __SRD) in fseeko64()
167 curoff -= fp->_r; in fseeko64()
168 if (HASUB (fp)) in fseeko64()
169 curoff -= fp->_ur; in fseeko64()
171 else if (fp->_flags & __SWR && fp->_p != NULL) in fseeko64()
172 curoff += fp->_p - fp->_bf._base; in fseeko64()
186 _newlib_flockfile_exit(fp); in fseeko64()
200 if (fp->_bf._base == NULL) in fseeko64()
201 _smakebuf (fp); in fseeko64()
204 if (fp->_flags & (__SWR | __SRW | __SNBF | __SNPT)) in fseeko64()
206 if ((fp->_flags & __SOPT) == 0) in fseeko64()
210 || fp->_file < 0 in fseeko64()
211 || _fstat64 (fp->_file, &st) in fseeko64()
214 fp->_flags |= __SNPT; in fseeko64()
218 fp->_blksize = st.st_blksize; in fseeko64()
220 fp->_blksize = 1024; in fseeko64()
222 fp->_flags |= __SOPT; in fseeko64()
235 if (_fstat64 (fp->_file, &st)) in fseeko64()
242 if (fp->_flags & __SOFF) in fseeko64()
243 curoff = fp->_offset; in fseeko64()
246 curoff = seekfn (fp->_cookie, (_fpos64_t)0, SEEK_CUR); in fseeko64()
250 curoff -= fp->_r; in fseeko64()
251 if (HASUB (fp)) in fseeko64()
252 curoff -= fp->_ur; in fseeko64()
262 if (HASUB (fp)) in fseeko64()
264 curoff += fp->_r; /* kill off ungetc */ in fseeko64()
265 n = fp->_up - fp->_bf._base; in fseeko64()
267 n += fp->_ur; in fseeko64()
271 n = fp->_p - fp->_bf._base; in fseeko64()
273 n += fp->_r; in fseeko64()
286 fp->_p = fp->_bf._base + o; in fseeko64()
287 fp->_r = n - o; in fseeko64()
288 if (HASUB (fp)) in fseeko64()
289 FREEUB (ptr, fp); in fseeko64()
290 fp->_flags &= ~__SEOF; in fseeko64()
291 _newlib_flockfile_exit(fp); in fseeko64()
304 curoff = target & ~((_fpos64_t)(fp->_blksize - 1)); in fseeko64()
305 if (seekfn (fp->_cookie, curoff, SEEK_SET) == POS_ERR) in fseeko64()
307 fp->_r = 0; in fseeko64()
308 fp->_p = fp->_bf._base; in fseeko64()
309 if (HASUB (fp)) in fseeko64()
310 FREEUB (ptr, fp); in fseeko64()
311 fp->_flags &= ~__SEOF; in fseeko64()
315 if (_srefill (fp) || fp->_r < (int) n) in fseeko64()
317 fp->_p += n; in fseeko64()
318 fp->_r -= n; in fseeko64()
320 _newlib_flockfile_exit(fp); in fseeko64()
330 if (fflush (fp) in fseeko64()
331 || seekfn (fp->_cookie, offset, whence) == POS_ERR) in fseeko64()
333 _newlib_flockfile_exit(fp); in fseeko64()
337 if (HASUB (fp)) in fseeko64()
338 FREEUB (ptr, fp); in fseeko64()
339 fp->_p = fp->_bf._base; in fseeko64()
340 fp->_r = 0; in fseeko64()
342 fp->_flags &= ~__SEOF; in fseeko64()
343 _newlib_flockfile_end (fp); in fseeko64()