qpms_error.h remove implicit dependency on stdbool.h

Former-commit-id: 8d6d3f0cf0e33e8f9401559625f7b3261d140cd6
This commit is contained in:
Marek Nečada 2019-08-23 09:40:45 +03:00
parent cbbdec5963
commit 32c9c2a434
1 changed files with 5 additions and 4 deletions

View File

@ -72,15 +72,16 @@ qpms_dbgmsg_flags qpms_dbgmsg_enable(qpms_dbgmsg_flags types);
#define QPMS_WTF qpms_pr_error_at_flf(__FILE__,__LINE__,__func__,"Unexpected error.")
#define QPMS_UNTESTED {\
static bool already_bitched = false; \
static _Bool already_bitched = 0; \
if (!already_bitched) {\
qpms_warn_at_flf(__FILE__,__LINE__,__func__,"Warning: untested function/feature!");\
already_bitched = true;\
already_bitched = 1;\
}\
}
#define QPMS_PR_ERROR(msg, ...) qpms_pr_error_at_flf(__FILE__,__LINE__,__func__,msg, ##__VA_ARGS__)
// TODO replace this macro with an inline function?
#define QPMS_ENSURE_SUCCESS(x) {if(x) QPMS_WTF;}
#define QPMS_ENSURE(x, msg, ...) {if(!(x)) qpms_pr_error_at_flf(__FILE__,__LINE__,__func__,msg, ##__VA_ARGS__); }
@ -95,10 +96,10 @@ qpms_dbgmsg_flags qpms_dbgmsg_enable(qpms_dbgmsg_flags types);
"Not implemented:" msg, ##__VA_ARGS__)
#define QPMS_INCOMPLETE_IMPLEMENTATION(msg, ...) {\
static bool already_bitched = false; \
static _Bool already_bitched = 0; \
if (!already_bitched) {\
qpms_warn_at_flf(__FILE__,__LINE__,__func__,msg, ##__VA_ARGS__);\
already_bitched = true;\
already_bitched = 1;\
}\
}