for (i = 0; i < MAXOCLASSES; i++)
oc_syms[i] = l_oc_syms[i];
-#ifdef PC9800
+# ifdef PC9800
if (SYMHANDLING(H_IBM)
&& ibmgraphics_mode_callback)
(*ibmgraphics_mode_callback)();
else if (!symset[currentgraphics] && ascgraphics_mode_callback)
(*ascgraphics_mode_callback)();
-#endif
-#ifdef TERMLIB
+# endif
+# ifdef TERMLIB
if (SYMHANDLING(H_DEC)
&& decgraphics_mode_callback)
(*decgraphics_mode_callback)();
-#endif
+# endif
} else
#endif
init_symbols();
symset[ROGUESET] = (char *)alloc(strlen(op) + 1);
Strcpy(symset[ROGUESET], op);
if (!read_sym_file(ROGUESET)) {
- badoption(opts);
free((char *)symset[ROGUESET]);
symset[ROGUESET] = (char *)0;
+ raw_printf("Unable to load symbol set \"%s\" from \"%s\".",
+ op, SYMBOLS);
+ wait_synch();
} else {
if (!initial && Is_rogue_level(&u.uz))
assign_graphics(ROGUESET);
symset[PRIMARY] = (char *)alloc(strlen(op) + 1);
Strcpy(symset[PRIMARY], op);
if (!read_sym_file(PRIMARY)) {
- badoption(opts);
free((char *)symset[PRIMARY]);
symset[PRIMARY] = (char *)0;
+ raw_printf("Unable to load symbol set \"%s\" from \"%s\".",
+ op, SYMBOLS);
+ wait_synch();
} else {
switch_symbols(TRUE);
need_redraw = TRUE;
menu_item *symset_pick = (menu_item *)0;
boolean rogueflag = (*optname == 'r');
char *symset_name;
- int chosen = -2, which_set =
+ int chosen = -2, res, which_set =
#ifdef REINCARNATION
rogueflag ? ROGUESET :
#endif
symset_name = symset[which_set];
symset[which_set] = (char *)0;
- if (read_sym_file(which_set) && symset_list) {
+ res = read_sym_file(which_set);
+ if (res && symset_list) {
int let = 'a';
struct textlist *sl;
tmpwin = create_nhwindow(NHW_MENU);
symset_list = sl->next;
}
symset_list = (struct textlist *)0;
+ } else if (!res) {
+ /* The symbols file could not be accessed */
+ pline("Unable to access \"%s\" file.", SYMBOLS);
+ return TRUE;
+ } else if (!symset_list) {
+ /* The symbols file was empty */
+ pline("There were no symbol sets found in \"%s\".",
+ SYMBOLS);
+ return TRUE;
}
-
/* these set default symbols and clear the handling value */
# ifdef REINCARNATION
if(rogueflag) init_r_symbols();
else {
free((genericptr_t)symset[which_set]);
symset[which_set] = (char *)0;
- return 0;
+ return TRUE;
}
}