Commit e067e1f9 authored by Sam Ravnborg's avatar Sam Ravnborg

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: default avatarSam Ravnborg <sam@ravnborg.org>
parent 59d3cf7a
...@@ -70,7 +70,7 @@ static void do_print_item(WINDOW * win, const char *item, int choice, ...@@ -70,7 +70,7 @@ static void do_print_item(WINDOW * win, const char *item, int choice,
int j; int j;
char *menu_item = malloc(menu_width + 1); 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; menu_item[menu_width] = 0;
j = first_alpha(menu_item, "YyNnMmHh"); j = first_alpha(menu_item, "YyNnMmHh");
...@@ -184,8 +184,8 @@ int dialog_menu(const char *title, const char *prompt, int height, int width, ...@@ -184,8 +184,8 @@ int dialog_menu(const char *title, const char *prompt, int height, int width,
const char *const *items) const char *const *items)
{ {
int i, j, x, y, box_x, box_y; int i, j, x, y, box_x, box_y;
int key = 0, button = 0, scroll = 0, choice = 0, first_item = int key = 0, button = 0, scroll = 0, choice = 0;
0, max_choice; int first_item = 0, max_choice;
WINDOW *dialog, *menu; WINDOW *dialog, *menu;
FILE *f; FILE *f;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment