X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/97a4b4dbf628a627e3c2d5689be89265f56074df..8dcf0a5124133d036f79094a9b0f26bd4cde9aef:/misc.h?ds=inline diff --git a/misc.h b/misc.h index 974f666..8700b96 100644 --- a/misc.h +++ b/misc.h @@ -1,9 +1,15 @@ #ifndef MISC_H #define MISC_H -#include #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. @@ -11,25 +17,10 @@ #define LOG_ISENABLED(priority) \ (_XBT_LOG_ISENABLEDV((*_XBT_LOGV(default)), (priority))) -/* Defines XCLOGn(...) which behave like CLOGn(...), except that the +/* Defines XBT_XCLOG(...) which behave like XBT_CLOG(...), except that the * given category is not passed through _XBT_LOGV before use. - * (auto-generated, like its name says...) */ -#include "misc_autogen.h" - -/* Returns c-string "s" if n > 1, empty string "" otherwise. */ -#define ESSE(n) ((n) > 1 ? misc::str_esse : misc::str_nil) -namespace misc { - - extern const char str_esse[]; - extern const char str_nil[]; - - template - struct address: public std::unary_function { - T* operator()(T& ref) { return &ref; } - }; - -} +#define XBT_XCLOG(c, p, ...) XBT_CLOG((*(c)), p, __VA_ARGS__) #endif // !MISC_H