Source code of Windows XP (NT5)
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.

60 lines
1.1 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: errsys.h
  3. *
  4. * This provides the ASSERT and VERIFY macros for all apps in all the
  5. * recognition apps.
  6. *
  7. * Created: 04-Oct-1995 16:17:00
  8. * Author: Patrick Haluptzok patrickh
  9. *
  10. * Copyright (c) 1995 Microsoft Corporation
  11. \**************************************************************************/
  12. #ifndef _INC_ERRSYS_H
  13. #define _INC_ERRSYS_H
  14. #include <TabInc.h>
  15. #if (defined(DBG) || defined(DBG) || defined(DEBUGINTERNAL))
  16. extern int giDebugLevel;
  17. #define JUST_DEBUG_MSG (giDebugLevel = 1) // Add to program init if desired.
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. int HwxAssertFn(int, char *, char *);
  22. int HwxWarning(int, char *, char *);
  23. #ifdef __cplusplus
  24. }
  25. #endif
  26. #ifndef VERIFY
  27. #define VERIFY(cond) ((cond) || HwxAssertFn(__LINE__,__FILE__,#cond))
  28. #endif
  29. #ifndef PANIC
  30. #define PANIC ASSERT(0)
  31. #endif
  32. #ifndef WARNING
  33. #define WARNING(cond) ((cond) || HwxWarning(__LINE__,__FILE__,#cond))
  34. #endif
  35. #else
  36. #ifndef VERIFY
  37. #define VERIFY(x) (x)
  38. #endif
  39. #ifndef PANIC
  40. #define PANIC
  41. #endif
  42. #ifndef WARNING
  43. #define WARNING(x)
  44. #endif
  45. #endif // DBG
  46. #endif // _INC_ERRSYS_H