mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Make nbErrors not extern
This commit is contained in:
@@ -125,6 +125,19 @@ void fatal(char const *fmt, ...) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void forceError() {
|
||||
if (nbErrors == 0) {
|
||||
nbErrors = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void requireZeroErrors() {
|
||||
if (nbErrors != 0) {
|
||||
fprintf(stderr, "Assembly aborted with %u error%s!\n", nbErrors, nbErrors == 1 ? "" : "s");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
void warning(WarningID id, char const *fmt, ...) {
|
||||
char const *flag = warnings.warningFlags[id].name;
|
||||
va_list args;
|
||||
|
||||
Reference in New Issue
Block a user