aboutsummaryrefslogtreecommitdiffstats
path: root/src/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.h')
-rw-r--r--src/log.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/log.h b/src/log.h
index ccb407a07..3bda616b6 100644
--- a/src/log.h
+++ b/src/log.h
@@ -28,6 +28,7 @@
#define LOG_LEVEL_DEBUG 2
extern int logLevel;
+extern short warningFlushed;
#define ERROR(...) myfprintf(stderr, __VA_ARGS__)
@@ -40,7 +41,15 @@ extern int logLevel;
#define DEBUG(...) if(logLevel>=LOG_LEVEL_DEBUG) \
myfprintf(stdout, __VA_ARGS__)
+#define WARNING(...) { \
+ if(warningFlushed) myfprintf(stderr, __VA_ARGS__); \
+ else bufferWarning(__VA_ARGS__); \
+}
+
void initLog();
+void bufferWarning(char * format, ... );
+
+void flushWarningLog();
+
#endif
-/* vim:set shiftwidth=4 tabstop=8 expandtab: */