Searched refs:fp (Results 1 - 25 of 196) sorted by relevance

12345678

/vbox/src/VBox/Devices/EFI/Firmware/StdLib/LibC/Stdio/
H A Dungetc.c58 * Expand the ungetc buffer `in place'. That is, adjust fp->_p when
64 __submore(FILE *fp) argument
69 _DIAGASSERT(fp != NULL);
70 if(fp == NULL) {
75 if (_UB(fp)._base == fp->_ubuf) {
81 _UB(fp)._base = p;
82 _UB(fp)._size = BUFSIZ;
83 p += BUFSIZ - sizeof(fp->_ubuf);
84 for (i = sizeof(fp
102 ungetc(int c, FILE *fp) argument
[all...]
H A Dfclose.c57 fclose(FILE *fp) argument
61 _DIAGASSERT(fp != NULL);
62 if(fp == NULL) {
67 if (fp->_flags == 0) { /* not open! */
71 FLOCKFILE(fp);
72 WCIO_FREE(fp);
73 r = fp->_flags & __SWR ? __sflush(fp) : 0;
74 if (fp->_close != NULL && (*fp
[all...]
H A Dwsetup.c60 __swsetup(FILE *fp) argument
63 _DIAGASSERT(fp != NULL);
64 if(fp == NULL) {
76 if ((fp->_flags & __SWR) == 0) {
77 if ((fp->_flags & __SRW) == 0)
79 if (fp->_flags & __SRD) {
81 if (HASUB(fp))
82 FREEUB(fp);
83 fp->_flags &= ~(__SRD|__SEOF);
84 fp
[all...]
H A Dflockfile.c68 flockfile(FILE *fp) argument
71 __flockfile_internal(fp, 0);
75 ftrylockfile(FILE *fp) argument
83 mutex_lock(&_LOCK(fp));
85 if (_LOCKOWNER(fp) == thr_self()) {
86 _LOCKCOUNT(fp)++;
87 } else if (_LOCKOWNER(fp) == NULL) {
88 _LOCKOWNER(fp) = thr_self();
89 _LOCKCOUNT(fp) = 1;
93 mutex_unlock(&_LOCK(fp));
99 funlockfile(FILE *fp) argument
106 __flockfile_internal(FILE *fp, int internal) argument
140 __funlockfile_internal(FILE *fp, int internal) argument
[all...]
H A Drefill.c64 lflush(FILE *fp) argument
67 _DIAGASSERT(fp != NULL);
68 if(fp == NULL) {
73 if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR))
74 return (__sflush(fp));
83 __srefill(FILE *fp) argument
86 _DIAGASSERT(fp != NULL);
87 if(fp == NULL) {
96 //Print(L"%a( %d)\n", __func__, fp->_file);
97 fp
[all...]
H A Dftell.c58 ftell(FILE *fp) argument
62 FLOCKFILE(fp);
64 if (fp->_seek == NULL) {
65 FUNLOCKFILE(fp);
74 __sflush(fp); /* may adjust seek offset on append stream */
75 if (fp->_flags & __SOFF)
76 pos = fp->_offset;
78 pos = (*fp->_seek)(fp->_cookie, (fpos_t)0, SEEK_CUR);
80 FUNLOCKFILE(fp);
[all...]
H A Dftello.c55 ftello(FILE *fp)
59 FLOCKFILE(fp);
61 if (fp->_seek == NULL) {
62 FUNLOCKFILE(fp);
71 __sflush(fp); /* may adjust seek offset on append stream */
72 if (fp->_flags & __SOFF)
73 pos = fp->_offset;
75 pos = (*fp->_seek)(fp->_cookie, (fpos_t)0, SEEK_CUR);
77 FUNLOCKFILE(fp);
[all...]
H A Drewind.c55 rewind(FILE *fp) argument
57 _DIAGASSERT(fp != NULL);
59 if(fp != NULL) {
60 FLOCKFILE(fp);
61 (void) fseek(fp, 0L, SEEK_SET);
62 __sclearerr(fp);
63 FUNLOCKFILE(fp);
H A Drget.c60 __srget(FILE *fp) argument
62 _DIAGASSERT(fp != NULL);
64 if(fp != NULL) {
65 _SET_ORIENTATION(fp, -1);
66 if (__srefill(fp) == 0) {
67 fp->_r--;
68 return (*fp->_p++);
H A Dfpurge.c60 fpurge(fp)
61 FILE *fp;
64 _DIAGASSERT(fp != NULL);
65 if(fp == NULL) {
70 if (fp->_flags == 0) {
74 FLOCKFILE(fp);
75 if (HASUB(fp))
76 FREEUB(fp);
77 WCIO_FREE(fp);
78 fp
[all...]
H A Dclrerr.c57 clearerr(FILE *fp) argument
59 _DIAGASSERT(fp != NULL);
60 if(fp != NULL) {
61 FLOCKFILE(fp);
62 __sclearerr(fp);
63 FUNLOCKFILE(fp);
H A Dfeof.c58 feof(FILE *fp) argument
62 _DIAGASSERT(fp != NULL);
63 if(fp == NULL) {
68 FLOCKFILE(fp);
69 r = __sfeof(fp);
70 FUNLOCKFILE(fp);
H A Dferror.c58 ferror(FILE *fp) argument
62 _DIAGASSERT(fp != NULL);
63 if(fp == NULL) {
68 FLOCKFILE(fp);
69 r = __sferror(fp);
70 FUNLOCKFILE(fp);
H A Dfgetc.c55 fgetc(FILE *fp) argument
59 _DIAGASSERT(fp != NULL);
61 if(fp != NULL) {
62 FLOCKFILE(fp);
63 r = __sgetc(fp);
64 FUNLOCKFILE(fp);
H A Dfputc.c55 fputc(int c, FILE *fp) argument
59 _DIAGASSERT(fp != NULL);
61 if(fp != NULL) {
62 FLOCKFILE(fp);
63 r = __sputc(c, fp);
64 FUNLOCKFILE(fp);
H A Dfreopen.c68 freopen(const char *file, const char *mode, FILE *fp) argument
75 _DIAGASSERT(fp != NULL);
76 if(fp == NULL) {
82 (void) fclose(fp);
97 if (fp->_flags == 0) {
98 fp->_flags = __SEOF; /* hold on to it */
103 if (fp->_flags & __SWR)
104 (void) __sflush(fp);
106 isopen = fp->_close != NULL;
107 if (((wantfd = fp
[all...]
H A Dwbuf.c59 __swbuf(int c, FILE *fp) argument
63 //_DIAGASSERT(fp != NULL);
64 if(fp == NULL) {
69 _SET_ORIENTATION(fp, -1);
78 fp->_w = fp->_lbfsize;
79 if (cantwrite(fp)) {
94 n = (int)(fp->_p - fp->_bf._base);
95 if (n >= fp
[all...]
H A Dsetvbuf.c62 setvbuf(FILE *fp, char *buf, int mode, size_t size) argument
68 _DIAGASSERT(fp != NULL);
70 if(fp == NULL) {
84 FLOCKFILE(fp);
92 (void)__sflush(fp);
93 if (HASUB(fp))
94 FREEUB(fp);
95 WCIO_FREE(fp);
96 fp->_r = fp
[all...]
H A Dgetc.c61 getc(FILE *fp) argument
65 _DIAGASSERT(fp != NULL);
66 if(fp == NULL) {
71 FLOCKFILE(fp);
72 r = __sgetc(fp);
73 FUNLOCKFILE(fp);
78 getc_unlocked(FILE *fp) argument
81 _DIAGASSERT(fp != NULL);
82 if(fp == NULL) {
87 return (__sgetc(fp));
[all...]
H A Dputc.c62 putc(int c, FILE *fp) argument
66 _DIAGASSERT(fp != NULL);
67 if(fp == NULL) {
72 FLOCKFILE(fp);
73 r = __sputc(c, fp);
74 FUNLOCKFILE(fp);
79 putc_unlocked(int c, FILE *fp) argument
81 _DIAGASSERT(fp != NULL);
82 if(fp == NULL) {
87 return (__sputc(c, fp));
[all...]
H A Dfileno.c63 _fileno(fp)
64 FILE *fp;
68 _DIAGASSERT(fp != NULL);
69 if(fp == NULL) {
74 FLOCKFILE(fp);
75 r = __sfileno(fp);
76 FUNLOCKFILE(fp);
H A Dungetwc.c41 ungetwc(wint_t wc, FILE *fp) argument
45 _DIAGASSERT(fp);
50 FLOCKFILE(fp);
51 _SET_ORIENTATION(fp, 1);
58 wcio = WCIO_GET(fp);
60 FUNLOCKFILE(fp);
66 FUNLOCKFILE(fp);
71 __sclearerr(fp);
72 FUNLOCKFILE(fp);
H A Dwcio.h39 #define WCIO_GET(fp) (&(_EXT(fp)->_wcio))
51 #define _SET_ORIENTATION(fp, mode) \
53 struct wchar_io_data *_wcio = WCIO_GET(fp);\
61 #define WCIO_FREE(fp) \
63 _EXT(fp)->_wcio.wcio_mode = 0;\
64 WCIO_FREEUB(fp);\
67 #define WCIO_FREEUB(fp) \
69 _EXT(fp)->_wcio.wcio_ungetwc_inbuf = 0;\
H A Dmakebuf.c68 __smakebuf(FILE *fp) argument
75 _DIAGASSERT(fp != NULL);
77 if (fp != NULL) {
78 if (fp->_flags & __SNBF) {
79 fp->_bf._base = fp->_p = fp->_nbuf;
80 fp->_bf._size = 1;
83 flags = __swhatbuf(fp, &size, &couldbetty);
85 fp
104 __swhatbuf(FILE *fp, size_t *bufsize, int *couldbetty) argument
[all...]
H A Dfseeko.c72 fseeko(FILE *fp, off_t offset, int whence)
80 _DIAGASSERT(fp != NULL);
81 if(fp == NULL) {
95 //Print(L"%a( %d, %Ld, %d)\n", __func__, fp->_file, offset, whence);
96 FLOCKFILE(fp);
101 if ((seekfn = fp->_seek) == NULL) {
103 FUNLOCKFILE(fp);
120 __sflush(fp); /* may adjust seek offset on append stream */
121 if (fp->_flags & __SOFF)
122 curoff = fp
[all...]

Completed in 54 milliseconds

12345678