X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=deps%2Flibchdr%2Fdeps%2Fzstd-1.5.6%2Flib%2FdictBuilder%2Fzdict.c;fp=deps%2Flibchdr%2Fdeps%2Fzstd-1.5.5%2Flib%2FdictBuilder%2Fzdict.c;h=82e999e80e37643e278f45026228fe004fbc4b50;hb=f535537faaef474f7d31e50949eea1f15a58ee09;hp=58290f450d6fcbe730f8cbcb056d4456b30fc960;hpb=db02598e737b8d50cd347fe2ef13cb85ade051dd;p=pcsx_rearmed.git diff --git a/deps/libchdr/deps/zstd-1.5.5/lib/dictBuilder/zdict.c b/deps/libchdr/deps/zstd-1.5.6/lib/dictBuilder/zdict.c similarity index 97% rename from deps/libchdr/deps/zstd-1.5.5/lib/dictBuilder/zdict.c rename to deps/libchdr/deps/zstd-1.5.6/lib/dictBuilder/zdict.c index 58290f45..82e999e8 100644 --- a/deps/libchdr/deps/zstd-1.5.5/lib/dictBuilder/zdict.c +++ b/deps/libchdr/deps/zstd-1.5.6/lib/dictBuilder/zdict.c @@ -74,9 +74,9 @@ static const U32 g_selectivity_default = 9; * Console display ***************************************/ #undef DISPLAY -#define DISPLAY(...) { fprintf(stderr, __VA_ARGS__); fflush( stderr ); } +#define DISPLAY(...) do { fprintf(stderr, __VA_ARGS__); fflush( stderr ); } while (0) #undef DISPLAYLEVEL -#define DISPLAYLEVEL(l, ...) if (notificationLevel>=l) { DISPLAY(__VA_ARGS__); } /* 0 : no display; 1: errors; 2: default; 3: details; 4: debug */ +#define DISPLAYLEVEL(l, ...) do { if (notificationLevel>=l) { DISPLAY(__VA_ARGS__); } } while (0) /* 0 : no display; 1: errors; 2: default; 3: details; 4: debug */ static clock_t ZDICT_clockSpan(clock_t nPrevious) { return clock() - nPrevious; } @@ -477,10 +477,16 @@ static size_t ZDICT_trainBuffer_legacy(dictItem* dictList, U32 dictListSize, clock_t const refreshRate = CLOCKS_PER_SEC * 3 / 10; # undef DISPLAYUPDATE -# define DISPLAYUPDATE(l, ...) if (notificationLevel>=l) { \ - if (ZDICT_clockSpan(displayClock) > refreshRate) \ - { displayClock = clock(); DISPLAY(__VA_ARGS__); \ - if (notificationLevel>=4) fflush(stderr); } } +# define DISPLAYUPDATE(l, ...) \ + do { \ + if (notificationLevel>=l) { \ + if (ZDICT_clockSpan(displayClock) > refreshRate) { \ + displayClock = clock(); \ + DISPLAY(__VA_ARGS__); \ + } \ + if (notificationLevel>=4) fflush(stderr); \ + } \ + } while (0) /* init */ DISPLAYLEVEL(2, "\r%70s\r", ""); /* clean display line */