init: code readability enhancements; very small code changes

This commit is contained in:
Denis Vlasenko
2007-02-17 15:52:02 +00:00
parent c84520d73d
commit ec27feb045
5 changed files with 62 additions and 65 deletions

View File

@ -57,8 +57,10 @@ int more_main(int argc, char **argv)
/* use input from terminal unless we do "more >outfile" */
if (isatty(STDOUT_FILENO)) {
cin = fopen(CURRENT_TTY, "r");
/* Huh? why not just fail if "/dev/tty" isn't available?
* If user has no ctty, it's his own problem */
if (!cin)
cin = xfopen(CONSOLE_DEV, "r");
cin = xfopen(DEV_CONSOLE, "r");
please_display_more_prompt = 2;
#if ENABLE_FEATURE_USE_TERMIOS
cin_fileno = fileno(cin);