Lines Matching refs:file

238 show(file_info_t *file)  in show()  argument
242 while ((ch = getc(file->fp)) != EOF) { in show()
243 if (last != file) { in show()
245 printfn(file->file_name, 1); in show()
246 last = file; in show()
252 if (ferror(file->fp)) { in show()
253 fclose(file->fp); in show()
254 file->fp = NULL; in show()
255 ierr(file->file_name); in show()
258 clearerr(file->fp); in show()
266 file_info_t *file; in set_events() local
274 for (i = 0, file = files; i < no_files; i++, file++) { in set_events()
275 if (!file->fp) in set_events()
278 if (fstatfs(fileno(file->fp), &sf) == 0 && in set_events()
284 if (Fflag && fileno(file->fp) != STDIN_FILENO) { in set_events()
285 EV_SET(&ev[n], fileno(file->fp), EVFILT_VNODE, in set_events()
290 EV_SET(&ev[n], fileno(file->fp), EVFILT_READ, in set_events()
309 file_info_t *file; in follow() local
315 for (i = 0, file = files; i < no_files; i++, file++) { in follow()
316 if (!file->fp) in follow()
320 printfn(file->file_name, 1); in follow()
321 forward(file->fp, file->file_name, style, off, &file->st); in follow()
326 last = --file; in follow()
344 for (i = 0, file = files; i < no_files; i++, file++) { in follow()
345 if (!file->fp) { in follow()
346 file->fp = in follow()
347 fileargs_fopen(fa, file->file_name, in follow()
349 if (file->fp != NULL && in follow()
350 fstat(fileno(file->fp), &file->st) in follow()
352 fclose(file->fp); in follow()
353 file->fp = NULL; in follow()
355 if (file->fp != NULL) in follow()
359 if (fileno(file->fp) == STDIN_FILENO) in follow()
361 ftmp = fileargs_fopen(fa, file->file_name, "r"); in follow()
365 ierr(file->file_name); in follow()
366 show(file); in follow()
367 if (file->fp != NULL) { in follow()
368 fclose(file->fp); in follow()
369 file->fp = NULL; in follow()
378 if (sb2.st_ino != file->st.st_ino || in follow()
379 sb2.st_dev != file->st.st_dev || in follow()
381 show(file); in follow()
382 if (file->fp != NULL) in follow()
383 fclose(file->fp); in follow()
384 file->fp = ftmp; in follow()
385 memcpy(&file->st, &sb2, in follow()
394 for (i = 0, file = files; i < no_files; i++, file++) in follow()
395 if (file->fp && !show(file)) in follow()
422 ierr(file->file_name); in follow()