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.

779 lines
29 KiB

  1. /*
  2. File: MacTypes.h
  3. Contains: Basic Macintosh data types.
  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 __MACTYPES__
  11. #define __MACTYPES__
  12. #ifndef __CONDITIONALMACROS__
  13. #include <ConditionalMacros.h>
  14. #endif
  15. #if PRAGMA_ONCE
  16. #pragma once
  17. #endif
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #if PRAGMA_IMPORT
  22. #pragma import on
  23. #endif
  24. #if PRAGMA_STRUCT_ALIGN
  25. #pragma options align=mac68k
  26. #elif PRAGMA_STRUCT_PACKPUSH
  27. #pragma pack(push, 2)
  28. #elif PRAGMA_STRUCT_PACK
  29. #pragma pack(2)
  30. #endif
  31. /********************************************************************************
  32. Special values in C
  33. NULL The C standard for an impossible pointer value
  34. nil A carry over from pascal, NULL is prefered for C
  35. *********************************************************************************/
  36. #ifndef NULL
  37. #if !defined(__cplusplus) && (defined(__SC__) || defined(THINK_C))
  38. /* Symantec C compilers (but not C++) want NULL and nil to be (void*)0 */
  39. #define NULL ((void *) 0)
  40. #else
  41. /* in case int is 16-bits, make sure NULL is 32-bits */
  42. #define NULL 0L
  43. #endif
  44. #endif
  45. #ifndef nil
  46. #define nil NULL
  47. #endif
  48. /********************************************************************************
  49. Base integer types for all target OS's and CPU's
  50. UInt8 8-bit unsigned integer
  51. SInt8 8-bit signed integer
  52. UInt16 16-bit unsigned integer
  53. SInt16 16-bit signed integer
  54. UInt32 32-bit unsigned integer
  55. SInt32 32-bit signed integer
  56. UInt64 64-bit unsigned integer
  57. SInt64 64-bit signed integer
  58. *********************************************************************************/
  59. typedef unsigned char UInt8;
  60. typedef signed char SInt8;
  61. typedef unsigned short UInt16;
  62. typedef signed short SInt16;
  63. typedef unsigned long UInt32;
  64. typedef signed long SInt32;
  65. #if TARGET_RT_BIG_ENDIAN
  66. struct wide {
  67. SInt32 hi;
  68. UInt32 lo;
  69. };
  70. typedef struct wide wide;
  71. struct UnsignedWide {
  72. UInt32 hi;
  73. UInt32 lo;
  74. };
  75. typedef struct UnsignedWide UnsignedWide;
  76. #else
  77. struct wide {
  78. UInt32 lo;
  79. SInt32 hi;
  80. };
  81. typedef struct wide wide;
  82. struct UnsignedWide {
  83. UInt32 lo;
  84. UInt32 hi;
  85. };
  86. typedef struct UnsignedWide UnsignedWide;
  87. #endif /* TARGET_RT_BIG_ENDIAN */
  88. #if TYPE_LONGLONG
  89. /*
  90. Note: wide and UnsignedWide must always be structs for source code
  91. compatibility. On the other hand UInt64 and SInt64 can be
  92. either a struct or a long long, depending on the compiler.
  93. If you use UInt64 and SInt64 you should do all operations on
  94. those data types through the functions/macros in Math64.h.
  95. This will assure that your code compiles with compilers that
  96. support long long and those that don't.
  97. The MS Visual C/C++ compiler uses __int64 instead of long long.
  98. */
  99. #if defined(_MSC_VER) && !defined(__MWERKS__) && defined(_M_IX86)
  100. typedef signed __int64 SInt64;
  101. typedef unsigned __int64 UInt64;
  102. #else
  103. typedef signed long long SInt64;
  104. typedef unsigned long long UInt64;
  105. #endif
  106. #else
  107. typedef wide SInt64;
  108. typedef UnsignedWide UInt64;
  109. #endif /* TYPE_LONGLONG */
  110. /********************************************************************************
  111. Base fixed point types
  112. Fixed 16-bit signed integer plus 16-bit fraction
  113. UnsignedFixed 16-bit unsigned integer plus 16-bit fraction
  114. Fract 2-bit signed integer plus 30-bit fraction
  115. ShortFixed 8-bit signed integer plus 8-bit fraction
  116. *********************************************************************************/
  117. typedef long Fixed;
  118. typedef Fixed * FixedPtr;
  119. typedef long Fract;
  120. typedef Fract * FractPtr;
  121. typedef unsigned long UnsignedFixed;
  122. typedef UnsignedFixed * UnsignedFixedPtr;
  123. typedef short ShortFixed;
  124. typedef ShortFixed * ShortFixedPtr;
  125. /********************************************************************************
  126. Base floating point types
  127. Float32 32 bit IEEE float: 1 sign bit, 8 exponent bits, 23 fraction bits
  128. Float64 64 bit IEEE float: 1 sign bit, 11 exponent bits, 52 fraction bits
  129. Float80 80 bit MacOS float: 1 sign bit, 15 exponent bits, 1 integer bit, 63 fraction bits
  130. Float96 96 bit 68881 float: 1 sign bit, 15 exponent bits, 16 pad bits, 1 integer bit, 63 fraction bits
  131. Note: These are fixed size floating point types, useful when writing a floating
  132. point value to disk. If your compiler does not support a particular size
  133. float, a struct is used instead.
  134. Use of of the NCEG types (e.g. double_t) or an ANSI C type (e.g. double) if
  135. you want a floating point representation that is natural for any given
  136. compiler, but might be a different size on different compilers.
  137. *********************************************************************************/
  138. typedef float Float32;
  139. typedef double Float64;
  140. struct Float80 {
  141. SInt16 exp;
  142. UInt16 man[4];
  143. };
  144. typedef struct Float80 Float80;
  145. struct Float96 {
  146. SInt16 exp[2]; /* the second 16-bits are undefined */
  147. UInt16 man[4];
  148. };
  149. typedef struct Float96 Float96;
  150. struct Float32Point {
  151. Float32 x;
  152. Float32 y;
  153. };
  154. typedef struct Float32Point Float32Point;
  155. /********************************************************************************
  156. MacOS Memory Manager types
  157. Ptr Pointer to a non-relocatable block
  158. Handle Pointer to a master pointer to a relocatable block
  159. Size The number of bytes in a block (signed for historical reasons)
  160. *********************************************************************************/
  161. typedef char * Ptr;
  162. typedef Ptr * Handle;
  163. typedef long Size;
  164. /********************************************************************************
  165. Higher level basic types
  166. OSErr 16-bit result error code
  167. OSStatus 32-bit result error code
  168. LogicalAddress Address in the clients virtual address space
  169. ConstLogicalAddress Address in the clients virtual address space that will only be read
  170. PhysicalAddress Real address as used on the hardware bus
  171. BytePtr Pointer to an array of bytes
  172. ByteCount The size of an array of bytes
  173. ByteOffset An offset into an array of bytes
  174. ItemCount 32-bit iteration count
  175. OptionBits Standard 32-bit set of bit flags
  176. PBVersion ?
  177. Duration 32-bit millisecond timer for drivers
  178. AbsoluteTime 64-bit clock
  179. ScriptCode A particular set of written characters (e.g. Roman vs Cyrillic) and their encoding
  180. LangCode A particular language (e.g. English), as represented using a particular ScriptCode
  181. RegionCode Designates a language as used in a particular region (e.g. British vs American
  182. English) together with other region-dependent characteristics (e.g. date format)
  183. FourCharCode A 32-bit value made by packing four 1 byte characters together
  184. OSType A FourCharCode used in the OS and file system (e.g. creator)
  185. ResType A FourCharCode used to tag resources (e.g. 'DLOG')
  186. *********************************************************************************/
  187. typedef SInt16 OSErr;
  188. typedef SInt32 OSStatus;
  189. typedef void * LogicalAddress;
  190. typedef const void * ConstLogicalAddress;
  191. typedef void * PhysicalAddress;
  192. typedef UInt8 * BytePtr;
  193. typedef UInt32 ByteCount;
  194. typedef UInt32 ByteOffset;
  195. typedef SInt32 Duration;
  196. typedef UnsignedWide AbsoluteTime;
  197. typedef UInt32 OptionBits;
  198. typedef UInt32 ItemCount;
  199. typedef UInt32 PBVersion;
  200. typedef SInt16 ScriptCode;
  201. typedef SInt16 LangCode;
  202. typedef SInt16 RegionCode;
  203. typedef unsigned long FourCharCode;
  204. typedef FourCharCode OSType;
  205. typedef FourCharCode ResType;
  206. typedef OSType * OSTypePtr;
  207. typedef ResType * ResTypePtr;
  208. /********************************************************************************
  209. Boolean types and values
  210. Boolean A one byte value, holds "false" (0) or "true" (1)
  211. false The Boolean value of zero (0)
  212. true The Boolean value of one (1)
  213. *********************************************************************************/
  214. /*
  215. The identifiers "true" and "false" are becoming keywords in C++
  216. and work with the new built-in type "bool"
  217. "Boolean" will remain an unsigned char for compatibility with source
  218. code written before "bool" existed.
  219. */
  220. #if !TYPE_BOOL
  221. #if TARGET_OS_WIN32
  222. /* MS VC normally warns if true or false is defined */
  223. #pragma warning (disable: 4237)
  224. #endif
  225. enum {
  226. false = 0,
  227. true = 1
  228. };
  229. #if TARGET_OS_WIN32
  230. #pragma warning (default: 4237)
  231. #endif
  232. #endif /* !TYPE_BOOL */
  233. typedef unsigned char Boolean;
  234. /********************************************************************************
  235. Function Pointer Types
  236. ProcPtr Generic pointer to a function
  237. Register68kProcPtr Pointer to a 68K function that expects parameters in registers
  238. UniversalProcPtr Pointer to classic 68K code or a RoutineDescriptor
  239. ProcHandle Pointer to a ProcPtr
  240. UniversalProcHandle Pointer to a UniversalProcPtr
  241. *********************************************************************************/
  242. typedef CALLBACK_API_C( long , ProcPtr )();
  243. typedef CALLBACK_API( void , Register68kProcPtr )();
  244. #if TARGET_OS_MAC && TARGET_RT_MAC_CFM
  245. /* The RoutineDescriptor structure is defined in MixedMode.h */
  246. typedef struct RoutineDescriptor *UniversalProcPtr;
  247. #else
  248. typedef ProcPtr UniversalProcPtr;
  249. #endif /* TARGET_OS_MAC && TARGET_RT_MAC_CFM */
  250. typedef ProcPtr * ProcHandle;
  251. typedef UniversalProcPtr * UniversalProcHandle;
  252. /********************************************************************************
  253. Common Constants
  254. noErr OSErr: function performed properly - no error
  255. kNilOptions OptionBits: all flags false
  256. kInvalidID KernelID: NULL is for pointers as kInvalidID is for ID's
  257. kVariableLengthArray array bounds: variable length array
  258. Note: kVariableLengthArray is used in array bounds to specify a variable length array.
  259. It is ususally used in variable length structs when the last field is an array
  260. of any size. Before ANSI C, we used zero as the bounds of variable length
  261. array, but zero length array are illegal in ANSI C. Example usage:
  262. struct FooList
  263. {
  264. short listLength;
  265. Foo elements[kVariableLengthArray];
  266. };
  267. *********************************************************************************/
  268. enum {
  269. noErr = 0
  270. };
  271. enum {
  272. kNilOptions = 0
  273. };
  274. #define kInvalidID 0
  275. enum {
  276. kVariableLengthArray = 1
  277. };
  278. enum {
  279. kUnknownType = 0x3F3F3F3F /* "????" QuickTime 3.0: default unknown ResType or OSType */
  280. };
  281. /********************************************************************************
  282. String Types and Unicode Types
  283. UnicodeScalarValue, A complete Unicode character in UTF-32 format, with
  284. UTF32Char values from 0 through 0x10FFFF (excluding the surrogate
  285. range 0xD800-0xDFFF and certain disallowed values).
  286. UniChar, A 16-bit Unicode code value in the default UTF-16 format.
  287. UTF16Char UnicodeScalarValues 0-0xFFFF are expressed in UTF-16
  288. format using a single UTF16Char with the same value.
  289. UnicodeScalarValues 0x10000-0x10FFFF are expressed in
  290. UTF-16 format using a pair of UTF16Chars - one in the
  291. high surrogate range (0xD800-0xDBFF) followed by one in
  292. the low surrogate range (0xDC00-0xDFFF). All of the
  293. characters defined in Unicode versions through 3.0 are
  294. in the range 0-0xFFFF and can be expressed using a single
  295. UTF16Char, thus the term "Unicode character" generally
  296. refers to a UniChar = UTF16Char.
  297. UTF8Char An 8-bit code value in UTF-8 format. UnicodeScalarValues
  298. 0-0x7F are expressed in UTF-8 format using one UTF8Char
  299. with the same value. UnicodeScalarValues above 0x7F are
  300. expressed in UTF-8 format using 2-4 UTF8Chars, all with
  301. values in the range 0x80-0xF4 (UnicodeScalarValues
  302. 0x100-0xFFFF use two or three UTF8Chars,
  303. UnicodeScalarValues 0x10000-0x10FFFF use four UTF8Chars).
  304. UniCharCount A count of UTF-16 code values in an array or buffer.
  305. StrNNN Pascal string holding up to NNN bytes
  306. StringPtr Pointer to a pascal string
  307. StringHandle Pointer to a StringPtr
  308. ConstStringPtr Pointer to a read-only pascal string
  309. ConstStrNNNParam For function parameters only - means string is const
  310. CStringPtr Pointer to a C string (in C: char*)
  311. ConstCStringPtr Pointer to a read-only C string (in C: const char*)
  312. Note: The length of a pascal string is stored as the first byte.
  313. A pascal string does not have a termination byte.
  314. A pascal string can hold at most 255 bytes of data.
  315. The first character in a pascal string is offset one byte from the start of the string.
  316. A C string is terminated with a byte of value zero.
  317. A C string has no length limitation.
  318. The first character in a C string is the zeroth byte of the string.
  319. *********************************************************************************/
  320. typedef UInt32 UnicodeScalarValue;
  321. typedef UInt32 UTF32Char;
  322. typedef UInt16 UniChar;
  323. typedef UInt16 UTF16Char;
  324. typedef UInt8 UTF8Char;
  325. typedef UniChar * UniCharPtr;
  326. typedef UInt32 UniCharCount;
  327. typedef UniCharCount * UniCharCountPtr;
  328. typedef unsigned char Str255[256];
  329. typedef unsigned char Str63[64];
  330. typedef unsigned char Str32[33];
  331. typedef unsigned char Str31[32];
  332. typedef unsigned char Str27[28];
  333. typedef unsigned char Str15[16];
  334. /*
  335. The type Str32 is used in many AppleTalk based data structures.
  336. It holds up to 32 one byte chars. The problem is that with the
  337. length byte it is 33 bytes long. This can cause weird alignment
  338. problems in structures. To fix this the type "Str32Field" has
  339. been created. It should only be used to hold 32 chars, but
  340. it is 34 bytes long so that there are no alignment problems.
  341. */
  342. typedef unsigned char Str32Field[34];
  343. /*
  344. QuickTime 3.0:
  345. The type StrFileName is used to make MacOS structs work
  346. cross-platform. For example FSSpec or SFReply previously
  347. contained a Str63 field. They now contain a StrFileName
  348. field which is the same when targeting the MacOS but is
  349. a 256 char buffer for Win32 and unix, allowing them to
  350. contain long file names.
  351. */
  352. #if TARGET_OS_MAC
  353. typedef Str63 StrFileName;
  354. #else
  355. typedef Str255 StrFileName;
  356. #endif /* TARGET_OS_MAC */
  357. typedef unsigned char * StringPtr;
  358. typedef StringPtr * StringHandle;
  359. typedef const unsigned char * ConstStringPtr;
  360. typedef const unsigned char * ConstStr255Param;
  361. typedef const unsigned char * ConstStr63Param;
  362. typedef const unsigned char * ConstStr32Param;
  363. typedef const unsigned char * ConstStr31Param;
  364. typedef const unsigned char * ConstStr27Param;
  365. typedef const unsigned char * ConstStr15Param;
  366. #if TARGET_OS_MAC
  367. typedef ConstStr63Param ConstStrFileNameParam;
  368. #else
  369. typedef ConstStr255Param ConstStrFileNameParam;
  370. #endif /* TARGET_OS_MAC */
  371. #ifdef __cplusplus
  372. inline unsigned char StrLength(ConstStr255Param string) { return (*string); }
  373. #else
  374. #define StrLength(string) (*(unsigned char *)(string))
  375. #endif /* defined(__cplusplus) */
  376. #if OLDROUTINENAMES
  377. #define Length(string) StrLength(string)
  378. #endif /* OLDROUTINENAMES */
  379. /********************************************************************************
  380. Quickdraw Types
  381. Point 2D Quickdraw coordinate, range: -32K to +32K
  382. Rect Rectangular Quickdraw area
  383. Style Quickdraw font rendering styles
  384. StyleParameter Style when used as a parameter (historical 68K convention)
  385. StyleField Style when used as a field (historical 68K convention)
  386. CharParameter Char when used as a parameter (historical 68K convention)
  387. Note: The original Macintosh toolbox in 68K Pascal defined Style as a SET.
  388. Both Style and CHAR occupy 8-bits in packed records or 16-bits when
  389. used as fields in non-packed records or as parameters.
  390. *********************************************************************************/
  391. struct Point {
  392. short v;
  393. short h;
  394. };
  395. typedef struct Point Point;
  396. typedef Point * PointPtr;
  397. struct Rect {
  398. short top;
  399. short left;
  400. short bottom;
  401. short right;
  402. };
  403. typedef struct Rect Rect;
  404. typedef Rect * RectPtr;
  405. struct FixedPoint {
  406. Fixed x;
  407. Fixed y;
  408. };
  409. typedef struct FixedPoint FixedPoint;
  410. struct FixedRect {
  411. Fixed left;
  412. Fixed top;
  413. Fixed right;
  414. Fixed bottom;
  415. };
  416. typedef struct FixedRect FixedRect;
  417. typedef short CharParameter;
  418. enum {
  419. normal = 0,
  420. bold = 1,
  421. italic = 2,
  422. underline = 4,
  423. outline = 8,
  424. shadow = 0x10,
  425. condense = 0x20,
  426. extend = 0x40
  427. };
  428. typedef unsigned char Style;
  429. typedef short StyleParameter;
  430. typedef Style StyleField;
  431. /********************************************************************************
  432. QuickTime TimeBase types (previously in Movies.h)
  433. TimeValue Count of units
  434. TimeScale Units per second
  435. CompTimeValue 64-bit count of units (always a struct)
  436. TimeValue64 64-bit count of units (long long or struct)
  437. TimeBase An opaque reference to a time base
  438. TimeRecord Package of TimeBase, duration, and scale
  439. *********************************************************************************/
  440. typedef long TimeValue;
  441. typedef long TimeScale;
  442. typedef wide CompTimeValue;
  443. typedef SInt64 TimeValue64;
  444. typedef struct TimeBaseRecord* TimeBase;
  445. struct TimeRecord {
  446. CompTimeValue value; /* units (duration or absolute) */
  447. TimeScale scale; /* units per second */
  448. TimeBase base; /* refernce to the time base */
  449. };
  450. typedef struct TimeRecord TimeRecord;
  451. /********************************************************************************
  452. THINK C base objects
  453. HandleObject Root class for handle based THINK C++ objects
  454. PascalObject Root class for pascal style objects in THINK C++
  455. *********************************************************************************/
  456. #if defined(__SC__) && !defined(__STDC__) && defined(__cplusplus)
  457. class __machdl HandleObject {};
  458. #if TARGET_CPU_68K
  459. class __pasobj PascalObject {};
  460. #endif
  461. #endif
  462. /********************************************************************************
  463. MacOS versioning structures
  464. VersRec Contents of a 'vers' resource
  465. VersRecPtr Pointer to a VersRecPtr
  466. VersRecHndl Resource Handle containing a VersRec
  467. NumVersion Packed BCD version representation (e.g. "4.2.1a3" is 0x04214003)
  468. UniversalProcPtr Pointer to classic 68K code or a RoutineDescriptor
  469. ProcHandle Pointer to a ProcPtr
  470. UniversalProcHandle Pointer to a UniversalProcPtr
  471. *********************************************************************************/
  472. #if TARGET_RT_BIG_ENDIAN
  473. struct NumVersion {
  474. /* Numeric version part of 'vers' resource */
  475. UInt8 majorRev; /*1st part of version number in BCD*/
  476. UInt8 minorAndBugRev; /*2nd & 3rd part of version number share a byte*/
  477. UInt8 stage; /*stage code: dev, alpha, beta, final*/
  478. UInt8 nonRelRev; /*revision level of non-released version*/
  479. };
  480. typedef struct NumVersion NumVersion;
  481. #else
  482. struct NumVersion {
  483. /* Numeric version part of 'vers' resource accessable in little endian format */
  484. UInt8 nonRelRev; /*revision level of non-released version*/
  485. UInt8 stage; /*stage code: dev, alpha, beta, final*/
  486. UInt8 minorAndBugRev; /*2nd & 3rd part of version number share a byte*/
  487. UInt8 majorRev; /*1st part of version number in BCD*/
  488. };
  489. typedef struct NumVersion NumVersion;
  490. #endif /* TARGET_RT_BIG_ENDIAN */
  491. enum {
  492. /* Version Release Stage Codes */
  493. developStage = 0x20,
  494. alphaStage = 0x40,
  495. betaStage = 0x60,
  496. finalStage = 0x80
  497. };
  498. union NumVersionVariant {
  499. /* NumVersionVariant is a wrapper so NumVersion can be accessed as a 32-bit value */
  500. NumVersion parts;
  501. unsigned long whole;
  502. };
  503. typedef union NumVersionVariant NumVersionVariant;
  504. typedef NumVersionVariant * NumVersionVariantPtr;
  505. typedef NumVersionVariantPtr * NumVersionVariantHandle;
  506. struct VersRec {
  507. /* 'vers' resource format */
  508. NumVersion numericVersion; /*encoded version number*/
  509. short countryCode; /*country code from intl utilities*/
  510. Str255 shortVersion; /*version number string - worst case*/
  511. Str255 reserved; /*longMessage string packed after shortVersion*/
  512. };
  513. typedef struct VersRec VersRec;
  514. typedef VersRec * VersRecPtr;
  515. typedef VersRecPtr * VersRecHndl;
  516. /*********************************************************************************
  517. Old names for types
  518. *********************************************************************************/
  519. typedef UInt8 Byte;
  520. typedef SInt8 SignedByte;
  521. typedef wide * WidePtr;
  522. typedef UnsignedWide * UnsignedWidePtr;
  523. typedef Float80 extended80;
  524. typedef Float96 extended96;
  525. typedef SInt8 VHSelect;
  526. /*********************************************************************************
  527. Debugger functions
  528. *********************************************************************************/
  529. /*
  530. * Debugger()
  531. *
  532. * Availability:
  533. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  534. * CarbonLib: in CarbonLib 1.0 and later
  535. * Mac OS X: in version 10.0 and later
  536. */
  537. EXTERN_API( void )
  538. Debugger(void) ONEWORDINLINE(0xA9FF);
  539. /*
  540. * DebugStr()
  541. *
  542. * Availability:
  543. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  544. * CarbonLib: in CarbonLib 1.0 and later
  545. * Mac OS X: in version 10.0 and later
  546. */
  547. EXTERN_API( void )
  548. DebugStr(ConstStr255Param debuggerMsg) ONEWORDINLINE(0xABFF);
  549. #if TARGET_OS_MAC
  550. #if CALL_NOT_IN_CARBON
  551. /*
  552. * debugstr()
  553. *
  554. * Availability:
  555. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  556. * CarbonLib: not available
  557. * Mac OS X: not available
  558. */
  559. EXTERN_API_C( void )
  560. debugstr(const char * debuggerMsg);
  561. #endif /* CALL_NOT_IN_CARBON */
  562. #if TARGET_CPU_PPC
  563. /* Only for Mac OS native drivers */
  564. #if CALL_NOT_IN_CARBON
  565. /*
  566. * SysDebug()
  567. *
  568. * Availability:
  569. * Non-Carbon CFM: in DriverServicesLib 1.0 and later
  570. * CarbonLib: not available
  571. * Mac OS X: not available
  572. */
  573. EXTERN_API_C( void )
  574. SysDebug(void);
  575. /*
  576. * SysDebugStr()
  577. *
  578. * Availability:
  579. * Non-Carbon CFM: in DriverServicesLib 1.0 and later
  580. * CarbonLib: not available
  581. * Mac OS X: not available
  582. */
  583. EXTERN_API_C( void )
  584. SysDebugStr(ConstStr255Param str);
  585. #endif /* CALL_NOT_IN_CARBON */
  586. #endif /* TARGET_CPU_PPC */
  587. /* SADE break points */
  588. /*
  589. * SysBreak()
  590. *
  591. * Availability:
  592. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  593. * CarbonLib: in CarbonLib 1.0 and later
  594. * Mac OS X: in version 10.0 and later
  595. */
  596. EXTERN_API( void )
  597. SysBreak(void) THREEWORDINLINE(0x303C, 0xFE16, 0xA9C9);
  598. /*
  599. * SysBreakStr()
  600. *
  601. * Availability:
  602. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  603. * CarbonLib: in CarbonLib 1.0 and later
  604. * Mac OS X: in version 10.0 and later
  605. */
  606. EXTERN_API( void )
  607. SysBreakStr(ConstStr255Param debuggerMsg) THREEWORDINLINE(0x303C, 0xFE15, 0xA9C9);
  608. /*
  609. * SysBreakFunc()
  610. *
  611. * Availability:
  612. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  613. * CarbonLib: in CarbonLib 1.0 and later
  614. * Mac OS X: in version 10.0 and later
  615. */
  616. EXTERN_API( void )
  617. SysBreakFunc(ConstStr255Param debuggerMsg) THREEWORDINLINE(0x303C, 0xFE14, 0xA9C9);
  618. /* old names for Debugger and DebugStr */
  619. #if OLDROUTINENAMES && TARGET_CPU_68K
  620. #define Debugger68k() Debugger()
  621. #define DebugStr68k(s) DebugStr(s)
  622. #endif
  623. #endif /* TARGET_OS_MAC */
  624. #if PRAGMA_STRUCT_ALIGN
  625. #pragma options align=reset
  626. #elif PRAGMA_STRUCT_PACKPUSH
  627. #pragma pack(pop)
  628. #elif PRAGMA_STRUCT_PACK
  629. #pragma pack()
  630. #endif
  631. #ifdef PRAGMA_IMPORT_OFF
  632. #pragma import off
  633. #elif PRAGMA_IMPORT
  634. #pragma import reset
  635. #endif
  636. #ifdef __cplusplus
  637. }
  638. #endif
  639. #endif /* __MACTYPES__ */