Lines Matching refs:fp
68 freopen(const char *file, const char *mode, FILE *fp) in freopen() argument
75 _DIAGASSERT(fp != NULL); in freopen()
76 if(fp == NULL) { in freopen()
82 (void) fclose(fp); in freopen()
97 if (fp->_flags == 0) { in freopen()
98 fp->_flags = __SEOF; /* hold on to it */ in freopen()
103 if (fp->_flags & __SWR) in freopen()
104 (void) __sflush(fp); in freopen()
106 isopen = fp->_close != NULL; in freopen()
107 if (((wantfd = fp->_file) >= 0) && isopen) { in freopen()
108 (void) (*fp->_close)(fp->_cookie); in freopen()
118 (void) (*fp->_close)(fp->_cookie); in freopen()
131 (void) (*fp->_close)(fp->_cookie); in freopen()
132 if (fp->_flags & __SMBF) in freopen()
133 free((char *)fp->_bf._base); in freopen()
134 fp->_w = 0; in freopen()
135 fp->_r = 0; in freopen()
136 fp->_p = NULL; in freopen()
137 fp->_bf._base = NULL; in freopen()
138 fp->_bf._size = 0; in freopen()
139 fp->_lbfsize = 0; in freopen()
140 if (HASUB(fp)) in freopen()
141 FREEUB(fp); in freopen()
142 WCIO_FREE(fp); in freopen()
143 _UB(fp)._size = 0; in freopen()
144 if (HASLB(fp)) in freopen()
145 FREELB(fp); in freopen()
146 fp->_lb._size = 0; in freopen()
149 fp->_flags = 0; /* set it free */ in freopen()
181 fp->_flags = (unsigned short)flags; in freopen()
182 fp->_file = (short)f; in freopen()
183 fp->_cookie = fp; in freopen()
184 fp->_read = __sread; in freopen()
185 fp->_write = __swrite; in freopen()
186 fp->_seek = __sseek; in freopen()
187 fp->_close = __sclose; in freopen()
198 (void) __sseek((void *)fp, (fpos_t)0, SEEK_END); in freopen()
199 return (fp); in freopen()