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.

2198 lines
58 KiB

  1. /*
  2. File: MacMemory.h
  3. Contains: Memory Manager Interfaces.
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1985-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. #ifndef __MACMEMORY__
  11. #define __MACMEMORY__
  12. #ifndef __MACTYPES__
  13. #include <MacTypes.h>
  14. #endif
  15. #ifndef __MIXEDMODE__
  16. #include <MixedMode.h>
  17. #endif
  18. #if PRAGMA_ONCE
  19. #pragma once
  20. #endif
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. #if PRAGMA_IMPORT
  25. #pragma import on
  26. #endif
  27. #if PRAGMA_STRUCT_ALIGN
  28. #pragma options align=mac68k
  29. #elif PRAGMA_STRUCT_PACKPUSH
  30. #pragma pack(push, 2)
  31. #elif PRAGMA_STRUCT_PACK
  32. #pragma pack(2)
  33. #endif
  34. enum {
  35. maxSize = 0x7FFFFFF0 /*the largest block possible*/
  36. };
  37. enum {
  38. defaultPhysicalEntryCount = 8
  39. };
  40. enum {
  41. /* values returned from the GetPageState function */
  42. kPageInMemory = 0,
  43. kPageOnDisk = 1,
  44. kNotPaged = 2
  45. };
  46. enum {
  47. /* masks for Zone->heapType field */
  48. k32BitHeap = 1, /* valid in all Memory Managers */
  49. kNewStyleHeap = 2, /* true if new Heap Manager is present */
  50. kNewDebugHeap = 4 /* true if new Heap Manager is running in debug mode on this heap */
  51. };
  52. /* bits for use with HGetState/HSetState*/
  53. enum {
  54. kHandleIsResourceBit = 5,
  55. kHandlePurgeableBit = 6,
  56. kHandleLockedBit = 7
  57. };
  58. /* masks for use with HGetState/HSetState*/
  59. enum {
  60. kHandleIsResourceMask = 0x20,
  61. kHandlePurgeableMask = 0x40,
  62. kHandleLockedMask = 0x80
  63. };
  64. typedef CALLBACK_API( long , GrowZoneProcPtr )(Size cbNeeded);
  65. typedef CALLBACK_API( void , PurgeProcPtr )(Handle blockToPurge);
  66. typedef CALLBACK_API_REGISTER68K( void , UserFnProcPtr, (void * parameter) );
  67. typedef STACK_UPP_TYPE(GrowZoneProcPtr) GrowZoneUPP;
  68. typedef STACK_UPP_TYPE(PurgeProcPtr) PurgeUPP;
  69. typedef REGISTER_UPP_TYPE(UserFnProcPtr) UserFnUPP;
  70. struct Zone {
  71. Ptr bkLim;
  72. Ptr purgePtr;
  73. Ptr hFstFree;
  74. long zcbFree;
  75. GrowZoneUPP gzProc;
  76. short moreMast;
  77. short flags;
  78. short cntRel;
  79. short maxRel;
  80. short cntNRel;
  81. SInt8 heapType; /* previously "maxNRel", now holds flags (e.g. k32BitHeap)*/
  82. SInt8 unused;
  83. short cntEmpty;
  84. short cntHandles;
  85. long minCBFree;
  86. PurgeUPP purgeProc;
  87. Ptr sparePtr;
  88. Ptr allocPtr;
  89. short heapData;
  90. };
  91. typedef struct Zone Zone;
  92. typedef Zone * THz;
  93. typedef THz * THzPtr;
  94. struct MemoryBlock {
  95. void * address;
  96. unsigned long count;
  97. };
  98. typedef struct MemoryBlock MemoryBlock;
  99. struct LogicalToPhysicalTable {
  100. MemoryBlock logical;
  101. MemoryBlock physical[8];
  102. };
  103. typedef struct LogicalToPhysicalTable LogicalToPhysicalTable;
  104. typedef short PageState;
  105. typedef short StatusRegisterContents;
  106. enum {
  107. kVolumeVirtualMemoryInfoVersion1 = 1 /* first version of VolumeVirtualMemoryInfo*/
  108. };
  109. struct VolumeVirtualMemoryInfo {
  110. PBVersion version; /* Input: Version of the VolumeVirtualMemoryInfo structure*/
  111. SInt16 volumeRefNum; /* Input: volume reference number*/
  112. Boolean inUse; /* output: true if volume is currently used for file mapping*/
  113. UInt8 _fill;
  114. UInt32 vmOptions; /* output: tells what volume can support (same as DriverGestaltVMOptionsResponse vmOptions bits in DriverGestalt)*/
  115. /* end of kVolumeVirtualMemoryInfoVersion1 structure*/
  116. };
  117. typedef struct VolumeVirtualMemoryInfo VolumeVirtualMemoryInfo;
  118. typedef VolumeVirtualMemoryInfo * VolumeVirtualMemoryInfoPtr;
  119. /*
  120. * NewGrowZoneUPP()
  121. *
  122. * Availability:
  123. * Non-Carbon CFM: available as macro/inline
  124. * CarbonLib: in CarbonLib 1.0 and later
  125. * Mac OS X: in version 10.0 and later
  126. */
  127. EXTERN_API_C( GrowZoneUPP )
  128. NewGrowZoneUPP(GrowZoneProcPtr userRoutine);
  129. #if !OPAQUE_UPP_TYPES
  130. enum { uppGrowZoneProcInfo = 0x000000F0 }; /* pascal 4_bytes Func(4_bytes) */
  131. #ifdef __cplusplus
  132. inline DEFINE_API_C(GrowZoneUPP) NewGrowZoneUPP(GrowZoneProcPtr userRoutine) { return (GrowZoneUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGrowZoneProcInfo, GetCurrentArchitecture()); }
  133. #else
  134. #define NewGrowZoneUPP(userRoutine) (GrowZoneUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGrowZoneProcInfo, GetCurrentArchitecture())
  135. #endif
  136. #endif
  137. /*
  138. * NewPurgeUPP()
  139. *
  140. * Availability:
  141. * Non-Carbon CFM: available as macro/inline
  142. * CarbonLib: in CarbonLib 1.0 and later
  143. * Mac OS X: in version 10.0 and later
  144. */
  145. EXTERN_API_C( PurgeUPP )
  146. NewPurgeUPP(PurgeProcPtr userRoutine);
  147. #if !OPAQUE_UPP_TYPES
  148. enum { uppPurgeProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
  149. #ifdef __cplusplus
  150. inline DEFINE_API_C(PurgeUPP) NewPurgeUPP(PurgeProcPtr userRoutine) { return (PurgeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPurgeProcInfo, GetCurrentArchitecture()); }
  151. #else
  152. #define NewPurgeUPP(userRoutine) (PurgeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPurgeProcInfo, GetCurrentArchitecture())
  153. #endif
  154. #endif
  155. /*
  156. * NewUserFnUPP()
  157. *
  158. * Availability:
  159. * Non-Carbon CFM: available as macro/inline
  160. * CarbonLib: in CarbonLib 1.0 and later
  161. * Mac OS X: in version 10.0 and later
  162. */
  163. EXTERN_API_C( UserFnUPP )
  164. NewUserFnUPP(UserFnProcPtr userRoutine);
  165. #if !OPAQUE_UPP_TYPES
  166. enum { uppUserFnProcInfo = 0x00009802 }; /* register no_return_value Func(4_bytes:A0) */
  167. #ifdef __cplusplus
  168. inline DEFINE_API_C(UserFnUPP) NewUserFnUPP(UserFnProcPtr userRoutine) { return (UserFnUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppUserFnProcInfo, GetCurrentArchitecture()); }
  169. #else
  170. #define NewUserFnUPP(userRoutine) (UserFnUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppUserFnProcInfo, GetCurrentArchitecture())
  171. #endif
  172. #endif
  173. /*
  174. * DisposeGrowZoneUPP()
  175. *
  176. * Availability:
  177. * Non-Carbon CFM: available as macro/inline
  178. * CarbonLib: in CarbonLib 1.0 and later
  179. * Mac OS X: in version 10.0 and later
  180. */
  181. EXTERN_API_C( void )
  182. DisposeGrowZoneUPP(GrowZoneUPP userUPP);
  183. #if !OPAQUE_UPP_TYPES
  184. #ifdef __cplusplus
  185. inline DEFINE_API_C(void) DisposeGrowZoneUPP(GrowZoneUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
  186. #else
  187. #define DisposeGrowZoneUPP(userUPP) DisposeRoutineDescriptor(userUPP)
  188. #endif
  189. #endif
  190. /*
  191. * DisposePurgeUPP()
  192. *
  193. * Availability:
  194. * Non-Carbon CFM: available as macro/inline
  195. * CarbonLib: in CarbonLib 1.0 and later
  196. * Mac OS X: in version 10.0 and later
  197. */
  198. EXTERN_API_C( void )
  199. DisposePurgeUPP(PurgeUPP userUPP);
  200. #if !OPAQUE_UPP_TYPES
  201. #ifdef __cplusplus
  202. inline DEFINE_API_C(void) DisposePurgeUPP(PurgeUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
  203. #else
  204. #define DisposePurgeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
  205. #endif
  206. #endif
  207. /*
  208. * DisposeUserFnUPP()
  209. *
  210. * Availability:
  211. * Non-Carbon CFM: available as macro/inline
  212. * CarbonLib: in CarbonLib 1.0 and later
  213. * Mac OS X: in version 10.0 and later
  214. */
  215. EXTERN_API_C( void )
  216. DisposeUserFnUPP(UserFnUPP userUPP);
  217. #if !OPAQUE_UPP_TYPES
  218. #ifdef __cplusplus
  219. inline DEFINE_API_C(void) DisposeUserFnUPP(UserFnUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
  220. #else
  221. #define DisposeUserFnUPP(userUPP) DisposeRoutineDescriptor(userUPP)
  222. #endif
  223. #endif
  224. /*
  225. * InvokeGrowZoneUPP()
  226. *
  227. * Availability:
  228. * Non-Carbon CFM: available as macro/inline
  229. * CarbonLib: in CarbonLib 1.0 and later
  230. * Mac OS X: in version 10.0 and later
  231. */
  232. EXTERN_API_C( long )
  233. InvokeGrowZoneUPP(
  234. Size cbNeeded,
  235. GrowZoneUPP userUPP);
  236. #if !OPAQUE_UPP_TYPES
  237. #ifdef __cplusplus
  238. inline DEFINE_API_C(long) InvokeGrowZoneUPP(Size cbNeeded, GrowZoneUPP userUPP) { return (long)CALL_ONE_PARAMETER_UPP(userUPP, uppGrowZoneProcInfo, cbNeeded); }
  239. #else
  240. #define InvokeGrowZoneUPP(cbNeeded, userUPP) (long)CALL_ONE_PARAMETER_UPP((userUPP), uppGrowZoneProcInfo, (cbNeeded))
  241. #endif
  242. #endif
  243. /*
  244. * InvokePurgeUPP()
  245. *
  246. * Availability:
  247. * Non-Carbon CFM: available as macro/inline
  248. * CarbonLib: in CarbonLib 1.0 and later
  249. * Mac OS X: in version 10.0 and later
  250. */
  251. EXTERN_API_C( void )
  252. InvokePurgeUPP(
  253. Handle blockToPurge,
  254. PurgeUPP userUPP);
  255. #if !OPAQUE_UPP_TYPES
  256. #ifdef __cplusplus
  257. inline DEFINE_API_C(void) InvokePurgeUPP(Handle blockToPurge, PurgeUPP userUPP) { CALL_ONE_PARAMETER_UPP(userUPP, uppPurgeProcInfo, blockToPurge); }
  258. #else
  259. #define InvokePurgeUPP(blockToPurge, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppPurgeProcInfo, (blockToPurge))
  260. #endif
  261. #endif
  262. /*
  263. * InvokeUserFnUPP()
  264. *
  265. * Availability:
  266. * Non-Carbon CFM: available as macro/inline
  267. * CarbonLib: in CarbonLib 1.0 and later
  268. * Mac OS X: in version 10.0 and later
  269. */
  270. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  271. #pragma parameter InvokeUserFnUPP(__A0, __A1)
  272. #endif
  273. EXTERN_API_C( void )
  274. InvokeUserFnUPP(
  275. void * parameter,
  276. UserFnUPP userUPP) ONEWORDINLINE(0x4E91);
  277. #if !OPAQUE_UPP_TYPES && (!TARGET_OS_MAC || !TARGET_CPU_68K || TARGET_RT_MAC_CFM)
  278. #ifdef __cplusplus
  279. inline DEFINE_API_C(void) InvokeUserFnUPP(void * parameter, UserFnUPP userUPP) { CALL_ONE_PARAMETER_UPP(userUPP, uppUserFnProcInfo, parameter); }
  280. #else
  281. #define InvokeUserFnUPP(parameter, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppUserFnProcInfo, (parameter))
  282. #endif
  283. #endif
  284. #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
  285. /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
  286. #define NewGrowZoneProc(userRoutine) NewGrowZoneUPP(userRoutine)
  287. #define NewPurgeProc(userRoutine) NewPurgeUPP(userRoutine)
  288. #define NewUserFnProc(userRoutine) NewUserFnUPP(userRoutine)
  289. #define CallGrowZoneProc(userRoutine, cbNeeded) InvokeGrowZoneUPP(cbNeeded, userRoutine)
  290. #define CallPurgeProc(userRoutine, blockToPurge) InvokePurgeUPP(blockToPurge, userRoutine)
  291. #define CallUserFnProc(userRoutine, parameter) InvokeUserFnUPP(parameter, userRoutine)
  292. #endif /* CALL_NOT_IN_CARBON */
  293. #if CALL_NOT_IN_CARBON
  294. /*
  295. * GetApplLimit()
  296. *
  297. * Availability:
  298. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  299. * CarbonLib: not available
  300. * Mac OS X: not available
  301. */
  302. EXTERN_API( Ptr )
  303. GetApplLimit(void) TWOWORDINLINE(0x2EB8, 0x0130);
  304. /*
  305. * SystemZone()
  306. *
  307. * Availability:
  308. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  309. * CarbonLib: not available
  310. * Mac OS X: not available
  311. */
  312. EXTERN_API( THz )
  313. SystemZone(void) TWOWORDINLINE(0x2EB8, 0x02A6);
  314. /*
  315. * ApplicationZone()
  316. *
  317. * Availability:
  318. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  319. * CarbonLib: not available
  320. * Mac OS X: not available
  321. */
  322. EXTERN_API( THz )
  323. ApplicationZone(void) TWOWORDINLINE(0x2EB8, 0x02AA);
  324. #endif /* CALL_NOT_IN_CARBON */
  325. /*
  326. * GZSaveHnd()
  327. *
  328. * Availability:
  329. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  330. * CarbonLib: in CarbonLib 1.0 and later
  331. * Mac OS X: in version 10.0 and later
  332. */
  333. EXTERN_API( Handle )
  334. GZSaveHnd(void) TWOWORDINLINE(0x2EB8, 0x0328);
  335. /*
  336. * TopMem()
  337. *
  338. * Availability:
  339. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  340. * CarbonLib: in CarbonLib 1.0 and later
  341. * Mac OS X: in version 10.0 and later
  342. */
  343. EXTERN_API( Ptr )
  344. TopMem(void) TWOWORDINLINE(0x2EB8, 0x0108);
  345. /*
  346. * MemError()
  347. *
  348. * Availability:
  349. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  350. * CarbonLib: in CarbonLib 1.0 and later
  351. * Mac OS X: in version 10.0 and later
  352. */
  353. EXTERN_API( OSErr )
  354. MemError(void) TWOWORDINLINE(0x3EB8, 0x0220);
  355. #if CALL_NOT_IN_CARBON
  356. /*
  357. * GetZone()
  358. *
  359. * Availability:
  360. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  361. * CarbonLib: not available
  362. * Mac OS X: not available
  363. */
  364. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  365. #pragma parameter __A0 GetZone
  366. #endif
  367. EXTERN_API( THz )
  368. GetZone(void) ONEWORDINLINE(0xA11A);
  369. #endif /* CALL_NOT_IN_CARBON */
  370. /*
  371. * NewHandle()
  372. *
  373. * Availability:
  374. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  375. * CarbonLib: in CarbonLib 1.0 and later
  376. * Mac OS X: in version 10.0 and later
  377. */
  378. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  379. #pragma parameter __A0 NewHandle(__D0)
  380. #endif
  381. EXTERN_API( Handle )
  382. NewHandle(Size byteCount) ONEWORDINLINE(0xA122);
  383. #if CALL_NOT_IN_CARBON
  384. /*
  385. * NewHandleSys()
  386. *
  387. * Availability:
  388. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  389. * CarbonLib: not available
  390. * Mac OS X: not available
  391. */
  392. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  393. #pragma parameter __A0 NewHandleSys(__D0)
  394. #endif
  395. EXTERN_API( Handle )
  396. NewHandleSys(Size byteCount) ONEWORDINLINE(0xA522);
  397. #endif /* CALL_NOT_IN_CARBON */
  398. /*
  399. * NewHandleClear()
  400. *
  401. * Availability:
  402. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  403. * CarbonLib: in CarbonLib 1.0 and later
  404. * Mac OS X: in version 10.0 and later
  405. */
  406. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  407. #pragma parameter __A0 NewHandleClear(__D0)
  408. #endif
  409. EXTERN_API( Handle )
  410. NewHandleClear(Size byteCount) ONEWORDINLINE(0xA322);
  411. #if CALL_NOT_IN_CARBON
  412. /*
  413. * NewHandleSysClear()
  414. *
  415. * Availability:
  416. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  417. * CarbonLib: not available
  418. * Mac OS X: not available
  419. */
  420. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  421. #pragma parameter __A0 NewHandleSysClear(__D0)
  422. #endif
  423. EXTERN_API( Handle )
  424. NewHandleSysClear(Size byteCount) ONEWORDINLINE(0xA722);
  425. /*
  426. * HandleZone()
  427. *
  428. * Availability:
  429. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  430. * CarbonLib: not available
  431. * Mac OS X: not available
  432. */
  433. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  434. #pragma parameter __A0 HandleZone(__A0)
  435. #endif
  436. EXTERN_API( THz )
  437. HandleZone(Handle h) ONEWORDINLINE(0xA126);
  438. #endif /* CALL_NOT_IN_CARBON */
  439. /*
  440. * RecoverHandle()
  441. *
  442. * Availability:
  443. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  444. * CarbonLib: in CarbonLib 1.0 and later
  445. * Mac OS X: in version 10.0 and later
  446. */
  447. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  448. #pragma parameter __A0 RecoverHandle(__A0)
  449. #endif
  450. EXTERN_API( Handle )
  451. RecoverHandle(Ptr p) ONEWORDINLINE(0xA128);
  452. #if CALL_NOT_IN_CARBON
  453. /*
  454. * RecoverHandleSys()
  455. *
  456. * Availability:
  457. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  458. * CarbonLib: not available
  459. * Mac OS X: not available
  460. */
  461. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  462. #pragma parameter __A0 RecoverHandleSys(__A0)
  463. #endif
  464. EXTERN_API( Handle )
  465. RecoverHandleSys(Ptr p) ONEWORDINLINE(0xA528);
  466. #endif /* CALL_NOT_IN_CARBON */
  467. /*
  468. * NewPtr()
  469. *
  470. * Availability:
  471. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  472. * CarbonLib: in CarbonLib 1.0 and later
  473. * Mac OS X: in version 10.0 and later
  474. */
  475. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  476. #pragma parameter __A0 NewPtr(__D0)
  477. #endif
  478. EXTERN_API( Ptr )
  479. NewPtr(Size byteCount) ONEWORDINLINE(0xA11E);
  480. #if CALL_NOT_IN_CARBON
  481. /*
  482. * NewPtrSys()
  483. *
  484. * Availability:
  485. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  486. * CarbonLib: not available
  487. * Mac OS X: not available
  488. */
  489. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  490. #pragma parameter __A0 NewPtrSys(__D0)
  491. #endif
  492. EXTERN_API( Ptr )
  493. NewPtrSys(Size byteCount) ONEWORDINLINE(0xA51E);
  494. #endif /* CALL_NOT_IN_CARBON */
  495. /*
  496. * NewPtrClear()
  497. *
  498. * Availability:
  499. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  500. * CarbonLib: in CarbonLib 1.0 and later
  501. * Mac OS X: in version 10.0 and later
  502. */
  503. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  504. #pragma parameter __A0 NewPtrClear(__D0)
  505. #endif
  506. EXTERN_API( Ptr )
  507. NewPtrClear(Size byteCount) ONEWORDINLINE(0xA31E);
  508. #if CALL_NOT_IN_CARBON
  509. /*
  510. * NewPtrSysClear()
  511. *
  512. * Availability:
  513. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  514. * CarbonLib: not available
  515. * Mac OS X: not available
  516. */
  517. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  518. #pragma parameter __A0 NewPtrSysClear(__D0)
  519. #endif
  520. EXTERN_API( Ptr )
  521. NewPtrSysClear(Size byteCount) ONEWORDINLINE(0xA71E);
  522. /*
  523. * PtrZone()
  524. *
  525. * Availability:
  526. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  527. * CarbonLib: not available
  528. * Mac OS X: not available
  529. */
  530. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  531. #pragma parameter __A0 PtrZone(__A0)
  532. #endif
  533. EXTERN_API( THz )
  534. PtrZone(Ptr p) ONEWORDINLINE(0xA148);
  535. #endif /* CALL_NOT_IN_CARBON */
  536. /*
  537. * MaxBlock()
  538. *
  539. * Availability:
  540. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  541. * CarbonLib: in CarbonLib 1.0 and later
  542. * Mac OS X: in version 10.0 and later
  543. */
  544. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  545. #pragma parameter __D0 MaxBlock
  546. #endif
  547. EXTERN_API( long )
  548. MaxBlock(void) ONEWORDINLINE(0xA061);
  549. #if CALL_NOT_IN_CARBON
  550. /*
  551. * MaxBlockSys()
  552. *
  553. * Availability:
  554. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  555. * CarbonLib: not available
  556. * Mac OS X: not available
  557. */
  558. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  559. #pragma parameter __D0 MaxBlockSys
  560. #endif
  561. EXTERN_API( long )
  562. MaxBlockSys(void) ONEWORDINLINE(0xA461);
  563. #endif /* CALL_NOT_IN_CARBON */
  564. /*
  565. * StackSpace()
  566. *
  567. * Availability:
  568. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  569. * CarbonLib: in CarbonLib 1.0 and later
  570. * Mac OS X: in version 10.0 and later
  571. */
  572. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  573. #pragma parameter __D0 StackSpace
  574. #endif
  575. EXTERN_API( long )
  576. StackSpace(void) ONEWORDINLINE(0xA065);
  577. /*
  578. * NewEmptyHandle()
  579. *
  580. * Availability:
  581. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  582. * CarbonLib: in CarbonLib 1.0 and later
  583. * Mac OS X: in version 10.0 and later
  584. */
  585. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  586. #pragma parameter __A0 NewEmptyHandle
  587. #endif
  588. EXTERN_API( Handle )
  589. NewEmptyHandle(void) ONEWORDINLINE(0xA166);
  590. #if CALL_NOT_IN_CARBON
  591. /*
  592. * NewEmptyHandleSys()
  593. *
  594. * Availability:
  595. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  596. * CarbonLib: not available
  597. * Mac OS X: not available
  598. */
  599. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  600. #pragma parameter __A0 NewEmptyHandleSys
  601. #endif
  602. EXTERN_API( Handle )
  603. NewEmptyHandleSys(void) ONEWORDINLINE(0xA566);
  604. #endif /* CALL_NOT_IN_CARBON */
  605. /*
  606. * HLock()
  607. *
  608. * Availability:
  609. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  610. * CarbonLib: in CarbonLib 1.0 and later
  611. * Mac OS X: in version 10.0 and later
  612. */
  613. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  614. #pragma parameter HLock(__A0)
  615. #endif
  616. EXTERN_API( void )
  617. HLock(Handle h) ONEWORDINLINE(0xA029);
  618. /*
  619. * HUnlock()
  620. *
  621. * Availability:
  622. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  623. * CarbonLib: in CarbonLib 1.0 and later
  624. * Mac OS X: in version 10.0 and later
  625. */
  626. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  627. #pragma parameter HUnlock(__A0)
  628. #endif
  629. EXTERN_API( void )
  630. HUnlock(Handle h) ONEWORDINLINE(0xA02A);
  631. /*
  632. * HPurge()
  633. *
  634. * Availability:
  635. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  636. * CarbonLib: in CarbonLib 1.0 and later
  637. * Mac OS X: in version 10.0 and later
  638. */
  639. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  640. #pragma parameter HPurge(__A0)
  641. #endif
  642. EXTERN_API( void )
  643. HPurge(Handle h) ONEWORDINLINE(0xA049);
  644. /*
  645. * HNoPurge()
  646. *
  647. * Availability:
  648. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  649. * CarbonLib: in CarbonLib 1.0 and later
  650. * Mac OS X: in version 10.0 and later
  651. */
  652. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  653. #pragma parameter HNoPurge(__A0)
  654. #endif
  655. EXTERN_API( void )
  656. HNoPurge(Handle h) ONEWORDINLINE(0xA04A);
  657. /*
  658. * HLockHi()
  659. *
  660. * Availability:
  661. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  662. * CarbonLib: in CarbonLib 1.0 and later
  663. * Mac OS X: in version 10.0 and later
  664. */
  665. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  666. #pragma parameter HLockHi(__A0)
  667. #endif
  668. EXTERN_API( void )
  669. HLockHi(Handle h) TWOWORDINLINE(0xA064, 0xA029);
  670. /*
  671. * TempNewHandle()
  672. *
  673. * Availability:
  674. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  675. * CarbonLib: in CarbonLib 1.0 and later
  676. * Mac OS X: in version 10.0 and later
  677. */
  678. EXTERN_API( Handle )
  679. TempNewHandle(
  680. Size logicalSize,
  681. OSErr * resultCode) THREEWORDINLINE(0x3F3C, 0x001D, 0xA88F);
  682. /*
  683. * TempMaxMem()
  684. *
  685. * Availability:
  686. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  687. * CarbonLib: in CarbonLib 1.0 and later
  688. * Mac OS X: in version 10.0 and later
  689. */
  690. EXTERN_API( Size )
  691. TempMaxMem(Size * grow) THREEWORDINLINE(0x3F3C, 0x0015, 0xA88F);
  692. /*
  693. * TempFreeMem()
  694. *
  695. * Availability:
  696. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  697. * CarbonLib: in CarbonLib 1.0 and later
  698. * Mac OS X: in version 10.0 and later
  699. */
  700. EXTERN_API( long )
  701. TempFreeMem(void) THREEWORDINLINE(0x3F3C, 0x0018, 0xA88F);
  702. #if CALL_NOT_IN_CARBON
  703. /*
  704. * InitZone()
  705. *
  706. * Availability:
  707. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  708. * CarbonLib: not available
  709. * Mac OS X: not available
  710. */
  711. EXTERN_API( void )
  712. InitZone(
  713. GrowZoneUPP pgrowZone,
  714. short cmoreMasters,
  715. void * limitPtr,
  716. void * startPtr);
  717. #endif /* CALL_NOT_IN_CARBON */
  718. #if CALL_NOT_IN_CARBON
  719. /*
  720. * SetZone()
  721. *
  722. * Availability:
  723. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  724. * CarbonLib: not available
  725. * Mac OS X: not available
  726. */
  727. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  728. #pragma parameter SetZone(__A0)
  729. #endif
  730. EXTERN_API( void )
  731. SetZone(THz hz) ONEWORDINLINE(0xA01B);
  732. #endif /* CALL_NOT_IN_CARBON */
  733. /*
  734. * CompactMem()
  735. *
  736. * Availability:
  737. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  738. * CarbonLib: in CarbonLib 1.0 and later
  739. * Mac OS X: in version 10.0 and later
  740. */
  741. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  742. #pragma parameter __D0 CompactMem(__D0)
  743. #endif
  744. EXTERN_API( Size )
  745. CompactMem(Size cbNeeded) ONEWORDINLINE(0xA04C);
  746. #if CALL_NOT_IN_CARBON
  747. /*
  748. * CompactMemSys()
  749. *
  750. * Availability:
  751. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  752. * CarbonLib: not available
  753. * Mac OS X: not available
  754. */
  755. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  756. #pragma parameter __D0 CompactMemSys(__D0)
  757. #endif
  758. EXTERN_API( Size )
  759. CompactMemSys(Size cbNeeded) ONEWORDINLINE(0xA44C);
  760. #endif /* CALL_NOT_IN_CARBON */
  761. /*
  762. * PurgeMem()
  763. *
  764. * Availability:
  765. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  766. * CarbonLib: in CarbonLib 1.0 and later
  767. * Mac OS X: in version 10.0 and later
  768. */
  769. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  770. #pragma parameter PurgeMem(__D0)
  771. #endif
  772. EXTERN_API( void )
  773. PurgeMem(Size cbNeeded) ONEWORDINLINE(0xA04D);
  774. #if CALL_NOT_IN_CARBON
  775. /*
  776. * PurgeMemSys()
  777. *
  778. * Availability:
  779. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  780. * CarbonLib: not available
  781. * Mac OS X: not available
  782. */
  783. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  784. #pragma parameter PurgeMemSys(__D0)
  785. #endif
  786. EXTERN_API( void )
  787. PurgeMemSys(Size cbNeeded) ONEWORDINLINE(0xA44D);
  788. #endif /* CALL_NOT_IN_CARBON */
  789. /*
  790. * FreeMem()
  791. *
  792. * Availability:
  793. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  794. * CarbonLib: in CarbonLib 1.0 and later
  795. * Mac OS X: in version 10.0 and later
  796. */
  797. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  798. #pragma parameter __D0 FreeMem
  799. #endif
  800. EXTERN_API( long )
  801. FreeMem(void) ONEWORDINLINE(0xA01C);
  802. #if CALL_NOT_IN_CARBON
  803. /*
  804. * FreeMemSys()
  805. *
  806. * Availability:
  807. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  808. * CarbonLib: not available
  809. * Mac OS X: not available
  810. */
  811. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  812. #pragma parameter __D0 FreeMemSys
  813. #endif
  814. EXTERN_API( long )
  815. FreeMemSys(void) ONEWORDINLINE(0xA41C);
  816. #endif /* CALL_NOT_IN_CARBON */
  817. /*
  818. * ReserveMem()
  819. *
  820. * Availability:
  821. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  822. * CarbonLib: in CarbonLib 1.0 and later
  823. * Mac OS X: in version 10.0 and later
  824. */
  825. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  826. #pragma parameter ReserveMem(__D0)
  827. #endif
  828. EXTERN_API( void )
  829. ReserveMem(Size cbNeeded) ONEWORDINLINE(0xA040);
  830. #if CALL_NOT_IN_CARBON
  831. /*
  832. * ReserveMemSys()
  833. *
  834. * Availability:
  835. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  836. * CarbonLib: not available
  837. * Mac OS X: not available
  838. */
  839. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  840. #pragma parameter ReserveMemSys(__D0)
  841. #endif
  842. EXTERN_API( void )
  843. ReserveMemSys(Size cbNeeded) ONEWORDINLINE(0xA440);
  844. #endif /* CALL_NOT_IN_CARBON */
  845. /*
  846. * MaxMem()
  847. *
  848. * Availability:
  849. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  850. * CarbonLib: in CarbonLib 1.0 and later
  851. * Mac OS X: in version 10.0 and later
  852. */
  853. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  854. #pragma parameter __D0 MaxMem(__A1)
  855. #endif
  856. EXTERN_API( Size )
  857. MaxMem(Size * grow) TWOWORDINLINE(0xA11D, 0x2288);
  858. #if CALL_NOT_IN_CARBON
  859. /*
  860. * MaxMemSys()
  861. *
  862. * Availability:
  863. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  864. * CarbonLib: not available
  865. * Mac OS X: not available
  866. */
  867. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  868. #pragma parameter __D0 MaxMemSys(__A1)
  869. #endif
  870. EXTERN_API( Size )
  871. MaxMemSys(Size * grow) TWOWORDINLINE(0xA51D, 0x2288);
  872. #endif /* CALL_NOT_IN_CARBON */
  873. /*
  874. * SetGrowZone()
  875. *
  876. * Availability:
  877. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  878. * CarbonLib: in CarbonLib 1.0 and later
  879. * Mac OS X: in version 10.0 and later
  880. */
  881. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  882. #pragma parameter SetGrowZone(__A0)
  883. #endif
  884. EXTERN_API( void )
  885. SetGrowZone(GrowZoneUPP growZone) ONEWORDINLINE(0xA04B);
  886. /*
  887. * GetGrowZone()
  888. *
  889. * Availability:
  890. * Non-Carbon CFM: not available
  891. * CarbonLib: in CarbonLib 1.1 and later
  892. * Mac OS X: in version 10.0 and later
  893. */
  894. EXTERN_API( GrowZoneUPP )
  895. GetGrowZone(void);
  896. /*
  897. * MoveHHi()
  898. *
  899. * Availability:
  900. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  901. * CarbonLib: in CarbonLib 1.0 and later
  902. * Mac OS X: in version 10.0 and later
  903. */
  904. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  905. #pragma parameter MoveHHi(__A0)
  906. #endif
  907. EXTERN_API( void )
  908. MoveHHi(Handle h) ONEWORDINLINE(0xA064);
  909. /*
  910. * DisposePtr()
  911. *
  912. * Availability:
  913. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  914. * CarbonLib: in CarbonLib 1.0 and later
  915. * Mac OS X: in version 10.0 and later
  916. */
  917. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  918. #pragma parameter DisposePtr(__A0)
  919. #endif
  920. EXTERN_API( void )
  921. DisposePtr(Ptr p) ONEWORDINLINE(0xA01F);
  922. /*
  923. * GetPtrSize()
  924. *
  925. * Availability:
  926. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  927. * CarbonLib: in CarbonLib 1.0 and later
  928. * Mac OS X: in version 10.0 and later
  929. */
  930. EXTERN_API( Size )
  931. GetPtrSize(Ptr p);
  932. /*
  933. * SetPtrSize()
  934. *
  935. * Availability:
  936. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  937. * CarbonLib: in CarbonLib 1.0 and later
  938. * Mac OS X: in version 10.0 and later
  939. */
  940. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  941. #pragma parameter SetPtrSize(__A0, __D0)
  942. #endif
  943. EXTERN_API( void )
  944. SetPtrSize(
  945. Ptr p,
  946. Size newSize) ONEWORDINLINE(0xA020);
  947. /*
  948. * DisposeHandle()
  949. *
  950. * Availability:
  951. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  952. * CarbonLib: in CarbonLib 1.0 and later
  953. * Mac OS X: in version 10.0 and later
  954. */
  955. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  956. #pragma parameter DisposeHandle(__A0)
  957. #endif
  958. EXTERN_API( void )
  959. DisposeHandle(Handle h) ONEWORDINLINE(0xA023);
  960. /*
  961. * SetHandleSize()
  962. *
  963. * Availability:
  964. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  965. * CarbonLib: in CarbonLib 1.0 and later
  966. * Mac OS X: in version 10.0 and later
  967. */
  968. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  969. #pragma parameter SetHandleSize(__A0, __D0)
  970. #endif
  971. EXTERN_API( void )
  972. SetHandleSize(
  973. Handle h,
  974. Size newSize) ONEWORDINLINE(0xA024);
  975. /*
  976. NOTE
  977. GetHandleSize and GetPtrSize are documented in Inside Mac as returning 0
  978. in case of an error, but the traps actually return an error code in D0.
  979. The glue sets D0 to 0 if an error occurred.
  980. */
  981. /*
  982. * GetHandleSize()
  983. *
  984. * Availability:
  985. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  986. * CarbonLib: in CarbonLib 1.0 and later
  987. * Mac OS X: in version 10.0 and later
  988. */
  989. EXTERN_API( Size )
  990. GetHandleSize(Handle h);
  991. #if CALL_NOT_IN_CARBON
  992. /*
  993. * InlineGetHandleSize()
  994. *
  995. * Availability:
  996. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  997. * CarbonLib: not available
  998. * Mac OS X: not available
  999. */
  1000. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1001. #pragma parameter __D0 InlineGetHandleSize(__A0)
  1002. #endif
  1003. EXTERN_API( Size )
  1004. InlineGetHandleSize(Handle h) ONEWORDINLINE(0xA025);
  1005. #endif /* CALL_NOT_IN_CARBON */
  1006. #if !TARGET_OS_MAC
  1007. #define InlineGetHandleSize GetHandleSize
  1008. #endif
  1009. /*
  1010. * ReallocateHandle()
  1011. *
  1012. * Availability:
  1013. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1014. * CarbonLib: in CarbonLib 1.0 and later
  1015. * Mac OS X: in version 10.0 and later
  1016. */
  1017. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1018. #pragma parameter ReallocateHandle(__A0, __D0)
  1019. #endif
  1020. EXTERN_API( void )
  1021. ReallocateHandle(
  1022. Handle h,
  1023. Size byteCount) ONEWORDINLINE(0xA027);
  1024. #if CALL_NOT_IN_CARBON
  1025. /*
  1026. * ReallocateHandleSys()
  1027. *
  1028. * Availability:
  1029. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  1030. * CarbonLib: not available
  1031. * Mac OS X: not available
  1032. */
  1033. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1034. #pragma parameter ReallocateHandleSys(__A0, __D0)
  1035. #endif
  1036. EXTERN_API( void )
  1037. ReallocateHandleSys(
  1038. Handle h,
  1039. Size byteCount) ONEWORDINLINE(0xA427);
  1040. #endif /* CALL_NOT_IN_CARBON */
  1041. /*
  1042. * EmptyHandle()
  1043. *
  1044. * Availability:
  1045. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1046. * CarbonLib: in CarbonLib 1.0 and later
  1047. * Mac OS X: in version 10.0 and later
  1048. */
  1049. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1050. #pragma parameter EmptyHandle(__A0)
  1051. #endif
  1052. EXTERN_API( void )
  1053. EmptyHandle(Handle h) ONEWORDINLINE(0xA02B);
  1054. /*
  1055. * HSetRBit()
  1056. *
  1057. * Availability:
  1058. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1059. * CarbonLib: in CarbonLib 1.0 and later
  1060. * Mac OS X: in version 10.0 and later
  1061. */
  1062. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1063. #pragma parameter HSetRBit(__A0)
  1064. #endif
  1065. EXTERN_API( void )
  1066. HSetRBit(Handle h) ONEWORDINLINE(0xA067);
  1067. /*
  1068. * HClrRBit()
  1069. *
  1070. * Availability:
  1071. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1072. * CarbonLib: in CarbonLib 1.0 and later
  1073. * Mac OS X: in version 10.0 and later
  1074. */
  1075. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1076. #pragma parameter HClrRBit(__A0)
  1077. #endif
  1078. EXTERN_API( void )
  1079. HClrRBit(Handle h) ONEWORDINLINE(0xA068);
  1080. /*
  1081. * HGetState()
  1082. *
  1083. * Availability:
  1084. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1085. * CarbonLib: in CarbonLib 1.0 and later
  1086. * Mac OS X: in version 10.0 and later
  1087. */
  1088. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1089. #pragma parameter __D0 HGetState(__A0)
  1090. #endif
  1091. EXTERN_API( SInt8 )
  1092. HGetState(Handle h) ONEWORDINLINE(0xA069);
  1093. /*
  1094. * HSetState()
  1095. *
  1096. * Availability:
  1097. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1098. * CarbonLib: in CarbonLib 1.0 and later
  1099. * Mac OS X: in version 10.0 and later
  1100. */
  1101. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1102. #pragma parameter HSetState(__A0, __D0)
  1103. #endif
  1104. EXTERN_API( void )
  1105. HSetState(
  1106. Handle h,
  1107. SInt8 flags) ONEWORDINLINE(0xA06A);
  1108. /*
  1109. * PurgeSpace()
  1110. *
  1111. * Availability:
  1112. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1113. * CarbonLib: in CarbonLib 1.0 and later
  1114. * Mac OS X: in version 10.0 and later
  1115. */
  1116. EXTERN_API( void )
  1117. PurgeSpace(
  1118. long * total,
  1119. long * contig);
  1120. /*
  1121. PurgeSpaceTotal and PurgeSpaceContiguous are currently only implement
  1122. on classic 68K. The are the same as PurgeSpace() but return just
  1123. one value (either total space purgable or contiguous space purgable).
  1124. Begining in Mac OS 8.5 they are available in InterfaceLib.
  1125. */
  1126. /*
  1127. * PurgeSpaceTotal()
  1128. *
  1129. * Availability:
  1130. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  1131. * CarbonLib: in CarbonLib 1.0 and later
  1132. * Mac OS X: in version 10.0 and later
  1133. */
  1134. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1135. #pragma parameter __A0 PurgeSpaceTotal
  1136. #endif
  1137. EXTERN_API( long )
  1138. PurgeSpaceTotal(void) ONEWORDINLINE(0xA062);
  1139. /*
  1140. * PurgeSpaceContiguous()
  1141. *
  1142. * Availability:
  1143. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  1144. * CarbonLib: in CarbonLib 1.0 and later
  1145. * Mac OS X: in version 10.0 and later
  1146. */
  1147. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1148. #pragma parameter __D0 PurgeSpaceContiguous
  1149. #endif
  1150. EXTERN_API( long )
  1151. PurgeSpaceContiguous(void) ONEWORDINLINE(0xA062);
  1152. #if CALL_NOT_IN_CARBON
  1153. /*
  1154. * PurgeSpaceSysTotal()
  1155. *
  1156. * Availability:
  1157. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  1158. * CarbonLib: not available
  1159. * Mac OS X: not available
  1160. */
  1161. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1162. #pragma parameter __A0 PurgeSpaceSysTotal
  1163. #endif
  1164. EXTERN_API( long )
  1165. PurgeSpaceSysTotal(void) ONEWORDINLINE(0xA562);
  1166. /*
  1167. * PurgeSpaceSysContiguous()
  1168. *
  1169. * Availability:
  1170. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  1171. * CarbonLib: not available
  1172. * Mac OS X: not available
  1173. */
  1174. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1175. #pragma parameter __D0 PurgeSpaceSysContiguous
  1176. #endif
  1177. EXTERN_API( long )
  1178. PurgeSpaceSysContiguous(void) ONEWORDINLINE(0xA562);
  1179. /*****************************************************************************
  1180. The routines:
  1181. BlockMoveUncached, BlockMoveDataUncached
  1182. BlockZero, BlockZeroUncached
  1183. were first created for developers writing drivers. Originally they only
  1184. existed in DriverServicesLib. Later they were added to InterfaceLib
  1185. in PCI based PowerMacs. MacOS 8.5 provides these routines in InterfaceLib
  1186. on all supported machines.
  1187. *****************************************************************************/
  1188. #endif /* CALL_NOT_IN_CARBON */
  1189. /*
  1190. * BlockMove()
  1191. *
  1192. * Availability:
  1193. * Non-Carbon CFM: in DriverServicesLib 1.0 and later
  1194. * CarbonLib: in CarbonLib 1.0 and later
  1195. * Mac OS X: in version 10.0 and later
  1196. */
  1197. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1198. #pragma parameter BlockMove(__A0, __A1, __D0)
  1199. #endif
  1200. EXTERN_API( void )
  1201. BlockMove(
  1202. const void * srcPtr,
  1203. void * destPtr,
  1204. Size byteCount) ONEWORDINLINE(0xA02E);
  1205. /*
  1206. * BlockMoveData()
  1207. *
  1208. * Availability:
  1209. * Non-Carbon CFM: in DriverServicesLib 1.0 and later
  1210. * CarbonLib: in CarbonLib 1.0 and later
  1211. * Mac OS X: in version 10.0 and later
  1212. */
  1213. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1214. #pragma parameter BlockMoveData(__A0, __A1, __D0)
  1215. #endif
  1216. EXTERN_API( void )
  1217. BlockMoveData(
  1218. const void * srcPtr,
  1219. void * destPtr,
  1220. Size byteCount) ONEWORDINLINE(0xA22E);
  1221. /*
  1222. * BlockMoveUncached()
  1223. *
  1224. * Availability:
  1225. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  1226. * CarbonLib: in CarbonLib 1.0 and later
  1227. * Mac OS X: in version 10.0 and later
  1228. */
  1229. EXTERN_API_C( void )
  1230. BlockMoveUncached(
  1231. const void * srcPtr,
  1232. void * destPtr,
  1233. Size byteCount);
  1234. /*
  1235. * BlockMoveDataUncached()
  1236. *
  1237. * Availability:
  1238. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  1239. * CarbonLib: in CarbonLib 1.0 and later
  1240. * Mac OS X: in version 10.0 and later
  1241. */
  1242. EXTERN_API_C( void )
  1243. BlockMoveDataUncached(
  1244. const void * srcPtr,
  1245. void * destPtr,
  1246. Size byteCount);
  1247. /*
  1248. * BlockZero()
  1249. *
  1250. * Availability:
  1251. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  1252. * CarbonLib: in CarbonLib 1.0 and later
  1253. * Mac OS X: in version 10.0 and later
  1254. */
  1255. EXTERN_API_C( void )
  1256. BlockZero(
  1257. void * destPtr,
  1258. Size byteCount);
  1259. /*
  1260. * BlockZeroUncached()
  1261. *
  1262. * Availability:
  1263. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  1264. * CarbonLib: in CarbonLib 1.0 and later
  1265. * Mac OS X: in version 10.0 and later
  1266. */
  1267. EXTERN_API_C( void )
  1268. BlockZeroUncached(
  1269. void * destPtr,
  1270. Size byteCount);
  1271. #if CALL_NOT_IN_CARBON
  1272. /*
  1273. * MaxApplZone()
  1274. *
  1275. * Availability:
  1276. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1277. * CarbonLib: not available
  1278. * Mac OS X: not available
  1279. */
  1280. EXTERN_API( void )
  1281. MaxApplZone(void) ONEWORDINLINE(0xA063);
  1282. /*
  1283. * SetApplBase()
  1284. *
  1285. * Availability:
  1286. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1287. * CarbonLib: not available
  1288. * Mac OS X: not available
  1289. */
  1290. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1291. #pragma parameter SetApplBase(__A0)
  1292. #endif
  1293. EXTERN_API( void )
  1294. SetApplBase(void * startPtr) ONEWORDINLINE(0xA057);
  1295. #endif /* CALL_NOT_IN_CARBON */
  1296. /*
  1297. * MoreMasters()
  1298. *
  1299. * Availability:
  1300. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1301. * CarbonLib: in CarbonLib 1.0 and later
  1302. * Mac OS X: in version 10.0 and later
  1303. */
  1304. EXTERN_API( void )
  1305. MoreMasters(void) ONEWORDINLINE(0xA036);
  1306. /*
  1307. * MoreMasterPointers()
  1308. *
  1309. * Availability:
  1310. * Non-Carbon CFM: not available
  1311. * CarbonLib: in CarbonLib 1.0 and later
  1312. * Mac OS X: in version 10.0 and later
  1313. */
  1314. EXTERN_API_C( void )
  1315. MoreMasterPointers(UInt32 inCount);
  1316. #if CALL_NOT_IN_CARBON
  1317. /*
  1318. * SetApplLimit()
  1319. *
  1320. * Availability:
  1321. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1322. * CarbonLib: not available
  1323. * Mac OS X: not available
  1324. */
  1325. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1326. #pragma parameter SetApplLimit(__A0)
  1327. #endif
  1328. EXTERN_API( void )
  1329. SetApplLimit(void * zoneLimit) ONEWORDINLINE(0xA02D);
  1330. /*
  1331. * InitApplZone()
  1332. *
  1333. * Availability:
  1334. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1335. * CarbonLib: not available
  1336. * Mac OS X: not available
  1337. */
  1338. EXTERN_API( void )
  1339. InitApplZone(void) ONEWORDINLINE(0xA02C);
  1340. /* Temporary Memory routines renamed, but obsolete, in System 7.0 and later. */
  1341. #endif /* CALL_NOT_IN_CARBON */
  1342. /*
  1343. * TempHLock()
  1344. *
  1345. * Availability:
  1346. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1347. * CarbonLib: in CarbonLib 1.0 and later
  1348. * Mac OS X: in version 10.0 and later
  1349. */
  1350. EXTERN_API( void )
  1351. TempHLock(
  1352. Handle h,
  1353. OSErr * resultCode) THREEWORDINLINE(0x3F3C, 0x001E, 0xA88F);
  1354. /*
  1355. * TempHUnlock()
  1356. *
  1357. * Availability:
  1358. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1359. * CarbonLib: in CarbonLib 1.0 and later
  1360. * Mac OS X: in version 10.0 and later
  1361. */
  1362. EXTERN_API( void )
  1363. TempHUnlock(
  1364. Handle h,
  1365. OSErr * resultCode) THREEWORDINLINE(0x3F3C, 0x001F, 0xA88F);
  1366. /*
  1367. * TempDisposeHandle()
  1368. *
  1369. * Availability:
  1370. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1371. * CarbonLib: in CarbonLib 1.0 and later
  1372. * Mac OS X: in version 10.0 and later
  1373. */
  1374. EXTERN_API( void )
  1375. TempDisposeHandle(
  1376. Handle h,
  1377. OSErr * resultCode) THREEWORDINLINE(0x3F3C, 0x0020, 0xA88F);
  1378. /*
  1379. * TempTopMem()
  1380. *
  1381. * Availability:
  1382. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1383. * CarbonLib: in CarbonLib 1.0 and later
  1384. * Mac OS X: in version 10.0 and later
  1385. */
  1386. EXTERN_API( Ptr )
  1387. TempTopMem(void) THREEWORDINLINE(0x3F3C, 0x0016, 0xA88F);
  1388. /*
  1389. * HoldMemory()
  1390. *
  1391. * Availability:
  1392. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1393. * CarbonLib: in CarbonLib 1.1 and later
  1394. * Mac OS X: in version 10.0 and later
  1395. */
  1396. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1397. #pragma parameter __D0 HoldMemory(__A0, __A1)
  1398. #endif
  1399. EXTERN_API( OSErr )
  1400. HoldMemory(
  1401. void * address,
  1402. unsigned long count) TWOWORDINLINE(0x7000, 0xA05C);
  1403. /*
  1404. * UnholdMemory()
  1405. *
  1406. * Availability:
  1407. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1408. * CarbonLib: in CarbonLib 1.1 and later
  1409. * Mac OS X: in version 10.0 and later
  1410. */
  1411. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1412. #pragma parameter __D0 UnholdMemory(__A0, __A1)
  1413. #endif
  1414. EXTERN_API( OSErr )
  1415. UnholdMemory(
  1416. void * address,
  1417. unsigned long count) TWOWORDINLINE(0x7001, 0xA05C);
  1418. #if CALL_NOT_IN_CARBON
  1419. /*
  1420. * LockMemory()
  1421. *
  1422. * Availability:
  1423. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1424. * CarbonLib: not available
  1425. * Mac OS X: not available
  1426. */
  1427. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1428. #pragma parameter __D0 LockMemory(__A0, __A1)
  1429. #endif
  1430. EXTERN_API( OSErr )
  1431. LockMemory(
  1432. void * address,
  1433. unsigned long count) TWOWORDINLINE(0x7002, 0xA05C);
  1434. /*
  1435. * LockMemoryForOutput()
  1436. *
  1437. * Availability:
  1438. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  1439. * CarbonLib: not available
  1440. * Mac OS X: not available
  1441. */
  1442. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1443. #pragma parameter __D0 LockMemoryForOutput(__A0, __A1)
  1444. #endif
  1445. EXTERN_API( OSErr )
  1446. LockMemoryForOutput(
  1447. void * address,
  1448. unsigned long count) TWOWORDINLINE(0x700A, 0xA05C);
  1449. /*
  1450. * LockMemoryContiguous()
  1451. *
  1452. * Availability:
  1453. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1454. * CarbonLib: not available
  1455. * Mac OS X: not available
  1456. */
  1457. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1458. #pragma parameter __D0 LockMemoryContiguous(__A0, __A1)
  1459. #endif
  1460. EXTERN_API( OSErr )
  1461. LockMemoryContiguous(
  1462. void * address,
  1463. unsigned long count) TWOWORDINLINE(0x7004, 0xA05C);
  1464. /*
  1465. * UnlockMemory()
  1466. *
  1467. * Availability:
  1468. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1469. * CarbonLib: not available
  1470. * Mac OS X: not available
  1471. */
  1472. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1473. #pragma parameter __D0 UnlockMemory(__A0, __A1)
  1474. #endif
  1475. EXTERN_API( OSErr )
  1476. UnlockMemory(
  1477. void * address,
  1478. unsigned long count) TWOWORDINLINE(0x7003, 0xA05C);
  1479. #endif /* CALL_NOT_IN_CARBON */
  1480. /*
  1481. * MakeMemoryResident()
  1482. *
  1483. * Availability:
  1484. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  1485. * CarbonLib: in CarbonLib 1.0.2 and later
  1486. * Mac OS X: in version 10.0 and later
  1487. */
  1488. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1489. #pragma parameter __D0 MakeMemoryResident(__A0, __A1)
  1490. #endif
  1491. EXTERN_API( OSErr )
  1492. MakeMemoryResident(
  1493. void * address,
  1494. unsigned long count) TWOWORDINLINE(0x700B, 0xA05C);
  1495. /*
  1496. * ReleaseMemoryData()
  1497. *
  1498. * Availability:
  1499. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  1500. * CarbonLib: in CarbonLib 1.0.2 and later
  1501. * Mac OS X: in version 10.0 and later
  1502. */
  1503. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1504. #pragma parameter __D0 ReleaseMemoryData(__A0, __A1)
  1505. #endif
  1506. EXTERN_API( OSErr )
  1507. ReleaseMemoryData(
  1508. void * address,
  1509. unsigned long count) TWOWORDINLINE(0x700C, 0xA05C);
  1510. /*
  1511. * MakeMemoryNonResident()
  1512. *
  1513. * Availability:
  1514. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  1515. * CarbonLib: in CarbonLib 1.0.2 and later
  1516. * Mac OS X: in version 10.0 and later
  1517. */
  1518. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1519. #pragma parameter __D0 MakeMemoryNonResident(__A0, __A1)
  1520. #endif
  1521. EXTERN_API( OSErr )
  1522. MakeMemoryNonResident(
  1523. void * address,
  1524. unsigned long count) TWOWORDINLINE(0x700D, 0xA05C);
  1525. /*
  1526. * FlushMemory()
  1527. *
  1528. * Availability:
  1529. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  1530. * CarbonLib: in CarbonLib 1.0.2 and later
  1531. * Mac OS X: in version 10.0 and later
  1532. */
  1533. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1534. #pragma parameter __D0 FlushMemory(__A0, __A1)
  1535. #endif
  1536. EXTERN_API( OSErr )
  1537. FlushMemory(
  1538. void * address,
  1539. unsigned long count) TWOWORDINLINE(0x700E, 0xA05C);
  1540. #if CALL_NOT_IN_CARBON
  1541. /*
  1542. * GetPhysical()
  1543. *
  1544. * Availability:
  1545. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1546. * CarbonLib: not available
  1547. * Mac OS X: not available
  1548. */
  1549. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1550. #pragma parameter __D0 GetPhysical(__A0, __A1)
  1551. #endif
  1552. EXTERN_API( OSErr )
  1553. GetPhysical(
  1554. LogicalToPhysicalTable * addresses,
  1555. unsigned long * physicalEntryCount) SIXWORDINLINE(0x2209, 0x2251, 0x7005, 0xA15C, 0x2241, 0x2288);
  1556. #endif /* CALL_NOT_IN_CARBON */
  1557. #if CALL_NOT_IN_CARBON
  1558. /*
  1559. * GetVolumeVirtualMemoryInfo()
  1560. *
  1561. * Availability:
  1562. * Non-Carbon CFM: in InterfaceLib 9.0 and later
  1563. * CarbonLib: not available
  1564. * Mac OS X: not available
  1565. */
  1566. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1567. #pragma parameter __D0 GetVolumeVirtualMemoryInfo(__A0)
  1568. #endif
  1569. EXTERN_API( OSErr )
  1570. GetVolumeVirtualMemoryInfo(VolumeVirtualMemoryInfoPtr volVMInfo) TWOWORDINLINE(0x700F, 0xA05C);
  1571. /*
  1572. * DeferUserFn()
  1573. *
  1574. * Availability:
  1575. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1576. * CarbonLib: not available
  1577. * Mac OS X: not available
  1578. */
  1579. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1580. #pragma parameter __D0 DeferUserFn(__A0, __D0)
  1581. #endif
  1582. EXTERN_API( OSErr )
  1583. DeferUserFn(
  1584. UserFnUPP userFunction,
  1585. void * argument) ONEWORDINLINE(0xA08F);
  1586. /*
  1587. * DebuggerGetMax()
  1588. *
  1589. * Availability:
  1590. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1591. * CarbonLib: not available
  1592. * Mac OS X: not available
  1593. */
  1594. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1595. #pragma parameter __D0 DebuggerGetMax
  1596. #endif
  1597. EXTERN_API( long )
  1598. DebuggerGetMax(void) TWOWORDINLINE(0x7000, 0xA08D);
  1599. /*
  1600. * DebuggerEnter()
  1601. *
  1602. * Availability:
  1603. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1604. * CarbonLib: not available
  1605. * Mac OS X: not available
  1606. */
  1607. EXTERN_API( void )
  1608. DebuggerEnter(void) TWOWORDINLINE(0x7001, 0xA08D);
  1609. /*
  1610. * DebuggerExit()
  1611. *
  1612. * Availability:
  1613. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1614. * CarbonLib: not available
  1615. * Mac OS X: not available
  1616. */
  1617. EXTERN_API( void )
  1618. DebuggerExit(void) TWOWORDINLINE(0x7002, 0xA08D);
  1619. /*
  1620. * DebuggerPoll()
  1621. *
  1622. * Availability:
  1623. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1624. * CarbonLib: not available
  1625. * Mac OS X: not available
  1626. */
  1627. EXTERN_API( void )
  1628. DebuggerPoll(void) TWOWORDINLINE(0x7003, 0xA08D);
  1629. /*
  1630. * GetPageState()
  1631. *
  1632. * Availability:
  1633. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1634. * CarbonLib: not available
  1635. * Mac OS X: not available
  1636. */
  1637. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1638. #pragma parameter __D0 GetPageState(__A0)
  1639. #endif
  1640. EXTERN_API( PageState )
  1641. GetPageState(const void * address) TWOWORDINLINE(0x7004, 0xA08D);
  1642. /*
  1643. * PageFaultFatal()
  1644. *
  1645. * Availability:
  1646. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1647. * CarbonLib: not available
  1648. * Mac OS X: not available
  1649. */
  1650. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1651. #pragma parameter __D0 PageFaultFatal
  1652. #endif
  1653. EXTERN_API( Boolean )
  1654. PageFaultFatal(void) TWOWORDINLINE(0x7005, 0xA08D);
  1655. /*
  1656. * DebuggerLockMemory()
  1657. *
  1658. * Availability:
  1659. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1660. * CarbonLib: not available
  1661. * Mac OS X: not available
  1662. */
  1663. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1664. #pragma parameter __D0 DebuggerLockMemory(__A0, __A1)
  1665. #endif
  1666. EXTERN_API( OSErr )
  1667. DebuggerLockMemory(
  1668. void * address,
  1669. unsigned long count) TWOWORDINLINE(0x7006, 0xA08D);
  1670. /*
  1671. * DebuggerUnlockMemory()
  1672. *
  1673. * Availability:
  1674. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1675. * CarbonLib: not available
  1676. * Mac OS X: not available
  1677. */
  1678. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1679. #pragma parameter __D0 DebuggerUnlockMemory(__A0, __A1)
  1680. #endif
  1681. EXTERN_API( OSErr )
  1682. DebuggerUnlockMemory(
  1683. void * address,
  1684. unsigned long count) TWOWORDINLINE(0x7007, 0xA08D);
  1685. /*
  1686. * EnterSupervisorMode()
  1687. *
  1688. * Availability:
  1689. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1690. * CarbonLib: not available
  1691. * Mac OS X: not available
  1692. */
  1693. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1694. #pragma parameter __D0 EnterSupervisorMode
  1695. #endif
  1696. EXTERN_API( StatusRegisterContents )
  1697. EnterSupervisorMode(void) TWOWORDINLINE(0x7008, 0xA08D);
  1698. /*
  1699. * StripAddress()
  1700. *
  1701. * Summary:
  1702. * A trap on classic 68K, and the identity function for pre-carbon
  1703. *
  1704. * Availability:
  1705. * Non-Carbon CFM: available as macro/inline
  1706. * CarbonLib: not available
  1707. * Mac OS X: not available
  1708. */
  1709. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1710. #pragma parameter __D0 StripAddress(__D0)
  1711. #endif
  1712. EXTERN_API( Ptr )
  1713. StripAddress(void * theAddress) ONEWORDINLINE(0xA055);
  1714. #if !TARGET_OS_MAC || !TARGET_CPU_68K
  1715. #ifdef __cplusplus
  1716. inline DEFINE_API(Ptr ) StripAddress(void *theAddress) { return (Ptr)theAddress; }
  1717. #else
  1718. #define StripAddress(theAddress) ((Ptr)theAddress)
  1719. #endif
  1720. #endif
  1721. /*
  1722. * Translate24To32()
  1723. *
  1724. * Summary:
  1725. * A trap on classic 68K, and the identity function for pre-carbon
  1726. *
  1727. * Availability:
  1728. * Non-Carbon CFM: available as macro/inline
  1729. * CarbonLib: not available
  1730. * Mac OS X: not available
  1731. */
  1732. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1733. #pragma parameter __D0 Translate24To32(__D0)
  1734. #endif
  1735. EXTERN_API( Ptr )
  1736. Translate24To32(void * addr24) ONEWORDINLINE(0xA091);
  1737. #if !TARGET_OS_MAC || !TARGET_CPU_68K
  1738. #ifdef __cplusplus
  1739. inline DEFINE_API(Ptr ) Translate24To32(void *addr24) { return (Ptr)addr24; }
  1740. #else
  1741. #define Translate24To32(addr24) ((Ptr)addr24)
  1742. #endif
  1743. #endif
  1744. #endif /* CALL_NOT_IN_CARBON */
  1745. /*
  1746. * HandToHand()
  1747. *
  1748. * Availability:
  1749. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1750. * CarbonLib: in CarbonLib 1.0 and later
  1751. * Mac OS X: in version 10.0 and later
  1752. */
  1753. EXTERN_API( OSErr )
  1754. HandToHand(Handle * theHndl);
  1755. /*
  1756. * PtrToXHand()
  1757. *
  1758. * Availability:
  1759. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1760. * CarbonLib: in CarbonLib 1.0 and later
  1761. * Mac OS X: in version 10.0 and later
  1762. */
  1763. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1764. #pragma parameter __D0 PtrToXHand(__A0, __A1, __D0)
  1765. #endif
  1766. EXTERN_API( OSErr )
  1767. PtrToXHand(
  1768. const void * srcPtr,
  1769. Handle dstHndl,
  1770. long size) ONEWORDINLINE(0xA9E2);
  1771. /*
  1772. * PtrToHand()
  1773. *
  1774. * Availability:
  1775. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1776. * CarbonLib: in CarbonLib 1.0 and later
  1777. * Mac OS X: in version 10.0 and later
  1778. */
  1779. EXTERN_API( OSErr )
  1780. PtrToHand(
  1781. const void * srcPtr,
  1782. Handle * dstHndl,
  1783. long size);
  1784. /*
  1785. * HandAndHand()
  1786. *
  1787. * Availability:
  1788. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1789. * CarbonLib: in CarbonLib 1.0 and later
  1790. * Mac OS X: in version 10.0 and later
  1791. */
  1792. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1793. #pragma parameter __D0 HandAndHand(__A0, __A1)
  1794. #endif
  1795. EXTERN_API( OSErr )
  1796. HandAndHand(
  1797. Handle hand1,
  1798. Handle hand2) ONEWORDINLINE(0xA9E4);
  1799. /*
  1800. * PtrAndHand()
  1801. *
  1802. * Availability:
  1803. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1804. * CarbonLib: in CarbonLib 1.0 and later
  1805. * Mac OS X: in version 10.0 and later
  1806. */
  1807. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1808. #pragma parameter __D0 PtrAndHand(__A0, __A1, __D0)
  1809. #endif
  1810. EXTERN_API( OSErr )
  1811. PtrAndHand(
  1812. const void * ptr1,
  1813. Handle hand2,
  1814. long size) ONEWORDINLINE(0xA9EF);
  1815. /* Carbon routines to aid in debugging. */
  1816. /* Checks all applicable heaps for validity */
  1817. /*
  1818. * CheckAllHeaps()
  1819. *
  1820. * Availability:
  1821. * Non-Carbon CFM: not available
  1822. * CarbonLib: in CarbonLib 1.0 and later
  1823. * Mac OS X: in version 10.0 and later
  1824. */
  1825. EXTERN_API( Boolean )
  1826. CheckAllHeaps(void);
  1827. /* Checks the application heap for validity */
  1828. /*
  1829. * IsHeapValid()
  1830. *
  1831. * Availability:
  1832. * Non-Carbon CFM: not available
  1833. * CarbonLib: in CarbonLib 1.0 and later
  1834. * Mac OS X: in version 10.0 and later
  1835. */
  1836. EXTERN_API( Boolean )
  1837. IsHeapValid(void);
  1838. /* It is invalid to pass a NULL or an empty Handle to IsHandleValid */
  1839. /*
  1840. * IsHandleValid()
  1841. *
  1842. * Availability:
  1843. * Non-Carbon CFM: not available
  1844. * CarbonLib: in CarbonLib 1.0 and later
  1845. * Mac OS X: in version 10.0 and later
  1846. */
  1847. EXTERN_API( Boolean )
  1848. IsHandleValid(Handle h);
  1849. /* It is invalid to pass a NULL Pointer to IsPointerValid */
  1850. /*
  1851. * IsPointerValid()
  1852. *
  1853. * Availability:
  1854. * Non-Carbon CFM: not available
  1855. * CarbonLib: in CarbonLib 1.0 and later
  1856. * Mac OS X: in version 10.0 and later
  1857. */
  1858. EXTERN_API( Boolean )
  1859. IsPointerValid(Ptr p);
  1860. #if OLDROUTINENAMES
  1861. #define ApplicZone() ApplicationZone()
  1862. #define MFTempNewHandle(logicalSize, resultCode) TempNewHandle(logicalSize, resultCode)
  1863. #define MFMaxMem(grow) TempMaxMem(grow)
  1864. #define MFFreeMem() TempFreeMem()
  1865. #define MFTempHLock(h, resultCode) TempHLock(h, resultCode)
  1866. #define MFTempHUnlock(h, resultCode) TempHUnlock(h, resultCode)
  1867. #define MFTempDisposHandle(h, resultCode) TempDisposeHandle(h, resultCode)
  1868. #define MFTopMem() TempTopMem()
  1869. #define ResrvMem(cbNeeded) ReserveMem(cbNeeded)
  1870. #define DisposPtr(p) DisposePtr(p)
  1871. #define DisposHandle(h) DisposeHandle(h)
  1872. #define ReallocHandle(h, byteCount) ReallocateHandle(h, byteCount)
  1873. #endif /* OLDROUTINENAMES */
  1874. #if PRAGMA_STRUCT_ALIGN
  1875. #pragma options align=reset
  1876. #elif PRAGMA_STRUCT_PACKPUSH
  1877. #pragma pack(pop)
  1878. #elif PRAGMA_STRUCT_PACK
  1879. #pragma pack()
  1880. #endif
  1881. #ifdef PRAGMA_IMPORT_OFF
  1882. #pragma import off
  1883. #elif PRAGMA_IMPORT
  1884. #pragma import reset
  1885. #endif
  1886. #ifdef __cplusplus
  1887. }
  1888. #endif
  1889. #endif /* __MACMEMORY__ */