Lines Matching defs:fp

96 forward(FILE *fp, const char *fn, enum STYLE style, off_t off, struct stat *sbp)
107 if (fseeko(fp, off, SEEK_SET) == -1) {
112 if ((ch = getc(fp)) == EOF) {
113 if (ferror(fp)) {
124 if ((ch = getc(fp)) == EOF) {
125 if (ferror(fp)) {
138 fseeko(fp, -off, SEEK_END) == -1) {
143 while (getc(fp) != EOF)
145 if (ferror(fp)) {
150 if (bytes(fp, fn, off))
156 if (fseeko(fp, (off_t)0, SEEK_END) == -1) {
161 rlines(fp, fn, off, sbp);
163 while (getc(fp) != EOF)
165 if (ferror(fp)) {
170 if (lines(fp, fn, off))
177 while ((ch = getc(fp)) != EOF)
180 if (ferror(fp)) {
191 rlines(FILE *fp, const char *fn, off_t off, struct stat *sbp)
200 map.fd = fileno(fp);
228 if (fseeko(fp, sbp->st_size, SEEK_SET) == -1) {
243 while ((ch = getc(file->fp)) != EOF) {
254 if (ferror(file->fp)) {
255 (void) fclose(file->fp);
256 file->fp = NULL;
260 clearerr(file->fp);
270 if (action != USE_PORT || file->fp == NULL)
279 fileno(file->fp), POLLIN, file);
282 fileno(file->fp));
310 sizeof (buf), "/proc/self/fd/%d", fileno(file->fp));
372 if (! file->fp)
375 (void) fstat(fileno(file->fp), &file->st);
400 if (file->fp) {
406 forward(file->fp, file->file_name, style, off,
408 if (Fflag && fileno(file->fp) != STDIN_FILENO)
428 if (!file->fp) {
429 file->fp = fopen(file->file_name, "r");
430 if (file->fp != NULL &&
431 fstat(fileno(file->fp), &file->st)
433 (void) fclose(file->fp);
434 file->fp = NULL;
436 if (file->fp != NULL)
440 if (fileno(file->fp) == STDIN_FILENO)
446 (void) fclose(file->fp);
447 file->fp = NULL;
457 file->fp = freopen(file->file_name, "r",
458 file->fp);
459 if (file->fp != NULL) {
470 if (file->fp && !show(file))
492 (void) fseek(file->fp, 0, SEEK_SET);