/bionic/libc/stdio/ |
H A D | stdio_ext.cpp | 37 size_t __fbufsize(FILE* fp) { argument 38 return fp->_bf._size; 42 int __freading(FILE* fp) { 43 return (fp->_flags & _SRD) != 0 || ...; 49 return (fp->_flags & _SWR) != 0 || ...; 53 int __freadable(FILE* fp) { argument 54 return (fp->_flags & (__SRD|__SRW)) != 0; 57 int __fwritable(FILE* fp) { argument 58 return (fp->_flags & (__SWR|__SRW)) != 0; 61 int __flbf(FILE* fp) { argument 65 __fpurge(FILE* fp) argument 69 __fpending(FILE* fp) argument 78 __fsetlocking(FILE* fp, int type) argument [all...] |
H A D | parsefloat.c | 41 size_t parsefloat(FILE *fp, char *buf, char *end) { argument 62 c = *fp->_p; 176 if (--fp->_r > 0) 177 fp->_p++; 178 else if (__srefill(fp)) 184 (void)ungetc(*(unsigned char *)p, fp); 189 size_t wparsefloat(FILE *fp, wchar_t *buf, wchar_t *end) { argument 211 if ((c = __fgetwc_unlock(fp)) == WEOF) 331 ungetwc(c, fp); 333 ungetwc(*p, fp); [all...] |
H A D | vfscanf.c | 99 __svfscanf(FILE *fp, const char *fmt0, __va_list ap) argument 109 int nread; /* number of characters consumed from fp */ 123 _SET_ORIENTATION(fp, -1); 133 while ((fp->_r > 0 || __srefill(fp) == 0) && 134 isspace(*fp->_p)) 135 nread++, fp->_r--, fp->_p++; 150 if (fp->_r <= 0 && __srefill(fp)) 890 vfscanf(FILE *fp, const char *fmt0, __va_list ap) argument [all...] |
H A D | vfwscanf.c | 105 __vfwscanf(FILE * __restrict fp, const wchar_t * __restrict fmt, __va_list ap) argument 115 int nread; /* number of characters consumed from fp */ 131 _SET_ORIENTATION(fp, 1); 144 while ((c = __fgetwc_unlock(fp)) != WEOF && 148 __ungetwc(c, fp); 163 if ((wi = __fgetwc_unlock(fp)) == WEOF) 166 __ungetwc(wi, fp); 338 while ((wi = __fgetwc_unlock(fp)) != WEOF && 343 __ungetwc(wi, fp); 360 (wi = __fgetwc_unlock(fp)) ! 719 vfwscanf(FILE * __restrict fp, const wchar_t * __restrict fmt, __va_list ap) argument [all...] |
/bionic/libc/upstream-openbsd/lib/libc/stdio/ |
H A D | fgetln.c | 43 __slbexpand(FILE *fp, size_t newsize) argument 47 if (fp->_lb._size >= newsize) 49 if ((p = realloc(fp->_lb._base, newsize)) == NULL) 51 fp->_lb._base = p; 52 fp->_lb._size = newsize; 64 fgetln(FILE *fp, size_t *lenp) argument 71 FLOCKFILE(fp); 72 _SET_ORIENTATION(fp, -1); 75 if (fp->_r <= 0 && __srefill(fp)) [all...] |
H A D | fputwc.c | 40 __fputwc_unlock(wchar_t wc, FILE *fp) argument 53 _SET_ORIENTATION(fp, 1); 54 wcio = WCIO_GET(fp); 70 if (__sfvwrite(fp, &uio)) { 78 fputwc(wchar_t wc, FILE *fp) argument 82 FLOCKFILE(fp); 83 r = __fputwc_unlock(wc, fp); 84 FUNLOCKFILE(fp);
|
H A D | getdelim.c | 47 int sep, FILE *__restrict fp) 53 FLOCKFILE(fp); 64 _SET_ORIENTATION(fp, -1); 68 if (fp->_r <= 0 && __srefill(fp)) { 69 if (__sferror(fp)) 76 p = memchr(fp->_p, sep, (size_t)fp->_r); 78 len = fp->_r; 80 len = (p - fp 46 getdelim(char **__restrict buf, size_t *__restrict buflen, int sep, FILE *__restrict fp) argument [all...] |
H A D | fvwrite.c | 48 __sfvwrite(FILE *fp, struct __suio *uio) argument 60 if (cantwrite(fp)) { 66 #define COPY(n) (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n)) 79 if (fp->_flags & __SNBF) { 85 w = (*fp->_write)(fp->_cookie, p, MIN(len, BUFSIZ)); 91 } else if ((fp->_flags & __SLBF) == 0) { 105 if ((fp->_flags & (__SALC | __SSTR)) == 106 (__SALC | __SSTR) && fp->_w < len) { 107 size_t blen = fp [all...] |
H A D | fmemopen.c | 120 FILE *fp; local 141 if ((fp = __sfp()) == NULL) { 154 fp->_flags = 0; 174 fp->_flags = (short)flags; 175 fp->_file = -1; 176 fp->_cookie = (void *)st; 177 fp->_read = (flags & __SWR) ? NULL : fmemopen_read; 178 fp->_write = (flags & __SRD) ? NULL : fmemopen_write; 179 fp->_seek = fmemopen_seek; 180 fp [all...] |
H A D | open_memstream.c | 117 FILE *fp; local 127 if ((fp = __sfp()) == NULL) { 135 fp->_flags = 0; 148 fp->_flags = __SWR; 149 fp->_file = -1; 150 fp->_cookie = st; 151 fp->_read = NULL; 152 fp->_write = memstream_write; 153 fp->_seek = memstream_seek; 154 fp [all...] |
H A D | open_wmemstream.c | 127 FILE *fp; local 137 if ((fp = __sfp()) == NULL) { 145 fp->_flags = 0; 159 fp->_flags = __SWR; 160 fp->_file = -1; 161 fp->_cookie = st; 162 fp->_read = NULL; 163 fp->_write = wmemstream_write; 164 fp->_seek = wmemstream_seek; 165 fp [all...] |
/bionic/tests/ |
H A D | sys_stat_test.cpp | 27 FILE* fp = tmpfile(); local 28 ASSERT_TRUE(fp != NULL); 30 int fd = fileno(fp); 45 fclose(fp);
|
H A D | fcntl_test.cpp | 200 FILE* fp = fdopen(pipe_fds[0], "r"); local 201 ASSERT_TRUE(fp != NULL); 202 ASSERT_TRUE(fgets(buf, sizeof(buf), fp) != NULL); 203 fclose(fp);
|
H A D | wchar_test.cpp | 576 FILE* fp = open_wmemstream(&p, &size); local 577 ASSERT_NE(EOF, fputws(L"hello, world!", fp)); 578 fclose(fp);
|
H A D | fortify_test.cpp | 703 FILE* fp = fopen("/dev/null", "r"); local 704 ASSERT_FORTIFY(fread(buf, 1, ct, fp)); 705 fclose(fp); 711 FILE* fp = fopen("/dev/null", "w"); local 712 ASSERT_FORTIFY(fwrite(buf, 1, ct, fp)); 713 fclose(fp);
|
H A D | time_test.cpp | 586 FILE* fp = fopen("/proc/sys/kernel/pid_max", "r"); local 588 fscanf(fp, "%ld", &pid_max); 590 fclose(fp);
|
/bionic/benchmarks/ |
H A D | stdio_benchmark.cpp | 33 FILE* fp = fopen("/dev/zero", "rw"); local 34 __fsetlocking(fp, FSETLOCKING_BYCALLER); 38 setvbuf(fp, 0, _IONBF, 0); 42 f(buf, chunk_size, 1, fp); 47 fclose(fp); 73 FILE* fp = fopen("/proc/version", "re"); local 74 if (no_locking) __fsetlocking(fp, FSETLOCKING_BYCALLER); 75 if (fgets(buf, sizeof(buf), fp) == nullptr) abort(); 76 fclose(fp);
|
/bionic/libc/bionic/ |
H A D | mntent.cpp | 34 mntent* getmntent(FILE* fp) { argument 36 return getmntent_r(fp, &tls.mntent_buf, tls.mntent_strings, sizeof(tls.mntent_strings)); 39 mntent* getmntent_r(FILE* fp, struct mntent* e, char* buf, int buf_len) { argument 41 while (fgets(buf, buf_len, fp) != NULL) { 70 int endmntent(FILE* fp) { argument 71 if (fp != NULL) { 72 fclose(fp);
|
H A D | pthread_attr.cpp | 118 FILE* fp = fopen("/proc/self/stat", "re"); local 119 if (fp == nullptr) { 124 if (fgets(line, sizeof(line), fp) == nullptr) { 128 fclose(fp); 164 FILE* fp = fopen("/proc/self/maps", "re"); local 165 if (fp == nullptr) { 169 while (fgets(line, sizeof(line), fp) != NULL) { 175 fclose(fp);
|
/bionic/libc/malloc_debug/ |
H A D | MapData.cpp | 114 FILE* fp = fopen("/proc/self/maps", "re"); local 115 if (fp == nullptr) { 120 while (fgets(buffer.data(), buffer.size(), fp) != nullptr) { 123 fclose(fp); 134 fclose(fp);
|
/bionic/libc/upstream-netbsd/lib/libc/gen/ |
H A D | popen.c | 69 FILE *fp; member in struct:pid 135 close(fileno(old->fp)); /* don't allow a flush */ 176 cur->fp = iop; 203 if (cur->fp == iop)
|
/bionic/libc/arch-mips64/bionic/ |
H A D | stat.cpp | 75 int fstat(int fp, struct stat* st) { argument 77 int ret = syscall(__NR_fstat, fp, &s);
|
/bionic/libc/dns/resolv/ |
H A D | res_init.c | 169 register FILE *fp; local 293 if ((fp = fopen(_PATH_RESCONF, "re")) != NULL) { 295 while (fgets(buf, sizeof(buf), fp) != NULL) { 437 (void) fclose(fp);
|
/bionic/libc/kernel/uapi/linux/ |
H A D | if_hippi.h | 100 struct hippi_fp_hdr fp; member in struct:hippi_hdr
|
/bionic/libc/versioner-dependencies/common/kernel_uapi/linux/ |
H A D | if_hippi.h | 100 struct hippi_fp_hdr fp; member in struct:hippi_hdr
|