NAME

CAT_DEBUGn - debug macros

SYNOPSIS

#include <cat/cat.h>

CAT_DEBUG1((cat_session *sess, const char *label, const char *fmt, ...));

CAT_DEBUG2((cat_session *sess, const char *label, const char *fmt, ...));

CAT_DEBUG3((cat_session *sess, const char *label, const char *fmt, ...));

CAT_DEBUG4((cat_session *sess, const char *label, const char *fmt, ...));

CAT_DEBUG5((cat_session *sess, const char *label, const char *fmt, ...));

DESCRIPTION

These macros test the global debug level before calling caterr_error() (or similar functions) to dispatch the debug message. Thus, when running with debug tracing turned off, the resulting overhead is one test-and-branch and some extra code.

The label and fmt are as described for caterr_error().

NOTES

The argument list must be surrounded by double parentheses.

If compiling with -DCAT_NODEBUG, the macros will be removed.

SEE ALSO

cat, caterr, caterr_error