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.

65 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. #ifndef WIN32
  25. #define UNREFERENCED_PARAMETER(x) (x)
  26. #endif
  27. #define DEBUG_OUT(parm1,parm2){\
  28. if(ole_flags & DEBUG_DEBUG_OUT){\
  29. wsprintf(szDebugBuffer,parm1,parm2);\
  30. OutputDebugString(szDebugBuffer);\
  31. OutputDebugString ("^^^ ");\
  32. }\
  33. }
  34. #define ASSERT(x,y) {\
  35. if (!(x)) { \
  36. wsprintf (szDebugBuffer, "Assert Failure file %s, line %d\r\n ", \
  37. (LPSTR) __FILE__, __LINE__);\
  38. OutputDebugString (szDebugBuffer);\
  39. OutputDebugString ((LPSTR) (y));\
  40. OutputDebugString ("@@@ ");\
  41. } \
  42. }
  43. #define Puts(msg) {\
  44. if(ole_flags & DEBUG_PUTS){\
  45. OutputDebugString ((LPSTR)(msg));\
  46. OutputDebugString ("** ");\
  47. }\
  48. }
  49. #else
  50. #define DEBUG_OUT(err, val) ;
  51. #define ASSERT(cond, msg)
  52. #define Puts(msg)
  53. #endif /* FIREWALLS */