summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.ravnborg.org>2005-11-22 00:59:32 +0300
committerSam Ravnborg <sam@mars.ravnborg.org>2005-11-22 00:59:32 +0300
commite067e1f98d54d62fd598126f95e7684e5b63e67f (patch)
treeaf41d76e7a2a400237d4a9a33b07841385b1120f /scripts
parent59d3cf7a40dfdbb8e86758ade172831c19630050 (diff)
downloadlinux-e067e1f98d54d62fd598126f95e7684e5b63e67f.tar.xz
kconfig: truncate too long menu lines in menuconfig
menu lines wrapped over too lines when too long - truncate them. Also fixed a coding style issue Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lxdialog/menubox.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lxdialog/menubox.c b/scripts/lxdialog/menubox.c
index d0bf32b34090..2d91880825ed 100644
--- a/scripts/lxdialog/menubox.c
+++ b/scripts/lxdialog/menubox.c
@@ -70,7 +70,7 @@ static void do_print_item(WINDOW * win, const char *item, int choice,
int j;
char *menu_item = malloc(menu_width + 1);
- strncpy(menu_item, item, menu_width);
+ strncpy(menu_item, item, menu_width - ITEM_IDENT);
menu_item[menu_width] = 0;
j = first_alpha(menu_item, "YyNnMmHh");
@@ -184,8 +184,8 @@ int dialog_menu(const char *title, const char *prompt, int height, int width,
const char *const *items)
{
int i, j, x, y, box_x, box_y;
- int key = 0, button = 0, scroll = 0, choice = 0, first_item =
- 0, max_choice;
+ int key = 0, button = 0, scroll = 0, choice = 0;
+ int first_item = 0, max_choice;
WINDOW *dialog, *menu;
FILE *f;