Team Fortress 2 Source Code as on 22/4/2020
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.

640 lines
22 KiB

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