kconfig/menuconfig: lxdialog is now built-in
[firefly-linux-kernel-4.4.55.git] / scripts / kconfig / lxdialog / yesno.c
index cb2568aae3ed7609a68dd04a81750e3e7c52ab2c..9fc24492c52f3a0c7c406ce9fb130bc59ef16780 100644 (file)
@@ -53,17 +53,18 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width)
        dialog = newwin(height, width, y, x);
        keypad(dialog, TRUE);
 
-       draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
-       wattrset(dialog, border_attr);
+       draw_box(dialog, 0, 0, height, width,
+                dlg.dialog.atr, dlg.border.atr);
+       wattrset(dialog, dlg.border.atr);
        mvwaddch(dialog, height - 3, 0, ACS_LTEE);
        for (i = 0; i < width - 2; i++)
                waddch(dialog, ACS_HLINE);
-       wattrset(dialog, dialog_attr);
+       wattrset(dialog, dlg.dialog.atr);
        waddch(dialog, ACS_RTEE);
 
        print_title(dialog, title, width);
 
-       wattrset(dialog, dialog_attr);
+       wattrset(dialog, dlg.dialog.atr);
        print_autowrap(dialog, prompt, width - 2, 1, 3);
 
        print_buttons(dialog, height, width, 0);
@@ -98,5 +99,5 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width)
        }
 
        delwin(dialog);
-       return -1;              /* ESC pressed */
+       return 255;             /* ESC pressed */
 }