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.

49 lines
2.1 KiB

  1. /***************************************************************************\
  2. * Module Name: FIREWALL.HXX *
  3. * *
  4. * Contains FIREWALL macros. These are like assert() functions that go away *
  5. * when FIREWALLS is not defined. *
  6. * *
  7. * Created: Sat 24-Sep-1988 22:45:53 *
  8. * Author: Charles Whitmer [chuckwh] *
  9. * *
  10. * Copyright (c) 1988-1999 Microsoft Corporation *
  11. \***************************************************************************/
  12. // Define the RIP and ASSERT macros.
  13. #if DBG
  14. extern ULONG gdi_dbgflags;
  15. #define GDI_DBGFLAGS_VERBOSE 0x0001
  16. #define GDI_DBGFLAGS_ERRORRIP 0x0002
  17. #define RIP(x) {DbgPrint(x); DbgBreakPoint();}
  18. #ifndef ASSERTGDI
  19. #define ASSERTGDI(x,y) if(!(x)) RIP(y)
  20. #endif
  21. #define VERIFYGDI(x,y) \
  22. {if(!(x)) \
  23. {DbgPrint(y); \
  24. if(gdi_dbgflags & (GDI_DBGFLAGS_VERBOSE|GDI_DBGFLAGS_ERRORRIP)) \
  25. DbgBreakPoint();}}
  26. #define ERROR_ASSERT(x,y) \
  27. {if((gdi_dbgflags & (GDI_DBGFLAGS_VERBOSE|GDI_DBGFLAGS_ERRORRIP)) \
  28. && !(x)) \
  29. RIP(y)}
  30. #define PUTS(x) {if (gdi_dbgflags & GDI_DBGFLAGS_VERBOSE) DbgPrint(x);}
  31. #define PUTSX(x,y) {if (gdi_dbgflags & GDI_DBGFLAGS_VERBOSE) DbgPrint(x,y);}
  32. #define USE(x) x = x
  33. #define WARNING(x) DbgPrint(x)
  34. #define WARNING1(x) DbgPrint(x)
  35. #else
  36. #define RIP(x)
  37. #define ASSERTGDI(x,y)
  38. #define VERIFYGDI(x,y)
  39. #define ERROR_ASSERT(x,y)
  40. #define PUTS(x)
  41. #define PUTSX(x,y)
  42. #define USE(x)
  43. #define WARNING(x)
  44. #define WARNING1(x)
  45. #endif