/* 
 * Debug helper functions...
 *
 * $Date$
 * $Revision$
 *
 */

#ifndef DEBUG_H__
#define DEBUG_H__
/** 
 * @addtogroup WImage 
 * @{ */

#if !defined (NDEBUG) && !defined (DPRINTF) && !defined (_WIN32_WCE)

int debug_printf (const char *tmpl, ...);

#define STRR(X) #X
#define STR(X) STRR(X)
#define DPRINTF(X) \
  (debug_printf("DEBUG %s [%s]: ", __FILE__, STR(__LINE__)), debug_printf X)

#else /* NDEBUG */

#ifdef DPRINTF
#undef DPRINTF
#endif
#define DPRINTF(x)

#endif /* NDEBUG */

/** @} */

#endif /* DEBUG_H__ */
