@@ -158,8 +158,11 @@ static int conf_sym(struct menu *menu)
struct symbol *sym = menu->sym;
int type;
tristate oldval, newval;
+ char *p;
while (1) {
+ if (sym->remark)
+ printf("Remark: %s\n", sym->remark);
printf("%*s%s ", indent - 1, "", _(menu->prompt->text));
if (sym->name)
printf("(%s) ", sym->name);
@@ -214,6 +217,8 @@ static int conf_sym(struct menu *menu)
break;
case '?':
goto help;
+ case '<':
+ goto remark;
default:
continue;
}
@@ -221,6 +226,20 @@ static int conf_sym(struct menu *menu)
return 0;
help:
print_help(menu);
+ continue;
+remark:
+ if (sym->remark)
+ printf("Current Remark: %s\n", sym->remark);
+ printf(" New remark: ");
+ fgets(line, sizeof(line), stdin);
+
+ if ((p = strchr(line, '\n')))
+ *p = '\0'; /* no \n in remark */
+ if (line[0]) {
+ if (sym->remark)
+ free(sym->remark);
+ sym->remark = strdup(line);
+ }
}
}