Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.2 KiB

  1. /*************************************************************************\
  2. * Module Name: debug.h
  3. *
  4. * This module contains debug support definitions
  5. * The debug support is Win32 specific. It does not use NT base functions.
  6. *
  7. * Created: 13-June-1991 9:50:00
  8. * Author: Jeffrey Newman c-jeffn
  9. *
  10. * Copyright (c) Microsoft Corporation
  11. \*************************************************************************/
  12. #ifndef _DEBUG_
  13. #define _DEBUG_
  14. //Turn on firewalls unless we are told not to.
  15. void DbgBreakPoint();
  16. DWORD DbgPrint(PSZ Format, ...);
  17. // Define the RIP and ASSERT macros.
  18. #ifdef RIP
  19. #undef RIP
  20. #endif
  21. #ifdef ASSERTGDI
  22. #undef ASSERTGDI
  23. #endif
  24. #ifdef PUTS
  25. #undef PUTS
  26. #endif
  27. #ifdef USE
  28. #undef USE
  29. #endif
  30. #if DBG
  31. #define RIP(x) {DbgPrint(x); DbgBreakPoint();}
  32. #define ASSERTGDI(x,y) {if(!(x)) RIP(y)}
  33. #define PUTS(x) DbgPrint(x)
  34. #define PUTS1(x, p1) DbgPrint(x, p1)
  35. #define USE(x) x = x
  36. #define NOTUSED(a) USE(a)
  37. #define EMFVALFAIL(x) DbgPrint x
  38. #else
  39. #define RIP(x)
  40. #define ASSERTGDI(x,y)
  41. #define PUTS(x)
  42. #define PUTS1(x, p1)
  43. #define USE(x)
  44. #define NOTUSED(a)
  45. #define EMFVALFAIL(x) DbgPrint x
  46. #endif
  47. #endif // _DEBUG_