From ca6e068bb9e3c53d236a9d17e7eabfe1f2aa09b0 Mon Sep 17 00:00:00 2001 From: kr Date: Fri, 18 Jan 2002 17:16:10 +0000 Subject: [PATCH] (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). --- grub/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/grub/main.c b/grub/main.c index 845cff73c..009df8721 100644 --- a/grub/main.c +++ b/grub/main.c @@ -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 ()); }