Home | History | Annotate | Download | only in des

Lines Matching defs:tty

148 #define	TTY_get(tty,data)	tcgetattr(tty,data)
149 #define TTY_set(tty,data) tcsetattr(tty,TCSANOW,data)
156 #define TTY_get(tty,data) ioctl(tty,TCGETA,data)
157 #define TTY_set(tty,data) ioctl(tty,TCSETA,data)
164 #define TTY_get(tty,data) ioctl(tty,TIOCGETP,data)
165 #define TTY_set(tty,data) ioctl(tty,TIOCSETP,data)
207 static int noecho_fgets(char *buf, int size, FILE *tty);
279 static FILE *tty;
292 tty=NULL;
295 if ((tty=fopen("con","r")) == NULL)
296 tty=stdin;
298 tty=stdin;
301 if ((tty=fopen("/dev/tty","r")) == NULL)
303 tty=stdin;
307 if (TTY_get(fileno(tty),&tty_orig) == -1)
342 if (is_a_tty && (TTY_set(fileno(tty),&tty_new) == -1))
365 fgets(buf,size,tty);
366 if (feof(tty)) goto error;
367 if (ferror(tty)) goto error;
370 else read_till_nl(tty);
376 fgets(buff,size,tty);
377 if (feof(tty)) goto error;
380 else read_till_nl(tty);
396 perror("fgets(tty)");
400 if (ps >= 2) TTY_set(fileno(tty),&tty_orig);
409 if (stdin != tty) fclose(tty);
479 static int noecho_fgets(char *buf, int size, FILE *tty)