home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’95 / CyberProcDoggie / Source Code / Woof / WoofLibraryInit.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-24  |  1.2 KB  |  68 lines  |  [TEXT/MPS ]

  1. #ifndef __SOM__
  2. #include <som.xh>
  3. #endif
  4.  
  5. #ifndef __SOMOBJ__
  6. #include <somobj.xh>
  7. #endif
  8.  
  9. #ifndef __FRAGRSRC__
  10. #include <FragRsrc.h>
  11. #endif
  12.  
  13. #ifndef _ODMEMORY_
  14. #include "ODMemory.h"
  15. #endif
  16.  
  17. #ifdef applec
  18. #pragma segment Woof
  19. #endif
  20.  
  21. #include "Debug.h"
  22. #include "WoofItem.xh"
  23. #include "WoofService.xh"
  24. #include "WoofLibraryInit.h"
  25.  
  26.  
  27. // Information for this library's resource fork
  28. CFragResFileRef gFragResFileRef_WoofLibrary;
  29.  
  30.  
  31.  
  32. SOMEXTERN void SOMLINK WoofLibrarySOMInit (long, long, string );
  33. extern "C" OSErr WoofLibraryCFMInit (InitBlockPtr initBlkPtr);
  34. extern "C" void __sinit(void);
  35.  
  36.  
  37.  
  38. SOMEXTERN void SOMLINK WoofLibrarySOMInit (long majorVersion, 
  39.                                        long minorVersion, 
  40.                                        string className)
  41.     {
  42.     AppleCyberdog_WoofItemNewClass(majorVersion, minorVersion);
  43.     AppleCyberdog_WoofServiceNewClass(majorVersion, minorVersion);
  44.     }
  45.  
  46.  
  47.  
  48. OSErr WoofLibraryCFMInit (InitBlockPtr initBlkPtr)
  49.     {
  50.     __sinit();
  51.     
  52.  
  53.     #if __CFM68K__
  54.     OSErr err= LinkupQDGlobals();
  55.     if( err ) return err;
  56.     #endif
  57.  
  58.     return InitCFragResources(initBlkPtr, &gFragResFileRef_WoofLibrary);
  59.     }
  60.     
  61.     
  62.     
  63. CFragResFileRef WoofLibraryGetResFileData()
  64.     {
  65.     return gFragResFileRef_WoofLibrary;
  66.     }
  67.  
  68.