Lines Matching refs:file
241 show(file_info_t *file) in show() argument
245 while ((ch = getc(file->fp)) != EOF) { in show()
246 if (last != file) { in show()
248 printfn(file->file_name, 1); in show()
249 last = file; in show()
255 if (ferror(file->fp)) { in show()
256 fclose(file->fp); in show()
257 file->fp = NULL; in show()
258 ierr(file->file_name); in show()
261 clearerr(file->fp); in show()
269 file_info_t *file; in set_events() local
277 for (i = 0, file = files; i < no_files; i++, file++) { in set_events()
278 if (!file->fp) in set_events()
281 if (fstatfs(fileno(file->fp), &sf) == 0 && in set_events()
287 if (Fflag && fileno(file->fp) != STDIN_FILENO) { in set_events()
288 EV_SET(&ev[n], fileno(file->fp), EVFILT_VNODE, in set_events()
293 EV_SET(&ev[n], fileno(file->fp), EVFILT_READ, in set_events()
312 file_info_t *file; in follow() local
318 for (i = 0, file = files; i < no_files; i++, file++) { in follow()
319 if (!file->fp) in follow()
323 printfn(file->file_name, 1); in follow()
324 forward(file->fp, file->file_name, style, off, &file->st); in follow()
329 last = --file; in follow()
347 for (i = 0, file = files; i < no_files; i++, file++) { in follow()
348 if (!file->fp) { in follow()
349 file->fp = in follow()
350 fileargs_fopen(fa, file->file_name, in follow()
352 if (file->fp != NULL && in follow()
353 fstat(fileno(file->fp), &file->st) in follow()
355 fclose(file->fp); in follow()
356 file->fp = NULL; in follow()
358 if (file->fp != NULL) in follow()
362 if (fileno(file->fp) == STDIN_FILENO) in follow()
364 ftmp = fileargs_fopen(fa, file->file_name, "r"); in follow()
368 ierr(file->file_name); in follow()
369 show(file); in follow()
370 if (file->fp != NULL) { in follow()
371 fclose(file->fp); in follow()
372 file->fp = NULL; in follow()
381 if (sb2.st_ino != file->st.st_ino || in follow()
382 sb2.st_dev != file->st.st_dev || in follow()
384 show(file); in follow()
385 if (file->fp != NULL) in follow()
386 fclose(file->fp); in follow()
387 file->fp = ftmp; in follow()
388 memcpy(&file->st, &sb2, in follow()
397 for (i = 0, file = files; i < no_files; i++, file++) in follow()
398 if (file->fp && !show(file)) in follow()
425 ierr(file->file_name); in follow()