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.

62 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. #undef _WINDOWS
  15. #define _WINDOWS
  16. #define DLL_USE
  17. #define INTERNAL PASCAL NEAR
  18. #define FARINTERNAL PASCAL FAR
  19. #ifdef FIREWALLS
  20. extern short ole_flags;
  21. #define DEBUG_PUTS 0x01
  22. #define DEBUG_DEBUG_OUT 0x02
  23. #define DEBUG_MESSAGEBOX 0x04
  24. extern char szDebugBuffer[];
  25. #define DEBUG_OUT(parm1,parm2){\
  26. if(ole_flags & DEBUG_DEBUG_OUT){\
  27. wsprintf(szDebugBuffer,parm1,parm2);\
  28. OutputDebugString(szDebugBuffer);\
  29. OutputDebugString ("^^^ ");\
  30. }\
  31. }
  32. #define ASSERT(x,y) {\
  33. if (!(x)) { \
  34. wsprintf (szDebugBuffer, "Assert Failure file %s, line %d\r\n ", \
  35. (LPSTR) __FILE__, __LINE__);\
  36. OutputDebugString (szDebugBuffer);\
  37. OutputDebugString ((LPSTR) (y));\
  38. OutputDebugString ("@@@ ");\
  39. } \
  40. }
  41. #define Puts(msg) {\
  42. if(ole_flags & DEBUG_PUTS){\
  43. OutputDebugString ((LPSTR)(msg));\
  44. OutputDebugString ("** ");\
  45. }\
  46. }
  47. #else
  48. #define DEBUG_OUT(err, val) ;
  49. #define ASSERT(cond, msg)
  50. #define Puts(msg)
  51. #endif /* FIREWALLS */