?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. /* debug.h - declarations for "debug.c".
  2.  
  3.    This is free and unencumbered software released into the public domain.
  4.    For more information, please refer to <http://unlicense.org>. */
  5.  
  6. #ifndef _DEBUG_H_INCLUDED
  7. #define _DEBUG_H_INCLUDED
  8.  
  9. #include <stdarg.h>
  10.  
  11. void _DEBUG (const char *file, int line, const char *func, const char *format, ...);
  12. void _PERROR (const char *file, int line, const char *func, const char *text);
  13.  
  14. #if DEBUG == 1
  15.  #define _DBG(text)         _DEBUG (__FILE__, __LINE__, __func__, "%s", text)
  16.  #define _DBG_(format, ...) _DEBUG (__FILE__, __LINE__, __func__, format, __VA_ARGS__)
  17.  #define _perror(text)      _PERROR (__FILE__, __LINE__, __func__, text)
  18. #else   /* DEBUG != 1 */
  19.  #define _DBG(text)
  20.  #define _DBG_(format, ...)
  21.  #define _perror(text)
  22. #endif  /* DEBUG != 1 */
  23.  
  24. #endif  /* !_DEBUG_H_INCLUDED */
  25.