]> wimlib.net Git - wimlib/blobdiff - include/wimlib/error.h
Add wimlib_get_compressor_needed_memory()
[wimlib] / include / wimlib / error.h
index 7e0a7cedbe025ec106a7a84cec6297940012ae90..522264021d3089bf80614c1a1000abc4f4067b60 100644 (file)
@@ -42,10 +42,12 @@ extern void
 wimlib_warning_with_errno(const tchar *format, ...)
                _format_attribute(printf, 1, 2) _cold_attribute;
 #  define ERROR(format, ...)                   wimlib_error(T(format), ## __VA_ARGS__)
-#  define ERROR_WITH_ERRNO(format, ...)        wimlib_error_with_errno(T(format), ## __VA_ARGS__)
+#  define ERROR_WITH_ERRNO(format, ...)                wimlib_error_with_errno(T(format), ## __VA_ARGS__)
 #  define WARNING(format, ...)                 wimlib_warning(T(format), ## __VA_ARGS__)
 #  define WARNING_WITH_ERRNO(format, ...)      wimlib_warning_with_errno(T(format), ## __VA_ARGS__)
+extern bool wimlib_print_errors;
 #else /* ENABLE_ERROR_MESSAGES */
+#  define wimlib_print_errors 0
 #  define ERROR(format, ...)                   dummy_tprintf(T(format), ## __VA_ARGS__)
 #  define ERROR_WITH_ERRNO(format, ...)                dummy_tprintf(T(format), ## __VA_ARGS__)
 #  define WARNING(format, ...)                 dummy_tprintf(T(format), ## __VA_ARGS__)
@@ -60,21 +62,16 @@ wimlib_warning_with_errno(const tchar *format, ...)
 #  define ENABLE_ASSERTIONS 1
 #endif
 
+
 #ifdef ENABLE_DEBUG
 extern void
 wimlib_debug(const tchar *file, int line, const char *func,
             const tchar *format, ...);
 #  define DEBUG(format, ...) \
-               wimlib_debug(T(__FILE__), __LINE__, __func__, T(format), ## __VA_ARGS__)
+               wimlib_debug(T(__FILE__), __LINE__, __func__, T(format), ## __VA_ARGS__)
 
 #else
 #  define DEBUG(format, ...) dummy_tprintf(T(format), ## __VA_ARGS__)
 #endif /* !ENABLE_DEBUG */
 
-#ifdef ENABLE_MORE_DEBUG
-#  define DEBUG2(format, ...) DEBUG(format, ## __VA_ARGS__)
-#else
-#  define DEBUG2(format, ...) dummy_tprintf(T(format), ## __VA_ARGS__)
-#endif /* !ENABLE_MORE_DEBUG */
-
 #endif /* _WIMLIB_ERROR_H */