X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/f29b38ef2a056daa14bbfda2fce78063faa773d4..f87ce6713676e7ecbb089353033372c3786f8e18:/misc.h diff --git a/misc.h b/misc.h index a4a6db1..557bed5 100644 --- a/misc.h +++ b/misc.h @@ -3,6 +3,13 @@ #include +/* Returns c-string "s" if n > 1, empty string "" otherwise. */ +#define ESSE(n) (misc::str_esse + ((n) <= 1)) + +namespace misc { + extern const char str_esse[]; +} + /* Returns true if the given priority is enabled for the default * category. Priority is xbt_log_priority_SUFFIX, where SUFFIX may * be: trace, debug, verbose, info, warning, error, critical. @@ -10,6 +17,11 @@ #define LOG_ISENABLED(priority) \ (_XBT_LOG_ISENABLEDV((*_XBT_LOGV(default)), (priority))) +/* Defines XBT_XCLOG(...) which behave like XBT_CLOG(...), except that the + * given category is not passed through _XBT_LOGV before use. + */ +#define XBT_XCLOG(c, p, ...) XBT_CLOG_((*(c)), p, __VA_ARGS__) + #endif // !MISC_H // Local variables: