aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/debug.cpp8
-rw-r--r--common/debug.h7
2 files changed, 15 insertions, 0 deletions
diff --git a/common/debug.cpp b/common/debug.cpp
index 52ff4307dd..b718b7917f 100644
--- a/common/debug.cpp
+++ b/common/debug.cpp
@@ -190,6 +190,14 @@ void debug(int level, const char *s, ...) {
}
+void debugN(const char *s, ...) {
+ va_list va;
+
+ va_start(va, s);
+ debugHelper(s, va, false);
+ va_end(va);
+}
+
void debugN(int level, const char *s, ...) {
va_list va;
diff --git a/common/debug.h b/common/debug.h
index 2068a1314a..06f897f103 100644
--- a/common/debug.h
+++ b/common/debug.h
@@ -43,6 +43,7 @@ void setDebugOutputFormatter(OutputFormatter f);
inline void debug(const char *s, ...) {}
inline void debug(int level, const char *s, ...) {}
+inline void debugN(const char *s, ...) {}
inline void debugN(int level, const char *s, ...) {}
inline void debugC(int level, uint32 engineChannel, const char *s, ...) {}
inline void debugC(uint32 engineChannel, const char *s, ...) {}
@@ -68,6 +69,12 @@ void debug(const char *s, ...) GCC_PRINTF(1, 2);
void debug(int level, const char *s, ...) GCC_PRINTF(2, 3);
/**
+ * Print a debug message to the text console (stdout).
+ * Does not append a newline.
+ */
+void debugN(const char *s, ...) GCC_PRINTF(1, 2);
+
+/**
* Print a debug message to the text console (stdout), but only if
* the gDebugLevel equals at least the specified level.
* As a rule of thumb, the more important the message, the lower the level.