Lines Matching refs:fp
44 fread(void *buf, size_t size, size_t count, FILE *fp) in fread() argument
52 fp->_flags |= __SERR; in fread()
66 FLOCKFILE(fp); in fread()
67 _SET_ORIENTATION(fp, -1); in fread()
70 if (fp->_r < 0) in fread()
71 fp->_r = 0; in fread()
76 if (fp->_bf._base == NULL) { in fread()
77 __smakebuf(fp); in fread()
86 size_t buffered_bytes = MIN((size_t) fp->_r, total); in fread()
87 memcpy(dst, fp->_p, buffered_bytes); in fread()
88 fp->_p += buffered_bytes; in fread()
89 fp->_r -= buffered_bytes; in fread()
104 if (total > (size_t) fp->_bf._size) { in fread()
110 fp->_flags |= __SMOD; in fread()
118 if (__srefill(fp)) { in fread()
127 ssize_t bytes_read = (*fp->_read)(fp->_cookie, dst, total); in fread()
129 fp->_flags |= (bytes_read == 0) ? __SEOF : __SERR; in fread()
137 FUNLOCKFILE(fp); in fread()