From: Mark Jansen Date: Mon, 8 Jan 2018 20:06:23 +0000 (+0100) Subject: [SDK] Add UNIMPLEMENTED_ONCE macro, to be used for functions that spam. X-Git-Tag: 0.4.9-dev~429 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=81eb3bbceb518c331f3d8e4754ad61adc0e94d33 [SDK] Add UNIMPLEMENTED_ONCE macro, to be used for functions that spam. --- diff --git a/sdk/include/reactos/debug.h b/sdk/include/reactos/debug.h index e7a4550edfe..70c3cb488e2 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)