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.

163 lines
3.7 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: test/scratch/test.scratch.be.pantheios.COM/test.scratch.be.pantheios.COM.cpp
  3. *
  4. * Purpose: Implementation file for the test.scratch.be.pantheios.COM project.
  5. *
  6. * Created: 9th October 2006
  7. * Updated: 6th August 2012
  8. *
  9. * Status: Wizard-generated
  10. *
  11. * License: (Licensed under the Synesis Software Open License)
  12. *
  13. * Copyright (c) 2006-2012, Synesis Software Pty Ltd.
  14. * All rights reserved.
  15. *
  16. * www: http://www.synesis.com.au/software
  17. *
  18. * ////////////////////////////////////////////////////////////////////// */
  19. #define PANTHEIOS_NO_INCLUDE_OS_AND_3PTYLIB_STRING_ACCESS
  20. /* Open-RJ Header Files */
  21. //#include <openrj/implicit_link.h>
  22. /* Pantheios Header Files */
  23. #include <pantheios/pantheios.hpp>
  24. #include <pantheios/implicit_link/core.h>
  25. #include <pantheios/implicit_link/fe.simple.h>
  26. #if defined(unix) || \
  27. defined(__unix) || \
  28. defined(__unix__)
  29. # include <pantheios/implicit_link/be.syslog.h>
  30. #elif defined(_WIN32) || \
  31. defined(WIN32)
  32. # include <pantheios/implicit_link/be.lrsplit.h>
  33. # include <pantheios/implicit_link/bel.WindowsDebugger.h>
  34. # include <pantheios/implicit_link/ber.WindowsSyslog.h>
  35. #endif /* operating system */
  36. /* STLSoft Header Files */
  37. #include <stlsoft/stlsoft.h>
  38. /* PlatformSTL Header Files */
  39. #include <platformstl/platformstl.hpp>
  40. /* UNIXEm Header Files */
  41. #include <unixem/unixem.h>
  42. #include <unixem/implicit_link.h>
  43. /* Standard C++ Header Files */
  44. #include <exception>
  45. #if 0
  46. #include <algorithm>
  47. #include <iterator>
  48. #include <list>
  49. #include <string>
  50. #include <vector>
  51. #endif /* 0 */
  52. #if !defined(__WATCOMC__) && \
  53. ( !defined(_MSC_VER) || \
  54. _MSC_VER >= 1100)
  55. #else /* ? __WATCOMC__ */
  56. namespace std
  57. {
  58. using ::exception;
  59. }
  60. #endif /* __WATCOMC__ */
  61. /* Standard C Header Files */
  62. #include <stdlib.h>
  63. #if defined(_MSC_VER) && \
  64. defined(_DEBUG)
  65. # include <crtdbg.h>
  66. #endif /* _MSC_VER) && _DEBUG */
  67. /* /////////////////////////////////////////////////////////////////////////
  68. * Macros and definitions
  69. */
  70. /* /////////////////////////////////////////////////////////////////////////
  71. * Globals
  72. */
  73. PANTHEIOS_EXTERN_C PAN_CHAR_T const PANTHEIOS_FE_PROCESS_IDENTITY[] = PANTHEIOS_LITERAL_STRING("test.scratch.be.pantheios.COM");
  74. /* /////////////////////////////////////////////////////////////////////////
  75. * Typedefs
  76. */
  77. #if 0
  78. typedef std::string string_t;
  79. #endif /* 0 */
  80. /* /////////////////////////////////////////////////////////////////////////
  81. * Forward declarations
  82. */
  83. /* ////////////////////////////////////////////////////////////////////// */
  84. static int main_(int /* argc */, char ** /*argv*/)
  85. {
  86. {
  87. pantheios::log_DEBUG("debug");
  88. }
  89. return EXIT_SUCCESS;
  90. }
  91. int main(int argc, char *argv[])
  92. {
  93. int res;
  94. #if defined(_MSC_VER) && \
  95. defined(_DEBUG)
  96. _CrtMemState memState;
  97. #endif /* _MSC_VER && _MSC_VER */
  98. #if defined(_MSC_VER) && \
  99. defined(_DEBUG)
  100. _CrtMemCheckpoint(&memState);
  101. #endif /* _MSC_VER && _MSC_VER */
  102. #if 0
  103. { for(size_t i = 0; i < 0xffffffff; ++i){} }
  104. #endif /* 0 */
  105. try
  106. {
  107. #if defined(_DEBUG) || \
  108. defined(__SYNSOFT_DBS_DEBUG)
  109. #endif /* debug */
  110. res = main_(argc, argv);
  111. }
  112. catch(std::exception &x)
  113. {
  114. fprintf(stderr, "Unhandled error: %s\n", x.what());
  115. res = EXIT_FAILURE;
  116. }
  117. catch(...)
  118. {
  119. fprintf(stderr, "Unhandled unknown error\n");
  120. res = EXIT_FAILURE;
  121. }
  122. #if defined(_MSC_VER) && \
  123. defined(_DEBUG)
  124. _CrtMemDumpAllObjectsSince(&memState);
  125. #endif /* _MSC_VER) && _DEBUG */
  126. return res;
  127. }
  128. /* ////////////////////////////////////////////////////////////////////// */