From 98e5a1579e7d34fe3803240750a1c48efcd9cb15 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Mon, 24 Jul 2006 21:40:46 +0200 Subject: kconfig/lxdialog: refactor color support Clean up and refactor color support. All color support are now in util.c including color definitions. In the process introduced a global variable named 'dlg' which is used all over to set color - thats the reason why all files are changed. Signed-off-by: Sam Ravnborg --- scripts/kconfig/lxdialog/lxdialog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/kconfig/lxdialog/lxdialog.c') diff --git a/scripts/kconfig/lxdialog/lxdialog.c b/scripts/kconfig/lxdialog/lxdialog.c index 79f6c5fb5cef..c264e024309e 100644 --- a/scripts/kconfig/lxdialog/lxdialog.c +++ b/scripts/kconfig/lxdialog/lxdialog.c @@ -78,11 +78,11 @@ int main(int argc, const char *const *argv) offset += 2; } } else if (!strcmp(argv[offset + 1], "--backtitle")) { - if (backtitle != NULL) { + if (dlg.backtitle != NULL) { Usage(argv[0]); exit(-1); } else { - backtitle = argv[offset + 2]; + dlg.backtitle = argv[offset + 2]; offset += 2; } } else if (!strcmp(argv[offset + 1], "--clear")) { @@ -123,7 +123,7 @@ int main(int argc, const char *const *argv) retval = (*(modePtr->jumper)) (title, argc - offset, argv + offset); if (opt_clear) { /* clear screen before exit */ - attr_clear(stdscr, LINES, COLS, screen_attr); + attr_clear(stdscr, LINES, COLS, dlg.screen.atr); refresh(); } end_dialog(); -- cgit v1.2.1