home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Framewrk / Layer / Sources / FWFramwI.cpp next >
Encoding:
Text File  |  1995-11-08  |  2.8 KB  |  99 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWFramwI.cpp
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Copyright:    © 1993, 1995 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #include <som.xh>
  11. #include <somobj.xh>
  12.  
  13. #ifndef FWCFMRES_H
  14. #include "FWCFMRes.h"
  15. #endif
  16.  
  17. #ifdef FW_DEBUG
  18.     #ifndef FWEVENTU_H
  19.     #include "FWEventU.h"
  20.     #endif
  21. #endif
  22.  
  23. #ifndef __CODEFRAGMENTS__
  24. #include <CodeFragments.h>
  25. #endif
  26.  
  27. //========================================================================================
  28. // Runtime Informations
  29. //========================================================================================
  30.  
  31. #ifdef FW_BUILD_MAC
  32. #pragma segment framework
  33. #endif
  34.  
  35. //========================================================================================
  36. // Prototypes
  37. //========================================================================================
  38.  
  39. #if defined(SYMANTEC_CPLUS) && defined(FW_BUILD_MAC)
  40.     #define FW_FRAMEWRKCFMINIT PartCFMInit
  41.     #define DummySOMInit main
  42.     #if !FW_LIB_EXPORT_PRAGMAS
  43.         #pragma internal on
  44.     #endif
  45. #endif
  46.  
  47. extern "C" pascal OSErr FW_FRAMEWRKCFMINIT (CFragInitBlockPtr initBlkPtr);
  48.  
  49. #if GENERATINGPOWERPC
  50. #ifdef __MWERKS__
  51. extern "C" void __sinit();
  52. #elif defined __MRC__
  53. extern "C" void __CPlusInit();
  54. #endif
  55. #endif
  56.  
  57. //========================================================================================
  58. // Initialization functions
  59. //========================================================================================
  60.  
  61. //----------------------------------------------------------------------------------------
  62. // DummySOMInit
  63. //----------------------------------------------------------------------------------------
  64.  
  65. SOMEXTERN void SOMLINK DummySOMInit (long majorVersion,
  66.                                 long minorVersion,
  67.                                  string className);
  68.  
  69. SOMEXTERN void SOMLINK DummySOMInit (long majorVersion,
  70.                                 long minorVersion,
  71.                                  string className)
  72. {
  73.  
  74. //----------------------------------------------------------------------------------------
  75. // FW_FRAMEWRKCFMINIT
  76. //----------------------------------------------------------------------------------------
  77.  
  78. extern "C" pascal OSErr FW_FRAMEWRKCFMINIT (CFragInitBlockPtr initBlkPtr)
  79. {
  80. #ifdef FW_DEBUG
  81.     if (::FW_IsCommandKeyPressed())
  82.         DebugStr("\pFW_FRAMEWRKCFMINIT");
  83. #endif
  84.     
  85.     // Shared libraries don't get there static objects initialized correctly without
  86.     // calling __sinit or __CPlusInit for MetroWerks or MrC respectively.
  87.  
  88. #if GENERATINGPOWERPC
  89. #ifdef __MWERKS__
  90.     __sinit();
  91. #elif defined __MRC__
  92.     __CPlusInit();
  93. #endif
  94. #endif
  95.     
  96.     return InitLibraryResources(initBlkPtr);
  97. }
  98.