/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/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/bionic/ |
H A D | flockfile.cpp | 38 void flockfile(FILE* fp) { argument 39 if (fp != nullptr) { 40 pthread_mutex_lock(&_FLOCK(fp)); 44 int ftrylockfile(FILE* fp) { argument 47 if (fp == nullptr) { 51 return pthread_mutex_trylock(&_FLOCK(fp)); 54 void funlockfile(FILE* fp) { argument 55 if (fp != nullptr) { 56 pthread_mutex_unlock(&_FLOCK(fp));
|
H A D | malloc_info.cpp | 25 explicit Elem(FILE* fp, const char* name, argument 27 this->fp = fp; 30 fprintf(fp, "<%s", name); 34 fputc(' ', fp); 35 vfprintf(fp, attr_fmt, args); 38 fputc('>', fp); 42 fprintf(fp, "</%s>", name); 48 vfprintf(fp, fmt, args); 53 FILE* fp; member in class:Elem 59 malloc_info(int options, FILE* fp) argument [all...] |
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 | ndk_cruft.cpp | 379 int putw(int value, FILE* fp) { argument 380 return fwrite(&value, sizeof(value), 1, fp) == 1 ? 0 : EOF;
|
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);
|
H A D | sysinfo.cpp | 66 FILE* fp = fopen("/sys/devices/system/cpu/online", "re"); local 67 if (fp != nullptr) { 70 if (getline(&line, &len, fp) != -1) { 74 fclose(fp);
|
H A D | tmpfile.cpp | 90 FILE* fp = fdopen(fd, "w+"); local 91 if (fp != NULL) { 92 return fp; 107 FILE* fp = __tmpfile_dir("/data/local/tmp"); local 108 if (fp == NULL) { 111 fp = __tmpfile_dir(P_tmpdir); 113 return fp;
|
/bionic/libc/dns/net/ |
H A D | getaddrinfo.c | 391 bool readBE32(FILE* fp, int32_t* result) { argument 393 if (fread(&tmp, sizeof(tmp), 1, fp) != 1) {
|
/bionic/libc/dns/resolv/ |
H A D | res_cache.c | 1462 FILE* fp; local 1466 fp = fopen("/data/reslog.txt", "w+e"); 1467 if (fp != NULL) { 1470 res_pquery(statep, answer, answerlen, fp); 1473 fseek(fp, 0, SEEK_END); 1474 fileLen=ftell(fp); 1475 fseek(fp, 0, SEEK_SET); 1479 fread(buf, fileLen, 1, fp); 1483 fclose(fp);
|
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 | cdrom.h | 721 __u8 fp : 1; member in struct:__anon300 735 __u8 fp : 1; member in struct:__anon300
|
H A D | if_hippi.h | 100 struct hippi_fp_hdr fp; member in struct:hippi_hdr
|
/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/stdio/ |
H A D | fread.c | 44 fread(void *buf, size_t size, size_t count, FILE *fp) __overloadable 52 fp->_flags |= __SERR; 66 FLOCKFILE(fp); variable 67 _SET_ORIENTATION(fp, -1); 70 if (fp->_r < 0) 71 fp->_r = 0; 76 if (fp->_bf._base == NULL) { 77 __smakebuf(fp); variable 86 size_t buffered_bytes = MIN((size_t) fp->_r, total); 87 memcpy(dst, fp 137 FUNLOCKFILE(fp); variable [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 | 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 54 fp->_r = 0; /* largely a convenience for callers */ 58 if (fp->_flags & __SEOF) 63 if ((fp->_flags & __SRD) == 0) { 64 if ((fp->_flags & __SRW) == 0) { 66 fp->_flags |= __SERR; 70 if (fp [all...] |
H A D | stdio.cpp | 103 explicit ScopedFileLock(FILE* fp) : fp_(fp) { argument 139 FILE *fp; local 145 for (fp = g->iobs, n = g->niobs; --n >= 0; fp++) 146 if (fp->_flags == 0) 157 fp = g->iobs; 159 fp->_flags = 1; /* reserve this slot; caller sets real flags */ 161 fp->_p = NULL; /* no current pointer */ 162 fp 194 FILE* fp = __sfp(); local 217 FILE* fp = __fopen(fd, flags); local 269 freopen(const char* file, const char* mode, FILE* fp) argument 374 fclose(FILE* fp) argument 400 fileno_unlocked(FILE* fp) argument 409 fileno(FILE* fp) argument 414 clearerr_unlocked(FILE* fp) argument 418 clearerr(FILE* fp) argument 423 feof_unlocked(FILE* fp) argument 427 feof(FILE* fp) argument 432 ferror_unlocked(FILE* fp) argument 436 ferror(FILE* fp) argument 442 FILE* fp = reinterpret_cast<FILE*>(cookie); local 447 FILE* fp = reinterpret_cast<FILE*>(cookie); local 458 FILE* fp = reinterpret_cast<FILE*>(cookie); local 463 FILE* fp = reinterpret_cast<FILE*>(cookie); local 468 FILE* fp = reinterpret_cast<FILE*>(cookie); local 472 __seek_unlocked(FILE* fp, off64_t offset, int whence) argument 489 __ftello64_unlocked(FILE* fp) argument 512 __fseeko64(FILE* fp, off64_t offset, int whence, int off_t_bits) argument 551 fseeko(FILE* fp, off_t offset, int whence) argument 557 fseeko64(FILE* fp, off64_t offset, int whence) argument 561 fsetpos(FILE* fp, const fpos_t* pos) argument 565 fsetpos64(FILE* fp, const fpos64_t* pos) argument 569 ftello(FILE* fp) argument 580 ftello64(FILE* fp) argument 585 fgetpos(FILE* fp, fpos_t* pos) argument 590 fgetpos64(FILE* fp, fpos64_t* pos) argument 604 FILE* fp = __sfp(); local 629 FILE* fp = __funopen(cookie, read_fn, write_fn, close_fn); local 641 FILE* fp = __funopen(cookie, read_fn, write_fn, close_fn); local 660 fprintf(FILE* fp, const char* fmt, ...) argument 664 fgetc(FILE* fp) argument 668 fputc(int c, FILE* fp) argument 672 fscanf(FILE* fp, const char* fmt, ...) argument 676 fwprintf(FILE* fp, const wchar_t* fmt, ...) argument 680 fwscanf(FILE* fp, const wchar_t* fmt, ...) argument 684 getc(FILE* fp) argument 689 getc_unlocked(FILE* fp) argument 701 getline(char** buf, size_t* len, FILE* fp) argument 705 getwc(FILE* fp) argument 717 putc(int c, FILE* fp) argument 722 putc_unlocked(int c, FILE* fp) argument 742 putwc(wchar_t wc, FILE* fp) argument 756 rewind(FILE* fp) argument 766 setbuf(FILE* fp, char* buf) argument 770 setbuffer(FILE* fp, char* buf, int size) argument 774 setlinebuf(FILE* fp) argument [all...] |
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 | 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-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/upstream-netbsd/lib/libc/string/ |
H A D | memccpy.c | 53 const unsigned char *fp = f; local 56 if ((*tp++ = *fp++) == uc)
|
/bionic/libc/upstream-openbsd/lib/libc/stdio/ |
H A D | fflush.c | 38 /* Flush a single file, or (if fp is NULL) all files. */ 40 fflush(FILE *fp) argument 44 if (fp == NULL) 46 FLOCKFILE(fp); 47 if ((fp->_flags & (__SWR | __SRW)) == 0) { 51 r = __sflush(fp); 52 FUNLOCKFILE(fp); 57 __sflush(FILE *fp) argument 62 t = fp->_flags; 66 if ((p = fp 89 __sflush_locked(FILE *fp) argument [all...] |