Lines Matching refs:FD
103 int fd, argc;
115 if ((fd = open(cp, O_RDWR|O_CREAT, 0666)) < 0) {
120 transfer(line, fd, "\01");
129 transfer(char *buf, int fd, const char *eofchars)
140 xpwrite(FD, buf, strlen(buf));
149 xpwrite(FD, &r, 1);
151 (void)read(FD, &c, 1);
159 eof = read(FD, &c, 1) <= 0;
174 if (write(fd, buffer, (size_t)cnt) != cnt) {
182 if (write(fd, buffer, (size_t)cnt) != cnt)
190 (void)close(fd);
260 FILE *fd;
274 if ((fd = fopen(fnamex, "r")) == NULL) {
278 transmit(fd, value(EOFWRITE), NULL);
280 (void)tcdrain(FD);
288 transmit(FILE *fd, const char *eofchars, char *command)
306 (void)read(FD, &c, (size_t)1); /* trailing \n */
308 (void)tcdrain(FD);
319 c = getc(fd);
353 (void)read(FD, &c, (size_t)1);
373 (void)fclose(fd);
392 FILE *fd;
406 if ((fd = fopen(copynamex, "r")) == NULL) {
414 transmit(fd, "\04", line);
428 xpwrite(FD, &cc, 1);
443 (void)read(FD, &cc, 1);
449 xpwrite(FD, &null, 1); /* poke it */
493 (void)dup2(FD, 1);
541 (void)dup2(FD, 0);
542 (void)dup2(FD, 1);
663 (void)write(FD, dismsg, strlen(dismsg));
793 (void)tcgetattr(FD, &rmtty);
801 (void)tcsetattr(FD, TCSADRAIN, &rmtty);
813 (void)tcgetattr(FD, &rmtty);
818 (void)tcsetattr(FD, TCSADRAIN, &rmtty);
829 (void)ioctl(FD, TIOCSBRK, NULL);
831 (void)ioctl(FD, TIOCCBRK, NULL);