(use_curses): Initialize to 0 if !HAVE_LIBCURSES

(main): Check for curses use and set terminal to dumb if we don't
       use it (helps for --batch and variants of non-curses setup).
This commit is contained in:
kr 2002-01-18 17:16:10 +00:00
parent f7eda1235f
commit ca6e068bb9

View file

@ -35,7 +35,11 @@ int grub_stage2 (void);
char *program_name = 0;
int use_config_file = 1;
int use_preset_menu = 0;
#ifdef HAVE_LIBCURSES
int use_curses = 1;
#else
int use_curses = 0;
#endif
int verbose = 0;
int read_only = 0;
int floppy_disks = 1;
@ -242,6 +246,11 @@ main (int argc, char **argv)
sleep (1);
}
/* If we don't have curses (!HAVE_LIBCURSES or --no-curses or
--batch) put terminal to dumb for better handling of line i/o */
if (!use_curses)
terminal |= TERMINAL_DUMB;
/* Transfer control to the stage2 simulator. */
exit (grub_stage2 ());
}