/contrib/ntp/include/ntp_debug.h

https://bitbucket.org/freebsd/freebsd-head/ · C++ Header · 28 lines · 12 code · 3 blank · 13 comment · 3 complexity · 34cbd118c08fbab4c930b47f1ae9fdcf MD5 · raw file

  1. /*
  2. * $Header$
  3. *
  4. * $Created: Sat Aug 20 14:23:01 2005 $
  5. *
  6. * Copyright (C) 2005 by Frank Kardel
  7. */
  8. #ifndef NTP_DEBUG_H
  9. #define NTP_DEBUG_H
  10. /*
  11. * macros for debugging output - cut down on #ifdef pollution in the code
  12. */
  13. #ifdef DEBUG
  14. #define DPRINTF(_lvl_, _arg_) \
  15. do { \
  16. if (debug >= (_lvl_)) \
  17. printf _arg_; \
  18. } while (0)
  19. #else
  20. #define DPRINTF(_lvl_, _arg_) do {} while (0)
  21. #endif
  22. #endif
  23. /*
  24. * $Log$
  25. */