X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib%2Ferror.h;h=e584c7b9cd23e885e96d71289fe66c535898e9e6;hp=a36f8028c0ffde1100d4e9366ce36c50c0a45f52;hb=f1c07e953597e3f6a809d35d7d5160af1ff67ed3;hpb=edf0f7f5331e626b55819dcafa88e202cdb82a32 diff --git a/include/wimlib/error.h b/include/wimlib/error.h index a36f8028..e584c7b9 100644 --- a/include/wimlib/error.h +++ b/include/wimlib/error.h @@ -1,12 +1,12 @@ #ifndef _WIMLIB_ERROR_H #define _WIMLIB_ERROR_H +#include + #include "wimlib.h" /* Get error code definitions */ #include "wimlib/compiler.h" #include "wimlib/types.h" -#include - static inline int _format_attribute(printf, 1, 2) dummy_tprintf(const tchar *format, ...) { @@ -34,8 +34,10 @@ wimlib_warning_with_errno(const tchar *format, ...) # 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; +extern FILE *wimlib_error_file; #else /* ENABLE_ERROR_MESSAGES */ # define wimlib_print_errors 0 +# define wimlib_error_file NULL # 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__) @@ -62,4 +64,7 @@ wimlib_debug(const tchar *file, int line, const char *func, # define DEBUG(format, ...) dummy_tprintf(T(format), ## __VA_ARGS__) #endif /* !ENABLE_DEBUG */ +extern void +print_byte_field(const u8 *field, size_t len, FILE *out); + #endif /* _WIMLIB_ERROR_H */