build: scripts/config - update to kconfig-v6.6.16
The main goal here is to keep this close to upstream. Changes include: - allow symbols implied by y to become m - make 'imply' obey the direct dependency - allow only 'config', 'comment', and 'if' inside 'choice' - qconf: make search fully work again on split mode - qconf: navigate menus on hyperlinks - remove '---help---' support - qconf: allow to edit "int", "hex", "string" menus in-place - qconf: drop Qt4 support - nconf: fix core dump when searching in empty menu - nconf: stop endless search loops - Create links to main menu items in search - fix segmentation fault in menuconfig search - nconf: Add search jump feature - port qconf to work with Qt6 in addition to Qt5 - fix possible buffer overflow - fix memory leak from range properties Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
This commit is contained in:
committed by
Robert Marko
parent
ff6df9ac9f
commit
65a3eb28d5
@@ -661,11 +661,6 @@ const char *menu_get_prompt(struct menu *menu)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct menu *menu_get_root_menu(struct menu *menu)
|
||||
{
|
||||
return &rootmenu;
|
||||
}
|
||||
|
||||
struct menu *menu_get_parent_menu(struct menu *menu)
|
||||
{
|
||||
enum prop_type type;
|
||||
@@ -706,6 +701,11 @@ static void get_dep_str(struct gstr *r, struct expr *expr, const char *prefix)
|
||||
}
|
||||
}
|
||||
|
||||
int __attribute__((weak)) get_jump_key_char(void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void get_prompt_str(struct gstr *r, struct property *prop,
|
||||
struct list_head *head)
|
||||
{
|
||||
@@ -727,52 +727,41 @@ static void get_prompt_str(struct gstr *r, struct property *prop,
|
||||
if (!expr_eq(prop->menu->dep, prop->visible.expr))
|
||||
get_dep_str(r, prop->visible.expr, " Visible if: ");
|
||||
|
||||
menu = prop->menu->parent;
|
||||
menu = prop->menu;
|
||||
for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) {
|
||||
bool accessible = menu_is_visible(menu);
|
||||
|
||||
submenu[i++] = menu;
|
||||
if (location == NULL && accessible)
|
||||
if (location == NULL && menu_is_visible(menu))
|
||||
location = menu;
|
||||
}
|
||||
if (head && location) {
|
||||
jump = xmalloc(sizeof(struct jump_key));
|
||||
|
||||
if (menu_is_visible(prop->menu)) {
|
||||
/*
|
||||
* There is not enough room to put the hint at the
|
||||
* beginning of the "Prompt" line. Put the hint on the
|
||||
* last "Location" line even when it would belong on
|
||||
* the former.
|
||||
*/
|
||||
jump->target = prop->menu;
|
||||
} else
|
||||
jump->target = location;
|
||||
|
||||
if (list_empty(head))
|
||||
jump->index = 0;
|
||||
else
|
||||
jump->index = list_entry(head->prev, struct jump_key,
|
||||
entries)->index + 1;
|
||||
|
||||
jump->target = location;
|
||||
list_add_tail(&jump->entries, head);
|
||||
}
|
||||
|
||||
if (i > 0) {
|
||||
str_printf(r, " Location:\n");
|
||||
for (j = 4; --i >= 0; j += 2) {
|
||||
menu = submenu[i];
|
||||
if (jump && menu == location)
|
||||
jump->offset = strlen(r->s);
|
||||
str_printf(r, "%*c-> %s", j, ' ',
|
||||
menu_get_prompt(menu));
|
||||
if (menu->sym) {
|
||||
str_printf(r, " (%s [=%s])", menu->sym->name ?
|
||||
menu->sym->name : "<choice>",
|
||||
sym_get_string_value(menu->sym));
|
||||
}
|
||||
str_append(r, "\n");
|
||||
str_printf(r, " Location:\n");
|
||||
for (j = 0; --i >= 0; j++) {
|
||||
int jk = -1;
|
||||
int indent = 2 * j + 4;
|
||||
|
||||
menu = submenu[i];
|
||||
if (jump && menu == location) {
|
||||
jump->offset = strlen(r->s);
|
||||
jk = get_jump_key_char();
|
||||
}
|
||||
|
||||
if (jk >= 0) {
|
||||
str_printf(r, "(%c)", jk);
|
||||
indent -= 3;
|
||||
}
|
||||
|
||||
str_printf(r, "%*c-> %s", indent, ' ', menu_get_prompt(menu));
|
||||
if (menu->sym) {
|
||||
str_printf(r, " (%s [=%s])", menu->sym->name ?
|
||||
menu->sym->name : "<choice>",
|
||||
sym_get_string_value(menu->sym));
|
||||
}
|
||||
str_append(r, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user