X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Ferror.c;h=6e04a06ae1cd94f125307502844c9cdce437fa1e;hp=ed9e6b72be56772f444c58932c79054e888370d9;hb=d31b2fee211b1c31420bafe1c2379f6f89bd92fe;hpb=5fce6aa92826ec69fdeeea13e28292fa1fbb43a8 diff --git a/src/error.c b/src/error.c index ed9e6b72..6e04a06a 100644 --- a/src/error.c +++ b/src/error.c @@ -49,16 +49,12 @@ bool wimlib_print_errors = false; FILE *wimlib_error_file = NULL; /* Set in wimlib_global_init() */ static bool wimlib_owns_error_file = false; -#endif -#if defined(ENABLE_ERROR_MESSAGES) || defined(ENABLE_DEBUG) static void wimlib_vmsg(const tchar *tag, const tchar *format, va_list va, bool perror) { -#ifndef ENABLE_DEBUG if (!wimlib_print_errors) return; -#endif int errno_save = errno; fflush(stdout); tfputs(tag, wimlib_error_file); @@ -82,9 +78,7 @@ wimlib_vmsg(const tchar *tag, const tchar *format, va_list va, bool perror) fflush(wimlib_error_file); errno = errno_save; } -#endif -#ifdef ENABLE_ERROR_MESSAGES void wimlib_error(const tchar *format, ...) { @@ -124,22 +118,7 @@ wimlib_warning_with_errno(const tchar *format, ...) wimlib_vmsg(T("\r[WARNING] "), format, va, true); va_end(va); } - -#endif - -#ifdef ENABLE_DEBUG -void wimlib_debug(const tchar *filename, int line, const char *func, - const tchar *format, ...) -{ - va_list va; - tchar buf[tstrlen(filename) + strlen(func) + 30]; - - tsprintf(buf, T("[%"TS" %d] %s(): "), filename, line, func); - va_start(va, format); - wimlib_vmsg(buf, format, va, false); - va_end(va); -} -#endif +#endif /* ENABLE_ERROR_MESSAGES */ void print_byte_field(const u8 *field, size_t len, FILE *out)