Lines Matching refs:fp
65 ** fp -- file pointer to be closed
73 ** file pointer 'fp' will no longer be valid.
77 sm_io_close(fp, timeout)
78 register SM_FILE_T *fp;
84 if (fp == NULL)
90 SM_REQUIRE_ISA(fp, SmFileMagic);
93 if (fp->sm_magic == NULL)
99 if (fp->f_close == NULL)
105 if (fp->f_dup_cnt > 0)
108 fp->f_dup_cnt--;
114 timeout = fp->f_timeout;
122 r = fp->f_flags & SMWR ? sm_flush(fp, (int *) &timeout) : 0;
134 if ((*fp->f_close)(fp) < 0)
140 if (fp->f_flags & SMMBF)
142 sm_free((char *)fp->f_bf.smb_base);
143 fp->f_bf.smb_base = NULL;
145 if (HASUB(fp))
146 FREEUB(fp);
147 fp->f_flags = 0; /* clear flags */
148 fp->sm_magic = NULL; /* Release this SM_FILE_T for reuse. */
149 fp->f_r = fp->f_w = 0; /* Mess up if reaccessed. */