Turn options into ordinary econfig keys:

(configkeys): Add options.
(KM_OPTION): New.
(vers): Find options in configkeys[] instead of Options[].
(xdump): Remove xdump opt syntax.
(xdopt): Remove.
(emp_config, print_config): Remove option special case.
(option_list, Options, setoption): Remove.
This commit is contained in:
Markus Armbruster 2005-12-25 10:32:50 +00:00
parent 373a08a0e0
commit ade510f787
7 changed files with 86 additions and 173 deletions

View file

@ -177,21 +177,24 @@ show_opts(int val)
{
int col;
char *sep;
struct option_list *op;
struct keymatch *kp;
sep = "";
col = 0;
for (op = Options; op->opt_key; op++) {
if (!*op->opt_valuep != !val)
for (kp = configkeys; kp->km_key; kp++) {
if (!(kp->km_flags & KM_OPTION))
continue;
col += strlen(sep) + strlen(op->opt_key);
if (CANT_HAPPEN(kp->km_type != NSC_INT))
continue;
if (!*(int *)kp->km_data != !val)
continue;
col += strlen(sep) + strlen(kp->km_key);
if (col > 70) {
pr(",\n ");
sep = "";
col = strlen(op->opt_key);
col = strlen(kp->km_key);
}
pr("%s%s", sep, op->opt_key);
pr("%s%s", sep, kp->km_key);
sep = ", ";
}