| 1 | /* $Id: odinwrap.h,v 1.22 2000-05-02 20:49:26 sandervl Exp $ */
|
|---|
| 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 _ODINWRAP_H_
|
|---|
| 15 |
|
|---|
| 16 | #include <os2sel.h>
|
|---|
| 17 |
|
|---|
| 18 | /****************************************************************************
|
|---|
| 19 | * Defines *
|
|---|
| 20 | ****************************************************************************/
|
|---|
| 21 |
|
|---|
| 22 | // override debugging
|
|---|
| 23 | //#undef DEBUG
|
|---|
| 24 | //#define DEBUG
|
|---|
| 25 |
|
|---|
| 26 | // override profiling
|
|---|
| 27 | //#undef PROFILE_ODIN
|
|---|
| 28 | //#define PROFILE_ODIN
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 | #define ODIN_INTERNAL _Optlink
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 | #ifdef DEBUG
|
|---|
| 36 | # define ODINDEBUGCHANNEL(a) static char* pszOdinDebugChannel=#a;
|
|---|
| 37 | #else
|
|---|
| 38 | # define ODINDEBUGCHANNEL(a)
|
|---|
| 39 | #endif
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 | //SvL: Define this to use the internal wrapper function of a specific api
|
|---|
| 43 | #define ODIN_EXTERN(a) ODIN_INTERNAL ODIN_##a
|
|---|
| 44 |
|
|---|
| 45 | #ifdef DEBUG
|
|---|
| 46 |
|
|---|
| 47 | //@@@PH 1999/10/25 IBM VAC++ debug memory support
|
|---|
| 48 | #include <malloc.h>
|
|---|
| 49 |
|
|---|
| 50 | #if 1
|
|---|
| 51 | #define CheckFS(a)
|
|---|
| 52 | #else
|
|---|
| 53 | //SvL: Eases locating apis that corrupt FS
|
|---|
| 54 | #define error_FSSelector "FS Selector for thread %d corrupted!!!"
|
|---|
| 55 |
|
|---|
| 56 | extern int IsExeStarted(); //kernel32
|
|---|
| 57 |
|
|---|
| 58 | #define CheckFS(sel) if(sel == 0x150b && IsExeStarted()) { \
|
|---|
| 59 | dprintf(((char *)error_FSSelector, GetCurrentThreadId())); \
|
|---|
| 60 | }
|
|---|
| 61 | #endif
|
|---|
| 62 |
|
|---|
| 63 | //SvL: Only check the heap very frequently when there are problems
|
|---|
| 64 | //#define DEBUG_ODINHEAP
|
|---|
| 65 |
|
|---|
| 66 | #ifdef DEBUG_ODINHEAP
|
|---|
| 67 | #define ODIN_HEAPCHECK() _heap_check()
|
|---|
| 68 | #else
|
|---|
| 69 | #define ODIN_HEAPCHECK()
|
|---|
| 70 | #endif
|
|---|
| 71 |
|
|---|
| 72 | // PH: this is for profiling cumulative method call times
|
|---|
| 73 | #ifdef PROFILE_ODIN
|
|---|
| 74 |
|
|---|
| 75 | # define PROFILE_START(a) \
|
|---|
| 76 | LARGE_INTEGER liStart; \
|
|---|
| 77 | LARGE_INTEGER liEnd; \
|
|---|
| 78 | unsigned long ulElapsed; \
|
|---|
| 79 | QueryPerformanceCounter(&liStart);
|
|---|
| 80 |
|
|---|
| 81 |
|
|---|
| 82 | # define PROFILE_STOP(a) \
|
|---|
| 83 | QueryPerformanceCounter(&liEnd);\
|
|---|
| 84 | if (liStart.LowPart > liEnd.LowPart) \
|
|---|
| 85 | ulElapsed = 0xFFFFFFFF - liStart.LowPart + liEnd.LowPart; \
|
|---|
| 86 | else \
|
|---|
| 87 | ulElapsed = liEnd.LowPart - liStart.LowPart; \
|
|---|
| 88 | \
|
|---|
| 89 | dprintf(("%s: %s %u ticks\n",\
|
|---|
| 90 | pszOdinDebugChannel,\
|
|---|
| 91 | a, \
|
|---|
| 92 | ulElapsed));
|
|---|
| 93 | #else
|
|---|
| 94 | # define PROFILE_START(a)
|
|---|
| 95 | # define PROFILE_STOP(a)
|
|---|
| 96 | #endif
|
|---|
| 97 |
|
|---|
| 98 | /****************************************************************************
|
|---|
| 99 | * General Wrapper Macros (debug instrumented) *
|
|---|
| 100 | ****************************************************************************/
|
|---|
| 101 |
|
|---|
| 102 | /* ---------- 0 parameters ---------- */
|
|---|
| 103 | #define ODINFUNCTION0(cRet,cName) \
|
|---|
| 104 | cRet ODIN_INTERNAL ODIN_##cName (void); \
|
|---|
| 105 | cRet WINAPI cName(void) \
|
|---|
| 106 | { \
|
|---|
| 107 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 108 | dprintf(("%s: "#cRet" "#cName"() enter\n",\
|
|---|
| 109 | pszOdinDebugChannel)); \
|
|---|
| 110 | CheckFS(sel) \
|
|---|
| 111 | ODIN_HEAPCHECK(); \
|
|---|
| 112 | PROFILE_START(#cName) \
|
|---|
| 113 | cRet rc = ODIN_##cName(); \
|
|---|
| 114 | PROFILE_STOP(#cName) \
|
|---|
| 115 | ODIN_HEAPCHECK(); \
|
|---|
| 116 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
|---|
| 117 | pszOdinDebugChannel, \
|
|---|
| 118 | rc)); \
|
|---|
| 119 | SetFS(sel); \
|
|---|
| 120 | return rc; \
|
|---|
| 121 | } \
|
|---|
| 122 | \
|
|---|
| 123 | cRet ODIN_INTERNAL ODIN_##cName (void)
|
|---|
| 124 |
|
|---|
| 125 |
|
|---|
| 126 | #define ODINPROCEDURE0(cName) \
|
|---|
| 127 | void ODIN_INTERNAL ODIN_##cName (void); \
|
|---|
| 128 | void WINAPI cName(void) \
|
|---|
| 129 | { \
|
|---|
| 130 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 131 | dprintf(("%s: void "#cName"() enter\n", \
|
|---|
| 132 | pszOdinDebugChannel)); \
|
|---|
| 133 | CheckFS(sel) \
|
|---|
| 134 | ODIN_HEAPCHECK(); \
|
|---|
| 135 | PROFILE_START(#cName) \
|
|---|
| 136 | ODIN_##cName(); \
|
|---|
| 137 | PROFILE_STOP(#cName) \
|
|---|
| 138 | ODIN_HEAPCHECK(); \
|
|---|
| 139 | dprintf(("%s: void "#cName"() leave\n", \
|
|---|
| 140 | pszOdinDebugChannel)); \
|
|---|
| 141 | SetFS(sel); \
|
|---|
| 142 | } \
|
|---|
| 143 | \
|
|---|
| 144 | void ODIN_INTERNAL ODIN_##cName (void)
|
|---|
| 145 |
|
|---|
| 146 |
|
|---|
| 147 | /* ---------- 1 parameters ---------- */
|
|---|
| 148 | #define ODINFUNCTION1(cRet,cName,t1,a1) \
|
|---|
| 149 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1); \
|
|---|
| 150 | cRet WINAPI cName(t1 a1) \
|
|---|
| 151 | { \
|
|---|
| 152 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 153 | dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh) enter\n", \
|
|---|
| 154 | pszOdinDebugChannel, \
|
|---|
| 155 | a1)); \
|
|---|
| 156 | CheckFS(sel) \
|
|---|
| 157 | ODIN_HEAPCHECK(); \
|
|---|
| 158 | PROFILE_START(#cName) \
|
|---|
| 159 | cRet rc = ODIN_##cName(a1); \
|
|---|
| 160 | PROFILE_STOP(#cName) \
|
|---|
| 161 | ODIN_HEAPCHECK(); \
|
|---|
| 162 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
|---|
| 163 | pszOdinDebugChannel, \
|
|---|
| 164 | rc)); \
|
|---|
| 165 | SetFS(sel); \
|
|---|
| 166 | return rc; \
|
|---|
| 167 | } \
|
|---|
| 168 | \
|
|---|
| 169 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1)
|
|---|
| 170 |
|
|---|
| 171 | #define ODINPROCEDURE1(cName,t1,a1) \
|
|---|
| 172 | void ODIN_INTERNAL ODIN_##cName (t1 a1); \
|
|---|
| 173 | void WINAPI cName(t1 a1) \
|
|---|
| 174 | { \
|
|---|
| 175 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 176 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh) enter\n", \
|
|---|
| 177 | pszOdinDebugChannel, \
|
|---|
| 178 | a1)); \
|
|---|
| 179 | CheckFS(sel) \
|
|---|
| 180 | ODIN_HEAPCHECK(); \
|
|---|
| 181 | PROFILE_START(#cName) \
|
|---|
| 182 | ODIN_##cName(a1); \
|
|---|
| 183 | PROFILE_STOP(#cName) \
|
|---|
| 184 | ODIN_HEAPCHECK(); \
|
|---|
| 185 | dprintf(("%s: void "#cName"() leave\n", \
|
|---|
| 186 | pszOdinDebugChannel)); \
|
|---|
| 187 | SetFS(sel); \
|
|---|
| 188 | } \
|
|---|
| 189 | \
|
|---|
| 190 | void ODIN_INTERNAL ODIN_##cName (t1 a1)
|
|---|
| 191 |
|
|---|
| 192 |
|
|---|
| 193 | /* ---------- 2 parameters ---------- */
|
|---|
| 194 | #define ODINFUNCTION2(cRet,cName,t1,a1,t2,a2) \
|
|---|
| 195 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2); \
|
|---|
| 196 | cRet WINAPI cName(t1 a1,t2 a2) \
|
|---|
| 197 | { \
|
|---|
| 198 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 199 | dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh) enter\n", \
|
|---|
| 200 | pszOdinDebugChannel, \
|
|---|
| 201 | a1,a2)); \
|
|---|
| 202 | CheckFS(sel) \
|
|---|
| 203 | ODIN_HEAPCHECK(); \
|
|---|
| 204 | PROFILE_START(#cName) \
|
|---|
| 205 | cRet rc = ODIN_##cName(a1,a2); \
|
|---|
| 206 | PROFILE_STOP(#cName) \
|
|---|
| 207 | ODIN_HEAPCHECK(); \
|
|---|
| 208 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
|---|
| 209 | pszOdinDebugChannel, \
|
|---|
| 210 | rc)); \
|
|---|
| 211 | SetFS(sel); \
|
|---|
| 212 | return rc; \
|
|---|
| 213 | } \
|
|---|
| 214 | \
|
|---|
| 215 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
|
|---|
| 216 |
|
|---|
| 217 | #define ODINPROCEDURE2(cName,t1,a1,t2,a2) \
|
|---|
| 218 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2); \
|
|---|
| 219 | void WINAPI cName(t1 a1,t2 a2) \
|
|---|
| 220 | { \
|
|---|
| 221 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 222 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh) enter\n", \
|
|---|
| 223 | pszOdinDebugChannel, \
|
|---|
| 224 | a1,a2)); \
|
|---|
| 225 | CheckFS(sel) \
|
|---|
| 226 | ODIN_HEAPCHECK(); \
|
|---|
| 227 | PROFILE_START(#cName) \
|
|---|
| 228 | ODIN_##cName(a1,a2); \
|
|---|
| 229 | PROFILE_STOP(#cName) \
|
|---|
| 230 | ODIN_HEAPCHECK(); \
|
|---|
| 231 | dprintf(("%s: void "#cName"() leave\n", \
|
|---|
| 232 | pszOdinDebugChannel)); \
|
|---|
| 233 | SetFS(sel); \
|
|---|
| 234 | } \
|
|---|
| 235 | \
|
|---|
| 236 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
|
|---|
| 237 |
|
|---|
| 238 |
|
|---|
| 239 | /* ---------- 3 parameters ---------- */
|
|---|
| 240 | #define ODINFUNCTION3(cRet,cName,t1,a1,t2,a2,t3,a3) \
|
|---|
| 241 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
|
|---|
| 242 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3) \
|
|---|
| 243 | { \
|
|---|
| 244 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 245 | dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \
|
|---|
| 246 | pszOdinDebugChannel, \
|
|---|
| 247 | a1,a2,a3)); \
|
|---|
| 248 | CheckFS(sel) \
|
|---|
| 249 | ODIN_HEAPCHECK(); \
|
|---|
| 250 | PROFILE_START(#cName) \
|
|---|
| 251 | cRet rc = ODIN_##cName(a1,a2,a3); \
|
|---|
| 252 | PROFILE_STOP(#cName) \
|
|---|
| 253 | ODIN_HEAPCHECK(); \
|
|---|
| 254 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
|---|
| 255 | pszOdinDebugChannel, \
|
|---|
| 256 | rc)); \
|
|---|
| 257 | SetFS(sel); \
|
|---|
| 258 | return rc; \
|
|---|
| 259 | } \
|
|---|
| 260 | \
|
|---|
| 261 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
|
|---|
| 262 |
|
|---|
| 263 | #define ODINPROCEDURE3(cName,t1,a1,t2,a2,t3,a3) \
|
|---|
| 264 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
|
|---|
| 265 | void WINAPI cName(t1 a1,t2 a2,t3 a3) \
|
|---|
| 266 | { \
|
|---|
| 267 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 268 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \
|
|---|
| 269 | pszOdinDebugChannel, \
|
|---|
| 270 | a1,a2,a3)); \
|
|---|
| 271 | CheckFS(sel) \
|
|---|
| 272 | ODIN_HEAPCHECK(); \
|
|---|
| 273 | PROFILE_START(#cName) \
|
|---|
| 274 | ODIN_##cName(a1,a2,a3); \
|
|---|
| 275 | PROFILE_STOP(#cName) \
|
|---|
| 276 | ODIN_HEAPCHECK(); \
|
|---|
| 277 | dprintf(("%s: void "#cName"() leave\n", \
|
|---|
| 278 | pszOdinDebugChannel)); \
|
|---|
| 279 | SetFS(sel); \
|
|---|
| 280 | } \
|
|---|
| 281 | \
|
|---|
| 282 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
|
|---|
| 283 |
|
|---|
| 284 |
|
|---|
| 285 | /* ---------- 4 parameters ---------- */
|
|---|
| 286 | #define ODINFUNCTION4(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4) \
|
|---|
| 287 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
|
|---|
| 288 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
|
|---|
| 289 | { \
|
|---|
| 290 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 291 | dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh, "#t4" "#a4"=%08xh) enter\n", \
|
|---|
| 292 | pszOdinDebugChannel, \
|
|---|
| 293 | a1,a2,a3,a4)); \
|
|---|
| 294 | CheckFS(sel) \
|
|---|
| 295 | ODIN_HEAPCHECK(); \
|
|---|
| 296 | PROFILE_START(#cName) \
|
|---|
| 297 | cRet rc = ODIN_##cName(a1,a2,a3,a4); \
|
|---|
| 298 | PROFILE_STOP(#cName) \
|
|---|
| 299 | ODIN_HEAPCHECK(); \
|
|---|
| 300 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
|---|
| 301 | pszOdinDebugChannel, \
|
|---|
| 302 | rc)); \
|
|---|
| 303 | SetFS(sel); \
|
|---|
| 304 | return rc; \
|
|---|
| 305 | } \
|
|---|
| 306 | \
|
|---|
| 307 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
|
|---|
| 308 |
|
|---|
| 309 | #define ODINPROCEDURE4(cName,t1,a1,t2,a2,t3,a3,t4,a4) \
|
|---|
| 310 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
|
|---|
| 311 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
|
|---|
| 312 | { \
|
|---|
| 313 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 314 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh, "#t4" "#a4"=%08xh) enter\n", \
|
|---|
| 315 | pszOdinDebugChannel, \
|
|---|
| 316 | a1,a2,a3,a4)); \
|
|---|
| 317 | CheckFS(sel) \
|
|---|
| 318 | ODIN_HEAPCHECK(); \
|
|---|
| 319 | PROFILE_START(#cName) \
|
|---|
| 320 | ODIN_##cName(a1,a2,a3,a4); \
|
|---|
| 321 | PROFILE_STOP(#cName) \
|
|---|
| 322 | ODIN_HEAPCHECK(); \
|
|---|
| 323 | dprintf(("%s: void "#cName"() leave\n", \
|
|---|
| 324 | pszOdinDebugChannel)); \
|
|---|
| 325 | SetFS(sel); \
|
|---|
| 326 | } \
|
|---|
| 327 | \
|
|---|
| 328 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
|
|---|
| 329 |
|
|---|
| 330 |
|
|---|
| 331 | /* ---------- 5 parameters ---------- */
|
|---|
| 332 | #define ODINFUNCTION5(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
|
|---|
| 333 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
|
|---|
| 334 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
|
|---|
| 335 | { \
|
|---|
| 336 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 337 | dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh" \
|
|---|
| 338 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh) enter\n", \
|
|---|
| 339 | pszOdinDebugChannel, \
|
|---|
| 340 | a1,a2,a3,a4,a5)); \
|
|---|
| 341 | CheckFS(sel) \
|
|---|
| 342 | ODIN_HEAPCHECK(); \
|
|---|
| 343 | PROFILE_START(#cName) \
|
|---|
| 344 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5); \
|
|---|
| 345 | PROFILE_STOP(#cName) \
|
|---|
| 346 | ODIN_HEAPCHECK(); \
|
|---|
| 347 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
|---|
| 348 | pszOdinDebugChannel, \
|
|---|
| 349 | rc)); \
|
|---|
| 350 | SetFS(sel); \
|
|---|
| 351 | return rc; \
|
|---|
| 352 | } \
|
|---|
| 353 | \
|
|---|
| 354 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
|
|---|
| 355 |
|
|---|
| 356 | #define ODINPROCEDURE5(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
|
|---|
| 357 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
|
|---|
| 358 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
|
|---|
| 359 | { \
|
|---|
| 360 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 361 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 362 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh) enter\n", \
|
|---|
| 363 | pszOdinDebugChannel, \
|
|---|
| 364 | a1,a2,a3,a4,a5)); \
|
|---|
| 365 | CheckFS(sel) \
|
|---|
| 366 | ODIN_HEAPCHECK(); \
|
|---|
| 367 | PROFILE_START(#cName) \
|
|---|
| 368 | ODIN_##cName(a1,a2,a3,a4,a5); \
|
|---|
| 369 | PROFILE_STOP(#cName) \
|
|---|
| 370 | ODIN_HEAPCHECK(); \
|
|---|
| 371 | dprintf(("%s: void "#cName"() leave\n", \
|
|---|
| 372 | pszOdinDebugChannel)); \
|
|---|
| 373 | SetFS(sel); \
|
|---|
| 374 | } \
|
|---|
| 375 | \
|
|---|
| 376 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
|
|---|
| 377 |
|
|---|
| 378 |
|
|---|
| 379 | /* ---------- 6 parameters ---------- */
|
|---|
| 380 | #define ODINFUNCTION6(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
|
|---|
| 381 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
|
|---|
| 382 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
|
|---|
| 383 | { \
|
|---|
| 384 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 385 | dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 386 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh) enter\n", \
|
|---|
| 387 | pszOdinDebugChannel, \
|
|---|
| 388 | a1,a2,a3,a4,a5,a6)); \
|
|---|
| 389 | CheckFS(sel) \
|
|---|
| 390 | ODIN_HEAPCHECK(); \
|
|---|
| 391 | PROFILE_START(#cName) \
|
|---|
| 392 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6); \
|
|---|
| 393 | PROFILE_STOP(#cName) \
|
|---|
| 394 | ODIN_HEAPCHECK(); \
|
|---|
| 395 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
|---|
| 396 | pszOdinDebugChannel, \
|
|---|
| 397 | rc)); \
|
|---|
| 398 | SetFS(sel); \
|
|---|
| 399 | return rc; \
|
|---|
| 400 | } \
|
|---|
| 401 | \
|
|---|
| 402 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
|
|---|
| 403 |
|
|---|
| 404 | // @@@PH 1999/12/28 the following macro is a workaround for WINMM:waveOutOpen
|
|---|
| 405 | // where the system needs to know about the win32 tib fs selector
|
|---|
| 406 | #define ODINFUNCTION6FS(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
|
|---|
| 407 | cRet ODIN_INTERNAL ODIN_##cName (unsigned short selFS, t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
|
|---|
| 408 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
|
|---|
| 409 | { \
|
|---|
| 410 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 411 | dprintf(("%s: "#cRet" "#cName"(selFS=%04xh, "#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 412 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh) enter\n", \
|
|---|
| 413 | pszOdinDebugChannel, \
|
|---|
| 414 | sel, \
|
|---|
| 415 | a1,a2,a3,a4,a5,a6)); \
|
|---|
| 416 | CheckFS(sel) \
|
|---|
| 417 | ODIN_HEAPCHECK(); \
|
|---|
| 418 | PROFILE_START(#cName) \
|
|---|
| 419 | cRet rc = ODIN_##cName(sel,a1,a2,a3,a4,a5,a6); \
|
|---|
| 420 | PROFILE_STOP(#cName) \
|
|---|
| 421 | ODIN_HEAPCHECK(); \
|
|---|
| 422 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
|---|
| 423 | pszOdinDebugChannel, \
|
|---|
| 424 | rc)); \
|
|---|
| 425 | SetFS(sel); \
|
|---|
| 426 | return rc; \
|
|---|
| 427 | } \
|
|---|
| 428 | \
|
|---|
| 429 | cRet ODIN_INTERNAL ODIN_##cName (unsigned short selFS, t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
|
|---|
| 430 |
|
|---|
| 431 |
|
|---|
| 432 | #define ODINPROCEDURE6(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
|
|---|
| 433 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
|
|---|
| 434 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
|
|---|
| 435 | { \
|
|---|
| 436 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 437 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 438 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh) enter\n", \
|
|---|
| 439 | pszOdinDebugChannel, \
|
|---|
| 440 | a1,a2,a3,a4,a5,a6)); \
|
|---|
| 441 | CheckFS(sel) \
|
|---|
| 442 | ODIN_HEAPCHECK(); \
|
|---|
| 443 | PROFILE_START(#cName) \
|
|---|
| 444 | ODIN_##cName(a1,a2,a3,a4,a5,a6); \
|
|---|
| 445 | PROFILE_STOP(#cName) \
|
|---|
| 446 | ODIN_HEAPCHECK(); \
|
|---|
| 447 | dprintf(("%s: void "#cName"() leave\n", \
|
|---|
| 448 | pszOdinDebugChannel)); \
|
|---|
| 449 | SetFS(sel); \
|
|---|
| 450 | } \
|
|---|
| 451 | \
|
|---|
| 452 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
|
|---|
| 453 |
|
|---|
| 454 |
|
|---|
| 455 | /* ---------- 7 parameters ---------- */
|
|---|
| 456 | #define ODINFUNCTION7(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
|
|---|
| 457 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
|
|---|
| 458 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
|
|---|
| 459 | { \
|
|---|
| 460 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 461 | dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 462 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh) enter\n", \
|
|---|
| 463 | pszOdinDebugChannel, \
|
|---|
| 464 | a1,a2,a3,a4,a5,a6,a7)); \
|
|---|
| 465 | CheckFS(sel) \
|
|---|
| 466 | ODIN_HEAPCHECK(); \
|
|---|
| 467 | PROFILE_START(#cName) \
|
|---|
| 468 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
|
|---|
| 469 | PROFILE_STOP(#cName) \
|
|---|
| 470 | ODIN_HEAPCHECK(); \
|
|---|
| 471 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
|---|
| 472 | pszOdinDebugChannel, \
|
|---|
| 473 | rc)); \
|
|---|
| 474 | SetFS(sel); \
|
|---|
| 475 | return rc; \
|
|---|
| 476 | } \
|
|---|
| 477 | \
|
|---|
| 478 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
|
|---|
| 479 |
|
|---|
| 480 | #define ODINPROCEDURE7(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
|
|---|
| 481 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
|
|---|
| 482 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
|
|---|
| 483 | { \
|
|---|
| 484 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 485 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 486 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh) enter\n", \
|
|---|
| 487 | pszOdinDebugChannel, \
|
|---|
| 488 | a1,a2,a3,a4,a5,a6,a7)); \
|
|---|
| 489 | CheckFS(sel) \
|
|---|
| 490 | ODIN_HEAPCHECK(); \
|
|---|
| 491 | PROFILE_START(#cName) \
|
|---|
| 492 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
|
|---|
| 493 | PROFILE_STOP(#cName) \
|
|---|
| 494 | ODIN_HEAPCHECK(); \
|
|---|
| 495 | dprintf(("%s: void "#cName"() leave\n", \
|
|---|
| 496 | pszOdinDebugChannel)); \
|
|---|
| 497 | SetFS(sel); \
|
|---|
| 498 | } \
|
|---|
| 499 | \
|
|---|
| 500 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
|
|---|
| 501 |
|
|---|
| 502 |
|
|---|
| 503 | /* ---------- 8 parameters ---------- */
|
|---|
| 504 | #define ODINFUNCTION8(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
|
|---|
| 505 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
|
|---|
| 506 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
|
|---|
| 507 | { \
|
|---|
| 508 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 509 | dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 510 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
|---|
| 511 | ", "#t8" "#a8"=%08xh) enter\n", \
|
|---|
| 512 | pszOdinDebugChannel, \
|
|---|
| 513 | a1,a2,a3,a4,a5,a6,a7,a8)); \
|
|---|
| 514 | CheckFS(sel) \
|
|---|
| 515 | ODIN_HEAPCHECK(); \
|
|---|
| 516 | PROFILE_START(#cName) \
|
|---|
| 517 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
|
|---|
| 518 | PROFILE_STOP(#cName) \
|
|---|
| 519 | ODIN_HEAPCHECK(); \
|
|---|
| 520 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
|---|
| 521 | pszOdinDebugChannel, \
|
|---|
| 522 | rc)); \
|
|---|
| 523 | SetFS(sel); \
|
|---|
| 524 | return rc; \
|
|---|
| 525 | } \
|
|---|
| 526 | \
|
|---|
| 527 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
|
|---|
| 528 |
|
|---|
| 529 | #define ODINPROCEDURE8(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
|
|---|
| 530 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
|
|---|
| 531 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
|
|---|
| 532 | { \
|
|---|
| 533 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 534 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 535 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
|---|
| 536 | ", "#t8" "#a8"=%08xh) enter\n", \
|
|---|
| 537 | pszOdinDebugChannel, \
|
|---|
| 538 | a1,a2,a3,a4,a5,a6,a7,a8)); \
|
|---|
| 539 | ODIN_HEAPCHECK(); \
|
|---|
| 540 | CheckFS(sel) \
|
|---|
| 541 | PROFILE_START(#cName) \
|
|---|
| 542 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
|
|---|
| 543 | PROFILE_STOP(#cName) \
|
|---|
| 544 | ODIN_HEAPCHECK(); \
|
|---|
| 545 | dprintf(("%s: void "#cName"() leave\n", \
|
|---|
| 546 | pszOdinDebugChannel)); \
|
|---|
| 547 | SetFS(sel); \
|
|---|
| 548 | } \
|
|---|
| 549 | \
|
|---|
| 550 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
|
|---|
| 551 |
|
|---|
| 552 |
|
|---|
| 553 | /* ---------- 9 parameters ---------- */
|
|---|
| 554 | #define ODINFUNCTION9(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
|
|---|
| 555 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
|
|---|
| 556 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
|
|---|
| 557 | { \
|
|---|
| 558 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 559 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 560 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
|---|
| 561 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh) enter\n", \
|
|---|
| 562 | pszOdinDebugChannel, \
|
|---|
| 563 | a1,a2,a3,a4,a5,a6,a7,a8,a9)); \
|
|---|
| 564 | CheckFS(sel) \
|
|---|
| 565 | ODIN_HEAPCHECK(); \
|
|---|
| 566 | PROFILE_START(#cName) \
|
|---|
| 567 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
|
|---|
| 568 | PROFILE_STOP(#cName) \
|
|---|
| 569 | ODIN_HEAPCHECK(); \
|
|---|
| 570 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
|---|
| 571 | pszOdinDebugChannel, \
|
|---|
| 572 | rc)); \
|
|---|
| 573 | SetFS(sel); \
|
|---|
| 574 | return rc; \
|
|---|
| 575 | } \
|
|---|
| 576 | \
|
|---|
| 577 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
|
|---|
| 578 |
|
|---|
| 579 | #define ODINPROCEDURE9(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
|
|---|
| 580 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
|
|---|
| 581 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
|
|---|
| 582 | { \
|
|---|
| 583 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 584 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 585 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
|---|
| 586 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh) enter\n", \
|
|---|
| 587 | pszOdinDebugChannel, \
|
|---|
| 588 | a1,a2,a3,a4,a5,a6,a7,a8,a9)); \
|
|---|
| 589 | CheckFS(sel) \
|
|---|
| 590 | ODIN_HEAPCHECK(); \
|
|---|
| 591 | PROFILE_START(#cName) \
|
|---|
| 592 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
|
|---|
| 593 | PROFILE_STOP(#cName) \
|
|---|
| 594 | ODIN_HEAPCHECK(); \
|
|---|
| 595 | dprintf(("%s: void "#cName"() leave\n", \
|
|---|
| 596 | pszOdinDebugChannel)); \
|
|---|
| 597 | SetFS(sel); \
|
|---|
| 598 | } \
|
|---|
| 599 | \
|
|---|
| 600 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
|
|---|
| 601 |
|
|---|
| 602 |
|
|---|
| 603 | /* ---------- 10 parameters ---------- */
|
|---|
| 604 | #define ODINFUNCTION10(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
|
|---|
| 605 | 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); \
|
|---|
| 606 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
|
|---|
| 607 | { \
|
|---|
| 608 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 609 | dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 610 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
|---|
| 611 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh) enter\n", \
|
|---|
| 612 | pszOdinDebugChannel, \
|
|---|
| 613 | a1,a2,a3,a4,a5,a6,a7,a8,a9,a10));\
|
|---|
| 614 | CheckFS(sel) \
|
|---|
| 615 | ODIN_HEAPCHECK(); \
|
|---|
| 616 | PROFILE_START(#cName) \
|
|---|
| 617 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
|
|---|
| 618 | PROFILE_STOP(#cName) \
|
|---|
| 619 | ODIN_HEAPCHECK(); \
|
|---|
| 620 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
|---|
| 621 | pszOdinDebugChannel, \
|
|---|
| 622 | rc)); \
|
|---|
| 623 | SetFS(sel); \
|
|---|
| 624 | return rc; \
|
|---|
| 625 | } \
|
|---|
| 626 | \
|
|---|
| 627 | 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)
|
|---|
| 628 |
|
|---|
| 629 | #define ODINPROCEDURE10(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
|
|---|
| 630 | 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); \
|
|---|
| 631 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
|
|---|
| 632 | { \
|
|---|
| 633 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 634 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 635 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
|---|
| 636 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh) enter\n", \
|
|---|
| 637 | pszOdinDebugChannel, \
|
|---|
| 638 | a1,a2,a3)); \
|
|---|
| 639 | CheckFS(sel) \
|
|---|
| 640 | ODIN_HEAPCHECK(); \
|
|---|
| 641 | PROFILE_START(#cName) \
|
|---|
| 642 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
|
|---|
| 643 | PROFILE_STOP(#cName) \
|
|---|
| 644 | ODIN_HEAPCHECK(); \
|
|---|
| 645 | dprintf(("%s: void "#cName"() leave\n", \
|
|---|
| 646 | pszOdinDebugChannel)); \
|
|---|
| 647 | SetFS(sel); \
|
|---|
| 648 | } \
|
|---|
| 649 | \
|
|---|
| 650 | 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)
|
|---|
| 651 |
|
|---|
| 652 |
|
|---|
| 653 | /* ---------- 11 parameters ---------- */
|
|---|
| 654 | #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) \
|
|---|
| 655 | 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); \
|
|---|
| 656 | 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) \
|
|---|
| 657 | { \
|
|---|
| 658 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 659 | dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 660 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
|---|
| 661 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh) enter\n", \
|
|---|
| 662 | pszOdinDebugChannel, \
|
|---|
| 663 | a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)); \
|
|---|
| 664 | CheckFS(sel) \
|
|---|
| 665 | ODIN_HEAPCHECK(); \
|
|---|
| 666 | PROFILE_START(#cName) \
|
|---|
| 667 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
|
|---|
| 668 | PROFILE_STOP(#cName) \
|
|---|
| 669 | ODIN_HEAPCHECK(); \
|
|---|
| 670 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
|---|
| 671 | pszOdinDebugChannel, \
|
|---|
| 672 | rc)); \
|
|---|
| 673 | SetFS(sel); \
|
|---|
| 674 | return rc; \
|
|---|
| 675 | } \
|
|---|
| 676 | \
|
|---|
| 677 | 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)
|
|---|
| 678 |
|
|---|
| 679 | #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) \
|
|---|
| 680 | 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); \
|
|---|
| 681 | 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) \
|
|---|
| 682 | { \
|
|---|
| 683 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 684 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 685 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
|---|
| 686 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh) enter\n", \
|
|---|
| 687 | pszOdinDebugChannel, \
|
|---|
| 688 | a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)); \
|
|---|
| 689 | CheckFS(sel) \
|
|---|
| 690 | ODIN_HEAPCHECK(); \
|
|---|
| 691 | PROFILE_START(#cName) \
|
|---|
| 692 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
|
|---|
| 693 | PROFILE_STOP(#cName) \
|
|---|
| 694 | ODIN_HEAPCHECK(); \
|
|---|
| 695 | dprintf(("%s: void "#cName"() leave\n", \
|
|---|
| 696 | pszOdinDebugChannel)); \
|
|---|
| 697 | SetFS(sel); \
|
|---|
| 698 | } \
|
|---|
| 699 | \
|
|---|
| 700 | 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)
|
|---|
| 701 |
|
|---|
| 702 |
|
|---|
| 703 | /* ---------- 12 parameters ---------- */
|
|---|
| 704 | #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) \
|
|---|
| 705 | 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); \
|
|---|
| 706 | 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) \
|
|---|
| 707 | { \
|
|---|
| 708 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 709 | dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 710 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
|---|
| 711 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
|
|---|
| 712 | ", "#t12" "#a12"=%08xh) enter\n", \
|
|---|
| 713 | pszOdinDebugChannel, \
|
|---|
| 714 | a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)); \
|
|---|
| 715 | CheckFS(sel) \
|
|---|
| 716 | ODIN_HEAPCHECK(); \
|
|---|
| 717 | PROFILE_START(#cName) \
|
|---|
| 718 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
|
|---|
| 719 | PROFILE_STOP(#cName) \
|
|---|
| 720 | ODIN_HEAPCHECK(); \
|
|---|
| 721 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
|---|
| 722 | pszOdinDebugChannel, \
|
|---|
| 723 | rc)); \
|
|---|
| 724 | SetFS(sel); \
|
|---|
| 725 | return rc; \
|
|---|
| 726 | } \
|
|---|
| 727 | \
|
|---|
| 728 | 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)
|
|---|
| 729 |
|
|---|
| 730 | #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) \
|
|---|
| 731 | 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); \
|
|---|
| 732 | 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) \
|
|---|
| 733 | { \
|
|---|
| 734 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 735 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 736 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
|---|
| 737 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
|
|---|
| 738 | ", "#t12" "#a12"=%08xh) enter\n", \
|
|---|
| 739 | pszOdinDebugChannel, \
|
|---|
| 740 | a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)); \
|
|---|
| 741 | CheckFS(sel) \
|
|---|
| 742 | ODIN_HEAPCHECK(); \
|
|---|
| 743 | PROFILE_START(#cName) \
|
|---|
| 744 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
|
|---|
| 745 | PROFILE_STOP(#cName) \
|
|---|
| 746 | ODIN_HEAPCHECK(); \
|
|---|
| 747 | dprintf(("%s: void "#cName"() leave\n", \
|
|---|
| 748 | pszOdinDebugChannel)); \
|
|---|
| 749 | SetFS(sel); \
|
|---|
| 750 | } \
|
|---|
| 751 | \
|
|---|
| 752 | 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)
|
|---|
| 753 |
|
|---|
| 754 |
|
|---|
| 755 | /* ---------- 13 parameters ---------- */
|
|---|
| 756 | #define ODINFUNCTION13(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,t13,a13) \
|
|---|
| 757 | 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,t13 a13); \
|
|---|
| 758 | 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,t13 a13) \
|
|---|
| 759 | { \
|
|---|
| 760 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 761 | dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 762 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
|---|
| 763 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
|
|---|
| 764 | ", "#t12" "#a12"=%08xh, "#t13" "#a13"=%08xh) enter\n", \
|
|---|
| 765 | pszOdinDebugChannel, \
|
|---|
| 766 | a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)); \
|
|---|
| 767 | CheckFS(sel) \
|
|---|
| 768 | ODIN_HEAPCHECK(); \
|
|---|
| 769 | PROFILE_START(#cName) \
|
|---|
| 770 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13); \
|
|---|
| 771 | PROFILE_STOP(#cName) \
|
|---|
| 772 | ODIN_HEAPCHECK(); \
|
|---|
| 773 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
|---|
| 774 | pszOdinDebugChannel, \
|
|---|
| 775 | rc)); \
|
|---|
| 776 | SetFS(sel); \
|
|---|
| 777 | return rc; \
|
|---|
| 778 | } \
|
|---|
| 779 | \
|
|---|
| 780 | 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,t13 a13)
|
|---|
| 781 |
|
|---|
| 782 | #define ODINPROCEDURE13(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,t13,a13) \
|
|---|
| 783 | 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,t13 a13); \
|
|---|
| 784 | 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,t13 a13) \
|
|---|
| 785 | { \
|
|---|
| 786 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 787 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 788 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
|---|
| 789 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
|
|---|
| 790 | ", "#t12" "#a12"=%08xh, "#t13" "#a13"=%08xh, ) enter\n", \
|
|---|
| 791 | pszOdinDebugChannel, \
|
|---|
| 792 | a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)); \
|
|---|
| 793 | CheckFS(sel) \
|
|---|
| 794 | ODIN_HEAPCHECK(); \
|
|---|
| 795 | PROFILE_START(#cName) \
|
|---|
| 796 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13); \
|
|---|
| 797 | PROFILE_STOP(#cName) \
|
|---|
| 798 | ODIN_HEAPCHECK(); \
|
|---|
| 799 | dprintf(("%s: void "#cName"() leave\n", \
|
|---|
| 800 | pszOdinDebugChannel)); \
|
|---|
| 801 | SetFS(sel); \
|
|---|
| 802 | } \
|
|---|
| 803 | \
|
|---|
| 804 | 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,t13 a13)
|
|---|
| 805 |
|
|---|
| 806 |
|
|---|
| 807 | /* ---------- 14 parameters ---------- */
|
|---|
| 808 | #define ODINFUNCTION14(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,t13,a13,t14,a14) \
|
|---|
| 809 | 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,t13 a13,t14 a14); \
|
|---|
| 810 | 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,t13 a13,t14 a14) \
|
|---|
| 811 | { \
|
|---|
| 812 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 813 | dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 814 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
|---|
| 815 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
|
|---|
| 816 | ", "#t12" "#a12"=%08xh, "#t13" "#a13"=%08xh, "#t14" "#a14"=%08xh) enter\n", \
|
|---|
| 817 | pszOdinDebugChannel, \
|
|---|
| 818 | a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14)); \
|
|---|
| 819 | CheckFS(sel) \
|
|---|
| 820 | ODIN_HEAPCHECK(); \
|
|---|
| 821 | PROFILE_START(#cName) \
|
|---|
| 822 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14); \
|
|---|
| 823 | ODIN_HEAPCHECK(); \
|
|---|
| 824 | dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
|
|---|
| 825 | pszOdinDebugChannel, \
|
|---|
| 826 | rc)); \
|
|---|
| 827 | SetFS(sel); \
|
|---|
| 828 | return rc; \
|
|---|
| 829 | } \
|
|---|
| 830 | \
|
|---|
| 831 | 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,t13 a13,t14 a14)
|
|---|
| 832 |
|
|---|
| 833 | #define ODINPROCEDURE14(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,t13,a13,t14,a14) \
|
|---|
| 834 | 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,t13 a13,t14 a14); \
|
|---|
| 835 | 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,t13 a13,t14 a14) \
|
|---|
| 836 | { \
|
|---|
| 837 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 838 | dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
|
|---|
| 839 | ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
|
|---|
| 840 | ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
|
|---|
| 841 | ", "#t12" "#a12"=%08xh, "#t13" "#a13"=%08xh, "#t14" "#a14"=%08xh) enter\n", \
|
|---|
| 842 | pszOdinDebugChannel, \
|
|---|
| 843 | a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14)); \
|
|---|
| 844 | CheckFS(sel) \
|
|---|
| 845 | ODIN_HEAPCHECK(); \
|
|---|
| 846 | PROFILE_START(#cName) \
|
|---|
| 847 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14); \
|
|---|
| 848 | PROFILE_STOP(#cName) \
|
|---|
| 849 | ODIN_HEAPCHECK(); \
|
|---|
| 850 | dprintf(("%s: void "#cName"() leave\n", \
|
|---|
| 851 | pszOdinDebugChannel)); \
|
|---|
| 852 | SetFS(sel); \
|
|---|
| 853 | } \
|
|---|
| 854 | \
|
|---|
| 855 | 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,t13 a13,t14 a14)
|
|---|
| 856 |
|
|---|
| 857 |
|
|---|
| 858 | #else
|
|---|
| 859 |
|
|---|
| 860 | /****************************************************************************
|
|---|
| 861 | * General Wrapper Macros *
|
|---|
| 862 | ****************************************************************************/
|
|---|
| 863 |
|
|---|
| 864 | /* ---------- 0 parameters ---------- */
|
|---|
| 865 | #define ODINFUNCTION0(cRet,cName) \
|
|---|
| 866 | cRet ODIN_INTERNAL ODIN_##cName (void);\
|
|---|
| 867 | cRet WINAPI cName(void) \
|
|---|
| 868 | { \
|
|---|
| 869 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 870 | cRet rc = ODIN_##cName(); \
|
|---|
| 871 | SetFS(sel); \
|
|---|
| 872 | return rc; \
|
|---|
| 873 | } \
|
|---|
| 874 | \
|
|---|
| 875 | cRet ODIN_INTERNAL ODIN_##cName (void)
|
|---|
| 876 |
|
|---|
| 877 |
|
|---|
| 878 | #define ODINPROCEDURE0(cName) \
|
|---|
| 879 | void ODIN_INTERNAL ODIN_##cName (void);\
|
|---|
| 880 | void WINAPI cName(void) \
|
|---|
| 881 | { \
|
|---|
| 882 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 883 | ODIN_##cName(); \
|
|---|
| 884 | SetFS(sel); \
|
|---|
| 885 | } \
|
|---|
| 886 | \
|
|---|
| 887 | void ODIN_INTERNAL ODIN_##cName (void)
|
|---|
| 888 |
|
|---|
| 889 |
|
|---|
| 890 | /* ---------- 1 parameters ---------- */
|
|---|
| 891 | #define ODINFUNCTION1(cRet,cName,t1,a1) \
|
|---|
| 892 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1);\
|
|---|
| 893 | cRet WINAPI cName(t1 a1) \
|
|---|
| 894 | { \
|
|---|
| 895 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 896 | cRet rc = ODIN_##cName(a1); \
|
|---|
| 897 | SetFS(sel); \
|
|---|
| 898 | return rc; \
|
|---|
| 899 | } \
|
|---|
| 900 | \
|
|---|
| 901 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1)
|
|---|
| 902 |
|
|---|
| 903 | #define ODINPROCEDURE1(cName,t1,a1) \
|
|---|
| 904 | void ODIN_INTERNAL ODIN_##cName (t1 a1);\
|
|---|
| 905 | void WINAPI cName(t1 a1) \
|
|---|
| 906 | { \
|
|---|
| 907 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 908 | ODIN_##cName(a1); \
|
|---|
| 909 | SetFS(sel); \
|
|---|
| 910 | } \
|
|---|
| 911 | \
|
|---|
| 912 | void ODIN_INTERNAL ODIN_##cName (t1 a1)
|
|---|
| 913 |
|
|---|
| 914 |
|
|---|
| 915 | /* ---------- 2 parameters ---------- */
|
|---|
| 916 | #define ODINFUNCTION2(cRet,cName,t1,a1,t2,a2) \
|
|---|
| 917 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2); \
|
|---|
| 918 | cRet WINAPI cName(t1 a1,t2 a2) \
|
|---|
| 919 | { \
|
|---|
| 920 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 921 | cRet rc = ODIN_##cName(a1,a2); \
|
|---|
| 922 | SetFS(sel); \
|
|---|
| 923 | return rc; \
|
|---|
| 924 | } \
|
|---|
| 925 | \
|
|---|
| 926 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
|
|---|
| 927 |
|
|---|
| 928 | #define ODINPROCEDURE2(cName,t1,a1,t2,a2) \
|
|---|
| 929 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2);\
|
|---|
| 930 | void WINAPI cName(t1 a1,t2 a2) \
|
|---|
| 931 | { \
|
|---|
| 932 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 933 | ODIN_##cName(a1,a2); \
|
|---|
| 934 | SetFS(sel); \
|
|---|
| 935 | } \
|
|---|
| 936 | \
|
|---|
| 937 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
|
|---|
| 938 |
|
|---|
| 939 |
|
|---|
| 940 | /* ---------- 3 parameters ---------- */
|
|---|
| 941 | #define ODINFUNCTION3(cRet,cName,t1,a1,t2,a2,t3,a3) \
|
|---|
| 942 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
|
|---|
| 943 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3) \
|
|---|
| 944 | { \
|
|---|
| 945 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 946 | cRet rc = ODIN_##cName(a1,a2,a3); \
|
|---|
| 947 | SetFS(sel); \
|
|---|
| 948 | return rc; \
|
|---|
| 949 | } \
|
|---|
| 950 | \
|
|---|
| 951 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
|
|---|
| 952 |
|
|---|
| 953 | #define ODINPROCEDURE3(cName,t1,a1,t2,a2,t3,a3) \
|
|---|
| 954 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
|
|---|
| 955 | void WINAPI cName(t1 a1,t2 a2,t3 a3) \
|
|---|
| 956 | { \
|
|---|
| 957 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 958 | ODIN_##cName(a1,a2,a3); \
|
|---|
| 959 | SetFS(sel); \
|
|---|
| 960 | } \
|
|---|
| 961 | \
|
|---|
| 962 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
|
|---|
| 963 |
|
|---|
| 964 |
|
|---|
| 965 | /* ---------- 4 parameters ---------- */
|
|---|
| 966 | #define ODINFUNCTION4(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4) \
|
|---|
| 967 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
|
|---|
| 968 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
|
|---|
| 969 | { \
|
|---|
| 970 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 971 | cRet rc = ODIN_##cName(a1,a2,a3,a4); \
|
|---|
| 972 | SetFS(sel); \
|
|---|
| 973 | return rc; \
|
|---|
| 974 | } \
|
|---|
| 975 | \
|
|---|
| 976 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
|
|---|
| 977 |
|
|---|
| 978 | #define ODINPROCEDURE4(cName,t1,a1,t2,a2,t3,a3,t4,a4) \
|
|---|
| 979 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
|
|---|
| 980 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
|
|---|
| 981 | { \
|
|---|
| 982 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 983 | ODIN_##cName(a1,a2,a3,a4); \
|
|---|
| 984 | SetFS(sel); \
|
|---|
| 985 | } \
|
|---|
| 986 | \
|
|---|
| 987 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
|
|---|
| 988 |
|
|---|
| 989 |
|
|---|
| 990 | /* ---------- 5 parameters ---------- */
|
|---|
| 991 | #define ODINFUNCTION5(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
|
|---|
| 992 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
|
|---|
| 993 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
|
|---|
| 994 | { \
|
|---|
| 995 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 996 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5); \
|
|---|
| 997 | SetFS(sel); \
|
|---|
| 998 | return rc; \
|
|---|
| 999 | } \
|
|---|
| 1000 | \
|
|---|
| 1001 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
|
|---|
| 1002 |
|
|---|
| 1003 | #define ODINPROCEDURE5(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
|
|---|
| 1004 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
|
|---|
| 1005 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
|
|---|
| 1006 | { \
|
|---|
| 1007 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1008 | ODIN_##cName(a1,a2,a3,a4,a5); \
|
|---|
| 1009 | SetFS(sel); \
|
|---|
| 1010 | } \
|
|---|
| 1011 | \
|
|---|
| 1012 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
|
|---|
| 1013 |
|
|---|
| 1014 |
|
|---|
| 1015 | /* ---------- 6 parameters ---------- */
|
|---|
| 1016 | #define ODINFUNCTION6(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
|
|---|
| 1017 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
|
|---|
| 1018 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
|
|---|
| 1019 | { \
|
|---|
| 1020 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1021 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6); \
|
|---|
| 1022 | SetFS(sel); \
|
|---|
| 1023 | return rc; \
|
|---|
| 1024 | } \
|
|---|
| 1025 | \
|
|---|
| 1026 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
|
|---|
| 1027 |
|
|---|
| 1028 |
|
|---|
| 1029 | // @@@PH 1999/12/28 the following macro is a workaround for WINMM:waveOutOpen
|
|---|
| 1030 | // where the system needs to know about the win32 tib fs selector
|
|---|
| 1031 | #define ODINFUNCTION6FS(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
|
|---|
| 1032 | cRet ODIN_INTERNAL ODIN_##cName (unsigned short selFS, t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
|
|---|
| 1033 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
|
|---|
| 1034 | { \
|
|---|
| 1035 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1036 | cRet rc = ODIN_##cName(sel,a1,a2,a3,a4,a5,a6); \
|
|---|
| 1037 | SetFS(sel); \
|
|---|
| 1038 | return rc; \
|
|---|
| 1039 | } \
|
|---|
| 1040 | \
|
|---|
| 1041 | cRet ODIN_INTERNAL ODIN_##cName (unsigned short selFS, t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
|
|---|
| 1042 |
|
|---|
| 1043 |
|
|---|
| 1044 | #define ODINPROCEDURE6(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
|
|---|
| 1045 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
|
|---|
| 1046 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
|
|---|
| 1047 | { \
|
|---|
| 1048 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1049 | ODIN_##cName(a1,a2,a3,a4,a5,a6); \
|
|---|
| 1050 | SetFS(sel); \
|
|---|
| 1051 | } \
|
|---|
| 1052 | \
|
|---|
| 1053 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
|
|---|
| 1054 |
|
|---|
| 1055 |
|
|---|
| 1056 | /* ---------- 7 parameters ---------- */
|
|---|
| 1057 | #define ODINFUNCTION7(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
|
|---|
| 1058 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
|
|---|
| 1059 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
|
|---|
| 1060 | { \
|
|---|
| 1061 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1062 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
|
|---|
| 1063 | SetFS(sel); \
|
|---|
| 1064 | return rc; \
|
|---|
| 1065 | } \
|
|---|
| 1066 | \
|
|---|
| 1067 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
|
|---|
| 1068 |
|
|---|
| 1069 | #define ODINPROCEDURE7(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
|
|---|
| 1070 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
|
|---|
| 1071 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
|
|---|
| 1072 | { \
|
|---|
| 1073 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1074 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
|
|---|
| 1075 | SetFS(sel); \
|
|---|
| 1076 | } \
|
|---|
| 1077 | \
|
|---|
| 1078 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
|
|---|
| 1079 |
|
|---|
| 1080 |
|
|---|
| 1081 | /* ---------- 8 parameters ---------- */
|
|---|
| 1082 | #define ODINFUNCTION8(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
|
|---|
| 1083 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
|
|---|
| 1084 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
|
|---|
| 1085 | { \
|
|---|
| 1086 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1087 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
|
|---|
| 1088 | SetFS(sel); \
|
|---|
| 1089 | return rc; \
|
|---|
| 1090 | } \
|
|---|
| 1091 | \
|
|---|
| 1092 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
|
|---|
| 1093 |
|
|---|
| 1094 | #define ODINPROCEDURE8(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
|
|---|
| 1095 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
|
|---|
| 1096 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
|
|---|
| 1097 | { \
|
|---|
| 1098 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1099 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
|
|---|
| 1100 | SetFS(sel); \
|
|---|
| 1101 | } \
|
|---|
| 1102 | \
|
|---|
| 1103 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
|
|---|
| 1104 |
|
|---|
| 1105 |
|
|---|
| 1106 | /* ---------- 9 parameters ---------- */
|
|---|
| 1107 | #define ODINFUNCTION9(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
|
|---|
| 1108 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
|
|---|
| 1109 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
|
|---|
| 1110 | { \
|
|---|
| 1111 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1112 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
|
|---|
| 1113 | SetFS(sel); \
|
|---|
| 1114 | return rc; \
|
|---|
| 1115 | } \
|
|---|
| 1116 | \
|
|---|
| 1117 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
|
|---|
| 1118 |
|
|---|
| 1119 | #define ODINPROCEDURE9(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
|
|---|
| 1120 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
|
|---|
| 1121 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
|
|---|
| 1122 | { \
|
|---|
| 1123 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1124 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
|
|---|
| 1125 | SetFS(sel); \
|
|---|
| 1126 | } \
|
|---|
| 1127 | \
|
|---|
| 1128 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
|
|---|
| 1129 |
|
|---|
| 1130 |
|
|---|
| 1131 | /* ---------- 10 parameters ---------- */
|
|---|
| 1132 | #define ODINFUNCTION10(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
|
|---|
| 1133 | 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); \
|
|---|
| 1134 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
|
|---|
| 1135 | { \
|
|---|
| 1136 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1137 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
|
|---|
| 1138 | SetFS(sel); \
|
|---|
| 1139 | return rc; \
|
|---|
| 1140 | } \
|
|---|
| 1141 | \
|
|---|
| 1142 | 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)
|
|---|
| 1143 |
|
|---|
| 1144 | #define ODINPROCEDURE10(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
|
|---|
| 1145 | 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); \
|
|---|
| 1146 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
|
|---|
| 1147 | { \
|
|---|
| 1148 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1149 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
|
|---|
| 1150 | SetFS(sel); \
|
|---|
| 1151 | } \
|
|---|
| 1152 | \
|
|---|
| 1153 | 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)
|
|---|
| 1154 |
|
|---|
| 1155 |
|
|---|
| 1156 | /* ---------- 11 parameters ---------- */
|
|---|
| 1157 | #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) \
|
|---|
| 1158 | 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); \
|
|---|
| 1159 | 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) \
|
|---|
| 1160 | { \
|
|---|
| 1161 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1162 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
|
|---|
| 1163 | SetFS(sel); \
|
|---|
| 1164 | return rc; \
|
|---|
| 1165 | } \
|
|---|
| 1166 | \
|
|---|
| 1167 | 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)
|
|---|
| 1168 |
|
|---|
| 1169 | #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) \
|
|---|
| 1170 | 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); \
|
|---|
| 1171 | 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) \
|
|---|
| 1172 | { \
|
|---|
| 1173 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1174 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
|
|---|
| 1175 | SetFS(sel); \
|
|---|
| 1176 | } \
|
|---|
| 1177 | \
|
|---|
| 1178 | 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)
|
|---|
| 1179 |
|
|---|
| 1180 |
|
|---|
| 1181 | /* ---------- 12 parameters ---------- */
|
|---|
| 1182 | #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) \
|
|---|
| 1183 | 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); \
|
|---|
| 1184 | 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) \
|
|---|
| 1185 | { \
|
|---|
| 1186 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1187 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
|
|---|
| 1188 | SetFS(sel); \
|
|---|
| 1189 | return rc; \
|
|---|
| 1190 | } \
|
|---|
| 1191 | \
|
|---|
| 1192 | 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)
|
|---|
| 1193 |
|
|---|
| 1194 | #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) \
|
|---|
| 1195 | 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); \
|
|---|
| 1196 | 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) \
|
|---|
| 1197 | { \
|
|---|
| 1198 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1199 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
|
|---|
| 1200 | SetFS(sel); \
|
|---|
| 1201 | } \
|
|---|
| 1202 | \
|
|---|
| 1203 | 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)
|
|---|
| 1204 |
|
|---|
| 1205 |
|
|---|
| 1206 |
|
|---|
| 1207 | #endif
|
|---|
| 1208 |
|
|---|
| 1209 | /****************************************************************************
|
|---|
| 1210 | * General Wrapper Macros *
|
|---|
| 1211 | ****************************************************************************/
|
|---|
| 1212 |
|
|---|
| 1213 | /* ---------- 0 parameters ---------- */
|
|---|
| 1214 | #define ODINFUNCTIONNODBG0(cRet,cName) \
|
|---|
| 1215 | cRet ODIN_INTERNAL ODIN_##cName (void);\
|
|---|
| 1216 | cRet WINAPI cName(void) \
|
|---|
| 1217 | { \
|
|---|
| 1218 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1219 | cRet rc = ODIN_##cName(); \
|
|---|
| 1220 | SetFS(sel); \
|
|---|
| 1221 | return rc; \
|
|---|
| 1222 | } \
|
|---|
| 1223 | \
|
|---|
| 1224 | cRet ODIN_INTERNAL ODIN_##cName (void)
|
|---|
| 1225 |
|
|---|
| 1226 |
|
|---|
| 1227 | #define ODINPROCEDURENODBG0(cName) \
|
|---|
| 1228 | void ODIN_INTERNAL ODIN_##cName (void);\
|
|---|
| 1229 | void WINAPI cName(void) \
|
|---|
| 1230 | { \
|
|---|
| 1231 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1232 | ODIN_##cName(); \
|
|---|
| 1233 | SetFS(sel); \
|
|---|
| 1234 | } \
|
|---|
| 1235 | \
|
|---|
| 1236 | void ODIN_INTERNAL ODIN_##cName (void)
|
|---|
| 1237 |
|
|---|
| 1238 |
|
|---|
| 1239 | /* ---------- 1 parameters ---------- */
|
|---|
| 1240 | #define ODINFUNCTIONNODBG1(cRet,cName,t1,a1) \
|
|---|
| 1241 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1);\
|
|---|
| 1242 | cRet WINAPI cName(t1 a1) \
|
|---|
| 1243 | { \
|
|---|
| 1244 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1245 | cRet rc = ODIN_##cName(a1); \
|
|---|
| 1246 | SetFS(sel); \
|
|---|
| 1247 | return rc; \
|
|---|
| 1248 | } \
|
|---|
| 1249 | \
|
|---|
| 1250 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1)
|
|---|
| 1251 |
|
|---|
| 1252 | #define ODINPROCEDURENODBG1(cName,t1,a1) \
|
|---|
| 1253 | void ODIN_INTERNAL ODIN_##cName (t1 a1);\
|
|---|
| 1254 | void WINAPI cName(t1 a1) \
|
|---|
| 1255 | { \
|
|---|
| 1256 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1257 | ODIN_##cName(a1); \
|
|---|
| 1258 | SetFS(sel); \
|
|---|
| 1259 | } \
|
|---|
| 1260 | \
|
|---|
| 1261 | void ODIN_INTERNAL ODIN_##cName (t1 a1)
|
|---|
| 1262 |
|
|---|
| 1263 |
|
|---|
| 1264 | /* ---------- 2 parameters ---------- */
|
|---|
| 1265 | #define ODINFUNCTIONNODBG2(cRet,cName,t1,a1,t2,a2) \
|
|---|
| 1266 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2); \
|
|---|
| 1267 | cRet WINAPI cName(t1 a1,t2 a2) \
|
|---|
| 1268 | { \
|
|---|
| 1269 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1270 | cRet rc = ODIN_##cName(a1,a2); \
|
|---|
| 1271 | SetFS(sel); \
|
|---|
| 1272 | return rc; \
|
|---|
| 1273 | } \
|
|---|
| 1274 | \
|
|---|
| 1275 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
|
|---|
| 1276 |
|
|---|
| 1277 | #define ODINPROCEDURENODBG2(cName,t1,a1,t2,a2) \
|
|---|
| 1278 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2);\
|
|---|
| 1279 | void WINAPI cName(t1 a1,t2 a2) \
|
|---|
| 1280 | { \
|
|---|
| 1281 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1282 | ODIN_##cName(a1,a2); \
|
|---|
| 1283 | SetFS(sel); \
|
|---|
| 1284 | } \
|
|---|
| 1285 | \
|
|---|
| 1286 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
|
|---|
| 1287 |
|
|---|
| 1288 |
|
|---|
| 1289 | /* ---------- 3 parameters ---------- */
|
|---|
| 1290 | #define ODINFUNCTIONNODBG3(cRet,cName,t1,a1,t2,a2,t3,a3) \
|
|---|
| 1291 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
|
|---|
| 1292 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3) \
|
|---|
| 1293 | { \
|
|---|
| 1294 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1295 | cRet rc = ODIN_##cName(a1,a2,a3); \
|
|---|
| 1296 | SetFS(sel); \
|
|---|
| 1297 | return rc; \
|
|---|
| 1298 | } \
|
|---|
| 1299 | \
|
|---|
| 1300 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
|
|---|
| 1301 |
|
|---|
| 1302 | #define ODINPROCEDURENODBG3(cName,t1,a1,t2,a2,t3,a3) \
|
|---|
| 1303 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
|
|---|
| 1304 | void WINAPI cName(t1 a1,t2 a2,t3 a3) \
|
|---|
| 1305 | { \
|
|---|
| 1306 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1307 | ODIN_##cName(a1,a2,a3); \
|
|---|
| 1308 | SetFS(sel); \
|
|---|
| 1309 | } \
|
|---|
| 1310 | \
|
|---|
| 1311 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
|
|---|
| 1312 |
|
|---|
| 1313 |
|
|---|
| 1314 | /* ---------- 4 parameters ---------- */
|
|---|
| 1315 | #define ODINFUNCTIONNODBG4(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4) \
|
|---|
| 1316 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
|
|---|
| 1317 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
|
|---|
| 1318 | { \
|
|---|
| 1319 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1320 | cRet rc = ODIN_##cName(a1,a2,a3,a4); \
|
|---|
| 1321 | SetFS(sel); \
|
|---|
| 1322 | return rc; \
|
|---|
| 1323 | } \
|
|---|
| 1324 | \
|
|---|
| 1325 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
|
|---|
| 1326 |
|
|---|
| 1327 | #define ODINPROCEDURENODBG4(cName,t1,a1,t2,a2,t3,a3,t4,a4) \
|
|---|
| 1328 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
|
|---|
| 1329 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
|
|---|
| 1330 | { \
|
|---|
| 1331 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1332 | ODIN_##cName(a1,a2,a3,a4); \
|
|---|
| 1333 | SetFS(sel); \
|
|---|
| 1334 | } \
|
|---|
| 1335 | \
|
|---|
| 1336 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
|
|---|
| 1337 |
|
|---|
| 1338 |
|
|---|
| 1339 | /* ---------- 5 parameters ---------- */
|
|---|
| 1340 | #define ODINFUNCTIONNODBG5(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
|
|---|
| 1341 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
|
|---|
| 1342 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
|
|---|
| 1343 | { \
|
|---|
| 1344 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1345 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5); \
|
|---|
| 1346 | SetFS(sel); \
|
|---|
| 1347 | return rc; \
|
|---|
| 1348 | } \
|
|---|
| 1349 | \
|
|---|
| 1350 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
|
|---|
| 1351 |
|
|---|
| 1352 | #define ODINPROCEDURENODBG5(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
|
|---|
| 1353 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
|
|---|
| 1354 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
|
|---|
| 1355 | { \
|
|---|
| 1356 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1357 | ODIN_##cName(a1,a2,a3,a4,a5); \
|
|---|
| 1358 | SetFS(sel); \
|
|---|
| 1359 | } \
|
|---|
| 1360 | \
|
|---|
| 1361 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
|
|---|
| 1362 |
|
|---|
| 1363 |
|
|---|
| 1364 | /* ---------- 6 parameters ---------- */
|
|---|
| 1365 | #define ODINFUNCTIONNODBG6(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
|
|---|
| 1366 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
|
|---|
| 1367 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
|
|---|
| 1368 | { \
|
|---|
| 1369 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1370 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6); \
|
|---|
| 1371 | SetFS(sel); \
|
|---|
| 1372 | return rc; \
|
|---|
| 1373 | } \
|
|---|
| 1374 | \
|
|---|
| 1375 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
|
|---|
| 1376 |
|
|---|
| 1377 | #define ODINPROCEDURENODBG6(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
|
|---|
| 1378 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
|
|---|
| 1379 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
|
|---|
| 1380 | { \
|
|---|
| 1381 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1382 | ODIN_##cName(a1,a2,a3,a4,a5,a6); \
|
|---|
| 1383 | SetFS(sel); \
|
|---|
| 1384 | } \
|
|---|
| 1385 | \
|
|---|
| 1386 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
|
|---|
| 1387 |
|
|---|
| 1388 |
|
|---|
| 1389 | /* ---------- 7 parameters ---------- */
|
|---|
| 1390 | #define ODINFUNCTIONNODBG7(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
|
|---|
| 1391 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
|
|---|
| 1392 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
|
|---|
| 1393 | { \
|
|---|
| 1394 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1395 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
|
|---|
| 1396 | SetFS(sel); \
|
|---|
| 1397 | return rc; \
|
|---|
| 1398 | } \
|
|---|
| 1399 | \
|
|---|
| 1400 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
|
|---|
| 1401 |
|
|---|
| 1402 | #define ODINPROCEDURENODBG7(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
|
|---|
| 1403 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
|
|---|
| 1404 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
|
|---|
| 1405 | { \
|
|---|
| 1406 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1407 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
|
|---|
| 1408 | SetFS(sel); \
|
|---|
| 1409 | } \
|
|---|
| 1410 | \
|
|---|
| 1411 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
|
|---|
| 1412 |
|
|---|
| 1413 |
|
|---|
| 1414 | /* ---------- 8 parameters ---------- */
|
|---|
| 1415 | #define ODINFUNCTIONNODBG8(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
|
|---|
| 1416 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
|
|---|
| 1417 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
|
|---|
| 1418 | { \
|
|---|
| 1419 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1420 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
|
|---|
| 1421 | SetFS(sel); \
|
|---|
| 1422 | return rc; \
|
|---|
| 1423 | } \
|
|---|
| 1424 | \
|
|---|
| 1425 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
|
|---|
| 1426 |
|
|---|
| 1427 | #define ODINPROCEDURENODBG8(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
|
|---|
| 1428 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
|
|---|
| 1429 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
|
|---|
| 1430 | { \
|
|---|
| 1431 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1432 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
|
|---|
| 1433 | SetFS(sel); \
|
|---|
| 1434 | } \
|
|---|
| 1435 | \
|
|---|
| 1436 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
|
|---|
| 1437 |
|
|---|
| 1438 |
|
|---|
| 1439 | /* ---------- 9 parameters ---------- */
|
|---|
| 1440 | #define ODINFUNCTIONNODBG9(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
|
|---|
| 1441 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
|
|---|
| 1442 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
|
|---|
| 1443 | { \
|
|---|
| 1444 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1445 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
|
|---|
| 1446 | SetFS(sel); \
|
|---|
| 1447 | return rc; \
|
|---|
| 1448 | } \
|
|---|
| 1449 | \
|
|---|
| 1450 | cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
|
|---|
| 1451 |
|
|---|
| 1452 | #define ODINPROCEDURENODBG9(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
|
|---|
| 1453 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
|
|---|
| 1454 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
|
|---|
| 1455 | { \
|
|---|
| 1456 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1457 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
|
|---|
| 1458 | SetFS(sel); \
|
|---|
| 1459 | } \
|
|---|
| 1460 | \
|
|---|
| 1461 | void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
|
|---|
| 1462 |
|
|---|
| 1463 |
|
|---|
| 1464 | /* ---------- 10 parameters ---------- */
|
|---|
| 1465 | #define ODINFUNCTIONNODBG10(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
|
|---|
| 1466 | 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); \
|
|---|
| 1467 | cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
|
|---|
| 1468 | { \
|
|---|
| 1469 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1470 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
|
|---|
| 1471 | SetFS(sel); \
|
|---|
| 1472 | return rc; \
|
|---|
| 1473 | } \
|
|---|
| 1474 | \
|
|---|
| 1475 | 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)
|
|---|
| 1476 |
|
|---|
| 1477 | #define ODINPROCEDURENODBG10(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
|
|---|
| 1478 | 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); \
|
|---|
| 1479 | void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
|
|---|
| 1480 | { \
|
|---|
| 1481 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1482 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
|
|---|
| 1483 | SetFS(sel); \
|
|---|
| 1484 | } \
|
|---|
| 1485 | \
|
|---|
| 1486 | 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)
|
|---|
| 1487 |
|
|---|
| 1488 |
|
|---|
| 1489 | /* ---------- 11 parameters ---------- */
|
|---|
| 1490 | #define ODINFUNCTIONNODBG11(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10,t11,a11) \
|
|---|
| 1491 | 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); \
|
|---|
| 1492 | 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) \
|
|---|
| 1493 | { \
|
|---|
| 1494 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1495 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
|
|---|
| 1496 | SetFS(sel); \
|
|---|
| 1497 | return rc; \
|
|---|
| 1498 | } \
|
|---|
| 1499 | \
|
|---|
| 1500 | 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)
|
|---|
| 1501 |
|
|---|
| 1502 | #define ODINPROCEDURENODBG11(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10,t11,a11) \
|
|---|
| 1503 | 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); \
|
|---|
| 1504 | 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) \
|
|---|
| 1505 | { \
|
|---|
| 1506 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1507 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
|
|---|
| 1508 | SetFS(sel); \
|
|---|
| 1509 | } \
|
|---|
| 1510 | \
|
|---|
| 1511 | 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)
|
|---|
| 1512 |
|
|---|
| 1513 |
|
|---|
| 1514 | /* ---------- 12 parameters ---------- */
|
|---|
| 1515 | #define ODINFUNCTIONNODBG12(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) \
|
|---|
| 1516 | 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); \
|
|---|
| 1517 | 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) \
|
|---|
| 1518 | { \
|
|---|
| 1519 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1520 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
|
|---|
| 1521 | SetFS(sel); \
|
|---|
| 1522 | return rc; \
|
|---|
| 1523 | } \
|
|---|
| 1524 | \
|
|---|
| 1525 | 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)
|
|---|
| 1526 |
|
|---|
| 1527 | #define ODINPROCEDURENODBG12(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) \
|
|---|
| 1528 | 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); \
|
|---|
| 1529 | 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) \
|
|---|
| 1530 | { \
|
|---|
| 1531 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1532 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
|
|---|
| 1533 | SetFS(sel); \
|
|---|
| 1534 | } \
|
|---|
| 1535 | \
|
|---|
| 1536 | 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)
|
|---|
| 1537 |
|
|---|
| 1538 |
|
|---|
| 1539 | /* ---------- 13 parameters ---------- */
|
|---|
| 1540 | #define ODINFUNCTIONNODBG13(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,t13,a13) \
|
|---|
| 1541 | 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,t13 a13); \
|
|---|
| 1542 | 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,t13 a13) \
|
|---|
| 1543 | { \
|
|---|
| 1544 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1545 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13); \
|
|---|
| 1546 | SetFS(sel); \
|
|---|
| 1547 | return rc; \
|
|---|
| 1548 | } \
|
|---|
| 1549 | \
|
|---|
| 1550 | 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,t13 a13)
|
|---|
| 1551 |
|
|---|
| 1552 | #define ODINPROCEDURENODBG13(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,t13,a13) \
|
|---|
| 1553 | 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,t13 a13); \
|
|---|
| 1554 | 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,t13 a13) \
|
|---|
| 1555 | { \
|
|---|
| 1556 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1557 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13); \
|
|---|
| 1558 | SetFS(sel); \
|
|---|
| 1559 | } \
|
|---|
| 1560 | \
|
|---|
| 1561 | 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,t13 a13)
|
|---|
| 1562 |
|
|---|
| 1563 |
|
|---|
| 1564 | /* ---------- 14 parameters ---------- */
|
|---|
| 1565 | #define ODINFUNCTIONNODBG14(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,t13,a13,t14,a14) \
|
|---|
| 1566 | 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,t13 a13,t14 a14); \
|
|---|
| 1567 | 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,t13 a13,t14 a14) \
|
|---|
| 1568 | { \
|
|---|
| 1569 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1570 | cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14); \
|
|---|
| 1571 | SetFS(sel); \
|
|---|
| 1572 | return rc; \
|
|---|
| 1573 | } \
|
|---|
| 1574 | \
|
|---|
| 1575 | 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,t13 a13,t14 a14)
|
|---|
| 1576 |
|
|---|
| 1577 | #define ODINPROCEDURENODBG14(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,t13,a13,t14,a14) \
|
|---|
| 1578 | 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,t13 a13,t14 a14); \
|
|---|
| 1579 | 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,t13 a13,t14 a14) \
|
|---|
| 1580 | { \
|
|---|
| 1581 | unsigned short sel = RestoreOS2FS(); \
|
|---|
| 1582 | ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14); \
|
|---|
| 1583 | SetFS(sel); \
|
|---|
| 1584 | } \
|
|---|
| 1585 | \
|
|---|
| 1586 | 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,t13 a13,t14 a14)
|
|---|
| 1587 |
|
|---|
| 1588 |
|
|---|
| 1589 | #endif /* _ODINWRAP_H_ */
|
|---|