Skip to content

Commit

Permalink
kconfig: truncate too long menu lines in menuconfig
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sam Ravnborg committed Nov 21, 2005
1 parent 59d3cf7 commit e067e1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/lxdialog/menubox.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit e067e1f

Please sign in to comment.