Lines Matching refs:fp

62 sm_stdopen(fp, info, flags, rpool)  in sm_stdopen()  argument
63 SM_FILE_T *fp; in sm_stdopen()
99 fp->f_file = open(path, oflags,
101 if (fp->f_file < 0)
105 (void) (*fp->f_seek)((void *)fp, (off_t)0, SEEK_END);
107 return fp->f_file;
127 sm_stdread(fp, buf, n) in sm_stdread() argument
128 SM_FILE_T *fp; in sm_stdread()
134 ret = read(fp->f_file, buf, n);
138 fp->f_lseekoff += ret;
156 sm_stdwrite(fp, buf, n) in sm_stdwrite() argument
157 SM_FILE_T *fp; in sm_stdwrite()
161 return write(fp->f_file, buf, n);
181 sm_stdseek(fp, offset, whence) in sm_stdseek() argument
182 SM_FILE_T *fp; in sm_stdseek()
188 ret = lseek(fp->f_file, (off_t) offset, whence);
190 fp->f_lseekoff = ret;
206 sm_stdclose(fp) in sm_stdclose() argument
207 SM_FILE_T *fp; in sm_stdclose()
209 return close(fp->f_file);
227 sm_stdsetmode(fp, mode) in sm_stdsetmode() argument
228 SM_FILE_T *fp; in sm_stdsetmode()
249 fp->f_flags = fp->f_flags & ~SMMODEMASK;
250 fp->f_flags |= flags;
269 sm_stdgetmode(fp, mode) in sm_stdgetmode() argument
270 SM_FILE_T *fp; in sm_stdgetmode()
273 switch (fp->f_flags & SMMODEMASK)
305 sm_stdsetinfo(fp, what, valp) in sm_stdsetinfo() argument
306 SM_FILE_T *fp; in sm_stdsetinfo()
313 return sm_stdsetmode(fp, (const int *)valp);
337 sm_stdgetinfo(fp, what, valp) in sm_stdgetinfo() argument
338 SM_FILE_T *fp; in sm_stdgetinfo()
345 return sm_stdgetmode(fp, (int *)valp);
348 return fp->f_file;
354 if (fstat(fp->f_file, &st) == 0)
365 if (SM_FD_SETSIZE > 0 && fp->f_file >= SM_FD_SETSIZE)
371 SM_FD_SET(fp->f_file, &readfds);
374 if (select(fp->f_file + 1, FDSET_CAST &readfds,
376 SM_FD_ISSET(fp->f_file, &readfds))
406 sm_stdfdopen(fp, info, flags, rpool) in sm_stdfdopen() argument
407 SM_FILE_T *fp; in sm_stdfdopen()
449 fp->f_file = fd;
451 (void) (*fp->f_seek)(fp, (off_t)0, SEEK_END);
452 return fp->f_file;
483 SM_FILE_T *fp; local
512 fp = sm_fp(SmFtStdio, ioflags, NULL);
513 fp->f_file = open(pathname, flags, mode);
514 if (fp->f_file == -1)
516 fp->f_flags = 0;
517 fp->sm_magic = NULL;
520 return fp;