diff options
Diffstat (limited to 'scripts/kconfig/lxdialog/textbox.c')
-rw-r--r-- | scripts/kconfig/lxdialog/textbox.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/kconfig/lxdialog/textbox.c b/scripts/kconfig/lxdialog/textbox.c index 77848bb8e..de4ae41d7 100644 --- a/scripts/kconfig/lxdialog/textbox.c +++ b/scripts/kconfig/lxdialog/textbox.c | |||
@@ -38,11 +38,8 @@ int dialog_textbox(const char *title, const char *file, int height, int width) | |||
38 | { | 38 | { |
39 | int i, x, y, cur_x, cur_y, fpos, key = 0; | 39 | int i, x, y, cur_x, cur_y, fpos, key = 0; |
40 | int passed_end; | 40 | int passed_end; |
41 | char search_term[MAX_LEN + 1]; | ||
42 | WINDOW *dialog, *text; | 41 | WINDOW *dialog, *text; |
43 | 42 | ||
44 | search_term[0] = '\0'; /* no search term entered yet */ | ||
45 | |||
46 | /* Open input file for reading */ | 43 | /* Open input file for reading */ |
47 | if ((fd = open(file, O_RDONLY)) == -1) { | 44 | if ((fd = open(file, O_RDONLY)) == -1) { |
48 | endwin(); | 45 | endwin(); |
@@ -437,7 +434,6 @@ static void print_page(WINDOW * win, int height, int width) | |||
437 | */ | 434 | */ |
438 | static void print_line(WINDOW * win, int row, int width) | 435 | static void print_line(WINDOW * win, int row, int width) |
439 | { | 436 | { |
440 | int y, x; | ||
441 | char *line; | 437 | char *line; |
442 | 438 | ||
443 | line = get_line(); | 439 | line = get_line(); |
@@ -446,11 +442,13 @@ static void print_line(WINDOW * win, int row, int width) | |||
446 | waddch(win, ' '); | 442 | waddch(win, ' '); |
447 | waddnstr(win, line, MIN(strlen(line), width - 2)); | 443 | waddnstr(win, line, MIN(strlen(line), width - 2)); |
448 | 444 | ||
449 | getyx(win, y, x); | ||
450 | /* Clear 'residue' of previous line */ | 445 | /* Clear 'residue' of previous line */ |
451 | #if OLD_NCURSES | 446 | #if OLD_NCURSES |
452 | { | 447 | { |
453 | int i; | 448 | int i; |
449 | int y, x; | ||
450 | |||
451 | getyx(win, y, x); | ||
454 | for (i = 0; i < width - x; i++) | 452 | for (i = 0; i < width - x; i++) |
455 | waddch(win, ' '); | 453 | waddch(win, ' '); |
456 | } | 454 | } |