Lines Matching refs:fp

29 **	stdio. fp->f_cookie is the FILE* of stdio. The cookie may be
31 ** When binding late (when fp->f_cookie==NULL) then the value of
32 ** fp->f_ival is used (0, 1 or 2) to map to stdio's stdin, stdout or
40 ** fp -- file pointer assign for this open
52 sm_stdioopen(fp, info, flags, rpool)
53 SM_FILE_T *fp;
100 fp->f_cookie = s;
108 ** fp - the file pointer to get the cookie assigned
115 setup(fp)
116 SM_FILE_T *fp;
118 if (fp->f_cookie == NULL)
120 switch (fp->f_ival)
123 fp->f_cookie = stdin;
126 fp->f_cookie = stdout;
129 fp->f_cookie = stderr;
132 sm_abort("fp->f_ival=%d: out of range (0...2)", fp->f_ival);
142 ** fp -- the file pointer
151 sm_stdioread(fp, buf, n)
152 SM_FILE_T *fp;
158 if (fp->f_cookie == NULL)
159 setup(fp);
160 s = fp->f_cookie;
168 ** fp -- the file pointer
177 sm_stdiowrite(fp, buf, n)
178 SM_FILE_T *fp;
184 if (fp->f_cookie == NULL)
185 setup(fp);
186 s = fp->f_cookie;
194 ** fp -- the file pointer
203 sm_stdioseek(fp, offset, whence)
204 SM_FILE_T *fp;
210 if (fp->f_cookie == NULL)
211 setup(fp);
212 s = fp->f_cookie;
220 ** fp -- close file pointer
227 sm_stdioclose(fp)
228 SM_FILE_T *fp;
232 if (fp->f_cookie == NULL)
233 setup(fp);
234 s = fp->f_cookie;
242 ** fp -- the file pointer
253 sm_stdiosetinfo(fp, what, valp)
254 SM_FILE_T *fp;
271 ** fp -- the file pointer
282 sm_stdiogetinfo(fp, what, valp)
283 SM_FILE_T *fp;
294 if (fp->f_cookie == NULL)
295 setup(fp);
296 fd = fileno((FILE *) fp->f_cookie);
334 SM_FILE_T *fp;
361 fp = sm_fp(SmFtRealStdio, ioflags, NULL);
362 fp->f_file = fd;
363 fp->f_cookie = stream;
364 return fp;