74#define ENTRY(name) PASTE(PASTE(PASTE(sane_,BACKEND_NAME),_),name)
78extern void sanei_debug_ndebug (
int level,
const char *msg, ...);
82# define DBG sanei_debug_ndebug
88# define DBG_LEVEL PASTE(sanei_debug_,BACKEND_NAME)
90# if defined(BACKEND_NAME) && !defined(STUBS)
91# ifdef DEBUG_DECLARE_ONLY
100 sanei_init_debug (STRINGIFY(BACKEND_NAME), &DBG_LEVEL)
103# define DBG_LOCAL PASTE(DBG_LEVEL,_call)
108# ifdef DEBUG_DECLARE_ONLY
110extern void DBG_LOCAL (
int level,
const char *msg, ...)
112__attribute__ ((format (printf, 2, 3)))
121 (
int level,
int max_level,
const char *be,
const char *fmt, va_list ap);
124# ifndef DEBUG_NOT_STATIC
127void DBG_LOCAL (
int level,
const char *msg, ...) __attribute__ ((format (printf, 2, 3)));
130# ifndef DEBUG_NOT_STATIC
134DBG_LOCAL (
int level,
const char *msg, ...)
148# define DBG DBG_LOCAL
Convenience macros and function declarations for backends.
#define STRINGIFY(x)
Turn parameter into string.
Definition: sanei.h:159
#define DBG_LEVEL
Current debug level.
Definition: sanei_debug.h:88
void sanei_init_debug(const char *backend, int *debug_level_var)
Expands to sane_BACKEND_NAME_name.
#define DBG_LOCAL
Expands to sane_BACKEND_NAME_name.
Definition: sanei_debug.h:103
void sanei_debug_msg(int level, int max_level, const char *be, const char *fmt, va_list ap)
Expands to sane_BACKEND_NAME_name.