return name;
}
+void conf_reset(void)
+{
+ struct symbol *sym;
+ int i;
+
+ for_all_symbols(i, sym) {
+ sym->flags |= SYMBOL_NEW | SYMBOL_CHANGED;
+ if (sym_is_choice(sym))
+ sym->flags &= ~SYMBOL_NEW;
+ sym->flags &= ~SYMBOL_VALID;
+ switch (sym->type) {
+ case S_INT:
+ case S_HEX:
+ case S_STRING:
+ if (sym->user.val)
+ free(sym->user.val);
+ default:
+ sym->user.val = NULL;
+ sym->user.tri = no;
+ }
+ }
+}
+
int conf_read_simple(const char *name)
{
FILE *in = NULL;
/* confdata.c */
P(conf_parse,void,(const char *name));
P(conf_read,int,(const char *name));
+P(conf_reset,void,(void));
P(conf_read_simple,int,(const char *name));
P(conf_write,int,(const char *name));
if (menu == &rootmenu) {
cprint(":");
cprint("--- ");
+ cprint("D");
+ cprint(_(" Reset to defaults"));
cprint("L");
cprint(_(" Load an Alternate Configuration File"));
cprint("S");
case 's':
conf_string(submenu);
break;
+ case 'D':
+ conf_reset();
+ break;
case 'L':
conf_load();
break;