MCPcopy Create free account
hub / github.com/Entware/Entware / init_dialog

Function init_dialog

scripts/config/lxdialog/util.c:302–326  ·  view source on GitHub ↗

* Do some initialization for dialog */

Source from the content-addressed store, hash-verified

300 * Do some initialization for dialog
301 */
302int init_dialog(const char *backtitle)
303{
304 int height, width;
305
306 initscr(); /* Init curses */
307
308 /* Get current cursor position for signal handler in mconf.c */
309 getyx(stdscr, saved_y, saved_x);
310
311 getmaxyx(stdscr, height, width);
312 if (height < WINDOW_HEIGTH_MIN || width < WINDOW_WIDTH_MIN) {
313 endwin();
314 return -ERRDISPLAYTOOSMALL;
315 }
316
317 dlg.backtitle = backtitle;
318 color_setup(getenv("MENUCONFIG_COLOR"));
319
320 keypad(stdscr, TRUE);
321 cbreak();
322 noecho();
323 dialog_clear();
324
325 return 0;
326}
327
328void set_dialog_backtitle(const char *backtitle)
329{

Callers 1

mainFunction · 0.85

Calls 2

color_setupFunction · 0.85
dialog_clearFunction · 0.85

Tested by

no test coverage detected