]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - scripts/kconfig/mconf.c
kconfig: comment typo in scripts/kconfig/Makefile.
[linux-2.6-omap-h63xx.git] / scripts / kconfig / mconf.c
index 462256d72baa9965c3521e00265b1a1054f9b78f..47e226fdedd7c8564447c76ab2481dd0ee608a44 100644 (file)
@@ -35,9 +35,13 @@ static const char mconf_readme[] = N_(
 "kernel parameters which are not really features, but must be\n"
 "entered in as decimal or hexadecimal numbers or possibly text.\n"
 "\n"
-"Menu items beginning with [*], <M> or [ ] represent features\n"
-"configured to be built in, modularized or removed respectively.\n"
-"Pointed brackets <> represent module capable features.\n"
+"Menu items beginning with following braces represent features that\n"
+"  [ ] can be built in or removed\n"
+"  < > can be built in, modularized or removed\n"
+"  { } can be built in or modularized (selected by other feature)\n"
+"  - - are selected by other feature,\n"
+"while *, M or whitespace inside braces means to build in, build as\n"
+"a module or to exclude the feature respectively.\n"
 "\n"
 "To change any of these features, highlight it with the cursor\n"
 "keys and press <Y> to build it in, <M> to make it a module or\n"
@@ -357,8 +361,9 @@ static void get_symbol_str(struct gstr *r, struct symbol *sym)
        bool hit;
        struct property *prop;
 
-       str_printf(r, "Symbol: %s [=%s]\n", sym->name,
-                                      sym_get_string_value(sym));
+       if (sym && sym->name)
+               str_printf(r, "Symbol: %s [=%s]\n", sym->name,
+                                                   sym_get_string_value(sym));
        for_all_prompts(sym, prop)
                get_prompt_str(r, prop);
        hit = false;
@@ -419,11 +424,13 @@ static void search_conf(void)
 {
        struct symbol **sym_arr;
        struct gstr res;
+       char *dialog_input;
        int dres;
 again:
        dialog_clear();
        dres = dialog_inputbox(_("Search Configuration Parameter"),
-                             _("Enter CONFIG_ (sub)string to search for (omit CONFIG_)"),
+                             _("Enter CONFIG_ (sub)string to search for "
+                               "(with or without \"CONFIG\")"),
                              10, 75, "");
        switch (dres) {
        case 0:
@@ -435,7 +442,12 @@ again:
                return;
        }
 
-       sym_arr = sym_re_search(dialog_input_result);
+       /* strip CONFIG_ if necessary */
+       dialog_input = dialog_input_result;
+       if (strncasecmp(dialog_input_result, "CONFIG_", 7) == 0)
+               dialog_input += 7;
+
+       sym_arr = sym_re_search(dialog_input);
        res = get_relations_str(sym_arr);
        free(sym_arr);
        show_textbox(_("Search Results"), str_get(&res), 0, 0);
@@ -474,6 +486,14 @@ static void build_conf(struct menu *menu)
                                if (single_menu_mode && menu->data)
                                        goto conf_childs;
                                return;
+                       case P_COMMENT:
+                               if (prompt) {
+                                       child_count++;
+                                       item_make("   %*c*** %s ***", indent + 1, ' ', prompt);
+                                       item_set_tag(':');
+                                       item_set_data(menu);
+                               }
+                               break;
                        default:
                                if (prompt) {
                                        child_count++;
@@ -553,7 +573,7 @@ static void build_conf(struct menu *menu)
                                if (sym_is_changable(sym))
                                        item_make("[%c]", val == no ? ' ' : '*');
                                else
-                                       item_make("---");
+                                       item_make("-%c-", val == no ? ' ' : '*');
                                item_set_tag('t');
                                item_set_data(menu);
                                break;
@@ -563,10 +583,13 @@ static void build_conf(struct menu *menu)
                                case mod: ch = 'M'; break;
                                default:  ch = ' '; break;
                                }
-                               if (sym_is_changable(sym))
-                                       item_make("<%c>", ch);
-                               else
-                                       item_make("---");
+                               if (sym_is_changable(sym)) {
+                                       if (sym->rev_dep.tri == mod)
+                                               item_make("{%c}", ch);
+                                       else
+                                               item_make("<%c>", ch);
+                               } else
+                                       item_make("-%c-", ch);
                                item_set_tag('t');
                                item_set_data(menu);
                                break;
@@ -718,11 +741,11 @@ static void show_help(struct menu *menu)
        struct gstr help = str_new();
        struct symbol *sym = menu->sym;
 
-       if (sym->help)
+       if (menu_has_help(menu))
        {
                if (sym->name) {
                        str_printf(&help, "CONFIG_%s:\n\n", sym->name);
-                       str_append(&help, _(sym->help));
+                       str_append(&help, _(menu_get_help(menu)));
                        str_append(&help, "\n");
                }
        } else {
@@ -905,7 +928,7 @@ int main(int ac, char **av)
        init_wsize();
        reset_dialog();
        init_dialog(NULL);
-       set_config_filename(".config");
+       set_config_filename(conf_get_configname());
        do {
                conf(&rootmenu);
                dialog_clear();