no USED_SOUNDS option parsing bit
If the program is build without USER_SOUNDS and encounters any SOUND or SOUNDDIR directive when parsing the run-time config file it only issues an error message about the first one. When finished parsing, have it include suppressed ones in the count of errors encountered.
This commit is contained in:
@@ -2975,6 +2975,15 @@ config_error_done(void)
|
||||
if (!config_error_data)
|
||||
return 0;
|
||||
n = config_error_data->num_errors;
|
||||
#ifndef USER_SOUNDS
|
||||
if (g.no_sound_notified > 0) {
|
||||
/* no USER_SOUNDS; config_error_add() was called once for first
|
||||
SOUND or SOUNDDIR entry seen, then skipped for any others;
|
||||
include those skipped ones in the total error count */
|
||||
n += (g.no_sound_notified - 1);
|
||||
g.no_sound_notified = 0;
|
||||
}
|
||||
#endif
|
||||
if (n) {
|
||||
pline("\n%d error%s in %s.\n", n, plur(n),
|
||||
*config_error_data->source ? config_error_data->source
|
||||
|
||||
Reference in New Issue
Block a user