debug.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * =====================================================================================
  3. *
  4. * .d8888b 88888b. .d88b. .d8888b 888d888 8888b. 88888b.d88b.
  5. * 88K 888 "88b d8P Y8b 88K 888P" "88b 888 "888 "88b
  6. * "Y8888b. 888 888 88888888 "Y8888b. 888 .d888888 888 888 888
  7. * X88 888 888 Y8b. X88 888 888 888 888 888 888
  8. * 88888P' 888 888 "Y8888 88888P' 888 "Y888888 888 888 888
  9. *
  10. * www.optixx.org
  11. *
  12. *
  13. * Version: 1.0
  14. * Created: 07/21/2009 03:32:16 PM
  15. * Author: david@optixx.org
  16. *
  17. * =====================================================================================
  18. */
  19. #ifndef __DEBUG_H__
  20. #define __DEBUG_H__
  21. #include <stdlib.h>
  22. #include <stdint.h>
  23. #include <stdarg.h>
  24. #if defined(NO_DEBUG) && defined(__GNUC__)
  25. /* gcc's cpp has extensions; it allows for macros with a variable number of
  26. arguments. We use this extension here to preprocess pmesg away. */
  27. #define debug(level, format, args...) ((void)0)
  28. #else
  29. void debug(int level, char *format, ...);
  30. /* print a message, if it is considered significant enough.
  31. Adapted from [K&R2], p. 174 */
  32. #endif
  33. #endif /* DEBUG_H */