/bionic/libc/stdio/ |
rget.c | 43 __srget(FILE *fp) 45 _SET_ORIENTATION(fp, -1); 46 if (__srefill(fp) == 0) { 47 fp->_r--; 48 return (*fp->_p++);
|
refill.c | 40 lflush(FILE *fp) 43 if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR)) 44 return (__sflush(fp)); 53 __srefill(FILE *fp) 60 fp->_r = 0; /* largely a convenience for callers */ 63 if (fp->_flags & __SEOF) 67 if ((fp->_flags & __SRD) == 0) { 68 if ((fp->_flags & __SRW) == 0) { 70 fp->_flags |= __SERR; 74 if (fp->_flags & __SWR) [all...] |
clrerr.c | 38 clearerr(FILE *fp) 40 flockfile(fp); 41 __sclearerr(fp); 42 funlockfile(fp);
|
fpurge.c | 44 fpurge(FILE *fp) 46 if (!fp->_flags) { 51 if (HASUB(fp)) 52 FREEUB(fp); 53 WCIO_FREE(fp); 54 fp->_p = fp->_bf._base; 55 fp->_r = 0; 56 fp->_w = fp->_flags & (__SLBF|__SNBF) ? 0 : fp->_bf._size [all...] |
wsetup.c | 44 __swsetup(FILE *fp) 53 if ((fp->_flags & __SWR) == 0) { 54 if ((fp->_flags & __SRW) == 0) 56 if (fp->_flags & __SRD) { 58 if (HASUB(fp)) 59 FREEUB(fp); 60 fp->_flags &= ~(__SRD|__SEOF); 61 fp->_r = 0; 62 fp->_p = fp->_bf._base [all...] |
fgetc.c | 37 fgetc(FILE *fp) 39 return (__sgetc(fp));
|
wbuf.c | 44 __swbuf(int c, FILE *fp) 48 _SET_ORIENTATION(fp, -1); 56 fp->_w = fp->_lbfsize; 57 if (cantwrite(fp)) { 72 n = fp->_p - fp->_bf._base; 73 if (n >= fp->_bf._size) { 74 if (fflush(fp)) 78 fp->_w-- [all...] |
wcio.h | 43 #define WCIO_GET(fp) \ 46 #define _SET_ORIENTATION(fp, mode) ((void)0) 51 #define WCIO_FREE(fp) ((void)(0)) 53 #define WCIO_FREEUB(fp) ((void)0) 55 #define WCIO_INIT(fp) ((void)0)
|
fclose.c | 40 extern void __fremovelock(FILE *fp); 43 fclose(FILE *fp) 47 if (fp->_flags == 0) { /* not open! */ 51 WCIO_FREE(fp); 52 r = fp->_flags & __SWR ? __sflush(fp) : 0; 53 if (fp->_close != NULL && (*fp->_close)(fp->_cookie) < 0) 55 if (fp->_flags & __SMBF [all...] |
ungetc.c | 41 * Expand the ungetc buffer `in place'. That is, adjust fp->_p when 47 __submore(FILE *fp) 52 if (_UB(fp)._base == fp->_ubuf) { 58 _UB(fp)._base = p; 59 _UB(fp)._size = BUFSIZ; 60 p += BUFSIZ - sizeof(fp->_ubuf); 61 for (i = sizeof(fp->_ubuf); --i >= 0;) 62 p[i] = fp->_ubuf[i]; 63 fp->_p = p [all...] |
rewind.c | 38 rewind(FILE *fp) 40 (void) fseek(fp, 0L, SEEK_SET); 41 clearerr(fp);
|
ftell.c | 42 ftello(FILE *fp) 46 if (fp->_seek == NULL) { 55 __sflush(fp); /* may adjust seek offset on append stream */ 56 if (fp->_flags & __SOFF) 57 pos = fp->_offset; 59 pos = (*fp->_seek)(fp->_cookie, (fpos_t)0, SEEK_CUR); 63 if (fp->_flags & __SRD) { 69 pos -= fp->_r; 70 if (HASUB(fp)) [all...] |
fseek.c | 49 fseeko(FILE *fp, off_t offset, int whence) 64 if ((seekfn = fp->_seek) == NULL) { 81 __sflush(fp); /* may adjust seek offset on append stream */ 82 if (fp->_flags & __SOFF) 83 curoff = fp->_offset; 85 curoff = (*seekfn)(fp->_cookie, (fpos_t)0, SEEK_CUR); 89 if (fp->_flags & __SRD) { 90 curoff -= fp->_r; 91 if (HASUB(fp)) 92 curoff -= fp->_ur [all...] |
fread.c | 40 lflush(FILE *fp) 43 if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR)) 44 return (__sflush(fp)); 49 fread(void *buf, size_t size, size_t count, FILE *fp) 63 if (fp->_r < 0) 64 fp->_r = 0; 69 if (fp->_flags & __SNBF && fp->_ur == 0) 79 fp->_r = 0; /* largely a convenience for callers */ 82 if (fp->_flags & __SEOF [all...] |