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.

96 lines
2.0 KiB

  1. #include <stdarg.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <assert.h>
  5. #include <iostream.h>
  6. #include <fstream.h>
  7. #include <afx.h>
  8. #include <afxtempl.h>
  9. #include <objbase.h>
  10. #include <afxwin.h>
  11. #include <afxole.h>
  12. #include <afxmt.h>
  13. #include <wchar.h>
  14. #include <process.h>
  15. #include <objbase.h>
  16. #include <initguid.h>
  17. #include <bool.hpp>
  18. #include <nString.hpp>
  19. #include <ui.hpp>
  20. #include <symbol.hpp>
  21. #include <type.hpp>
  22. #include <value.hpp>
  23. #include <valueRef.hpp>
  24. #include <typeRef.hpp>
  25. #include <oidValue.hpp>
  26. #include <objType.hpp>
  27. #include <objTypV1.hpp>
  28. #include <objTypV2.hpp>
  29. #include <objId.hpp>
  30. #include <trapType.hpp>
  31. #include <notType.hpp>
  32. #include <group.hpp>
  33. #include <notGroup.hpp>
  34. #include <module.hpp>
  35. #include <sValues.hpp>
  36. #include <lex_yy.hpp>
  37. #include <ytab.hpp>
  38. #include <errorMsg.hpp>
  39. #include <errorCon.hpp>
  40. #include <scanner.hpp>
  41. #include <parser.hpp>
  42. #include <apTree.hpp>
  43. #include <oidTree.hpp>
  44. #include <pTree.hpp>
  45. #include "Debug.hpp"
  46. #include "Configs.hpp"
  47. SIMCErrorContainer errorContainer;
  48. extern Configs theConfigs;
  49. void _coreASSERT(const char *filename, int line, const char *errMsg, void (*cleanup)())
  50. {
  51. const char *name;
  52. name = strrchr(filename, '\\');
  53. if (name != NULL)
  54. filename = name+1;
  55. cout << "Err [" << filename << ":" << line << "] - " << errMsg << "\n";
  56. if (cleanup != NULL)
  57. (*cleanup)();
  58. }
  59. void dumpOnBuild()
  60. {
  61. SIMCErrorMessage errorMessage;
  62. if ( (theConfigs.m_dwFlags & (CFG_VERB_ERROR | CFG_VERB_WARNING)) == 0 )
  63. return;
  64. for (errorContainer.MoveToFirstMessage();
  65. errorContainer.GetNextMessage(errorMessage) && theConfigs.m_nMaxErrors > 0;
  66. )
  67. {
  68. switch (errorMessage.GetSeverityLevel())
  69. {
  70. case 0:
  71. if (theConfigs.m_dwFlags & CFG_VERB_ERROR)
  72. {
  73. cout << errorMessage;
  74. theConfigs.m_nMaxErrors--;
  75. }
  76. break;
  77. case 1:
  78. if (theConfigs.m_dwFlags & CFG_VERB_WARNING)
  79. {
  80. cout << errorMessage;
  81. theConfigs.m_nMaxErrors--;
  82. }
  83. break;
  84. }
  85. }
  86. }