Skip to content

Commit 90fe4c5

Browse files
committed
kconfig: menuconfig: remove OLD_NCURSES macro
This code has been here for more than 20 years. The bug in the old days no longer matters. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent 491b146 commit 90fe4c5

3 files changed

Lines changed: 0 additions & 33 deletions

File tree

scripts/kconfig/lxdialog/dialog.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,6 @@
1818
#endif
1919
#include <ncurses.h>
2020

21-
/*
22-
* Colors in ncurses 1.9.9e do not work properly since foreground and
23-
* background colors are OR'd rather than separately masked. This version
24-
* of dialog was hacked to work with ncurses 1.9.9e, making it incompatible
25-
* with standard curses. The simplest fix (to make this work with standard
26-
* curses) uses the wbkgdset() function, not used in the original hack.
27-
* Turn it off if we're building with 1.9.9e, since it just confuses things.
28-
*/
29-
#if defined(NCURSES_VERSION) && defined(_NEED_WRAP) && !defined(GCC_PRINTFLIKE)
30-
#define OLD_NCURSES 1
31-
#undef wbkgdset
32-
#define wbkgdset(w,p) /*nothing */
33-
#else
34-
#define OLD_NCURSES 0
35-
#endif
36-
3721
#define TR(params) _tracef params
3822

3923
#define KEY_ESC 27

scripts/kconfig/lxdialog/menubox.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,7 @@ static void do_print_item(WINDOW * win, const char *item, int line_y,
6363
/* Clear 'residue' of last item */
6464
wattrset(win, dlg.menubox.atr);
6565
wmove(win, line_y, 0);
66-
#if OLD_NCURSES
67-
{
68-
int i;
69-
for (i = 0; i < menu_width; i++)
70-
waddch(win, ' ');
71-
}
72-
#else
7366
wclrtoeol(win);
74-
#endif
7567
wattrset(win, selected ? dlg.item_selected.atr : dlg.item.atr);
7668
mvwaddstr(win, line_y, item_x, menu_item);
7769
if (hotkey) {

scripts/kconfig/lxdialog/textbox.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -336,16 +336,7 @@ static void print_line(WINDOW * win, int row, int width)
336336
waddnstr(win, line, MIN(strlen(line), width - 2));
337337

338338
/* Clear 'residue' of previous line */
339-
#if OLD_NCURSES
340-
{
341-
int x = getcurx(win);
342-
int i;
343-
for (i = 0; i < width - x; i++)
344-
waddch(win, ' ');
345-
}
346-
#else
347339
wclrtoeol(win);
348-
#endif
349340
}
350341

351342
/*

0 commit comments

Comments
 (0)