Merge branch 'master' into beyn_without_unitcell
Former-commit-id: ee56e6d72638fe01117d50fd78bd1eeeabf5f518
This commit is contained in:
commit
26e7d9acee
|
@ -72,16 +72,22 @@ 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__)
|
||||
|
||||
#define QPMS_ENSURE_SUCCESS(x) {if(x) QPMS_WTF;}
|
||||
// TODO replace this macro with an inline function?
|
||||
#define QPMS_ENSURE_SUCCESS(x) { \
|
||||
int errorcode = (x); \
|
||||
if(errorcode) \
|
||||
qpms_pr_error_at_flf(__FILE__,__LINE__,__func__,"Unexpected error (%d)", errorcode); \
|
||||
}
|
||||
|
||||
|
||||
#define QPMS_ENSURE(x, msg, ...) {if(!(x)) qpms_pr_error_at_flf(__FILE__,__LINE__,__func__,msg, ##__VA_ARGS__); }
|
||||
|
||||
|
@ -95,10 +101,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;\
|
||||
}\
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue