Lines Matching defs:fp
114 register SM_FILE_T *fp;
135 fp = sm_fp(type, ioflags, NULL);
148 if ((*fp->f_open)(fp, info, flags, rpool) < 0)
150 fp->f_flags = 0; /* release */
151 fp->sm_magic = NULL; /* release */
161 sm_rpool_attach_x(rpool, sm_io_fclose, fp);
164 return fp;
170 ** fp -- file pointer to duplicate
183 sm_io_dup(fp)
184 SM_FILE_T *fp;
187 SM_REQUIRE_ISA(fp, SmFileMagic);
188 if (fp->sm_magic != SmFileMagic)
193 if (fp->f_dup_cnt >= INT_MAX - 1)
199 fp->f_dup_cnt++;
200 return fp;
211 ** fp -- the file pointer to reuse
221 sm_io_reopen(type, timeout, info, flags, rpool, fp)
227 SM_FILE_T *fp;
235 (void) sm_io_close(fp, timeout);
275 if (fp != NULL)
277 if (fp->sm_magic != SmFileMagic)
278 fp->f_flags = SMFEOF; /* hold on to it */
282 (void) sm_io_flush(fp, SM_TIME_FOREVER);
283 (void) sm_io_close(fp, SM_TIME_FOREVER);
287 fp2 = sm_fp(type, ioflags, fp);
321 ** When a read occurs on fp, fp2 will be flushed iff there is no
322 ** data waiting on fp.
325 ** fp -- the file opened for reading.
333 sm_io_autoflush(fp, fp2)
334 SM_FILE_T *fp;
339 SM_REQUIRE_ISA(fp, SmFileMagic);
343 savefp = fp->f_flushfp;
344 fp->f_flushfp = fp2;