home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / CIncludes / CodeFragments.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  17.0 KB  |  558 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        CodeFragments.h
  3.  
  4.      Contains:    Public Code Fragment Manager Interfaces.
  5.  
  6.      Version:    Technology:    Mac OS 8.1
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1992-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. /*
  18.    •
  19.    ===========================================================================================
  20.    The Code Fragment Manager API
  21.    =============================
  22. */
  23.  
  24.  
  25. #ifndef __CODEFRAGMENTS__
  26. #define __CODEFRAGMENTS__
  27.  
  28. #ifndef __MACTYPES__
  29. #include <MacTypes.h>
  30. #endif
  31. #ifndef __FILES__
  32. #include <Files.h>
  33. #endif
  34.  
  35.  
  36.  
  37. #if PRAGMA_ONCE
  38. #pragma once
  39. #endif
  40.  
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif
  44.  
  45. #if PRAGMA_IMPORT
  46. #pragma import on
  47. #endif
  48.  
  49. #if PRAGMA_STRUCT_ALIGN
  50.     #pragma options align=mac68k
  51. #elif PRAGMA_STRUCT_PACKPUSH
  52.     #pragma pack(push, 2)
  53. #elif PRAGMA_STRUCT_PACK
  54.     #pragma pack(2)
  55. #endif
  56.  
  57. /*
  58.    §
  59.    ===========================================================================================
  60.    General Types and Constants
  61.    ===========================
  62. */
  63.  
  64.  
  65.  
  66. enum {
  67.     kCFragResourceType            = FOUR_CHAR_CODE('cfrg'),
  68.     kCFragResourceID            = 0,
  69.     kCFragLibraryFileType        = FOUR_CHAR_CODE('shlb'),
  70.     kCFragAllFileTypes            = (long)0xFFFFFFFF
  71. };
  72.  
  73.  
  74. typedef OSType                             CFragArchitecture;
  75.  
  76. enum {
  77.     kPowerPCCFragArch            = FOUR_CHAR_CODE('pwpc'),
  78.     kMotorola68KCFragArch        = FOUR_CHAR_CODE('m68k'),
  79.     kAnyCFragArch                = 0x3F3F3F3F
  80. };
  81.  
  82. #if TARGET_CPU_PPC
  83.  
  84. enum {
  85.     kCompiledCFragArch            = kPowerPCCFragArch
  86. };
  87.  
  88. #endif  /* TARGET_CPU_PPC */
  89.  
  90. #if TARGET_CPU_68K
  91.  
  92. enum {
  93.     kCompiledCFragArch            = kMotorola68KCFragArch
  94. };
  95.  
  96. #endif  /* TARGET_CPU_68K */
  97.  
  98. typedef UInt32                             CFragVersionNumber;
  99.  
  100. enum {
  101.     kNullCFragVersion            = 0,
  102.     kWildcardCFragVersion        = (long)0xFFFFFFFF
  103. };
  104.  
  105.  
  106. typedef UInt8                             CFragUsage;
  107.  
  108. enum {
  109.     kImportLibraryCFrag            = 0,                            /* Standard CFM import library.*/
  110.     kApplicationCFrag            = 1,                            /* MacOS application.*/
  111.     kDropInAdditionCFrag        = 2,                            /* Application or library private extension/plug-in*/
  112.     kStubLibraryCFrag            = 3,                            /* Import library used for linking only*/
  113.     kWeakStubLibraryCFrag        = 4                                /* Import library used for linking only and will be automatically weak linked*/
  114. };
  115.  
  116.  
  117.  
  118. enum {
  119.     kIsCompleteCFrag            = 0,                            /* A "base" fragment, not an update.*/
  120.     kFirstCFragUpdate            = 1                                /* The first update, others are numbered 2, 3, ...*/
  121. };
  122.  
  123.  
  124.  
  125. enum {
  126.     kCFragGoesToEOF                = 0
  127. };
  128.  
  129.  
  130.  
  131.  
  132. typedef UInt8                             CFragLocatorKind;
  133.  
  134. enum {
  135.     kMemoryCFragLocator            = 0,                            /* Container is already addressable.*/
  136.     kDataForkCFragLocator        = 1,                            /* Container is in a file's data fork.*/
  137.     kResourceCFragLocator        = 2,                            /* Container is in a file's resource fork.*/
  138.     kByteStreamCFragLocator        = 3,                            /* ! Reserved for possible future use!*/
  139.     kNamedFragmentCFragLocator    = 4                                /* ! Reserved for possible future use!*/
  140. };
  141.  
  142.  
  143. /*
  144.    --------------------------------------------------------------------------------------
  145.    A 'cfrg' resource consists of a header followed by a sequence of variable length
  146.    members.  The constant kDefaultCFragNameLen only provides for a legal ANSI declaration
  147.    and for a reasonable display in a debugger.  The actual name field is cut to fit.
  148.    There may be "extensions" after the name, the memberSize field includes them.  The
  149.    general form of an extension is a 16 bit type code followed by a 16 bit size in bytes.
  150.    Only one standard extension type is defined at present, it is used by SOM's searching
  151.    mechanism.
  152. */
  153.  
  154.  
  155.  
  156. union CFragUsage1Union {                                        /* ! Meaning differs depending on value of "usage".*/
  157.     UInt32                             appStackSize;                /* If the fragment is an application. (Not used by CFM!)*/
  158. };
  159. typedef union CFragUsage1Union            CFragUsage1Union;
  160.  
  161. union CFragUsage2Union {                                        /* ! Meaning differs depending on value of "usage".*/
  162.     SInt16                             appSubdirID;                /* If the fragment is an application.*/
  163.     UInt16                             libFlags;                    /* If the fragment is an import library.*/
  164. };
  165. typedef union CFragUsage2Union            CFragUsage2Union;
  166.  
  167. enum {
  168.                                                                 /* Bit masks for the CFragUsage2Union libFlags variant.*/
  169.     kCFragLibUsageMapPrivatelyMask = 0x0001                        /* Put container in app heap if necessary.*/
  170. };
  171.  
  172.  
  173. union CFragWhere1Union {                                        /* ! Meaning differs depending on value of "where".*/
  174.     UInt32                             spaceID;                    /* If the fragment is in memory.  (Actually an AddressSpaceID.)*/
  175.     OSType                             forkKind;                    /* If the fragment is in an arbitrary byte stream fork.*/
  176. };
  177. typedef union CFragWhere1Union            CFragWhere1Union;
  178.  
  179. union CFragWhere2Union {                                        /* ! Meaning differs depending on value of "where".*/
  180.     UInt16                             forkInstance;                /* If the fragment is in an arbitrary byte stream fork.*/
  181. };
  182. typedef union CFragWhere2Union            CFragWhere2Union;
  183.  
  184. enum {
  185.     kDefaultCFragNameLen        = 16
  186. };
  187.  
  188.  
  189.  
  190. struct CFragResourceMember {
  191.     CFragArchitecture                 architecture;
  192.     UInt16                             reservedA;                    /* ! Must be zero!*/
  193.     UInt8                             reservedB;                    /* ! Must be zero!*/
  194.     UInt8                             updateLevel;
  195.     CFragVersionNumber                 currentVersion;
  196.     CFragVersionNumber                 oldDefVersion;
  197.     CFragUsage1Union                 uUsage1;
  198.     CFragUsage2Union                 uUsage2;
  199.     CFragUsage                         usage;
  200.     CFragLocatorKind                 where;
  201.     UInt32                             offset;
  202.     UInt32                             length;
  203.     CFragWhere1Union                 uWhere1;
  204.     CFragWhere2Union                 uWhere2;
  205.     UInt16                             extensionCount;                /* The number of extensions beyond the name.*/
  206.     UInt16                             memberSize;                    /* Size in bytes, includes all extensions.*/
  207.     unsigned char                     name[16];                    /* ! Actually a sized PString.*/
  208. };
  209. typedef struct CFragResourceMember        CFragResourceMember;
  210. typedef CFragResourceMember *            CFragResourceMemberPtr;
  211.  
  212. struct CFragResourceExtensionHeader {
  213.     UInt16                             extensionKind;
  214.     UInt16                             extensionSize;
  215. };
  216. typedef struct CFragResourceExtensionHeader CFragResourceExtensionHeader;
  217. typedef CFragResourceExtensionHeader *    CFragResourceExtensionHeaderPtr;
  218.  
  219. struct CFragResourceSearchExtension {
  220.     CFragResourceExtensionHeader     header;
  221.     OSType                             libKind;
  222.     unsigned char                     qualifiers[1];                /* ! Actually four PStrings.*/
  223. };
  224. typedef struct CFragResourceSearchExtension CFragResourceSearchExtension;
  225. typedef CFragResourceSearchExtension *    CFragResourceSearchExtensionPtr;
  226.  
  227. enum {
  228.     kCFragResourceSearchExtensionKind = 0x30EE
  229. };
  230.  
  231.  
  232.  
  233. struct CFragResource {
  234.     UInt32                             reservedA;                    /* ! Must be zero!*/
  235.     UInt32                             reservedB;                    /* ! Must be zero!*/
  236.     UInt16                             reservedC;                    /* ! Must be zero!*/
  237.     UInt16                             version;
  238.     UInt32                             reservedD;                    /* ! Must be zero!*/
  239.     UInt32                             reservedE;                    /* ! Must be zero!*/
  240.     UInt32                             reservedF;                    /* ! Must be zero!*/
  241.     UInt32                             reservedG;                    /* ! Must be zero!*/
  242.     UInt16                             reservedH;                    /* ! Must be zero!*/
  243.     UInt16                             memberCount;
  244.     CFragResourceMember             firstMember;
  245. };
  246. typedef struct CFragResource            CFragResource;
  247. typedef CFragResource *                    CFragResourcePtr;
  248. typedef CFragResourcePtr *                CFragResourceHandle;
  249.  
  250. enum {
  251.     kCurrCFragResourceVersion    = 1
  252. };
  253.  
  254.  
  255. #define AlignToFour(aValue)    (((aValue) + 3) & ~3)
  256. #define kBaseCFragResourceMemberSize    (offsetof ( CFragResourceMember, name ) )
  257. #define kBaseCFragResourceSize            (offsetof ( CFragResource, firstMember.name ) )
  258. #define NextCFragResourceMemberPtr(aMemberPtr)    \
  259.         ((CFragResourceMemberPtr) ((BytePtr)aMemberPtr + aMemberPtr->memberSize))
  260. #define FirstCFragResourceExtensionPtr(aMemberPtr)                                            \
  261.         ((CFragResourceExtensionHeaderPtr) ((BytePtr)aMemberPtr +                            \
  262.                                             AlignToFour ( kBaseCFragResourceMemberSize +    \
  263.                                                           aMemberPtr->name[0] + 1 ) ))
  264. #define NextCFragResourceExtensionPtr(anExtensionPtr)                    \
  265.         ((CFragResourceExtensionHeaderPtr) ((BytePtr)anExtensionPtr +    \
  266.                                             ((CFragResourceExtensionHeaderPtr)anExtensionPtr)->extensionSize ))
  267. #define FirstCFragResourceSearchQualifier(searchExtensionPtr)                    \
  268.         ((StringPtr) ((BytePtr)searchExtensionPtr +                                \
  269.                       offsetof ( CFragResourceSearchExtension, qualifiers ) ))
  270. #define NextCFragResourceSearchQualifier(searchQualifierPtr)    \
  271.         ((StringPtr) ((BytePtr)searchQualifierPtr +    searchQualifierPtr[0] + 1))
  272.  
  273. typedef struct OpaqueCFragConnectionID*  CFragConnectionID;
  274. typedef struct OpaqueCFragClosureID*     CFragClosureID;
  275. typedef struct OpaqueCFragContainerID*     CFragContainerID;
  276. typedef struct OpaqueCFragContextID*     CFragContextID;
  277.  
  278. typedef UInt32                             CFragLoadOptions;
  279.  
  280. enum {
  281.     kReferenceCFrag                = 0x0001,                        /* Try to use existing copy, increment reference counts.*/
  282.     kFindCFrag                    = 0x0002,                        /* Try find an existing copy, do not increment reference counts.*/
  283.     kPrivateCFragCopy            = 0x0005                        /* Prepare a new private copy.  (kReferenceCFrag | 0x0004)*/
  284. };
  285.  
  286.  
  287.  
  288. enum {
  289.     kUnresolvedCFragSymbolAddress = 0
  290. };
  291.  
  292.  
  293. typedef UInt8                             CFragSymbolClass;
  294.  
  295. enum {
  296.     kCodeCFragSymbol            = 0,
  297.     kDataCFragSymbol            = 1,
  298.     kTVectorCFragSymbol            = 2,
  299.     kTOCCFragSymbol                = 3,
  300.     kGlueCFragSymbol            = 4
  301. };
  302.  
  303.  
  304. /*
  305.    §
  306.    ===========================================================================================
  307.    Macros and Functions
  308.    ====================
  309. */
  310.  
  311.  
  312. #define CFragHasFileLocation(where)    \
  313.         ( ((where) == kDataForkCFragLocator) || ((where) == kResourceCFragLocator) )
  314.  
  315. EXTERN_API( OSErr )
  316. GetSharedLibrary                (ConstStr63Param         libName,
  317.                                  CFragArchitecture         archType,
  318.                                  CFragLoadOptions         loadFlags,
  319.                                  CFragConnectionID *    connID,
  320.                                  Ptr *                    mainAddr,
  321.                                  Str255                 errMessage)                            THREEWORDINLINE(0x3F3C, 0x0001, 0xAA5A);
  322.  
  323. EXTERN_API( OSErr )
  324. GetDiskFragment                    (const FSSpec *            fileSpec,
  325.                                  UInt32                 offset,
  326.                                  UInt32                 length,
  327.                                  ConstStr63Param         fragName,
  328.                                  CFragLoadOptions         loadFlags,
  329.                                  CFragConnectionID *    connID,
  330.                                  Ptr *                    mainAddr,
  331.                                  Str255                 errMessage)                            THREEWORDINLINE(0x3F3C, 0x0002, 0xAA5A);
  332.  
  333. EXTERN_API( OSErr )
  334. GetMemFragment                    (void *                    memAddr,
  335.                                  UInt32                 length,
  336.                                  ConstStr63Param         fragName,
  337.                                  CFragLoadOptions         loadFlags,
  338.                                  CFragConnectionID *    connID,
  339.                                  Ptr *                    mainAddr,
  340.                                  Str255                 errMessage)                            THREEWORDINLINE(0x3F3C, 0x0003, 0xAA5A);
  341.  
  342. EXTERN_API( OSErr )
  343. CloseConnection                    (CFragConnectionID *    connID)                                THREEWORDINLINE(0x3F3C, 0x0004, 0xAA5A);
  344.  
  345. EXTERN_API( OSErr )
  346. FindSymbol                        (CFragConnectionID         connID,
  347.                                  ConstStr255Param         symName,
  348.                                  Ptr *                    symAddr,
  349.                                  CFragSymbolClass *        symClass)                            THREEWORDINLINE(0x3F3C, 0x0005, 0xAA5A);
  350.  
  351. EXTERN_API( OSErr )
  352. CountSymbols                    (CFragConnectionID         connID,
  353.                                  long *                    symCount)                            THREEWORDINLINE(0x3F3C, 0x0006, 0xAA5A);
  354.  
  355. EXTERN_API( OSErr )
  356. GetIndSymbol                    (CFragConnectionID         connID,
  357.                                  long                     symIndex,
  358.                                  Str255                 symName,
  359.                                  Ptr *                    symAddr,
  360.                                  CFragSymbolClass *        symClass)                            THREEWORDINLINE(0x3F3C, 0x0007, 0xAA5A);
  361.  
  362.  
  363. /*
  364.    §
  365.    ===========================================================================================
  366.    Initialization & Termination Routines
  367.    =====================================
  368. */
  369.  
  370.  
  371. /*
  372.    -----------------------------------------------------------------------------------------
  373.    A fragment's initialization and termination routines are called when a new incarnation of
  374.    the fragment is created or destroyed, respectively.  Exactly when this occurs depends on
  375.    what kinds of section sharing the fragment has and how the fragment is prepared.  Import
  376.    libraries have at most one incarnation per process.  Fragments prepared with option
  377.    kPrivateCFragCopy may have many incarnations per process.
  378.    The initialization function is passed a pointer to an initialization information structure
  379.    and returns an OSErr.  If an initialization function returns a non-zero value the entire
  380.    closure of which it is a part fails.  The C prototype for an initialization function is:
  381.           OSErr    CFragInitFunction    ( const CFragInitBlock *    initBlock );
  382.    The termination procedure takes no parameters and returns nothing.  The C prototype for a
  383.    termination procedure is:
  384.           void    CFragTermProcedure    ( void );
  385.    Note that since the initialization and termination routines are themselves "CFM"-style
  386.    routines whether or not they have the "pascal" keyword is irrelevant.
  387. */
  388.  
  389.  
  390. /*
  391.    -----------------------------------------------------------------------------------------
  392.    ! Note:
  393.    ! The "System7" portion of these type names was introduced during the evolution towards
  394.    ! the now defunct Copland version of Mac OS.  Copland was to be called System 8 and there
  395.    ! were slightly different types for System 7 and System 8.  The "generic" type names were
  396.    ! conditionally defined for the desired target system.
  397.    ! Always use the generic types, e.g. CFragInitBlock!  The "System7" names have been kept
  398.    ! only to avoid perturbing code that (improperly) used the target specific type.
  399. */
  400.  
  401.  
  402.  
  403. struct CFragSystem7MemoryLocator {
  404.     LogicalAddress                     address;
  405.     UInt32                             length;
  406.     Boolean                         inPlace;
  407.     UInt8                             reservedA;                    /* ! Must be zero!*/
  408.     UInt16                             reservedB;                    /* ! Must be zero!*/
  409. };
  410. typedef struct CFragSystem7MemoryLocator CFragSystem7MemoryLocator;
  411.  
  412. struct CFragSystem7DiskFlatLocator {
  413.     FSSpecPtr                         fileSpec;
  414.     UInt32                             offset;
  415.     UInt32                             length;
  416. };
  417. typedef struct CFragSystem7DiskFlatLocator CFragSystem7DiskFlatLocator;
  418. /* ! This must have a file specification at the same offset as a disk flat locator!*/
  419.  
  420. struct CFragSystem7SegmentedLocator {
  421.     FSSpecPtr                         fileSpec;
  422.     OSType                             rsrcType;
  423.     SInt16                             rsrcID;
  424.     UInt16                             reservedA;                    /* ! Must be zero!*/
  425. };
  426. typedef struct CFragSystem7SegmentedLocator CFragSystem7SegmentedLocator;
  427.  
  428. struct CFragSystem7Locator {
  429.     SInt32                             where;
  430.     union {
  431.         CFragSystem7DiskFlatLocator     onDisk;
  432.         CFragSystem7MemoryLocator         inMem;
  433.         CFragSystem7SegmentedLocator     inSegs;
  434.     }                                 u;
  435. };
  436. typedef struct CFragSystem7Locator        CFragSystem7Locator;
  437. typedef CFragSystem7Locator *            CFragSystem7LocatorPtr;
  438.  
  439. struct CFragSystem7InitBlock {
  440.     CFragContextID                     contextID;
  441.     CFragClosureID                     closureID;
  442.     CFragConnectionID                 connectionID;
  443.     CFragSystem7Locator             fragLocator;
  444.     StringPtr                         libName;
  445.     UInt32                             reservedA;                    /* ! Must be zero!*/
  446. };
  447. typedef struct CFragSystem7InitBlock    CFragSystem7InitBlock;
  448. typedef CFragSystem7InitBlock *            CFragSystem7InitBlockPtr;
  449.  
  450. typedef CFragSystem7InitBlock             CFragInitBlock;
  451. typedef CFragSystem7InitBlockPtr         CFragInitBlockPtr;
  452. /* These init/term routine types are only of value to CFM itself.*/
  453. typedef CALLBACK_API_C( OSErr , CFragInitFunction )(const CFragInitBlock *initBlock);
  454. typedef CALLBACK_API_C( void , CFragTermProcedure )(void );
  455. /*
  456.    §
  457.    ===========================================================================================
  458.    Old Name Spellings
  459.    ==================
  460. */
  461.  
  462.  
  463. /*
  464.    -------------------------------------------------------------------------------------------
  465.    We've tried to reduce the risk of name collisions in the future by introducing the phrase
  466.    "CFrag" into constant and type names.  The old names are defined below in terms of the new.
  467. */
  468.  
  469.  
  470.  
  471. enum {
  472.     kLoadCFrag                    = kReferenceCFrag
  473. };
  474.  
  475.  
  476. #if OLDROUTINENAMES
  477. #define IsFileLocation        CFragHasFileLocation
  478. typedef CFragConnectionID                 ConnectionID;
  479. typedef CFragLoadOptions                 LoadFlags;
  480. typedef CFragSymbolClass                 SymClass;
  481. typedef CFragInitBlock                     InitBlock;
  482. typedef CFragInitBlockPtr                 InitBlockPtr;
  483. typedef CFragSystem7MemoryLocator         MemFragment;
  484. typedef CFragSystem7DiskFlatLocator     DiskFragment;
  485. typedef CFragSystem7SegmentedLocator     SegmentedFragment;
  486. typedef CFragSystem7Locator             FragmentLocator;
  487. typedef CFragSystem7LocatorPtr             FragmentLocatorPtr;
  488. typedef CFragSystem7MemoryLocator         CFragHFSMemoryLocator;
  489. typedef CFragSystem7DiskFlatLocator     CFragHFSDiskFlatLocator;
  490. typedef CFragSystem7SegmentedLocator     CFragHFSSegmentedLocator;
  491. typedef CFragSystem7Locator             CFragHFSLocator;
  492. typedef CFragSystem7LocatorPtr             CFragHFSLocatorPtr;
  493.  
  494. enum {
  495.     kPowerPCArch                = kPowerPCCFragArch,
  496.     kMotorola68KArch            = kMotorola68KCFragArch,
  497.     kAnyArchType                = kAnyCFragArch,
  498.     kNoLibName                    = 0,
  499.     kNoConnectionID                = 0,
  500.     kLoadLib                    = kLoadCFrag,
  501.     kFindLib                    = kFindCFrag,
  502.     kNewCFragCopy                = kPrivateCFragCopy,
  503.     kLoadNewCopy                = kPrivateCFragCopy,
  504.     kUseInPlace                    = 0x80,
  505.     kCodeSym                    = kCodeCFragSymbol,
  506.     kDataSym                    = kDataCFragSymbol,
  507.     kTVectSym                    = kTVectorCFragSymbol,
  508.     kTOCSym                        = kTOCCFragSymbol,
  509.     kGlueSym                    = kGlueCFragSymbol,
  510.     kInMem                        = kMemoryCFragLocator,
  511.     kOnDiskFlat                    = kDataForkCFragLocator,
  512.     kOnDiskSegmented            = kResourceCFragLocator,
  513.     kIsLib                        = kImportLibraryCFrag,
  514.     kIsApp                        = kApplicationCFrag,
  515.     kIsDropIn                    = kDropInAdditionCFrag,
  516.     kFullLib                    = kIsCompleteCFrag,
  517.     kUpdateLib                    = kFirstCFragUpdate,
  518.     kWholeFork                    = kCFragGoesToEOF,
  519.     kCFMRsrcType                = kCFragResourceType,
  520.     kCFMRsrcID                    = kCFragResourceID,
  521.     kSHLBFileType                = kCFragLibraryFileType,
  522.     kUnresolvedSymbolAddress    = kUnresolvedCFragSymbolAddress
  523. };
  524.  
  525.  
  526. enum {
  527.     kPowerPC                    = kPowerPCCFragArch,
  528.     kMotorola68K                = kMotorola68KCFragArch
  529. };
  530.  
  531. #endif  /* OLDROUTINENAMES */
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538. #if PRAGMA_STRUCT_ALIGN
  539.     #pragma options align=reset
  540. #elif PRAGMA_STRUCT_PACKPUSH
  541.     #pragma pack(pop)
  542. #elif PRAGMA_STRUCT_PACK
  543.     #pragma pack()
  544. #endif
  545.  
  546. #ifdef PRAGMA_IMPORT_OFF
  547. #pragma import off
  548. #elif PRAGMA_IMPORT
  549. #pragma import reset
  550. #endif
  551.  
  552. #ifdef __cplusplus
  553. }
  554. #endif
  555.  
  556. #endif /* __CODEFRAGMENTS__ */
  557.  
  558.