Change g_displayLevel to int and fix DISPLAYUPDATE flush

This commit is contained in:
Sean Purcell
2017-03-23 11:21:59 -07:00
parent dfc75f74da
commit 042ba122ae
10 changed files with 36 additions and 38 deletions
-2
View File
@@ -59,8 +59,6 @@ static int g_displayLevel = 2;
if ((clock() - g_time > refreshRate) || (displayLevel >= 4)) { \
g_time = clock(); \
DISPLAY(__VA_ARGS__); \
if (displayLevel >= 4) \
fflush(stdout); \
} \
}
#define DISPLAYUPDATE(l, ...) LOCALDISPLAYUPDATE(g_displayLevel, l, __VA_ARGS__)
+1 -1
View File
@@ -480,7 +480,7 @@ static size_t ZDICT_trainBuffer(dictItem* dictList, U32 dictListSize,
# define DISPLAYUPDATE(l, ...) if (notificationLevel>=l) { \
if (ZDICT_clockSpan(displayClock) > refreshRate) \
{ displayClock = clock(); DISPLAY(__VA_ARGS__); \
if (notificationLevel>=4) fflush(stdout); } }
if (notificationLevel>=4) fflush(stderr); } }
/* init */
DISPLAYLEVEL(2, "\r%70s\r", ""); /* clean display line */