1 #ifndef _WIMLIB_ERROR_H
2 #define _WIMLIB_ERROR_H
6 #include "wimlib.h" /* Get error code definitions */
7 #include "wimlib/compiler.h"
8 #include "wimlib/types.h"
11 wimlib_error(const tchar *format, ...)
12 _format_attribute(printf, 1, 2) _cold_attribute;
15 wimlib_error_with_errno(const tchar *format, ...)
16 _format_attribute(printf, 1, 2) _cold_attribute;
19 wimlib_warning(const tchar *format, ...)
20 _format_attribute(printf, 1, 2) _cold_attribute;
23 wimlib_warning_with_errno(const tchar *format, ...)
24 _format_attribute(printf, 1, 2) _cold_attribute;
26 #define ERROR(format, ...) wimlib_error(T(format), ## __VA_ARGS__)
27 #define ERROR_WITH_ERRNO(format, ...) wimlib_error_with_errno(T(format), ## __VA_ARGS__)
28 #define WARNING(format, ...) wimlib_warning(T(format), ## __VA_ARGS__)
29 #define WARNING_WITH_ERRNO(format, ...) wimlib_warning_with_errno(T(format), ## __VA_ARGS__)
31 extern bool wimlib_print_errors;
32 extern FILE *wimlib_error_file;
35 print_byte_field(const u8 *field, size_t len, FILE *out);
37 #endif /* _WIMLIB_ERROR_H */