Lines Matching refs:fileno
291 if (!isatty(fileno(stderr)) in open_terminal()
292 || (device = ttyname(fileno(stderr))) == 0) { in open_terminal()
293 if (!isatty(fileno(stdout)) in open_terminal()
294 || (device = ttyname(fileno(stdout))) == 0) { in open_terminal()
295 if (!isatty(fileno(stdin)) in open_terminal()
296 || (device = ttyname(fileno(stdin))) == 0) { in open_terminal()
310 int fd = fileno(dialog_state.screen_output); in my_putc()
362 if (fileno(input) != fileno(stdin)) { in init_dialog()
363 if ((fd1 = dup(fileno(input))) >= 0 in init_dialog()
364 && (fd2 = dup(fileno(stdin))) >= 0) { in init_dialog()
365 (void) dup2(fileno(input), fileno(stdin)); in init_dialog()
367 if (fileno(stdin) != 0) /* some functions may read fd #0 */ in init_dialog()
368 (void) dup2(fileno(stdin), 0); in init_dialog()
373 } else if (!isatty(fileno(stdin))) { in init_dialog()
375 if ((fd2 = dup(fileno(stdin))) >= 0) { in init_dialog()
379 if (fileno(stdin) != 0) /* some functions may read fd #0 */ in init_dialog()
380 (void) dup2(fileno(stdin), 0); in init_dialog()
405 if (!isatty(fileno(stdout)) in init_dialog()
406 && (fileno(stdout) == fileno(output) || dialog_tty())) { in init_dialog()
451 if ((fileno(output) != fileno(stdout) in dlg_keep_tite()
452 || isatty(fileno(output))) in dlg_keep_tite()