E void NDECL(free_autopickup_exceptions);
E int FDECL(load_symset, (const char *, int));
E void NDECL(free_symsets);
-E void FDECL(parsesymbols, (char *));
+E boolean FDECL(parsesymbols, (char *));
E struct symparse *FDECL(match_sym, (char *));
E void NDECL(set_playmode);
E int FDECL(sym_val, (char *));
}
}
+ /* Is it a symbol? */
+ if (strstr(opts, "S_") == opts && parsesymbols(opts)) {
+ switch_symbols(TRUE);
+ return;
+ }
+
/* out of valid options */
badoption(opts);
}
}
/* Parse the value of a SYMBOLS line from a config file */
-void
+boolean
parsesymbols(opts)
register char *opts;
{
if ((op = index(opts, ',')) != 0) {
*op++ = 0;
- parsesymbols(op);
+ if (!parsesymbols(op)) return FALSE;
}
/* S_sample:string */
if (!strval)
strval = index(opts, '=');
if (!strval)
- return;
+ return FALSE;
*strval++ = '\0';
/* strip leading and trailing white space from symname and strval */
symp = match_sym(symname);
if (!symp)
- return;
+ return FALSE;
if (symp->range && symp->range != SYM_CONTROL) {
val = sym_val(strval);
update_l_symset(symp, val);
}
+ return TRUE;
}
struct symparse *