diff --git a/libkram/simdjson/simdjson.h b/libkram/simdjson/simdjson.h index 4ad510d3..9588ff55 100644 --- a/libkram/simdjson/simdjson.h +++ b/libkram/simdjson/simdjson.h @@ -27249,7 +27249,7 @@ inline void log_headers() noexcept { printf("|%.*s", 5+2, DASHES); printf("|--------"); printf("|\n"); - fflush(stdout); + // fflush(stdout); } } @@ -27287,7 +27287,7 @@ inline void log_line(const json_iterator &iter, token_position index, depth_t de printf("| %5i ", depth); printf("| %.*s ", int(detail.size()), detail.data()); printf("|\n"); - fflush(stdout); + // fflush(stdout); } } diff --git a/libkram/zstd/zstd.cpp b/libkram/zstd/zstd.cpp index cc07d3c8..a1f2e042 100644 --- a/libkram/zstd/zstd.cpp +++ b/libkram/zstd/zstd.cpp @@ -35865,11 +35865,12 @@ void COVER_dictSelectionFree(COVER_dictSelection_t selection); static int g_displayLevel = 2; #endif #undef DISPLAY -#define DISPLAY(...) \ - { \ - fprintf(stderr, __VA_ARGS__); \ - fflush(stderr); \ - } +#define DISPLAY(fmt, ...) KLOGI("zstd", fmt, ##__VA_ARGS__) +//#define DISPLAY(...) \ +// { \ +// fprintf(stderr, __VA_ARGS__); \ +// fflush(stderr); \ +// } #undef LOCALDISPLAYLEVEL #define LOCALDISPLAYLEVEL(displayLevel, l, ...) \ if (displayLevel >= l) { \ @@ -39095,11 +39096,12 @@ divbwt(const unsigned char *T, unsigned char *U, int *A, int n, unsigned char * static int g_displayLevel = 2; #endif #undef DISPLAY -#define DISPLAY(...) \ - { \ - fprintf(stderr, __VA_ARGS__); \ - fflush(stderr); \ - } +#define DISPLAY(fmt, ...) KLOGI("zstd", fmt, ##__VA_ARGS__) +//#define DISPLAY(...) \ +// { \ +// fprintf(stderr, __VA_ARGS__); \ +// fflush(stderr); \ +// } #undef LOCALDISPLAYLEVEL #define LOCALDISPLAYLEVEL(displayLevel, l, ...) \ if (displayLevel >= l) { \ @@ -39883,7 +39885,8 @@ static const U32 g_selectivity_default = 9; * Console display ***************************************/ #undef DISPLAY -#define DISPLAY(...) { fprintf(stderr, __VA_ARGS__); fflush( stderr ); } +#define DISPLAY(fmt, ...) KLOGI("zstd", fmt, ##__VA_ARGS__) +// #define DISPLAY(...) { fprintf(stderr, __VA_ARGS__); fflush( stderr ); } #undef DISPLAYLEVEL #define DISPLAYLEVEL(l, ...) if (notificationLevel>=l) { DISPLAY(__VA_ARGS__); } /* 0 : no display; 1: errors; 2: default; 3: details; 4: debug */ @@ -40348,7 +40351,7 @@ static size_t ZDICT_trainBuffer_legacy(dictItem* dictList, U32 dictListSize, # define DISPLAYUPDATE(l, ...) if (notificationLevel>=l) { \ if (ZDICT_clockSpan(displayClock) > refreshRate) \ { displayClock = clock(); DISPLAY(__VA_ARGS__); \ - if (notificationLevel>=4) fflush(stderr); } } + } } /* init */ DISPLAYLEVEL(2, "\r%70s\r", ""); /* clean display line */