Lines Matching refs:fp
52 fclose(FILE *fp)
56 _DIAGASSERT(fp != NULL);
58 if (fp->_flags == 0) { /* not open! */
62 FLOCKFILE(fp);
63 WCIO_FREE(fp);
64 r = fp->_flags & __SWR ? __sflush(fp) : 0;
65 if (fp->_close != NULL && (*fp->_close)(fp->_cookie) < 0)
67 if (fp->_flags & __SMBF)
68 free((char *)fp->_bf._base);
69 if (HASUB(fp))
70 FREEUB(fp);
71 FREELB(fp);
72 FUNLOCKFILE(fp);
73 fp->_file = -1;
74 fp->_flags = 0; /* Release this FILE for reuse. */
75 fp->_r = fp->_w = 0; /* Mess up if reaccessed. */