From 309749f0db010a9a5b3405a8ac9371886c727df3 Mon Sep 17 00:00:00 2001 From: Connor Date: Tue, 16 May 2017 21:02:45 -0700 Subject: [PATCH] --- wc3hash.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/wc3hash.c b/wc3hash.c index 5db4d00..163e89e 100644 --- a/wc3hash.c +++ b/wc3hash.c @@ -1,17 +1,8 @@ -#ifdef _WIN64 -#define FMT64 "%016I64X" -#else -#ifdef __unix -#define FMT64 "%016lX" -#else -#define FMT64 "%016llX" -#endif -#endif - #include #include #include #include +#include typedef uint8_t u8; typedef uint32_t u32; @@ -77,14 +68,14 @@ int main(int argc, char **argv) { if (argc == 1) { const char str[] = "IseeDeadPeople"; u64 hash = wc3hashC(str); - fprintf(stderr, FMT64 " should equal 701EA16D47F385FC\n", hash); + fprintf(stderr, "%" PRIX64 " should equal 701EA16D47F385FC\n", hash); return hash != 0x701EA16D47F385FC; } for (int i = 1; i < argc; i++) { u64 hash = wc3hashC(argv[i]); u32 hash32 = (hash >> 32) ^ hash; - printf(FMT64 "\t%08X\n", hash, hash32); + printf("%" PRIX64 "\t%08X\n", hash, hash32); } return 0; }