/* * Do some initialization for dialog */ int init_dialog(const char *backtitle) { int height, width; initscr(); /* Init curses */ /* Get current cursor position for signal handler in mconf.c */ getyx(stdscr, saved_y, saved_x); getmaxyx(stdscr, height, width); if (height < WINDOW_HEIGTH_MIN || width < WINDOW_WIDTH_MIN) { endwin(); return -ERRDISPLAYTOOSMALL; } dlg.backtitle = backtitle; color_setup(getenv("MENUCONFIG_COLOR")); keypad(stdscr, TRUE); cbreak(); noecho(); dialog_clear(); return 0; }
/* * Do some initialization for dialog */ void init_dialog(void) { initscr(); /* Init curses */ keypad(stdscr, TRUE); cbreak(); noecho(); if (use_colors) /* Set up colors */ color_setup(); dialog_clear(); }
/* * Do some initialization for dialog */ void init_dialog (void) { #ifdef LOCALE setlocale(LC_CTYPE, ""); /* required by ncurses on linux UTF-8 console */ #endif initscr (); /* Init curses */ keypad (stdscr, TRUE); cbreak (); noecho (); if (use_colors) /* Set up colors */ color_setup (); dialog_clear (); }
/* * Do some initialization for dialog */ int init_dialog(const char *backtitle) { int height, width; initscr(); /* Init curses */ getmaxyx(stdscr, height, width); if (height < 19 || width < 80) { endwin(); return -ERRDISPLAYTOOSMALL; } dlg.backtitle = backtitle; color_setup(getenv("MENUCONFIG_COLOR")); keypad(stdscr, TRUE); cbreak(); noecho(); dialog_clear(); return 0; }