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.

86 lines
2.1 KiB

  1. //
  2. // Universal Resource Consumer: Just an innocent stress program
  3. // Copyright (c) Microsoft Corporation, 1997
  4. //
  5. //
  6. // header: error.hxx
  7. // author: silviuc
  8. // created: Fri Apr 10 14:30:19 1998
  9. //
  10. #ifndef _ERROR_HXX_INCLUDED_
  11. #define _ERROR_HXX_INCLUDED_
  12. //
  13. // Table of contents
  14. //
  15. void __cdecl Error (char *fmt, ...);
  16. void __cdecl Warning (char *fmt, ...);
  17. void __cdecl Message (char *fmt, ...);
  18. void __cdecl DebugMessage (char *fmt, ...);
  19. //
  20. // Macro:
  21. //
  22. // assert_ (exp)
  23. //
  24. // Description:
  25. //
  26. // Custom defined assertion macro. It is active, unless
  27. // ASSERT_DISABLED macro is defined. We take care to protect
  28. // it from multiple definitions by enclosing it in
  29. // `#ifndef assert_ .. #endif'.
  30. //
  31. #ifndef ASSERT_DISABLED
  32. #ifndef assert_
  33. #define assert_(exp) \
  34. do \
  35. { \
  36. if ((exp) == 0) \
  37. { \
  38. fprintf (stderr, "`assert_' failed: %s (%d): \n %s", \
  39. __FILE__, __LINE__, #exp); \
  40. exit (1); \
  41. } \
  42. } \
  43. while (0)
  44. #endif // #ifndef assert_
  45. #else
  46. #define assert_(exp)
  47. #endif // #ifndef ASSERT_DISABLED
  48. //
  49. // Macro:
  50. //
  51. // trace_ (exp)
  52. //
  53. // Description:
  54. //
  55. // Macro used for spying during debugging. The final code should
  56. // not contain calls to this macro.
  57. //
  58. #define trace_(exp) printf("trace - %s \n", exp)
  59. //
  60. // Macro:
  61. //
  62. // dump_ (exp)
  63. //
  64. // Description:
  65. //
  66. // Macro used for spying during debugging. The final code should
  67. // not contain calls to this macro.
  68. //
  69. #define dump_(exp) printf ("dump - %s: %u (%08X)\n", #exp, (exp), (exp))
  70. // ...
  71. #endif // #ifndef _ERROR_HXX_INCLUDED_
  72. //
  73. // end of header: error.hxx
  74. //