home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ocl150a.zip / OCL / Source / OCL_Entry.cc < prev    next >
C/C++ Source or Header  |  1997-04-05  |  3KB  |  113 lines

  1. // OCL - OS/2 Class Library
  2. // (c) Cubus 1995
  3. // All Rights Reserved
  4. // DLLEntry.cc
  5.  
  6. /*
  7.  * Redistribution and use in source and binary forms, with or without
  8.  * modification, are permitted provided that the following conditions
  9.  * are met:
  10.  * 1. Redistributions of source code must retain the above copyright
  11.  *    notice, this list of conditions and the following disclaimer.
  12.  * 2. Neither the name Cubus nor the name Team OCL may be used to
  13.  *    endorse or promote products derived from this software
  14.  *    without specific prior written permission.
  15.  * 3. See OCL.INF for a detailed copyright notice.
  16.  *
  17.  *              THIS SOFTWARE IS PROVIDED ``AS IS'' AND
  18.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  21.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27.  * SUCH DAMAGE.
  28.  */
  29.  
  30. // $Header: W:/Projects/OCL/Source/rcs/OCL_Entry.cc 1.50 1996/08/11 23:49:10 B.STEIN Release $
  31.  
  32.  
  33. #ifdef __BCPLUSPLUS__
  34. # pragma option -Jgd
  35. #endif
  36.  
  37. #define __OCL_RESOLVE_TEMPLATES__
  38. #define __OCL_SOURCE__
  39.  
  40. #define OINCL_OSTRING
  41. #define OINCL_BASE
  42.  
  43. #include <ocl.hpp>
  44. #include <slOString.hpp>
  45. #include <OBook.hpp>
  46. #include <OProcStat.hpp>
  47. #include <OMenu.hpp>
  48. #include <OMemu.hpp>
  49. #include <OThread.hpp>
  50. #include <OMLE.hpp>
  51. #include <OEditor.hpp>
  52. #include <OPipeSvr.hpp>
  53. #include <OPipeCli.hpp>
  54. #include <OPipeTool.hpp>
  55. #include <OPMPipeTool.hpp>
  56. #include <OButtonBar.hpp>
  57. #include <OCollection.hpp>
  58. #include <OIterator.hpp>
  59. #include <OConstIterator.hpp>
  60. #include <OQueue.hpp>
  61. #include <OStack.hpp>
  62. #include <OContainer.hpp>
  63. #include <OFuzzSearch.hpp>
  64.  
  65. #if (defined (__IBMCPP__) && (__IBMCPP__ < 300))
  66.   #pragma define (OList<ULONG>)
  67. #endif
  68.  
  69.  
  70. extern "C"
  71.  {
  72.  
  73. #if ((defined __EMX__) || (defined __IBMCPP__))
  74.   int  _CRT_init (void);
  75.   void _CRT_term (void);
  76.   void __ctordtorInit (void);
  77.   void __ctordtorTerm (void);
  78. #endif
  79.  
  80.   ULONG EXPENTRY _DLL_InitTerm (ULONG mod_handle, ULONG flag);
  81.  
  82.  }
  83.  
  84.  
  85. ULONG EXPENTRY _DLL_InitTerm (ULONG mod_handle, ULONG flag)
  86. {
  87.  switch (flag)
  88.   {
  89.    case 0:
  90.      #if ((defined __EMX__) || (defined __IBMCPP__))
  91.        if (_CRT_init () == 0)
  92.         {
  93.          __ctordtorInit ();
  94.          return 1;
  95.         }
  96.      #endif
  97.      return 1;
  98.  
  99.    case 1:
  100.      #if ((defined __EMX__) || (defined __IBMCPP__))
  101.        __ctordtorTerm ();
  102.        _CRT_term ();
  103.      #endif
  104.      return 1;
  105.  
  106.    default:
  107.      return 0;
  108.   }
  109. }
  110.  
  111.  
  112. // end of source 
  113.