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.

61 lines
1.5 KiB

  1. /****************************** Module Header ******************************\
  2. * Module Name: CMACS.H
  3. *
  4. * This module contains common macros used by C routines.
  5. *
  6. * Created: 9-Feb-1989
  7. *
  8. * Copyright (c) 1985 - 1989 Microsoft Corporation
  9. *
  10. * History:
  11. * Created by Raor
  12. *
  13. \***************************************************************************/
  14. #define _WINDOWS
  15. #define DLL_USE
  16. #define INTERNAL PASCAL NEAR
  17. #define FARINTERNAL PASCAL FAR
  18. #ifdef FIREWALLS
  19. extern short ole_flags;
  20. #define DEBUG_PUTS 0x01
  21. #define DEBUG_DEBUG_OUT 0x02
  22. #define DEBUG_MESSAGEBOX 0x04
  23. extern char szDebugBuffer[];
  24. #define DEBUG_OUT(parm1,parm2){\
  25. if(ole_flags & DEBUG_DEBUG_OUT){\
  26. wsprintf(szDebugBuffer,parm1,parm2);\
  27. OutputDebugString(szDebugBuffer);\
  28. OutputDebugString ("^^^ ");\
  29. }\
  30. }
  31. #define ASSERT(x,y) {\
  32. if (!(x)) { \
  33. wsprintf (szDebugBuffer, "Assert Failure file %s, line %d\r\n ", \
  34. (LPSTR) __FILE__, __LINE__);\
  35. OutputDebugString (szDebugBuffer);\
  36. OutputDebugString ((LPSTR) (y));\
  37. OutputDebugString ("@@@ ");\
  38. } \
  39. }
  40. #define Puts(msg) {\
  41. if(ole_flags & DEBUG_PUTS){\
  42. OutputDebugString ((LPSTR)(msg));\
  43. OutputDebugString ("** ");\
  44. }\
  45. }
  46. #else
  47. #define DEBUG_OUT(err, val) ;
  48. #define ASSERT(cond, msg)
  49. #define Puts(msg)
  50. #endif /* FIREWALLS */