https://git.reactos.org/?p=reactos.git;a=commitdiff;h=81eb3bbceb518c331f3d8…
commit 81eb3bbceb518c331f3d8e4754ad61adc0e94d33
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Mon Jan 8 21:06:23 2018 +0100
[SDK] Add UNIMPLEMENTED_ONCE macro, to be used for functions that spam.
---
sdk/include/reactos/debug.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sdk/include/reactos/debug.h b/sdk/include/reactos/debug.h
index e7a4550edf..70c3cb488e 100644
--- a/sdk/include/reactos/debug.h
+++ b/sdk/include/reactos/debug.h
@@ -117,6 +117,7 @@ RtlAssert(
#endif
#define UNIMPLEMENTED __NOTICE(WARNING, "is UNIMPLEMENTED!\n")
+ #define UNIMPLEMENTED_ONCE do { static int bWarnedOnce = 0; if (!bWarnedOnce) {
bWarnedOnce++; UNIMPLEMENTED; } } while (0)
#define ERR_(ch, fmt, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_ERROR_LEVEL,
"(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)
#define WARN_(ch, fmt, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_WARNING_LEVEL,
"(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)
@@ -151,6 +152,7 @@ RtlAssert(
#define DPRINT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#define UNIMPLEMENTED
+ #define UNIMPLEMENTED_ONCE
#define ERR_(ch, ...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#define WARN_(ch, ...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)