Searched defs:fp (Results 1 - 25 of 76) sorted by relevance

1234

/bionic/libc/upstream-openbsd/lib/libc/stdio/
H A Dclrerr.c39 clearerr(FILE *fp) argument
41 FLOCKFILE(fp);
42 __sclearerr(fp);
43 FUNLOCKFILE(fp);
H A Dfgetc.c37 fgetc(FILE *fp) argument
39 return (getc(fp));
H A Dfpurge.c44 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 Dgetwc.c41 getwc(FILE *fp) argument
44 return fgetwc(fp);
H A Drewind.c38 rewind(FILE *fp) argument
40 (void) fseek(fp, 0L, SEEK_SET);
41 clearerr(fp);
H A Drget.c43 __srget(FILE *fp) argument
45 _SET_ORIENTATION(fp, -1);
46 if (__srefill(fp) == 0) {
47 fp->_r--;
48 return (*fp->_p++);
H A Dwsetup.c44 __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 Dfeof.c43 feof(FILE *fp) argument
47 FLOCKFILE(fp);
48 ret = __sfeof(fp);
49 FUNLOCKFILE(fp);
H A Dferror.c43 ferror(FILE *fp) argument
47 FLOCKFILE(fp);
48 ret = __sferror(fp);
49 FUNLOCKFILE(fp);
H A Dfputc.c38 fputc(int c, FILE *fp) argument
40 return (putc(c, fp));
H A Dfwide.c37 fwide(FILE *fp, int mode) argument
52 FLOCKFILE(fp);
53 wcio = WCIO_GET(fp);
61 FUNLOCKFILE(fp);
H A Dgetc.c43 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 Dgetline.c34 getline(char **__restrict buf, size_t *__restrict buflen, FILE *__restrict fp) argument
36 return getdelim(buf, buflen, '\n', fp);
H A Dputwc.c41 putwc(wchar_t wc, FILE *fp) argument
44 return fputwc(wc, fp);
H A Dsetbuf.c38 setbuf(FILE *fp, char *buf) argument
40 (void) setvbuf(fp, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
H A Dwbuf.c44 __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 Dfprintf.c39 fprintf(FILE *fp, const char *fmt, ...) argument
45 ret = vfprintf(fp, fmt, ap);
H A Dfscanf.c39 fscanf(FILE *fp, const char *fmt, ...) argument
45 ret = vfscanf(fp, fmt, ap);
H A Dfwalk.c42 FILE *fp; local
48 for (fp = g->iobs, n = g->niobs; --n >= 0; fp++) {
49 if ((fp->_flags != 0) && ((fp->_flags & __SIGN) == 0))
50 ret |= (*function)(fp);
H A Dfwprintf.c39 fwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt, ...) argument
45 ret = vfwprintf(fp, fmt, ap);
H A Dfwscanf.c34 fwscanf(FILE * __restrict fp, const wchar_t * __restrict fmt, ...) argument
40 r = vfwscanf(fp, fmt, ap);
H A Dputc.c44 putc_unlocked(int c, FILE *fp) argument
46 if (cantwrite(fp)) {
50 _SET_ORIENTATION(fp, -1);
51 return (__sputc(c, fp));
60 putc(int c, FILE *fp) argument
64 FLOCKFILE(fp);
65 ret = putc_unlocked(c, fp);
66 FUNLOCKFILE(fp);
H A Dsetbuffer.c37 setbuffer(FILE *fp, char *buf, int size) argument
40 (void)setvbuf(fp, buf, buf ? _IOFBF : _IONBF, size);
47 setlinebuf(FILE *fp) argument
50 return (setvbuf(fp, (char *)NULL, _IOLBF, (size_t)0));
/bionic/libc/bionic/
H A Dflockfile.cpp38 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));
/bionic/libc/stdio/
H A Drefill.c40 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...]

Completed in 637 milliseconds

1234