debug.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * =====================================================================================
  3. *
  4. * ________ .__ __ ________ ____ ________
  5. * \_____ \ __ __|__| ____ | | __\______ \ _______ _/_ |/ _____/
  6. * / / \ \| | \ |/ ___\| |/ / | | \_/ __ \ \/ /| / __ \
  7. * / \_/. \ | / \ \___| < | ` \ ___/\ / | \ |__\ \
  8. * \_____\ \_/____/|__|\___ >__|_ \/_______ /\___ >\_/ |___|\_____ /
  9. * \__> \/ \/ \/ \/ \/
  10. *
  11. * www.optixx.org
  12. *
  13. *
  14. * Version: 1.0
  15. * Created: 07/21/2009 03:32:16 PM
  16. * Author: david@optixx.org
  17. *
  18. * =====================================================================================
  19. */
  20. #ifndef __DEBUG_H__
  21. #define __DEBUG_H__
  22. #include <stdlib.h>
  23. #include <stdint.h>
  24. #include <stdarg.h>
  25. #if defined(NO_DEBUG) && defined(__GNUC__)
  26. /* gcc's cpp has extensions; it allows for macros with a variable number of
  27. arguments. We use this extension here to preprocess pmesg away. */
  28. #define debug(level, format, args...) ((void)0)
  29. #else
  30. void debug(int level, char *format, ...);
  31. /* print a message, if it is considered significant enough.
  32. Adapted from [K&R2], p. 174 */
  33. #endif
  34. #endif /* DEBUG_H */