]> wimlib.net Git - wimlib/blob - include/wimlib/error.h
Remove some unnecessary configure options
[wimlib] / include / wimlib / error.h
1 #ifndef _WIMLIB_ERROR_H
2 #define _WIMLIB_ERROR_H
3
4 #include <stdio.h>
5
6 #include "wimlib.h" /* Get error code definitions */
7 #include "wimlib/compiler.h"
8 #include "wimlib/types.h"
9
10 static inline int _format_attribute(printf, 1, 2)
11 dummy_tprintf(const tchar *format, ...)
12 {
13         return 0;
14 }
15
16 extern void
17 wimlib_error(const tchar *format, ...)
18         _format_attribute(printf, 1, 2) _cold_attribute;
19
20 extern void
21 wimlib_error_with_errno(const tchar *format, ...)
22                 _format_attribute(printf, 1, 2) _cold_attribute;
23
24 extern void
25 wimlib_warning(const tchar *format, ...)
26                 _format_attribute(printf, 1, 2) _cold_attribute;
27
28 extern void
29 wimlib_warning_with_errno(const tchar *format, ...)
30                 _format_attribute(printf, 1, 2) _cold_attribute;
31 #  define ERROR(format, ...)                    wimlib_error(T(format), ## __VA_ARGS__)
32 #  define ERROR_WITH_ERRNO(format, ...)         wimlib_error_with_errno(T(format), ## __VA_ARGS__)
33 #  define WARNING(format, ...)                  wimlib_warning(T(format), ## __VA_ARGS__)
34 #  define WARNING_WITH_ERRNO(format, ...)       wimlib_warning_with_errno(T(format), ## __VA_ARGS__)
35 extern bool wimlib_print_errors;
36 extern FILE *wimlib_error_file;
37
38 extern void
39 print_byte_field(const u8 *field, size_t len, FILE *out);
40
41 #endif /* _WIMLIB_ERROR_H */