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.

259 lines
5.8 KiB

  1. /*
  2. File: Patches.h
  3. Contains: Patch Manager Interfaces.
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1994-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 __PATCHES__
  11. #define __PATCHES__
  12. #ifndef __MACTYPES__
  13. #include <MacTypes.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 CALL_NOT_IN_CARBON
  25. enum {
  26. kOSTrapType = 0,
  27. kToolboxTrapType = 1
  28. };
  29. typedef SignedByte TrapType;
  30. enum {
  31. OSTrap = kOSTrapType, /* old name */
  32. ToolTrap = kToolboxTrapType /* old name */
  33. };
  34. #endif /* CALL_NOT_IN_CARBON */
  35. /*
  36. GetTrapAddress and SetTrapAddress are obsolete and should not
  37. be used. Always use NGetTrapAddress and NSetTrapAddress instead.
  38. The old routines will not be supported for PowerPC apps.
  39. */
  40. #if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  41. #if CALL_NOT_IN_CARBON
  42. /*
  43. * GetTrapAddress()
  44. *
  45. * Availability:
  46. * Non-Carbon CFM: not available
  47. * CarbonLib: not available
  48. * Mac OS X: not available
  49. */
  50. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  51. #pragma parameter __A0 GetTrapAddress(__D0)
  52. #endif
  53. EXTERN_API( UniversalProcPtr )
  54. GetTrapAddress(UInt16 trapNum) ONEWORDINLINE(0xA146);
  55. /*
  56. * SetTrapAddress()
  57. *
  58. * Availability:
  59. * Non-Carbon CFM: not available
  60. * CarbonLib: not available
  61. * Mac OS X: not available
  62. */
  63. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  64. #pragma parameter SetTrapAddress(__A0, __D0)
  65. #endif
  66. EXTERN_API( void )
  67. SetTrapAddress(
  68. UniversalProcPtr trapAddr,
  69. UInt16 trapNum) ONEWORDINLINE(0xA047);
  70. #endif /* CALL_NOT_IN_CARBON */
  71. #endif /* TARGET_CPU_68K && !TARGET_RT_MAC_CFM */
  72. #if CALL_NOT_IN_CARBON
  73. /*
  74. * NGetTrapAddress()
  75. *
  76. * Availability:
  77. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  78. * CarbonLib: not available
  79. * Mac OS X: not available
  80. */
  81. EXTERN_API( UniversalProcPtr )
  82. NGetTrapAddress(
  83. UInt16 trapNum,
  84. TrapType tTyp);
  85. /*
  86. * NSetTrapAddress()
  87. *
  88. * Availability:
  89. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  90. * CarbonLib: not available
  91. * Mac OS X: not available
  92. */
  93. EXTERN_API( void )
  94. NSetTrapAddress(
  95. UniversalProcPtr trapAddr,
  96. UInt16 trapNum,
  97. TrapType tTyp);
  98. #endif /* CALL_NOT_IN_CARBON */
  99. #if CALL_NOT_IN_CARBON
  100. /*
  101. * GetOSTrapAddress()
  102. *
  103. * Availability:
  104. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  105. * CarbonLib: not available
  106. * Mac OS X: not available
  107. */
  108. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  109. #pragma parameter __A0 GetOSTrapAddress(__D0)
  110. #endif
  111. EXTERN_API( UniversalProcPtr )
  112. GetOSTrapAddress(UInt16 trapNum) ONEWORDINLINE(0xA346);
  113. /*
  114. * SetOSTrapAddress()
  115. *
  116. * Availability:
  117. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  118. * CarbonLib: not available
  119. * Mac OS X: not available
  120. */
  121. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  122. #pragma parameter SetOSTrapAddress(__A0, __D0)
  123. #endif
  124. EXTERN_API( void )
  125. SetOSTrapAddress(
  126. UniversalProcPtr trapAddr,
  127. UInt16 trapNum) ONEWORDINLINE(0xA247);
  128. /*
  129. * GetToolTrapAddress()
  130. *
  131. * Availability:
  132. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  133. * CarbonLib: not available
  134. * Mac OS X: not available
  135. */
  136. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  137. #pragma parameter __A0 GetToolTrapAddress(__D0)
  138. #endif
  139. EXTERN_API( UniversalProcPtr )
  140. GetToolTrapAddress(UInt16 trapNum) ONEWORDINLINE(0xA746);
  141. /*
  142. * SetToolTrapAddress()
  143. *
  144. * Availability:
  145. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  146. * CarbonLib: not available
  147. * Mac OS X: not available
  148. */
  149. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  150. #pragma parameter SetToolTrapAddress(__A0, __D0)
  151. #endif
  152. EXTERN_API( void )
  153. SetToolTrapAddress(
  154. UniversalProcPtr trapAddr,
  155. UInt16 trapNum) ONEWORDINLINE(0xA647);
  156. /*
  157. * GetToolboxTrapAddress()
  158. *
  159. * Availability:
  160. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  161. * CarbonLib: not available
  162. * Mac OS X: not available
  163. */
  164. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  165. #pragma parameter __A0 GetToolboxTrapAddress(__D0)
  166. #endif
  167. EXTERN_API( UniversalProcPtr )
  168. GetToolboxTrapAddress(UInt16 trapNum) ONEWORDINLINE(0xA746);
  169. /*
  170. * SetToolboxTrapAddress()
  171. *
  172. * Availability:
  173. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  174. * CarbonLib: not available
  175. * Mac OS X: not available
  176. */
  177. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  178. #pragma parameter SetToolboxTrapAddress(__A0, __D0)
  179. #endif
  180. EXTERN_API( void )
  181. SetToolboxTrapAddress(
  182. UniversalProcPtr trapAddr,
  183. UInt16 trapNum) ONEWORDINLINE(0xA647);
  184. #endif /* CALL_NOT_IN_CARBON */
  185. #if TARGET_CPU_PPC
  186. #if CALL_NOT_IN_CARBON
  187. /*
  188. * GetTrapVector()
  189. *
  190. * Availability:
  191. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  192. * CarbonLib: not available
  193. * Mac OS X: not available
  194. */
  195. EXTERN_API( UniversalProcHandle )
  196. GetTrapVector(UInt16 trapNumber);
  197. #endif /* CALL_NOT_IN_CARBON */
  198. #endif /* TARGET_CPU_PPC */
  199. #ifdef PRAGMA_IMPORT_OFF
  200. #pragma import off
  201. #elif PRAGMA_IMPORT
  202. #pragma import reset
  203. #endif
  204. #ifdef __cplusplus
  205. }
  206. #endif
  207. #endif /* __PATCHES__ */