Changeset 475 for trunk/include/odinwrap.h
- Timestamp:
- Aug 11, 1999, 4:03:34 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/odinwrap.h
r473 r475 1 /* $Id: odinwrap.h,v 1. 1 1999-08-11 12:46:00phaller Exp $ */1 /* $Id: odinwrap.h,v 1.2 1999-08-11 14:03:34 phaller Exp $ */ 2 2 3 3 /* … … 14 14 #define _ODINWARP_H_ 15 15 16 /* remarks: 17 18 - provide complete set of generic debug macros (level 6++) 19 */ 16 20 17 21 /**************************************************************************** … … 21 25 #define ODIN_INTERNAL _Optlink 22 26 27 28 #ifdef DEBUG 29 # define ODINDEBUGCHANNEL(a) static char* pszOdinDebugChannel=#a; 30 #else 31 # define ODINDEBUGCHANNEL(a) 32 #endif 33 34 35 #ifdef DEBUG 36 37 /**************************************************************************** 38 * General Wrapper Macros (debug instrumented) * 39 ****************************************************************************/ 40 41 /* ---------- 0 parameters ---------- */ 42 #define ODINFUNCTION0(cRet,cName) \ 43 cRet ODIN_INTERNAL cName (void); \ 44 cRet WINAPI ODIN_##cName(void) \ 45 { \ 46 unsigned short sel = RestoreOS2FS(); \ 47 dprintf(("%s: "#cRet" "#cName"() enter\n", \ 48 pszOdinDebugChannel)); \ 49 cRet rc = cName(); \ 50 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 51 pszOdinDebugChannel, \ 52 rc)); \ 53 SetFS(sel); \ 54 return rc; \ 55 } \ 56 \ 57 cRet ODIN_INTERNAL cName (void) 58 59 60 #define ODINPROCEDURE0(cName) \ 61 void ODIN_INTERNAL cName (void); \ 62 void WINAPI ODIN_##cName(void) \ 63 { \ 64 unsigned short sel = RestoreOS2FS(); \ 65 dprintf(("%s: void "#cName"() enter\n", \ 66 pszOdinDebugChannel)); \ 67 cName(); \ 68 dprintf(("%s: void "#cName"() leave\n", \ 69 pszOdinDebugChannel)); \ 70 SetFS(sel); \ 71 } \ 72 \ 73 void ODIN_INTERNAL cName (void) 74 75 76 /* ---------- 1 parameters ---------- */ 77 #define ODINFUNCTION1(cRet,cName,t1,a1) \ 78 cRet ODIN_INTERNAL cName (t1 a1); \ 79 cRet WINAPI ODIN_##cName(t1 a1) \ 80 { \ 81 unsigned short sel = RestoreOS2FS(); \ 82 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh) enter\n", \ 83 pszOdinDebugChannel, \ 84 a1)); \ 85 cRet rc = cName(a1); \ 86 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 87 pszOdinDebugChannel, \ 88 rc)); \ 89 SetFS(sel); \ 90 return rc; \ 91 } \ 92 \ 93 cRet ODIN_INTERNAL cName (t1 a1) 94 95 #define ODINPROCEDURE1(cName,t1,a1) \ 96 void ODIN_INTERNAL cName (t1 a1); \ 97 void WINAPI ODIN_##cName(t1 a1) \ 98 { \ 99 unsigned short sel = RestoreOS2FS(); \ 100 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh) enter\n", \ 101 pszOdinDebugChannel, \ 102 a1)); \ 103 cName(a1); \ 104 dprintf(("%s: void "#cName"() leave\n", \ 105 pszOdinDebugChannel)); \ 106 SetFS(sel); \ 107 } \ 108 \ 109 void ODIN_INTERNAL cName (t1 a1) 110 111 112 /* ---------- 2 parameters ---------- */ 113 #define ODINFUNCTION2(cRet,cName,t1,a1,t2,a2) \ 114 cRet ODIN_INTERNAL cName (t1 a1,t2 a2); \ 115 cRet WINAPI ODIN_##cName(t1 a1,t2 a2) \ 116 { \ 117 unsigned short sel = RestoreOS2FS(); \ 118 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh) enter\n", \ 119 pszOdinDebugChannel, \ 120 a1,a2)); \ 121 cRet rc = cName(a1,a2); \ 122 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 123 pszOdinDebugChannel, \ 124 rc)); \ 125 SetFS(sel); \ 126 return rc; \ 127 } \ 128 \ 129 cRet ODIN_INTERNAL cName (t1 a1,t2 a2) 130 131 #define ODINPROCEDURE2(cName,t1,a1,t2,a2) \ 132 void ODIN_INTERNAL cName (t1 a1,t2 a2); \ 133 void WINAPI ODIN_##cName(t1 a1,t2 a2) \ 134 { \ 135 unsigned short sel = RestoreOS2FS(); \ 136 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh) enter\n", \ 137 pszOdinDebugChannel, \ 138 a1,a2)); \ 139 cName(a1,a2); \ 140 dprintf(("%s: void "#cName"() leave\n", \ 141 pszOdinDebugChannel)); \ 142 SetFS(sel); \ 143 } \ 144 \ 145 void ODIN_INTERNAL cName (t1 a1,t2 a2) 146 147 148 /* ---------- 3 parameters ---------- */ 149 #define ODINFUNCTION3(cRet,cName,t1,a1,t2,a2,t3,a3) \ 150 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3); \ 151 cRet WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3) \ 152 { \ 153 unsigned short sel = RestoreOS2FS(); \ 154 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \ 155 pszOdinDebugChannel, \ 156 a1,a2,a3)); \ 157 cRet rc = cName(a1,a2,a3); \ 158 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 159 pszOdinDebugChannel, \ 160 rc)); \ 161 SetFS(sel); \ 162 return rc; \ 163 } \ 164 \ 165 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3) 166 167 #define ODINPROCEDURE3(cName,t1,a1,t2,a2,t3,a3) \ 168 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3); \ 169 void WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3) \ 170 { \ 171 unsigned short sel = RestoreOS2FS(); \ 172 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \ 173 pszOdinDebugChannel, \ 174 a1,a2,a3)); \ 175 cName(a1,a2,a3); \ 176 dprintf(("%s: void "#cName"() leave\n", \ 177 pszOdinDebugChannel)); \ 178 SetFS(sel); \ 179 } \ 180 \ 181 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3) 182 183 184 /* ---------- 4 parameters ---------- */ 185 #define ODINFUNCTION4(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4) \ 186 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4); \ 187 cRet WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4) \ 188 { \ 189 unsigned short sel = RestoreOS2FS(); \ 190 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh, "#t4" "#a4"=%08xh) enter\n", \ 191 pszOdinDebugChannel, \ 192 a1,a2,a3,a4)); \ 193 cRet rc = cName(a1,a2,a3,a4); \ 194 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 195 pszOdinDebugChannel, \ 196 rc)); \ 197 SetFS(sel); \ 198 return rc; \ 199 } \ 200 \ 201 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4) 202 203 #define ODINPROCEDURE4(cName,t1,a1,t2,a2,t3,a3,t4,a4) \ 204 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4); \ 205 void WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4) \ 206 { \ 207 unsigned short sel = RestoreOS2FS(); \ 208 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh, "#t4" "#a4"=%08xh) enter\n", \ 209 pszOdinDebugChannel, \ 210 a1,a2,a3,a4)); \ 211 cName(a1,a2,a3,a4); \ 212 dprintf(("%s: void "#cName"() leave\n", \ 213 pszOdinDebugChannel)); \ 214 SetFS(sel); \ 215 } \ 216 \ 217 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4) 218 219 220 /* ---------- 5 parameters ---------- */ 221 #define ODINFUNCTION5(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \ 222 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \ 223 cRet WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \ 224 { \ 225 unsigned short sel = RestoreOS2FS(); \ 226 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh" \ 227 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh) enter\n", \ 228 pszOdinDebugChannel, \ 229 a1,a2,a3,a4,a5)); \ 230 cRet rc = cName(a1,a2,a3,a4,a5); \ 231 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 232 pszOdinDebugChannel, \ 233 rc)); \ 234 SetFS(sel); \ 235 return rc; \ 236 } \ 237 \ 238 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) 239 240 #define ODINPROCEDURE5(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \ 241 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \ 242 void WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \ 243 { \ 244 unsigned short sel = RestoreOS2FS(); \ 245 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \ 246 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh) enter\n", \ 247 pszOdinDebugChannel, \ 248 a1,a2,a3,a4,a5)); \ 249 cName(a1,a2,a3,a4,a5); \ 250 dprintf(("%s: void "#cName"() leave\n", \ 251 pszOdinDebugChannel)); \ 252 SetFS(sel); \ 253 } \ 254 \ 255 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) 256 257 258 /* ---------- 6 parameters ---------- */ 259 #define ODINFUNCTION6(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \ 260 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \ 261 cRet WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \ 262 { \ 263 unsigned short sel = RestoreOS2FS(); \ 264 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \ 265 pszOdinDebugChannel, \ 266 a1,a2,a3)); \ 267 cRet rc = cName(a1,a2,a3,a4,a5,a6); \ 268 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 269 pszOdinDebugChannel, \ 270 rc)); \ 271 SetFS(sel); \ 272 return rc; \ 273 } \ 274 \ 275 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) 276 277 #define ODINPROCEDURE6(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \ 278 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \ 279 void WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \ 280 { \ 281 unsigned short sel = RestoreOS2FS(); \ 282 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \ 283 pszOdinDebugChannel, \ 284 a1,a2,a3)); \ 285 cName(a1,a2,a3,a4,a5,a6); \ 286 dprintf(("%s: void "#cName"() leave\n", \ 287 pszOdinDebugChannel)); \ 288 SetFS(sel); \ 289 } \ 290 \ 291 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) 292 293 294 /* ---------- 7 parameters ---------- */ 295 #define ODINFUNCTION7(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \ 296 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \ 297 cRet WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \ 298 { \ 299 unsigned short sel = RestoreOS2FS(); \ 300 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \ 301 pszOdinDebugChannel, \ 302 a1,a2,a3)); \ 303 cRet rc = cName(a1,a2,a3,a4,a5,a6,a7); \ 304 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 305 pszOdinDebugChannel, \ 306 rc)); \ 307 SetFS(sel); \ 308 return rc; \ 309 } \ 310 \ 311 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) 312 313 #define ODINPROCEDURE7(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \ 314 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \ 315 void WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \ 316 { \ 317 unsigned short sel = RestoreOS2FS(); \ 318 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \ 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 \ 327 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) 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) \ 332 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \ 333 cRet WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \ 334 { \ 335 unsigned short sel = RestoreOS2FS(); \ 336 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \ 337 pszOdinDebugChannel, \ 338 a1,a2,a3)); \ 339 cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8); \ 340 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 341 pszOdinDebugChannel, \ 342 rc)); \ 343 SetFS(sel); \ 344 return rc; \ 345 } \ 346 \ 347 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4,a4,t5 a5,t6 a6,t7 a7,t8 a8) 348 349 #define ODINPROCEDURE8(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \ 350 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \ 351 void WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \ 352 { \ 353 unsigned short sel = RestoreOS2FS(); \ 354 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \ 355 pszOdinDebugChannel, \ 356 a1,a2,a3)); \ 357 cName(a1,a2,a3,a4,a5,a6,a7,a8); \ 358 dprintf(("%s: void "#cName"() leave\n", \ 359 pszOdinDebugChannel)); \ 360 SetFS(sel); \ 361 } \ 362 \ 363 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) 364 365 366 /* ---------- 9 parameters ---------- */ 367 #define ODINFUNCTION9(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \ 368 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \ 369 cRet WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \ 370 { \ 371 unsigned short sel = RestoreOS2FS(); \ 372 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \ 373 pszOdinDebugChannel, \ 374 a1,a2,a3)); \ 375 cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \ 376 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 377 pszOdinDebugChannel, \ 378 rc)); \ 379 SetFS(sel); \ 380 return rc; \ 381 } \ 382 \ 383 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4,a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) 384 385 #define ODINPROCEDURE9(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \ 386 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \ 387 void WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \ 388 { \ 389 unsigned short sel = RestoreOS2FS(); \ 390 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \ 391 pszOdinDebugChannel, \ 392 a1,a2,a3)); \ 393 cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \ 394 dprintf(("%s: void "#cName"() leave\n", \ 395 pszOdinDebugChannel)); \ 396 SetFS(sel); \ 397 } \ 398 \ 399 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) 400 401 402 /* ---------- 10 parameters ---------- */ 403 #define ODINFUNCTION10(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \ 404 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10); \ 405 cRet WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \ 406 { \ 407 unsigned short sel = RestoreOS2FS(); \ 408 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \ 409 pszOdinDebugChannel, \ 410 a1,a2,a3)); \ 411 cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \ 412 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 413 pszOdinDebugChannel, \ 414 rc)); \ 415 SetFS(sel); \ 416 return rc; \ 417 } \ 418 \ 419 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4,a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) 420 421 #define ODINPROCEDURE10(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \ 422 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10); \ 423 void WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \ 424 { \ 425 unsigned short sel = RestoreOS2FS(); \ 426 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \ 427 pszOdinDebugChannel, \ 428 a1,a2,a3)); \ 429 cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \ 430 dprintf(("%s: void "#cName"() leave\n", \ 431 pszOdinDebugChannel)); \ 432 SetFS(sel); \ 433 } \ 434 \ 435 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) 436 437 438 /* ---------- 11 parameters ---------- */ 439 #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) \ 440 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11); \ 441 cRet WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11) \ 442 { \ 443 unsigned short sel = RestoreOS2FS(); \ 444 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \ 445 pszOdinDebugChannel, \ 446 a1,a2,a3)); \ 447 cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \ 448 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 449 pszOdinDebugChannel, \ 450 rc)); \ 451 SetFS(sel); \ 452 return rc; \ 453 } \ 454 \ 455 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4,a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11) 456 457 #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) \ 458 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11); \ 459 void WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11) \ 460 { \ 461 unsigned short sel = RestoreOS2FS(); \ 462 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \ 463 pszOdinDebugChannel, \ 464 a1,a2,a3)); \ 465 cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \ 466 dprintf(("%s: void "#cName"() leave\n", \ 467 pszOdinDebugChannel)); \ 468 SetFS(sel); \ 469 } \ 470 \ 471 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11) 472 473 474 /* ---------- 12 parameters ---------- */ 475 #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) \ 476 cRet ODIN_INTERNAL 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); \ 477 cRet WINAPI 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) \ 478 { \ 479 unsigned short sel = RestoreOS2FS(); \ 480 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \ 481 pszOdinDebugChannel, \ 482 a1,a2,a3)); \ 483 cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \ 484 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 485 pszOdinDebugChannel, \ 486 rc)); \ 487 SetFS(sel); \ 488 return rc; \ 489 } \ 490 \ 491 cRet ODIN_INTERNAL 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) 492 493 #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) \ 494 void ODIN_INTERNAL 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); \ 495 void WINAPI 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) \ 496 { \ 497 unsigned short sel = RestoreOS2FS(); \ 498 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \ 499 pszOdinDebugChannel, \ 500 a1,a2,a3)); \ 501 cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \ 502 dprintf(("%s: void "#cName"() leave\n", \ 503 pszOdinDebugChannel)); \ 504 SetFS(sel); \ 505 } \ 506 \ 507 void ODIN_INTERNAL 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) 508 509 510 #else 23 511 24 512 /**************************************************************************** … … 252 740 253 741 742 /* ---------- 9 parameters ---------- */ 743 #define ODINFUNCTION9(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \ 744 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \ 745 cRet WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \ 746 { \ 747 unsigned short sel = RestoreOS2FS(); \ 748 cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \ 749 SetFS(sel); \ 750 return rc; \ 751 } \ 752 \ 753 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4,a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) 754 755 #define ODINPROCEDURE9(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \ 756 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \ 757 void WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \ 758 { \ 759 unsigned short sel = RestoreOS2FS(); \ 760 cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \ 761 SetFS(sel); \ 762 } \ 763 \ 764 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) 765 766 767 /* ---------- 10 parameters ---------- */ 768 #define ODINFUNCTION10(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \ 769 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10); \ 770 cRet WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \ 771 { \ 772 unsigned short sel = RestoreOS2FS(); \ 773 cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \ 774 SetFS(sel); \ 775 return rc; \ 776 } \ 777 \ 778 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4,a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) 779 780 #define ODINPROCEDURE10(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \ 781 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10); \ 782 void WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \ 783 { \ 784 unsigned short sel = RestoreOS2FS(); \ 785 cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \ 786 SetFS(sel); \ 787 } \ 788 \ 789 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) 790 791 792 /* ---------- 11 parameters ---------- */ 793 #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) \ 794 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11); \ 795 cRet WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11) \ 796 { \ 797 unsigned short sel = RestoreOS2FS(); \ 798 cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \ 799 SetFS(sel); \ 800 return rc; \ 801 } \ 802 \ 803 cRet ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4,a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11) 804 805 #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) \ 806 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11); \ 807 void WINAPI ODIN_##cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11) \ 808 { \ 809 unsigned short sel = RestoreOS2FS(); \ 810 cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \ 811 SetFS(sel); \ 812 } \ 813 \ 814 void ODIN_INTERNAL cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11) 815 816 817 /* ---------- 12 parameters ---------- */ 818 #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) \ 819 cRet ODIN_INTERNAL 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); \ 820 cRet WINAPI 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) \ 821 { \ 822 unsigned short sel = RestoreOS2FS(); \ 823 cRet rc = cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \ 824 SetFS(sel); \ 825 return rc; \ 826 } \ 827 \ 828 cRet ODIN_INTERNAL 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) 829 830 #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) \ 831 void ODIN_INTERNAL 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); \ 832 void WINAPI 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) \ 833 { \ 834 unsigned short sel = RestoreOS2FS(); \ 835 cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \ 836 SetFS(sel); \ 837 } \ 838 \ 839 void ODIN_INTERNAL 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) 840 841 842 843 #endif 254 844 255 845 #endif /* _ODINWRAP_H_ */
Note:
See TracChangeset
for help on using the changeset viewer.