mirror of
https://github.com/thepigeongenerator/sdl_template.git
synced 2025-12-19 10:15:45 +01:00
rename 'error' to 'fatal', add 'error' which just logs
mainly because we sometimes would like to just write an error without terminating the program
This commit is contained in:
@@ -49,7 +49,13 @@ void warn(char const* fmt, ...) {
|
||||
(void)fprintf(stderr, "\033[93mW: %s\033[0m\n", buf);
|
||||
}
|
||||
|
||||
noreturn void error(gamestatus error_code, char const* fname, uint32_t ln, char const* fmt, ...) {
|
||||
void error(char const* fmt, ...) {
|
||||
char buf[PRINT_BUFFER_SIZE] = {0};
|
||||
write_args(buf, fmt);
|
||||
(void)fprintf(stderr, "\033[mW: %s\033[0m", buf);
|
||||
}
|
||||
|
||||
noreturn void fatal(gamestatus error_code, char const* fname, uint32_t ln, char const* fmt, ...) {
|
||||
char buf1[PRINT_BUFFER_SIZE] = {0};
|
||||
write_args(buf1, fmt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user