Lines Matching refs:fp
63 ** fp -- file pointer to be closed
71 ** file pointer 'fp' will no longer be valid.
75 sm_io_close(fp, timeout)
76 register SM_FILE_T *fp;
82 if (fp == NULL)
88 SM_REQUIRE_ISA(fp, SmFileMagic);
91 if (fp->sm_magic == NULL)
97 if (fp->f_close == NULL)
103 if (fp->f_dup_cnt > 0)
106 fp->f_dup_cnt--;
112 timeout = fp->f_timeout;
120 r = fp->f_flags & SMWR ? sm_flush(fp, (int *) &timeout) : 0;
132 if ((*fp->f_close)(fp) < 0)
138 if (fp->f_flags & SMMBF)
140 sm_free((char *)fp->f_bf.smb_base);
141 fp->f_bf.smb_base = NULL;
143 if (HASUB(fp))
144 FREEUB(fp);
145 fp->f_flags = 0; /* clear flags */
146 fp->sm_magic = NULL; /* Release this SM_FILE_T for reuse. */
147 fp->f_r = fp->f_w = 0; /* Mess up if reaccessed. */