Lines Matching +full:- +full:- +full:no +full:- +full:tty
1 /* Copyright 1997,2001,2002,2007-2009 Alain Knaff.
21 static FILE *tty=NULL; variable
23 static int ttyfd=-1;
58 /* no way to use raw terminal */
75 static int tty_mode = -1; /* 1 for raw, 0 for cooked, -1 for initial */
84 #define FAIL (-1)
89 /*--------------- Signal Handler routines -------------*/
96 if(tty && need_tty_reset) in tty_time_out()
109 exit_code=default_choice-minc+1; in tty_time_out()
121 if(tty && need_tty_reset) { in cleanup_tty()
131 if(mode != tty_mode && mode != -1) { in set_raw_tty()
133 /* Determine existing TTY settings */ in set_raw_tty()
137 /* Restore original TTY settings on exit */ in set_raw_tty()
176 if (tty == NULL) { in opentty()
177 ttyfd = open("/dev/tty", O_RDONLY); in opentty()
179 tty = fdopen(ttyfd, "r"); in opentty()
182 if (tty == NULL){ in opentty()
188 tty = stdin; in opentty()
194 return tty; in opentty()
202 if(!opentty(-1)) in ask_confirmation()
210 fflush(opentty(-1)); in ask_confirmation()
214 /* Treat end-of-file or error as no */ in ask_confirmation()
221 /* Treat end-of-file as no */ in ask_confirmation()
227 return -1; in ask_confirmation()