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.

53 lines
2.0 KiB

  1. /*****************************************************************************
  2. * *
  3. * ASSERT.C *
  4. * *
  5. * Copyright (C) Microsoft Corporation 1991 - 1994. *
  6. * All Rights reserved. *
  7. * *
  8. ******************************************************************************
  9. * *
  10. * Module Description: ASSERTION ROUTINES FOR ORKIN DEBUGGING LIBRARY *
  11. * *
  12. ******************************************************************************
  13. * *
  14. * Previous Owner: DavidJes *
  15. * Current Owner: RHobbs *
  16. * *
  17. *****************************************************************************/
  18. #include <mvopsys.h>
  19. #include <orkin.h>
  20. // The following is missing the second "void" in windows.h which
  21. // results in a "No Prototype" warning by the compiler
  22. #ifndef _32BIT
  23. void FAR PASCAL DebugBreak(void);
  24. #endif
  25. #ifdef _DEBUG
  26. void EXPORT_API far pascal _assertion(WORD wLine, LPSTR lpstrFile)
  27. {
  28. static char szExitMsg[180];
  29. LPSTR lpstrExitMsg = &szExitMsg[0];
  30. wsprintf(lpstrExitMsg, "Assertion Failed: File %s, Line %u.\r\n",
  31. lpstrFile, wLine);
  32. OutputDebugString(lpstrExitMsg);
  33. DebugBreak();
  34. return;
  35. }
  36. #else
  37. // This is here so _assertion can be placed in the .DEF file for WMVC.
  38. void EXPORT_API far pascal _assertion(WORD wLine, LPSTR lpstrFile)
  39. {}
  40. #endif