Mac OS 9
Patches.h
Go to the documentation of this file.
1 
20 #ifndef __PATCHES__
21 #define __PATCHES__
22 
23 #ifndef __MACTYPES__
24 #include <MacTypes.h>
25 #endif
26 
27 #if PRAGMA_ONCE
28 #pragma once
29 #endif
30 
31 #ifdef __cplusplus
32 extern "C"
33 {
34 #endif
35 
36 #if PRAGMA_IMPORT
37 #pragma import on
38 #endif
39 
40 #if PRAGMA_STRUCT_ALIGN
41 #pragma options align = mac68k
42 #elif PRAGMA_STRUCT_PACKPUSH
43 #pragma pack(push, 2)
44 #elif PRAGMA_STRUCT_PACK
45 #pragma pack(2)
46 #endif
47 
48 #if CALL_NOT_IN_CARBON
49  enum
50  {
51  kOSTrapType = 0,
52  kToolboxTrapType = 1
53  };
54 
55  typedef SignedByte TrapType;
56  enum
57  {
58  OSTrap = kOSTrapType,
59  ToolTrap = kToolboxTrapType
60  };
61 
62 #endif
69 #if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
70 #if CALL_NOT_IN_CARBON
71 
106 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
107 #pragma parameter __A0 GetTrapAddress(__D0)
108 #endif
109  UniversalProcPtr
110  GetTrapAddress(UInt16 trapNum);
111 
141 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
142 #pragma parameter SetTrapAddress(__A0, __D0)
143 #endif
144  void
145  SetTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum);
146 
147 #endif
149 #endif
151 #if CALL_NOT_IN_CARBON
152 
189  UniversalProcPtr
190  NGetTrapAddress(UInt16 trapNum, TrapType tTyp);
191 
227  void
228  NSetTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum, TrapType tTyp);
229 
230 #endif
232 #if CALL_NOT_IN_CARBON
233 
271 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
272 #pragma parameter __A0 GetOSTrapAddress(__D0)
273 #endif
274  UniversalProcPtr
275  GetOSTrapAddress(UInt16 trapNum);
276 
313 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
314 #pragma parameter SetOSTrapAddress(__A0, __D0)
315 #endif
316  void
317  SetOSTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum);
318 
356 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
357 #pragma parameter __A0 GetToolTrapAddress(__D0)
358 #endif
359  UniversalProcPtr
360  GetToolTrapAddress(UInt16 trapNum);
361 
397 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
398 #pragma parameter SetToolTrapAddress(__A0, __D0)
399 #endif
400  void
401  SetToolTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum);
402 
411 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
412 #pragma parameter __A0 GetToolboxTrapAddress(__D0)
413 #endif
414  UniversalProcPtr
415  GetToolboxTrapAddress(UInt16 trapNum);
416 
425 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
426 #pragma parameter SetToolboxTrapAddress(__A0, __D0)
427 #endif
428  void
429  SetToolboxTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum);
430 
431 #endif
433 #if TARGET_CPU_PPC
434 #if CALL_NOT_IN_CARBON
443  UniversalProcHandle
444  GetTrapVector(UInt16 trapNumber);
445 
446 #endif
448 #endif
450 #if PRAGMA_STRUCT_ALIGN
451 #pragma options align = reset
452 #elif PRAGMA_STRUCT_PACKPUSH
453 #pragma pack(pop)
454 #elif PRAGMA_STRUCT_PACK
455 #pragma pack()
456 #endif
457 
458 #ifdef PRAGMA_IMPORT_OFF
459 #pragma import off
460 #elif PRAGMA_IMPORT
461 #pragma import reset
462 #endif
463 
464 #ifdef __cplusplus
465 }
466 #endif
467 
468 #endif
469 * /*/*/ * /*/*/ */*/
Basic Macintosh data types.
@ ToolTrap
Definition: Patches.h:59
UniversalProcPtr GetOSTrapAddress(UInt16 trapNum)
void SetOSTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum)
UniversalProcPtr GetToolTrapAddress(UInt16 trapNum)
UniversalProcPtr GetToolboxTrapAddress(UInt16 trapNum)
void SetToolTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum)
void NSetTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum, TrapType tTyp)
void SetToolboxTrapAddress(UniversalProcPtr trapAddr, UInt16 trapNum)
UniversalProcPtr NGetTrapAddress(UInt16 trapNum, TrapType tTyp)