[484] | 1 | /* $Id: odinwrap.h,v 1.4 1999-08-11 22:25:50 phaller Exp $ */
|
---|
[473] | 2 |
|
---|
| 3 | /*
|
---|
| 4 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
| 5 | *
|
---|
| 6 | * ODIN FS: Selector function wrapper macros
|
---|
| 7 | *
|
---|
| 8 | * Copyright 1999 Patrick Haller
|
---|
| 9 | *
|
---|
| 10 | */
|
---|
| 11 |
|
---|
| 12 |
|
---|
| 13 | #ifndef _ODINWRAP_H_
|
---|
| 14 | #define _ODINWARP_H_
|
---|
| 15 |
|
---|
| 16 |
|
---|
| 17 | /****************************************************************************
|
---|
| 18 | * Defines *
|
---|
| 19 | ****************************************************************************/
|
---|
| 20 |
|
---|
[484] | 21 | #define ODIN_INTERNAL _Optlink _Export
|
---|
[473] | 22 |
|
---|
| 23 |
|
---|
[475] | 24 | #ifdef DEBUG
|
---|
| 25 | # define ODINDEBUGCHANNEL(a) static char* pszOdinDebugChannel=#a;
|
---|
| 26 | #else
|
---|
| 27 | # define ODINDEBUGCHANNEL(a)
|
---|
| 28 | #endif
|
---|
| 29 |
|
---|
| 30 |
|
---|
| 31 | #ifdef DEBUG
|
---|
| 32 |
|
---|
[473] | 33 | /****************************************************************************
|
---|
[475] | 34 | * General Wrapper Macros (debug instrumented) *
|
---|
| 35 | ****************************************************************************/
|
---|
| 36 |
|
---|
| 37 | /* ---------- 0 parameters ---------- */
|
---|
| 38 | #define ODINFUNCTION0(cRet,cName) \
|
---|
[484] | 39 | cRet ODIN_INTERNAL ODIN_##cName (void); \
|
---|
| 40 | cRet WINAPI cName(void) \
|
---|
[475] | 41 | { \
|
---|
| 42 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 43 | dprintf(("%s: "#cRet" "#cName"() enter\n", \
|
---|
| 44 | pszOdinDebugChannel)); \
|
---|
| 45 | cRet rc = cName(); \
|
---|
| 46 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
---|
| 47 | pszOdinDebugChannel, \
|
---|
| 48 | rc)); \
|
---|
| 49 | SetFS(sel); \
|
---|
| 50 | return rc; \
|
---|
| 51 | } \
|
---|
| 52 | \
|
---|
[484] | 53 | cRet ODIN_INTERNAL ODIN_##cName (void)
|
---|
[475] | 54 |
|
---|
| 55 |
|
---|
| 56 | #define ODINPROCEDURE0(cName) \
|
---|
[484] | 57 | void ODIN_INTERNAL ODIN_##cName (void); \
|
---|
| 58 | void WINAPI cName(void) \
|
---|
[475] | 59 | { \
|
---|
| 60 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 61 | dprintf(("%s: void "#cName"() enter\n", \
|
---|
| 62 | pszOdinDebugChannel)); \
|
---|
| 63 | cName(); \
|
---|
| 64 | dprintf(("%s: void "#cName"() leave\n", \
|
---|
| 65 | pszOdinDebugChannel)); \
|
---|
| 66 | SetFS(sel); \
|
---|
| 67 | } \
|
---|
| 68 | \
|
---|
[484] | 69 | void ODIN_INTERNAL ODIN_##cName (void)
|
---|
[475] | 70 |
|
---|
| 71 |
|
---|
| 72 | /* ---------- 1 parameters ---------- */
|
---|
| 73 | #define ODINFUNCTION1(cRet,cName,t1,a1) \
|
---|
[484] | 74 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1); \
|
---|
| 75 | cRet WINAPI cName(t1 a1) \
|
---|
[475] | 76 | { \
|
---|
| 77 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 78 | dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh) enter\n", \
|
---|
| 79 | pszOdinDebugChannel, \
|
---|
| 80 | a1)); \
|
---|
| 81 | cRet rc = cName(a1); \
|
---|
| 82 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
---|
| 83 | pszOdinDebugChannel, \
|
---|
| 84 | rc)); \
|
---|
| 85 | SetFS(sel); \
|
---|
| 86 | return rc; \
|
---|
| 87 | } \
|
---|
| 88 | \
|
---|
[484] | 89 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1)
|
---|
[475] | 90 |
|
---|
| 91 | #define ODINPROCEDURE1(cName,t1,a1) \
|
---|
[484] | 92 | void ODIN_INTERNAL ODIN_##cName (t1 a1); \
|
---|
| 93 | void WINAPI cName(t1 a1) \
|
---|
[475] | 94 | { \
|
---|
| 95 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 96 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh) enter\n", \
|
---|
| 97 | pszOdinDebugChannel, \
|
---|
| 98 | a1)); \
|
---|
| 99 | cName(a1); \
|
---|
| 100 | dprintf(("%s: void "#cName"() leave\n", \
|
---|
| 101 | pszOdinDebugChannel)); \
|
---|
| 102 | SetFS(sel); \
|
---|
| 103 | } \
|
---|
| 104 | \
|
---|
[484] | 105 | void ODIN_INTERNAL ODIN_##cName (t1 a1)
|
---|
[475] | 106 |
|
---|
| 107 |
|
---|
| 108 | /* ---------- 2 parameters ---------- */
|
---|
| 109 | #define ODINFUNCTION2(cRet,cName,t1,a1,t2,a2) \
|
---|
[484] | 110 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2); \
|
---|
| 111 | cRet WINAPI cName(t1 a1,t2 a2) \
|
---|
[475] | 112 | { \
|
---|
| 113 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 114 | dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh) enter\n", \
|
---|
| 115 | pszOdinDebugChannel, \
|
---|
| 116 | a1,a2)); \
|
---|
| 117 | cRet rc = cName(a1,a2); \
|
---|
| 118 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
---|
| 119 | pszOdinDebugChannel, \
|
---|
| 120 | rc)); \
|
---|
| 121 | SetFS(sel); \
|
---|
| 122 | return rc; \
|
---|
| 123 | } \
|
---|
| 124 | \
|
---|
[484] | 125 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
|
---|
[475] | 126 |
|
---|
| 127 | #define ODINPROCEDURE2(cName,t1,a1,t2,a2) \
|
---|
[484] | 128 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2); \
|
---|
| 129 | void WINAPI cName(t1 a1,t2 a2) \
|
---|
[475] | 130 | { \
|
---|
| 131 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 132 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh) enter\n", \
|
---|
| 133 | pszOdinDebugChannel, \
|
---|
| 134 | a1,a2)); \
|
---|
| 135 | cName(a1,a2); \
|
---|
| 136 | dprintf(("%s: void "#cName"() leave\n", \
|
---|
| 137 | pszOdinDebugChannel)); \
|
---|
| 138 | SetFS(sel); \
|
---|
| 139 | } \
|
---|
| 140 | \
|
---|
[484] | 141 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
|
---|
[475] | 142 |
|
---|
| 143 |
|
---|
| 144 | /* ---------- 3 parameters ---------- */
|
---|
| 145 | #define ODINFUNCTION3(cRet,cName,t1,a1,t2,a2,t3,a3) \
|
---|
[484] | 146 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
|
---|
| 147 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3) \
|
---|
[475] | 148 | { \
|
---|
| 149 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 150 | dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \
|
---|
| 151 | pszOdinDebugChannel, \
|
---|
| 152 | a1,a2,a3)); \
|
---|
| 153 | cRet rc = cName(a1,a2,a3); \
|
---|
| 154 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
---|
| 155 | pszOdinDebugChannel, \
|
---|
| 156 | rc)); \
|
---|
| 157 | SetFS(sel); \
|
---|
| 158 | return rc; \
|
---|
| 159 | } \
|
---|
| 160 | \
|
---|
[484] | 161 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
|
---|
[475] | 162 |
|
---|
| 163 | #define ODINPROCEDURE3(cName,t1,a1,t2,a2,t3,a3) \
|
---|
[484] | 164 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
|
---|
| 165 | void WINAPI cName(t1 a1,t2 a2,t3 a3) \
|
---|
[475] | 166 | { \
|
---|
| 167 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 168 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \
|
---|
| 169 | pszOdinDebugChannel, \
|
---|
| 170 | a1,a2,a3)); \
|
---|
| 171 | cName(a1,a2,a3); \
|
---|
| 172 | dprintf(("%s: void "#cName"() leave\n", \
|
---|
| 173 | pszOdinDebugChannel)); \
|
---|
| 174 | SetFS(sel); \
|
---|
| 175 | } \
|
---|
| 176 | \
|
---|
[484] | 177 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
|
---|
[475] | 178 |
|
---|
| 179 |
|
---|
| 180 | /* ---------- 4 parameters ---------- */
|
---|
| 181 | #define ODINFUNCTION4(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4) \
|
---|
[484] | 182 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
|
---|
| 183 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
|
---|
[475] | 184 | { \
|
---|
| 185 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 186 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh, "#t4" "#a4"=%08xh) enter\n", \
|
---|
| 187 | pszOdinDebugChannel, \
|
---|
| 188 | a1,a2,a3,a4)); \
|
---|
| 189 | cRet rc = cName(a1,a2,a3,a4); \
|
---|
| 190 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
---|
| 191 | pszOdinDebugChannel, \
|
---|
| 192 | rc)); \
|
---|
| 193 | SetFS(sel); \
|
---|
| 194 | return rc; \
|
---|
| 195 | } \
|
---|
| 196 | \
|
---|
[484] | 197 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
|
---|
[475] | 198 |
|
---|
| 199 | #define ODINPROCEDURE4(cName,t1,a1,t2,a2,t3,a3,t4,a4) \
|
---|
[484] | 200 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
|
---|
| 201 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
|
---|
[475] | 202 | { \
|
---|
| 203 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 204 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh, "#t4" "#a4"=%08xh) enter\n", \
|
---|
| 205 | pszOdinDebugChannel, \
|
---|
| 206 | a1,a2,a3,a4)); \
|
---|
| 207 | cName(a1,a2,a3,a4); \
|
---|
| 208 | dprintf(("%s: void "#cName"() leave\n", \
|
---|
| 209 | pszOdinDebugChannel)); \
|
---|
| 210 | SetFS(sel); \
|
---|
| 211 | } \
|
---|
| 212 | \
|
---|
[484] | 213 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
|
---|
[475] | 214 |
|
---|
| 215 |
|
---|
| 216 | /* ---------- 5 parameters ---------- */
|
---|
| 217 | #define ODINFUNCTION5(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
|
---|
[484] | 218 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
|
---|
| 219 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
|
---|
[475] | 220 | { \
|
---|
| 221 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 222 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh" \
|
---|
| 223 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh) enter\n", \
|
---|
| 224 | pszOdinDebugChannel, \
|
---|
| 225 | a1,a2,a3,a4,a5)); \
|
---|
| 226 | cRet rc = cName(a1,a2,a3,a4,a5); \
|
---|
| 227 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
---|
| 228 | pszOdinDebugChannel, \
|
---|
| 229 | rc)); \
|
---|
| 230 | SetFS(sel); \
|
---|
| 231 | return rc; \
|
---|
| 232 | } \
|
---|
| 233 | \
|
---|
[484] | 234 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
|
---|
[475] | 235 |
|
---|
| 236 | #define ODINPROCEDURE5(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
|
---|
[484] | 237 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
|
---|
| 238 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
|
---|
[475] | 239 | { \
|
---|
| 240 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 241 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
---|
| 242 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh) enter\n", \
|
---|
| 243 | pszOdinDebugChannel, \
|
---|
| 244 | a1,a2,a3,a4,a5)); \
|
---|
| 245 | cName(a1,a2,a3,a4,a5); \
|
---|
| 246 | dprintf(("%s: void "#cName"() leave\n", \
|
---|
| 247 | pszOdinDebugChannel)); \
|
---|
| 248 | SetFS(sel); \
|
---|
| 249 | } \
|
---|
| 250 | \
|
---|
[484] | 251 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
|
---|
[475] | 252 |
|
---|
| 253 |
|
---|
| 254 | /* ---------- 6 parameters ---------- */
|
---|
| 255 | #define ODINFUNCTION6(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
|
---|
[484] | 256 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
|
---|
| 257 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
|
---|
[475] | 258 | { \
|
---|
| 259 | unsigned short sel = RestoreOS2FS(); \
|
---|
[476] | 260 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
---|
| 261 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh) enter\n", \
|
---|
[475] | 262 | pszOdinDebugChannel, \
|
---|
| 263 | a1,a2,a3)); \
|
---|
| 264 | cRet rc = cName(a1,a2,a3,a4,a5,a6); \
|
---|
| 265 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
---|
| 266 | pszOdinDebugChannel, \
|
---|
| 267 | rc)); \
|
---|
| 268 | SetFS(sel); \
|
---|
| 269 | return rc; \
|
---|
| 270 | } \
|
---|
| 271 | \
|
---|
[484] | 272 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
|
---|
[475] | 273 |
|
---|
| 274 | #define ODINPROCEDURE6(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
|
---|
[484] | 275 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
|
---|
| 276 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
|
---|
[475] | 277 | { \
|
---|
| 278 | unsigned short sel = RestoreOS2FS(); \
|
---|
[476] | 279 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
---|
| 280 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh) enter\n", \
|
---|
[475] | 281 | pszOdinDebugChannel, \
|
---|
| 282 | a1,a2,a3)); \
|
---|
| 283 | cName(a1,a2,a3,a4,a5,a6); \
|
---|
| 284 | dprintf(("%s: void "#cName"() leave\n", \
|
---|
| 285 | pszOdinDebugChannel)); \
|
---|
| 286 | SetFS(sel); \
|
---|
| 287 | } \
|
---|
| 288 | \
|
---|
[484] | 289 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
|
---|
[475] | 290 |
|
---|
| 291 |
|
---|
| 292 | /* ---------- 7 parameters ---------- */
|
---|
| 293 | #define ODINFUNCTION7(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
|
---|
[484] | 294 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
|
---|
| 295 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
|
---|
[475] | 296 | { \
|
---|
| 297 | unsigned short sel = RestoreOS2FS(); \
|
---|
[476] | 298 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
---|
| 299 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh) enter\n", \
|
---|
[475] | 300 | pszOdinDebugChannel, \
|
---|
| 301 | a1,a2,a3)); \
|
---|
| 302 | cRet rc = cName(a1,a2,a3,a4,a5,a6,a7); \
|
---|
| 303 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
---|
| 304 | pszOdinDebugChannel, \
|
---|
| 305 | rc)); \
|
---|
| 306 | SetFS(sel); \
|
---|
| 307 | return rc; \
|
---|
| 308 | } \
|
---|
| 309 | \
|
---|
[484] | 310 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
|
---|
[475] | 311 |
|
---|
| 312 | #define ODINPROCEDURE7(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
|
---|
[484] | 313 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
|
---|
| 314 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
|
---|
[475] | 315 | { \
|
---|
| 316 | unsigned short sel = RestoreOS2FS(); \
|
---|
[476] | 317 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
---|
| 318 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh) enter\n", \
|
---|
[475] | 319 | pszOdinDebugChannel, \
|
---|
| 320 | a1,a2,a3)); \
|
---|
| 321 | cName(a1,a2,a3,a4,a5,a6,a7); \
|
---|
| 322 | dprintf(("%s: void "#cName"() leave\n", \
|
---|
| 323 | pszOdinDebugChannel)); \
|
---|
| 324 | SetFS(sel); \
|
---|
| 325 | } \
|
---|
| 326 | \
|
---|
[484] | 327 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
|
---|
[475] | 328 |
|
---|
| 329 |
|
---|
| 330 | /* ---------- 8 parameters ---------- */
|
---|
| 331 | #define ODINFUNCTION8(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
|
---|
[484] | 332 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
|
---|
| 333 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
|
---|
[475] | 334 | { \
|
---|
| 335 | unsigned short sel = RestoreOS2FS(); \
|
---|
[476] | 336 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
---|
| 337 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
---|
| 338 | ", "#t8" "#a8"=%08xh) enter\n", \
|
---|
[475] | 339 | pszOdinDebugChannel, \
|
---|
| 340 | a1,a2,a3)); \
|
---|
| 341 | cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8); \
|
---|
| 342 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
---|
| 343 | pszOdinDebugChannel, \
|
---|
| 344 | rc)); \
|
---|
| 345 | SetFS(sel); \
|
---|
| 346 | return rc; \
|
---|
| 347 | } \
|
---|
| 348 | \
|
---|
[484] | 349 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
|
---|
[475] | 350 |
|
---|
| 351 | #define ODINPROCEDURE8(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
|
---|
[484] | 352 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
|
---|
| 353 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
|
---|
[475] | 354 | { \
|
---|
| 355 | unsigned short sel = RestoreOS2FS(); \
|
---|
[476] | 356 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
---|
| 357 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
---|
| 358 | ", "#t8" "#a8"=%08xh) enter\n", \
|
---|
[475] | 359 | pszOdinDebugChannel, \
|
---|
| 360 | a1,a2,a3)); \
|
---|
| 361 | cName(a1,a2,a3,a4,a5,a6,a7,a8); \
|
---|
| 362 | dprintf(("%s: void "#cName"() leave\n", \
|
---|
| 363 | pszOdinDebugChannel)); \
|
---|
| 364 | SetFS(sel); \
|
---|
| 365 | } \
|
---|
| 366 | \
|
---|
[484] | 367 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
|
---|
[475] | 368 |
|
---|
| 369 |
|
---|
| 370 | /* ---------- 9 parameters ---------- */
|
---|
| 371 | #define ODINFUNCTION9(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
|
---|
[484] | 372 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
|
---|
| 373 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
|
---|
[475] | 374 | { \
|
---|
| 375 | unsigned short sel = RestoreOS2FS(); \
|
---|
[476] | 376 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
---|
| 377 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
---|
| 378 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh) enter\n", \
|
---|
[475] | 379 | pszOdinDebugChannel, \
|
---|
| 380 | a1,a2,a3)); \
|
---|
| 381 | cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
|
---|
| 382 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
---|
| 383 | pszOdinDebugChannel, \
|
---|
| 384 | rc)); \
|
---|
| 385 | SetFS(sel); \
|
---|
| 386 | return rc; \
|
---|
| 387 | } \
|
---|
| 388 | \
|
---|
[484] | 389 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
|
---|
[475] | 390 |
|
---|
| 391 | #define ODINPROCEDURE9(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
|
---|
[484] | 392 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
|
---|
| 393 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
|
---|
[475] | 394 | { \
|
---|
| 395 | unsigned short sel = RestoreOS2FS(); \
|
---|
[476] | 396 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
---|
| 397 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
---|
| 398 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh) enter\n", \
|
---|
[475] | 399 | pszOdinDebugChannel, \
|
---|
| 400 | a1,a2,a3)); \
|
---|
| 401 | cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
|
---|
| 402 | dprintf(("%s: void "#cName"() leave\n", \
|
---|
| 403 | pszOdinDebugChannel)); \
|
---|
| 404 | SetFS(sel); \
|
---|
| 405 | } \
|
---|
| 406 | \
|
---|
[484] | 407 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
|
---|
[475] | 408 |
|
---|
| 409 |
|
---|
| 410 | /* ---------- 10 parameters ---------- */
|
---|
| 411 | #define ODINFUNCTION10(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
|
---|
[484] | 412 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10); \
|
---|
| 413 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
|
---|
[475] | 414 | { \
|
---|
| 415 | unsigned short sel = RestoreOS2FS(); \
|
---|
[476] | 416 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
---|
| 417 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
---|
| 418 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh) enter\n", \
|
---|
[475] | 419 | pszOdinDebugChannel, \
|
---|
| 420 | a1,a2,a3)); \
|
---|
| 421 | cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
|
---|
| 422 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
---|
| 423 | pszOdinDebugChannel, \
|
---|
| 424 | rc)); \
|
---|
| 425 | SetFS(sel); \
|
---|
| 426 | return rc; \
|
---|
| 427 | } \
|
---|
| 428 | \
|
---|
[484] | 429 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10)
|
---|
[475] | 430 |
|
---|
| 431 | #define ODINPROCEDURE10(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
|
---|
[484] | 432 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10); \
|
---|
| 433 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
|
---|
[475] | 434 | { \
|
---|
| 435 | unsigned short sel = RestoreOS2FS(); \
|
---|
[476] | 436 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
---|
| 437 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
---|
| 438 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh) enter\n", \
|
---|
[475] | 439 | pszOdinDebugChannel, \
|
---|
| 440 | a1,a2,a3)); \
|
---|
| 441 | cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
|
---|
| 442 | dprintf(("%s: void "#cName"() leave\n", \
|
---|
| 443 | pszOdinDebugChannel)); \
|
---|
| 444 | SetFS(sel); \
|
---|
| 445 | } \
|
---|
| 446 | \
|
---|
[484] | 447 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10)
|
---|
[475] | 448 |
|
---|
| 449 |
|
---|
| 450 | /* ---------- 11 parameters ---------- */
|
---|
| 451 | #define ODINFUNCTION11(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10,t11,a11) \
|
---|
[484] | 452 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11); \
|
---|
| 453 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11) \
|
---|
[475] | 454 | { \
|
---|
| 455 | unsigned short sel = RestoreOS2FS(); \
|
---|
[476] | 456 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
---|
| 457 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
---|
| 458 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh) enter\n", \
|
---|
[475] | 459 | pszOdinDebugChannel, \
|
---|
| 460 | a1,a2,a3)); \
|
---|
| 461 | cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
|
---|
| 462 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
---|
| 463 | pszOdinDebugChannel, \
|
---|
| 464 | rc)); \
|
---|
| 465 | SetFS(sel); \
|
---|
| 466 | return rc; \
|
---|
| 467 | } \
|
---|
| 468 | \
|
---|
[484] | 469 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11)
|
---|
[475] | 470 |
|
---|
| 471 | #define ODINPROCEDURE11(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10,t11,a11) \
|
---|
[484] | 472 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11); \
|
---|
| 473 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11) \
|
---|
[475] | 474 | { \
|
---|
| 475 | unsigned short sel = RestoreOS2FS(); \
|
---|
[476] | 476 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
---|
| 477 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
---|
| 478 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh) enter\n", \
|
---|
[475] | 479 | pszOdinDebugChannel, \
|
---|
| 480 | a1,a2,a3)); \
|
---|
| 481 | cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
|
---|
| 482 | dprintf(("%s: void "#cName"() leave\n", \
|
---|
| 483 | pszOdinDebugChannel)); \
|
---|
| 484 | SetFS(sel); \
|
---|
| 485 | } \
|
---|
| 486 | \
|
---|
[484] | 487 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11)
|
---|
[475] | 488 |
|
---|
| 489 |
|
---|
| 490 | /* ---------- 12 parameters ---------- */
|
---|
| 491 | #define ODINFUNCTION12(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10,t11,a11,t12,a12) \
|
---|
[484] | 492 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11,t12 a12); \
|
---|
| 493 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11,t12 a12) \
|
---|
[475] | 494 | { \
|
---|
| 495 | unsigned short sel = RestoreOS2FS(); \
|
---|
[476] | 496 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
---|
| 497 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
---|
| 498 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
|
---|
| 499 | ", "#t12" "#a12"=%08xh) enter\n", \
|
---|
[475] | 500 | pszOdinDebugChannel, \
|
---|
| 501 | a1,a2,a3)); \
|
---|
| 502 | cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
|
---|
| 503 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
---|
| 504 | pszOdinDebugChannel, \
|
---|
| 505 | rc)); \
|
---|
| 506 | SetFS(sel); \
|
---|
| 507 | return rc; \
|
---|
| 508 | } \
|
---|
| 509 | \
|
---|
[484] | 510 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11,t12 a12)
|
---|
[475] | 511 |
|
---|
| 512 | #define ODINPROCEDURE12(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10,t11,a11,t12,a12) \
|
---|
[484] | 513 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11,t12 a12); \
|
---|
| 514 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11,t12 a12) \
|
---|
[475] | 515 | { \
|
---|
| 516 | unsigned short sel = RestoreOS2FS(); \
|
---|
[476] | 517 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
---|
| 518 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
---|
| 519 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
|
---|
| 520 | ", "#t12" "#a12"=%08xh) enter\n", \
|
---|
[475] | 521 | pszOdinDebugChannel, \
|
---|
| 522 | a1,a2,a3)); \
|
---|
| 523 | cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
|
---|
| 524 | dprintf(("%s: void "#cName"() leave\n", \
|
---|
| 525 | pszOdinDebugChannel)); \
|
---|
| 526 | SetFS(sel); \
|
---|
| 527 | } \
|
---|
| 528 | \
|
---|
[484] | 529 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11,t12 a12)
|
---|
[475] | 530 |
|
---|
| 531 |
|
---|
| 532 | #else
|
---|
| 533 |
|
---|
| 534 | /****************************************************************************
|
---|
[473] | 535 | * General Wrapper Macros *
|
---|
| 536 | ****************************************************************************/
|
---|
| 537 |
|
---|
| 538 | /* ---------- 0 parameters ---------- */
|
---|
| 539 | #define ODINFUNCTION0(cRet,cName) \
|
---|
[484] | 540 | cRet ODIN_INTERNAL ODIN_##cName (void);\
|
---|
| 541 | cRet WINAPI cName(void) \
|
---|
[473] | 542 | { \
|
---|
| 543 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 544 | cRet rc = cName(); \
|
---|
| 545 | SetFS(sel); \
|
---|
| 546 | return rc; \
|
---|
| 547 | } \
|
---|
| 548 | \
|
---|
[484] | 549 | cRet ODIN_INTERNAL ODIN_##cName (void)
|
---|
[473] | 550 |
|
---|
| 551 |
|
---|
| 552 | #define ODINPROCEDURE0(cName) \
|
---|
[484] | 553 | void ODIN_INTERNAL ODIN_##cName (void);\
|
---|
| 554 | void WINAPI cName(void) \
|
---|
[473] | 555 | { \
|
---|
| 556 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 557 | cName(); \
|
---|
| 558 | SetFS(sel); \
|
---|
| 559 | } \
|
---|
| 560 | \
|
---|
[484] | 561 | void ODIN_INTERNAL ODIN_##cName (void)
|
---|
[473] | 562 |
|
---|
| 563 |
|
---|
| 564 | /* ---------- 1 parameters ---------- */
|
---|
| 565 | #define ODINFUNCTION1(cRet,cName,t1,a1) \
|
---|
[484] | 566 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1);\
|
---|
| 567 | cRet WINAPI cName(t1 a1) \
|
---|
[473] | 568 | { \
|
---|
| 569 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 570 | cRet rc = cName(a1); \
|
---|
| 571 | SetFS(sel); \
|
---|
| 572 | return rc; \
|
---|
| 573 | } \
|
---|
| 574 | \
|
---|
[484] | 575 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1)
|
---|
[473] | 576 |
|
---|
| 577 | #define ODINPROCEDURE1(cName,t1,a1) \
|
---|
[484] | 578 | void ODIN_INTERNAL ODIN_##cName (t1 a1);\
|
---|
| 579 | void WINAPI cName(t1 a1) \
|
---|
[473] | 580 | { \
|
---|
| 581 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 582 | cName(a1); \
|
---|
| 583 | SetFS(sel); \
|
---|
| 584 | } \
|
---|
| 585 | \
|
---|
[484] | 586 | void ODIN_INTERNAL ODIN_##cName (t1 a1)
|
---|
[473] | 587 |
|
---|
| 588 |
|
---|
| 589 | /* ---------- 2 parameters ---------- */
|
---|
| 590 | #define ODINFUNCTION2(cRet,cName,t1,a1,t2,a2) \
|
---|
[484] | 591 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2); \
|
---|
| 592 | cRet WINAPI cName(t1 a1,t2 a2) \
|
---|
[473] | 593 | { \
|
---|
| 594 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 595 | cRet rc = cName(a1,a2); \
|
---|
| 596 | SetFS(sel); \
|
---|
| 597 | return rc; \
|
---|
| 598 | } \
|
---|
| 599 | \
|
---|
[484] | 600 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
|
---|
[473] | 601 |
|
---|
| 602 | #define ODINPROCEDURE2(cName,t1,a1,t2,a2) \
|
---|
[484] | 603 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2);\
|
---|
| 604 | void WINAPI cName(t1 a1,t2 a2) \
|
---|
[473] | 605 | { \
|
---|
| 606 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 607 | cName(a1,a2); \
|
---|
| 608 | SetFS(sel); \
|
---|
| 609 | } \
|
---|
| 610 | \
|
---|
[484] | 611 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
|
---|
[473] | 612 |
|
---|
| 613 |
|
---|
| 614 | /* ---------- 3 parameters ---------- */
|
---|
| 615 | #define ODINFUNCTION3(cRet,cName,t1,a1,t2,a2,t3,a3) \
|
---|
[484] | 616 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
|
---|
| 617 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3) \
|
---|
[473] | 618 | { \
|
---|
| 619 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 620 | cRet rc = cName(a1,a2,a3); \
|
---|
| 621 | SetFS(sel); \
|
---|
| 622 | return rc; \
|
---|
| 623 | } \
|
---|
| 624 | \
|
---|
[484] | 625 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
|
---|
[473] | 626 |
|
---|
| 627 | #define ODINPROCEDURE3(cName,t1,a1,t2,a2,t3,a3) \
|
---|
[484] | 628 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
|
---|
| 629 | void WINAPI cName(t1 a1,t2 a2,t3 a3) \
|
---|
[473] | 630 | { \
|
---|
| 631 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 632 | cName(a1,a2,a3); \
|
---|
| 633 | SetFS(sel); \
|
---|
| 634 | } \
|
---|
| 635 | \
|
---|
[484] | 636 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
|
---|
[473] | 637 |
|
---|
| 638 |
|
---|
| 639 | /* ---------- 4 parameters ---------- */
|
---|
| 640 | #define ODINFUNCTION4(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4) \
|
---|
[484] | 641 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
|
---|
| 642 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
|
---|
[473] | 643 | { \
|
---|
| 644 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 645 | cRet rc = cName(a1,a2,a3,a4); \
|
---|
| 646 | SetFS(sel); \
|
---|
| 647 | return rc; \
|
---|
| 648 | } \
|
---|
| 649 | \
|
---|
[484] | 650 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
|
---|
[473] | 651 |
|
---|
| 652 | #define ODINPROCEDURE4(cName,t1,a1,t2,a2,t3,a3,t4,a4) \
|
---|
[484] | 653 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
|
---|
| 654 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
|
---|
[473] | 655 | { \
|
---|
| 656 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 657 | cName(a1,a2,a3,a4); \
|
---|
| 658 | SetFS(sel); \
|
---|
| 659 | } \
|
---|
| 660 | \
|
---|
[484] | 661 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
|
---|
[473] | 662 |
|
---|
| 663 |
|
---|
| 664 | /* ---------- 5 parameters ---------- */
|
---|
| 665 | #define ODINFUNCTION5(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
|
---|
[484] | 666 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
|
---|
| 667 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
|
---|
[473] | 668 | { \
|
---|
| 669 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 670 | cRet rc = cName(a1,a2,a3,a4,a5); \
|
---|
| 671 | SetFS(sel); \
|
---|
| 672 | return rc; \
|
---|
| 673 | } \
|
---|
| 674 | \
|
---|
[484] | 675 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
|
---|
[473] | 676 |
|
---|
| 677 | #define ODINPROCEDURE5(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
|
---|
[484] | 678 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
|
---|
| 679 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
|
---|
[473] | 680 | { \
|
---|
| 681 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 682 | cName(a1,a2,a3,a4,a5); \
|
---|
| 683 | SetFS(sel); \
|
---|
| 684 | } \
|
---|
| 685 | \
|
---|
[484] | 686 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
|
---|
[473] | 687 |
|
---|
| 688 |
|
---|
| 689 | /* ---------- 6 parameters ---------- */
|
---|
| 690 | #define ODINFUNCTION6(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
|
---|
[484] | 691 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
|
---|
| 692 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
|
---|
[473] | 693 | { \
|
---|
| 694 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 695 | cRet rc = cName(a1,a2,a3,a4,a5,a6); \
|
---|
| 696 | SetFS(sel); \
|
---|
| 697 | return rc; \
|
---|
| 698 | } \
|
---|
| 699 | \
|
---|
[484] | 700 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
|
---|
[473] | 701 |
|
---|
| 702 | #define ODINPROCEDURE6(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
|
---|
[484] | 703 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
|
---|
| 704 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
|
---|
[473] | 705 | { \
|
---|
| 706 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 707 | cName(a1,a2,a3,a4,a5,a6); \
|
---|
| 708 | SetFS(sel); \
|
---|
| 709 | } \
|
---|
| 710 | \
|
---|
[484] | 711 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
|
---|
[473] | 712 |
|
---|
| 713 |
|
---|
| 714 | /* ---------- 7 parameters ---------- */
|
---|
| 715 | #define ODINFUNCTION7(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
|
---|
[484] | 716 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
|
---|
| 717 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
|
---|
[473] | 718 | { \
|
---|
| 719 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 720 | cRet rc = cName(a1,a2,a3,a4,a5,a6,a7); \
|
---|
| 721 | SetFS(sel); \
|
---|
| 722 | return rc; \
|
---|
| 723 | } \
|
---|
| 724 | \
|
---|
[484] | 725 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
|
---|
[473] | 726 |
|
---|
| 727 | #define ODINPROCEDURE7(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
|
---|
[484] | 728 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
|
---|
| 729 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
|
---|
[473] | 730 | { \
|
---|
| 731 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 732 | cName(a1,a2,a3,a4,a5,a6,a7); \
|
---|
| 733 | SetFS(sel); \
|
---|
| 734 | } \
|
---|
| 735 | \
|
---|
[484] | 736 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
|
---|
[473] | 737 |
|
---|
| 738 |
|
---|
| 739 | /* ---------- 8 parameters ---------- */
|
---|
| 740 | #define ODINFUNCTION8(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
|
---|
[484] | 741 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
|
---|
| 742 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
|
---|
[473] | 743 | { \
|
---|
| 744 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 745 | cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8); \
|
---|
| 746 | SetFS(sel); \
|
---|
| 747 | return rc; \
|
---|
| 748 | } \
|
---|
| 749 | \
|
---|
[484] | 750 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4,a4,t5 a5,t6 a6,t7 a7,t8 a8)
|
---|
[473] | 751 |
|
---|
| 752 | #define ODINPROCEDURE8(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
|
---|
[484] | 753 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
|
---|
| 754 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
|
---|
[473] | 755 | { \
|
---|
| 756 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 757 | cName(a1,a2,a3,a4,a5,a6,a7,a8); \
|
---|
| 758 | SetFS(sel); \
|
---|
| 759 | } \
|
---|
| 760 | \
|
---|
[484] | 761 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
|
---|
[473] | 762 |
|
---|
| 763 |
|
---|
[475] | 764 | /* ---------- 9 parameters ---------- */
|
---|
| 765 | #define ODINFUNCTION9(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
|
---|
[484] | 766 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
|
---|
| 767 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
|
---|
[475] | 768 | { \
|
---|
| 769 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 770 | cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
|
---|
| 771 | SetFS(sel); \
|
---|
| 772 | return rc; \
|
---|
| 773 | } \
|
---|
| 774 | \
|
---|
[484] | 775 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4,a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
|
---|
[473] | 776 |
|
---|
[475] | 777 | #define ODINPROCEDURE9(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
|
---|
[484] | 778 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
|
---|
| 779 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
|
---|
[475] | 780 | { \
|
---|
| 781 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 782 | cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
|
---|
| 783 | SetFS(sel); \
|
---|
| 784 | } \
|
---|
| 785 | \
|
---|
[484] | 786 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
|
---|
[475] | 787 |
|
---|
| 788 |
|
---|
| 789 | /* ---------- 10 parameters ---------- */
|
---|
| 790 | #define ODINFUNCTION10(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
|
---|
[484] | 791 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10); \
|
---|
| 792 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
|
---|
[475] | 793 | { \
|
---|
| 794 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 795 | cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
|
---|
| 796 | SetFS(sel); \
|
---|
| 797 | return rc; \
|
---|
| 798 | } \
|
---|
| 799 | \
|
---|
[484] | 800 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4,a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10)
|
---|
[475] | 801 |
|
---|
| 802 | #define ODINPROCEDURE10(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
|
---|
[484] | 803 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10); \
|
---|
| 804 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
|
---|
[475] | 805 | { \
|
---|
| 806 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 807 | cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
|
---|
| 808 | SetFS(sel); \
|
---|
| 809 | } \
|
---|
| 810 | \
|
---|
[484] | 811 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10)
|
---|
[475] | 812 |
|
---|
| 813 |
|
---|
| 814 | /* ---------- 11 parameters ---------- */
|
---|
| 815 | #define ODINFUNCTION11(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10,t11,a11) \
|
---|
[484] | 816 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11); \
|
---|
| 817 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11) \
|
---|
[475] | 818 | { \
|
---|
| 819 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 820 | cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
|
---|
| 821 | SetFS(sel); \
|
---|
| 822 | return rc; \
|
---|
| 823 | } \
|
---|
| 824 | \
|
---|
[484] | 825 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4,a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11)
|
---|
[475] | 826 |
|
---|
| 827 | #define ODINPROCEDURE11(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10,t11,a11) \
|
---|
[484] | 828 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11); \
|
---|
| 829 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11) \
|
---|
[475] | 830 | { \
|
---|
| 831 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 832 | cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
|
---|
| 833 | SetFS(sel); \
|
---|
| 834 | } \
|
---|
| 835 | \
|
---|
[484] | 836 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11)
|
---|
[475] | 837 |
|
---|
| 838 |
|
---|
| 839 | /* ---------- 12 parameters ---------- */
|
---|
| 840 | #define ODINFUNCTION12(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10,t11,a11,t12,a12) \
|
---|
[484] | 841 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11,t12 a12); \
|
---|
| 842 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11,t12 a12) \
|
---|
[475] | 843 | { \
|
---|
| 844 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 845 | cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
|
---|
| 846 | SetFS(sel); \
|
---|
| 847 | return rc; \
|
---|
| 848 | } \
|
---|
| 849 | \
|
---|
[484] | 850 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4,a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11,t12 a12)
|
---|
[475] | 851 |
|
---|
| 852 | #define ODINPROCEDURE12(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10,t11,a11,t12,a12) \
|
---|
[484] | 853 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11,t12 a12); \
|
---|
| 854 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11,t12 a12) \
|
---|
[475] | 855 | { \
|
---|
| 856 | unsigned short sel = RestoreOS2FS(); \
|
---|
| 857 | cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
|
---|
| 858 | SetFS(sel); \
|
---|
| 859 | } \
|
---|
| 860 | \
|
---|
[484] | 861 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11,t12 a12)
|
---|
[475] | 862 |
|
---|
| 863 |
|
---|
| 864 |
|
---|
| 865 | #endif
|
---|
| 866 |
|
---|
[473] | 867 | #endif /* _ODINWRAP_H_ */
|
---|