/bionic/libc/upstream-openbsd/lib/libc/stdio/ |
H A D | clrerr.c | 39 clearerr(FILE *fp) argument 41 FLOCKFILE(fp); 42 __sclearerr(fp); 43 FUNLOCKFILE(fp);
|
H A D | fgetc.c | 37 fgetc(FILE *fp) argument 39 return (getc(fp));
|
H A D | fpurge.c | 44 fpurge(FILE *fp) argument 46 FLOCKFILE(fp); 47 if (!fp->_flags) { 48 FUNLOCKFILE(fp); 53 if (HASUB(fp)) 54 FREEUB(fp); 55 WCIO_FREE(fp); 56 fp->_p = fp->_bf._base; 57 fp [all...] |
H A D | getwc.c | 41 getwc(FILE *fp) argument 44 return fgetwc(fp);
|
H A D | rewind.c | 38 rewind(FILE *fp) argument 40 (void) fseek(fp, 0L, SEEK_SET); 41 clearerr(fp);
|
H A D | rget.c | 43 __srget(FILE *fp) argument 45 _SET_ORIENTATION(fp, -1); 46 if (__srefill(fp) == 0) { 47 fp->_r--; 48 return (*fp->_p++);
|
H A D | wsetup.c | 44 __swsetup(FILE *fp) argument 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 [all...] |
H A D | fclose.c | 40 fclose(FILE *fp) argument 44 if (fp->_flags == 0) { /* not open! */ 48 FLOCKFILE(fp); 49 WCIO_FREE(fp); 50 r = fp->_flags & __SWR ? __sflush(fp) : 0; 51 if (fp->_close != NULL && (*fp->_close)(fp->_cookie) < 0) 53 if (fp [all...] |
H A D | feof.c | 43 feof(FILE *fp) argument 47 FLOCKFILE(fp); 48 ret = __sfeof(fp); 49 FUNLOCKFILE(fp);
|
H A D | ferror.c | 43 ferror(FILE *fp) argument 47 FLOCKFILE(fp); 48 ret = __sferror(fp); 49 FUNLOCKFILE(fp);
|
H A D | fgetpos.c | 40 fgetpos(FILE *fp, fpos_t *pos) argument 42 return((*pos = ftello(fp)) == (fpos_t)-1);
|
H A D | fileno.c | 43 fileno(FILE *fp) argument 47 FLOCKFILE(fp); 48 ret = __sfileno(fp); 49 FUNLOCKFILE(fp);
|
H A D | fputc.c | 38 fputc(int c, FILE *fp) argument 40 return (putc(c, fp));
|
H A D | funopen.c | 43 FILE *fp; local 58 if ((fp = __sfp()) == NULL) 60 fp->_flags = flags; 61 fp->_file = -1; 62 fp->_cookie = (void *)cookie; /* SAFE: cookie not modified */ 63 fp->_read = readfn; 64 fp->_write = writefn; 65 fp->_seek = seekfn; 66 fp->_close = closefn; 67 return (fp); [all...] |
H A D | fwide.c | 37 fwide(FILE *fp, int mode) argument 52 FLOCKFILE(fp); 53 wcio = WCIO_GET(fp); 61 FUNLOCKFILE(fp);
|
H A D | getc.c | 43 getc_unlocked(FILE *fp) argument 45 return (__sgetc(fp)); 54 getc(FILE *fp) argument 58 FLOCKFILE(fp); 59 c = __sgetc(fp); 60 FUNLOCKFILE(fp);
|
H A D | getline.c | 34 getline(char **__restrict buf, size_t *__restrict buflen, FILE *__restrict fp) argument 36 return getdelim(buf, buflen, '\n', fp);
|
H A D | putwc.c | 41 putwc(wchar_t wc, FILE *fp) argument 44 return fputwc(wc, fp);
|
H A D | refill.c | 40 lflush(FILE *fp) argument 42 if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR)) 43 return (__sflush_locked(fp)); /* ignored... */ 52 __srefill(FILE *fp) argument 59 fp->_r = 0; /* largely a convenience for callers */ 62 if (fp->_flags & __SEOF) 66 if ((fp->_flags & __SRD) == 0) { 67 if ((fp->_flags & __SRW) == 0) { 69 fp->_flags |= __SERR; 73 if (fp [all...] |
H A D | setbuf.c | 38 setbuf(FILE *fp, char *buf) argument 40 (void) setvbuf(fp, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
|
H A D | wbuf.c | 44 __swbuf(int c, FILE *fp) argument 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 (__sflush(fp)) 78 fp [all...] |
H A D | fprintf.c | 39 fprintf(FILE *fp, const char *fmt, ...) argument 45 ret = vfprintf(fp, fmt, ap);
|
H A D | fscanf.c | 39 fscanf(FILE *fp, const char *fmt, ...) argument 45 ret = vfscanf(fp, fmt, ap);
|
/bionic/libc/bionic/ |
H A D | flockfile.cpp | 38 void flockfile(FILE* fp) { argument 43 if (fp != NULL) { 44 pthread_mutex_lock(&_FLOCK(fp)); 48 int ftrylockfile(FILE* fp) { argument 55 if (fp == NULL) { 59 return pthread_mutex_trylock(&_FLOCK(fp)); 62 void funlockfile(FILE* fp) { argument 67 if (fp != NULL) { 68 pthread_mutex_unlock(&_FLOCK(fp));
|
/bionic/tests/ |
H A D | stdio_ext_test.cpp | 35 FILE* fp = fopen("/proc/version", "r"); local 38 ASSERT_EQ(0U, __fbufsize(fp)); 42 fgets(buf, sizeof(buf), fp); 43 ASSERT_EQ(1024U, __fbufsize(fp)); 45 ASSERT_EQ(0, setvbuf(fp, buf, _IOFBF, 1)); 46 ASSERT_EQ(1U, __fbufsize(fp)); 48 ASSERT_EQ(0, setvbuf(fp, buf, _IOFBF, 8)); 49 ASSERT_EQ(8U, __fbufsize(fp)); 51 fclose(fp); 55 FILE* fp local 68 FILE* fp = fopen("/dev/null", "w"); local 80 FILE* fp = tmpfile(); local 102 FILE* fp = fopen("/dev/null", "w"); local 118 FILE* fp = fopen("/dev/null", "r"); local 135 FILE* fp = fopen("/proc/version", "r"); local [all...] |