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

123

/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 Dfgetpos.c40 fgetpos(FILE *fp, fpos_t *pos) argument
42 return((*pos = ftello(fp)) == (fpos_t)-1);
H A Dfileno.c43 fileno(FILE *fp) argument
47 FLOCKFILE(fp);
48 ret = __sfileno(fp);
49 FUNLOCKFILE(fp);
H A Dfputc.c38 fputc(int c, FILE *fp) argument
40 return (putc(c, fp));
H A Dfunopen.c43 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 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 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
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 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);
/bionic/libc/bionic/
H A Dflockfile.cpp38 void flockfile(FILE* fp) { argument
39 if (fp != NULL) {
40 pthread_mutex_lock(&_FLOCK(fp));
44 int ftrylockfile(FILE* fp) { argument
47 if (fp == NULL) {
51 return pthread_mutex_trylock(&_FLOCK(fp));
54 void funlockfile(FILE* fp) { argument
55 if (fp != NULL) {
56 pthread_mutex_unlock(&_FLOCK(fp));
/bionic/libc/upstream-freebsd/lib/libc/stdio/
H A Dfclose.c49 fclose(FILE *fp) argument
53 if (fp->_flags == 0) { /* not open! */
57 FLOCKFILE(fp);
58 r = fp->_flags & __SWR ? __sflush(fp) : 0;
59 if (fp->_close != NULL && (*fp->_close)(fp->_cookie) < 0)
61 if (fp->_flags & __SMBF)
62 free((char *)fp
[all...]
/bionic/tests/
H A Dmntent_test.cpp22 FILE* fp = setmntent("/no/mnt/tab/on/android", "r"); local
23 ASSERT_TRUE(fp == NULL);
26 ASSERT_TRUE(getmntent(fp) == NULL);
30 ASSERT_TRUE(getmntent_r(fp, &mbuf, cbuf, sizeof(cbuf)) == NULL);
33 ASSERT_EQ(1, endmntent(fp));

Completed in 213 milliseconds

123