X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Futil.h;h=1613e351d077788c73ba86088119f449ebe3f209;hb=24b70d77c3d41a78a5fa78acb0e8ca3edcdd5956;hp=4b75eda2c98001a515101d8a7e9c398250292925;hpb=650997e4865a090b6856c7ca34b02f42994e8e29;p=wimlib diff --git a/src/util.h b/src/util.h index 4b75eda2..1613e351 100644 --- a/src/util.h +++ b/src/util.h @@ -172,7 +172,7 @@ 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__) @@ -243,10 +243,10 @@ extern const tchar * path_stream_name(const tchar *path); static inline void -print_byte_field(const u8 field[], size_t len) +print_byte_field(const u8 field[], size_t len, FILE *out) { while (len--) - tprintf(T("%02hhx"), *field++); + tfprintf(out, T("%02hhx"), *field++); } static inline u32 @@ -279,4 +279,10 @@ wimlib_printf(const tchar *format, ...) FORMAT(printf, 1, 2); extern void zap_backslashes(tchar *s); +static inline u64 +hash_u64(u64 n) +{ + return n * 0x9e37fffffffc0001ULL; +} + #endif /* _WIMLIB_UTIL_H */