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.

72 lines
1.5 KiB

  1. /*
  2. * **************************** Module Header ******************************\
  3. * Module Name: CMACS.H
  4. *
  5. * This module contains common macros used by C routines.
  6. *
  7. * Created: 9-Feb-1989
  8. *
  9. * Copyright (c) 1985 - 1989 Microsoft Corporation
  10. *
  11. * History:
  12. * Created by Raor
  13. *
  14. * This will eventually be removed completely. Right now, we
  15. * define ASSERT in terms of AssertSz.
  16. *
  17. * \**************************************************************************
  18. */
  19. #if !defined( _CMACS_H_ )
  20. #define _CMACS_H_
  21. #ifndef _MAC
  22. #define DLL_USE
  23. #ifdef FIREWALLS
  24. extern short ole_flags;
  25. #ifndef _DEBUG
  26. #define _DEBUG
  27. #endif
  28. #include <debug.h>
  29. #define DEBUG_PUTS 0x01
  30. #define DEBUG_DEBUG_OUT 0x02
  31. #define DEBUG_MESSAGEBOX 0x04
  32. extern char szDebugBuffer[];
  33. #define DEBUG_OUT(parm1,parm2){\
  34. if(ole_flags & DEBUG_DEBUG_OUT){\
  35. wsprintf(szDebugBuffer,parm1,parm2);\
  36. OutputDebugString(szDebugBuffer);\
  37. OutputDebugString ("^^^ ");\
  38. }\
  39. }
  40. #define ASSERT(x,y) AssertSz(x,y)
  41. #define Puts(msg) {\
  42. if(ole_flags & DEBUG_PUTS){\
  43. OutputDebugString ((LPSTR)(msg));\
  44. OutputDebugString ("** ");\
  45. }\
  46. }
  47. #else // FIREWALLS
  48. #define DEBUG_OUT(err, val) ;
  49. #define ASSERT(cond, msg)
  50. // #define Puts(msg)
  51. // FIREWALLS is never defined so let the Puts from debug.h remain defined
  52. #endif // FIREWALLS
  53. #endif // !_MAC
  54. #endif // _CMACS_H_