Lines Matching refs:fp
58 ftell(FILE *fp) in ftell() argument
62 FLOCKFILE(fp); in ftell()
64 if (fp->_seek == NULL) { in ftell()
65 FUNLOCKFILE(fp); in ftell()
74 __sflush(fp); /* may adjust seek offset on append stream */ in ftell()
75 if (fp->_flags & __SOFF) in ftell()
76 pos = fp->_offset; in ftell()
78 pos = (*fp->_seek)(fp->_cookie, (fpos_t)0, SEEK_CUR); in ftell()
80 FUNLOCKFILE(fp); in ftell()
84 if (fp->_flags & __SRD) { in ftell()
90 pos -= fp->_r; in ftell()
91 if (HASUB(fp)) in ftell()
92 pos -= fp->_ur; in ftell()
93 } else if (fp->_flags & __SWR && fp->_p != NULL) { in ftell()
99 pos += fp->_p - fp->_bf._base; in ftell()
101 FUNLOCKFILE(fp); in ftell()