Lines Matching refs:fd
79 static void setinputfd(int fd, int push);
150 if (parsefile->fd == 0 && iflag) { in preadfd()
186 nr = read(parsefile->fd, buf, IBUFSIZ - 1); in preadfd()
192 if (parsefile->fd == 0 && errno == EWOULDBLOCK) { in preadfd()
308 if (parsefile->fd == 0 && iflag && something) { in preadbuffer()
416 int fd; in setinputfile() local
419 if ((fd = open(fname, O_RDONLY)) < 0) { in setinputfile()
425 if (fd < 10) in setinputfile()
426 fd = savefd(fd, fd); in setinputfile()
427 setinputfd(fd, flags & INPUT_PUSH_FILE); in setinputfile()
430 return fd; in setinputfile()
440 setinputfd(int fd, int push) in setinputfd() argument
446 parsefile->fd = fd; in setinputfd()
484 pf->fd = -1; in pushfile()
498 if (pf->fd >= 0) in popfile()
499 close(pf->fd); in popfile()
532 if (parsefile->fd > 0) { in closescript()
533 close(parsefile->fd); in closescript()
534 parsefile->fd = 0; in closescript()