Changeset 1669 for trunk/include
- Timestamp:
- Nov 9, 1999, 8:21:36 PM (26 years ago)
- Location:
- trunk/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/misc.h
r1616 r1669 1 /* $Id: misc.h,v 1. 9 1999-11-05 13:03:41 achimhaExp $ */1 /* $Id: misc.h,v 1.10 1999-11-09 19:21:36 sandervl Exp $ */ 2 2 3 3 /* … … 35 35 #define dassert(a, b) if(!(a)) WriteLogError b 36 36 #define dbgCheckObj(a) a->checkObject() 37 38 #ifdef DEBUG_ENABLELOG_LEVEL2 39 #define dprintf2(a) WriteLog a 40 #else 41 #define dprintf2(a) 42 #endif 43 37 44 #else 38 45 #define dprintf(a) -
trunk/include/odinwrap.h
r1642 r1669 1 /* $Id: odinwrap.h,v 1.1 4 1999-11-08 20:54:09sandervl Exp $ */1 /* $Id: odinwrap.h,v 1.15 1999-11-09 19:21:35 sandervl Exp $ */ 2 2 3 3 /* … … 38 38 #include <malloc.h> 39 39 40 #if 1 41 #define CheckFS(a) 42 #else 43 //SvL: Eases locating apis that corrupt FS 44 #define error_FSSelector "FS Selector for thread %d corrupted!!!" 45 46 extern int IsExeStarted(); //kernel32 47 48 #define CheckFS(sel) if(sel == 0x150b && IsExeStarted()) { \ 49 dprintf(((char *)error_FSSelector, GetCurrentThreadId())); \ 50 } 51 #endif 52 40 53 //SvL: Only check the heap very frequently when there are problems 41 54 //#define DEBUG_ODINHEAP … … 59 72 dprintf(("%s: "#cRet" "#cName"() enter\n", \ 60 73 pszOdinDebugChannel)); \ 61 ODIN_HEAPCHECK(); \ 74 CheckFS(sel) \ 75 _heap_check(); \ 62 76 cRet rc = ODIN_##cName(); \ 63 ODIN_HEAPCHECK(); \77 _heap_check(); \ 64 78 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 65 79 pszOdinDebugChannel, \ … … 79 93 dprintf(("%s: void "#cName"() enter\n", \ 80 94 pszOdinDebugChannel)); \ 81 ODIN_HEAPCHECK(); \ 95 CheckFS(sel) \ 96 _heap_check(); \ 82 97 ODIN_##cName(); \ 83 ODIN_HEAPCHECK(); \98 _heap_check(); \ 84 99 dprintf(("%s: void "#cName"() leave\n", \ 85 100 pszOdinDebugChannel)); \ … … 99 114 pszOdinDebugChannel, \ 100 115 a1)); \ 101 ODIN_HEAPCHECK(); \ 116 CheckFS(sel) \ 117 _heap_check(); \ 102 118 cRet rc = ODIN_##cName(a1); \ 103 ODIN_HEAPCHECK(); \119 _heap_check(); \ 104 120 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 105 121 pszOdinDebugChannel, \ … … 119 135 pszOdinDebugChannel, \ 120 136 a1)); \ 121 ODIN_HEAPCHECK(); \ 137 CheckFS(sel) \ 138 _heap_check(); \ 122 139 ODIN_##cName(a1); \ 123 ODIN_HEAPCHECK(); \140 _heap_check(); \ 124 141 dprintf(("%s: void "#cName"() leave\n", \ 125 142 pszOdinDebugChannel)); \ … … 139 156 pszOdinDebugChannel, \ 140 157 a1,a2)); \ 141 ODIN_HEAPCHECK(); \ 158 CheckFS(sel) \ 159 _heap_check(); \ 142 160 cRet rc = ODIN_##cName(a1,a2); \ 143 ODIN_HEAPCHECK(); \161 _heap_check(); \ 144 162 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 145 163 pszOdinDebugChannel, \ … … 159 177 pszOdinDebugChannel, \ 160 178 a1,a2)); \ 161 ODIN_HEAPCHECK(); \ 179 CheckFS(sel) \ 180 _heap_check(); \ 162 181 ODIN_##cName(a1,a2); \ 163 ODIN_HEAPCHECK(); \182 _heap_check(); \ 164 183 dprintf(("%s: void "#cName"() leave\n", \ 165 184 pszOdinDebugChannel)); \ … … 179 198 pszOdinDebugChannel, \ 180 199 a1,a2,a3)); \ 181 ODIN_HEAPCHECK(); \ 200 CheckFS(sel) \ 201 _heap_check(); \ 182 202 cRet rc = ODIN_##cName(a1,a2,a3); \ 183 ODIN_HEAPCHECK(); \203 _heap_check(); \ 184 204 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 185 205 pszOdinDebugChannel, \ … … 199 219 pszOdinDebugChannel, \ 200 220 a1,a2,a3)); \ 201 ODIN_HEAPCHECK(); \ 221 CheckFS(sel) \ 222 _heap_check(); \ 202 223 ODIN_##cName(a1,a2,a3); \ 203 ODIN_HEAPCHECK(); \224 _heap_check(); \ 204 225 dprintf(("%s: void "#cName"() leave\n", \ 205 226 pszOdinDebugChannel)); \ … … 219 240 pszOdinDebugChannel, \ 220 241 a1,a2,a3,a4)); \ 221 ODIN_HEAPCHECK(); \ 242 CheckFS(sel) \ 243 _heap_check(); \ 222 244 cRet rc = ODIN_##cName(a1,a2,a3,a4); \ 223 ODIN_HEAPCHECK(); \245 _heap_check(); \ 224 246 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 225 247 pszOdinDebugChannel, \ … … 239 261 pszOdinDebugChannel, \ 240 262 a1,a2,a3,a4)); \ 241 ODIN_HEAPCHECK(); \ 263 CheckFS(sel) \ 264 _heap_check(); \ 242 265 ODIN_##cName(a1,a2,a3,a4); \ 243 ODIN_HEAPCHECK(); \266 _heap_check(); \ 244 267 dprintf(("%s: void "#cName"() leave\n", \ 245 268 pszOdinDebugChannel)); \ … … 260 283 pszOdinDebugChannel, \ 261 284 a1,a2,a3,a4,a5)); \ 262 ODIN_HEAPCHECK(); \ 285 CheckFS(sel) \ 286 _heap_check(); \ 263 287 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5); \ 264 ODIN_HEAPCHECK(); \288 _heap_check(); \ 265 289 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 266 290 pszOdinDebugChannel, \ … … 281 305 pszOdinDebugChannel, \ 282 306 a1,a2,a3,a4,a5)); \ 283 ODIN_HEAPCHECK(); \ 307 CheckFS(sel) \ 308 _heap_check(); \ 284 309 ODIN_##cName(a1,a2,a3,a4,a5); \ 285 ODIN_HEAPCHECK(); \310 _heap_check(); \ 286 311 dprintf(("%s: void "#cName"() leave\n", \ 287 312 pszOdinDebugChannel)); \ … … 302 327 pszOdinDebugChannel, \ 303 328 a1,a2,a3,a4,a5,a6)); \ 304 ODIN_HEAPCHECK(); \ 329 CheckFS(sel) \ 330 _heap_check(); \ 305 331 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6); \ 306 ODIN_HEAPCHECK(); \332 _heap_check(); \ 307 333 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 308 334 pszOdinDebugChannel, \ … … 323 349 pszOdinDebugChannel, \ 324 350 a1,a2,a3,a4,a5,a6)); \ 325 ODIN_HEAPCHECK(); \ 351 CheckFS(sel) \ 352 _heap_check(); \ 326 353 ODIN_##cName(a1,a2,a3,a4,a5,a6); \ 327 ODIN_HEAPCHECK(); \354 _heap_check(); \ 328 355 dprintf(("%s: void "#cName"() leave\n", \ 329 356 pszOdinDebugChannel)); \ … … 344 371 pszOdinDebugChannel, \ 345 372 a1,a2,a3,a4,a5,a6,a7)); \ 346 ODIN_HEAPCHECK(); \ 373 CheckFS(sel) \ 374 _heap_check(); \ 347 375 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \ 348 ODIN_HEAPCHECK(); \376 _heap_check(); \ 349 377 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 350 378 pszOdinDebugChannel, \ … … 365 393 pszOdinDebugChannel, \ 366 394 a1,a2,a3,a4,a5,a6,a7)); \ 367 ODIN_HEAPCHECK(); \ 395 CheckFS(sel) \ 396 _heap_check(); \ 368 397 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \ 369 ODIN_HEAPCHECK(); \398 _heap_check(); \ 370 399 dprintf(("%s: void "#cName"() leave\n", \ 371 400 pszOdinDebugChannel)); \ … … 387 416 pszOdinDebugChannel, \ 388 417 a1,a2,a3,a4,a5,a6,a7,a8)); \ 389 ODIN_HEAPCHECK(); \ 418 CheckFS(sel) \ 419 _heap_check(); \ 390 420 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \ 391 ODIN_HEAPCHECK(); \421 _heap_check(); \ 392 422 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 393 423 pszOdinDebugChannel, \ … … 409 439 pszOdinDebugChannel, \ 410 440 a1,a2,a3,a4,a5,a6,a7,a8)); \ 411 ODIN_HEAPCHECK(); \ 441 _heap_check(); \ 442 CheckFS(sel) \ 412 443 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \ 413 ODIN_HEAPCHECK(); \444 _heap_check(); \ 414 445 dprintf(("%s: void "#cName"() leave\n", \ 415 446 pszOdinDebugChannel)); \ … … 431 462 pszOdinDebugChannel, \ 432 463 a1,a2,a3,a4,a5,a6,a7,a8,a9)); \ 433 ODIN_HEAPCHECK(); \ 464 CheckFS(sel) \ 465 _heap_check(); \ 434 466 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \ 435 ODIN_HEAPCHECK(); \467 _heap_check(); \ 436 468 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 437 469 pszOdinDebugChannel, \ … … 453 485 pszOdinDebugChannel, \ 454 486 a1,a2,a3,a4,a5,a6,a7,a8,a9)); \ 455 ODIN_HEAPCHECK(); \ 487 CheckFS(sel) \ 488 _heap_check(); \ 456 489 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \ 457 ODIN_HEAPCHECK(); \490 _heap_check(); \ 458 491 dprintf(("%s: void "#cName"() leave\n", \ 459 492 pszOdinDebugChannel)); \ … … 475 508 pszOdinDebugChannel, \ 476 509 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10));\ 477 ODIN_HEAPCHECK(); \ 510 CheckFS(sel) \ 511 _heap_check(); \ 478 512 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \ 479 ODIN_HEAPCHECK(); \513 _heap_check(); \ 480 514 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 481 515 pszOdinDebugChannel, \ … … 497 531 pszOdinDebugChannel, \ 498 532 a1,a2,a3)); \ 499 ODIN_HEAPCHECK(); \ 533 CheckFS(sel) \ 534 _heap_check(); \ 500 535 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \ 501 ODIN_HEAPCHECK(); \536 _heap_check(); \ 502 537 dprintf(("%s: void "#cName"() leave\n", \ 503 538 pszOdinDebugChannel)); \ … … 519 554 pszOdinDebugChannel, \ 520 555 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)); \ 521 ODIN_HEAPCHECK(); \ 556 CheckFS(sel) \ 557 _heap_check(); \ 522 558 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \ 523 ODIN_HEAPCHECK(); \559 _heap_check(); \ 524 560 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 525 561 pszOdinDebugChannel, \ … … 541 577 pszOdinDebugChannel, \ 542 578 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)); \ 543 ODIN_HEAPCHECK(); \ 579 CheckFS(sel) \ 580 _heap_check(); \ 544 581 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \ 545 ODIN_HEAPCHECK(); \582 _heap_check(); \ 546 583 dprintf(("%s: void "#cName"() leave\n", \ 547 584 pszOdinDebugChannel)); \ … … 564 601 pszOdinDebugChannel, \ 565 602 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)); \ 566 ODIN_HEAPCHECK(); \ 603 CheckFS(sel) \ 604 _heap_check(); \ 567 605 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \ 568 ODIN_HEAPCHECK(); \606 _heap_check(); \ 569 607 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \ 570 608 pszOdinDebugChannel, \ … … 587 625 pszOdinDebugChannel, \ 588 626 a1,a2,a3,a4,a5,a6,a7,a8,a9,10,a11,a12)); \ 589 ODIN_HEAPCHECK(); \ 627 CheckFS(sel) \ 628 _heap_check(); \ 590 629 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \ 591 ODIN_HEAPCHECK(); \630 _heap_check(); \ 592 631 dprintf(("%s: void "#cName"() leave\n", \ 593 632 pszOdinDebugChannel)); \ … … 933 972 #endif 934 973 974 /**************************************************************************** 975 * General Wrapper Macros * 976 ****************************************************************************/ 977 978 /* ---------- 0 parameters ---------- */ 979 #define ODINFUNCTIONNODBG0(cRet,cName) \ 980 cRet ODIN_INTERNAL ODIN_##cName (void);\ 981 cRet WINAPI cName(void) \ 982 { \ 983 unsigned short sel = RestoreOS2FS(); \ 984 cRet rc = ODIN_##cName(); \ 985 SetFS(sel); \ 986 return rc; \ 987 } \ 988 \ 989 cRet ODIN_INTERNAL ODIN_##cName (void) 990 991 992 #define ODINPROCEDURENODBG0(cName) \ 993 void ODIN_INTERNAL ODIN_##cName (void);\ 994 void WINAPI cName(void) \ 995 { \ 996 unsigned short sel = RestoreOS2FS(); \ 997 ODIN_##cName(); \ 998 SetFS(sel); \ 999 } \ 1000 \ 1001 void ODIN_INTERNAL ODIN_##cName (void) 1002 1003 1004 /* ---------- 1 parameters ---------- */ 1005 #define ODINFUNCTIONNODBG1(cRet,cName,t1,a1) \ 1006 cRet ODIN_INTERNAL ODIN_##cName (t1 a1);\ 1007 cRet WINAPI cName(t1 a1) \ 1008 { \ 1009 unsigned short sel = RestoreOS2FS(); \ 1010 cRet rc = ODIN_##cName(a1); \ 1011 SetFS(sel); \ 1012 return rc; \ 1013 } \ 1014 \ 1015 cRet ODIN_INTERNAL ODIN_##cName (t1 a1) 1016 1017 #define ODINPROCEDURENODBG1(cName,t1,a1) \ 1018 void ODIN_INTERNAL ODIN_##cName (t1 a1);\ 1019 void WINAPI cName(t1 a1) \ 1020 { \ 1021 unsigned short sel = RestoreOS2FS(); \ 1022 ODIN_##cName(a1); \ 1023 SetFS(sel); \ 1024 } \ 1025 \ 1026 void ODIN_INTERNAL ODIN_##cName (t1 a1) 1027 1028 1029 /* ---------- 2 parameters ---------- */ 1030 #define ODINFUNCTIONNODBG2(cRet,cName,t1,a1,t2,a2) \ 1031 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2); \ 1032 cRet WINAPI cName(t1 a1,t2 a2) \ 1033 { \ 1034 unsigned short sel = RestoreOS2FS(); \ 1035 cRet rc = ODIN_##cName(a1,a2); \ 1036 SetFS(sel); \ 1037 return rc; \ 1038 } \ 1039 \ 1040 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2) 1041 1042 #define ODINPROCEDURENODBG2(cName,t1,a1,t2,a2) \ 1043 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2);\ 1044 void WINAPI cName(t1 a1,t2 a2) \ 1045 { \ 1046 unsigned short sel = RestoreOS2FS(); \ 1047 ODIN_##cName(a1,a2); \ 1048 SetFS(sel); \ 1049 } \ 1050 \ 1051 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2) 1052 1053 1054 /* ---------- 3 parameters ---------- */ 1055 #define ODINFUNCTIONNODBG3(cRet,cName,t1,a1,t2,a2,t3,a3) \ 1056 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \ 1057 cRet WINAPI cName(t1 a1,t2 a2,t3 a3) \ 1058 { \ 1059 unsigned short sel = RestoreOS2FS(); \ 1060 cRet rc = ODIN_##cName(a1,a2,a3); \ 1061 SetFS(sel); \ 1062 return rc; \ 1063 } \ 1064 \ 1065 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3) 1066 1067 #define ODINPROCEDURENODBG3(cName,t1,a1,t2,a2,t3,a3) \ 1068 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \ 1069 void WINAPI cName(t1 a1,t2 a2,t3 a3) \ 1070 { \ 1071 unsigned short sel = RestoreOS2FS(); \ 1072 ODIN_##cName(a1,a2,a3); \ 1073 SetFS(sel); \ 1074 } \ 1075 \ 1076 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3) 1077 1078 1079 /* ---------- 4 parameters ---------- */ 1080 #define ODINFUNCTIONNODBG4(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4) \ 1081 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \ 1082 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \ 1083 { \ 1084 unsigned short sel = RestoreOS2FS(); \ 1085 cRet rc = ODIN_##cName(a1,a2,a3,a4); \ 1086 SetFS(sel); \ 1087 return rc; \ 1088 } \ 1089 \ 1090 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4) 1091 1092 #define ODINPROCEDURENODBG4(cName,t1,a1,t2,a2,t3,a3,t4,a4) \ 1093 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \ 1094 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \ 1095 { \ 1096 unsigned short sel = RestoreOS2FS(); \ 1097 ODIN_##cName(a1,a2,a3,a4); \ 1098 SetFS(sel); \ 1099 } \ 1100 \ 1101 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4) 1102 1103 1104 /* ---------- 5 parameters ---------- */ 1105 #define ODINFUNCTIONNODBG5(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \ 1106 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \ 1107 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \ 1108 { \ 1109 unsigned short sel = RestoreOS2FS(); \ 1110 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5); \ 1111 SetFS(sel); \ 1112 return rc; \ 1113 } \ 1114 \ 1115 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) 1116 1117 #define ODINPROCEDURENODBG5(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \ 1118 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \ 1119 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \ 1120 { \ 1121 unsigned short sel = RestoreOS2FS(); \ 1122 ODIN_##cName(a1,a2,a3,a4,a5); \ 1123 SetFS(sel); \ 1124 } \ 1125 \ 1126 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) 1127 1128 1129 /* ---------- 6 parameters ---------- */ 1130 #define ODINFUNCTIONNODBG6(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \ 1131 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \ 1132 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \ 1133 { \ 1134 unsigned short sel = RestoreOS2FS(); \ 1135 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6); \ 1136 SetFS(sel); \ 1137 return rc; \ 1138 } \ 1139 \ 1140 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) 1141 1142 #define ODINPROCEDURENODBG6(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \ 1143 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \ 1144 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \ 1145 { \ 1146 unsigned short sel = RestoreOS2FS(); \ 1147 ODIN_##cName(a1,a2,a3,a4,a5,a6); \ 1148 SetFS(sel); \ 1149 } \ 1150 \ 1151 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) 1152 1153 1154 /* ---------- 7 parameters ---------- */ 1155 #define ODINFUNCTIONNODBG7(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \ 1156 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \ 1157 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \ 1158 { \ 1159 unsigned short sel = RestoreOS2FS(); \ 1160 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \ 1161 SetFS(sel); \ 1162 return rc; \ 1163 } \ 1164 \ 1165 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) 1166 1167 #define ODINPROCEDURENODBG7(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \ 1168 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \ 1169 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \ 1170 { \ 1171 unsigned short sel = RestoreOS2FS(); \ 1172 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \ 1173 SetFS(sel); \ 1174 } \ 1175 \ 1176 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) 1177 1178 1179 /* ---------- 8 parameters ---------- */ 1180 #define ODINFUNCTIONNODBG8(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \ 1181 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \ 1182 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \ 1183 { \ 1184 unsigned short sel = RestoreOS2FS(); \ 1185 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \ 1186 SetFS(sel); \ 1187 return rc; \ 1188 } \ 1189 \ 1190 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) 1191 1192 #define ODINPROCEDURENODBG8(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \ 1193 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \ 1194 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \ 1195 { \ 1196 unsigned short sel = RestoreOS2FS(); \ 1197 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \ 1198 SetFS(sel); \ 1199 } \ 1200 \ 1201 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) 1202 1203 1204 /* ---------- 9 parameters ---------- */ 1205 #define ODINFUNCTIONNODBG9(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \ 1206 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \ 1207 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \ 1208 { \ 1209 unsigned short sel = RestoreOS2FS(); \ 1210 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \ 1211 SetFS(sel); \ 1212 return rc; \ 1213 } \ 1214 \ 1215 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) 1216 1217 #define ODINPROCEDURENODBG9(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \ 1218 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \ 1219 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \ 1220 { \ 1221 unsigned short sel = RestoreOS2FS(); \ 1222 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \ 1223 SetFS(sel); \ 1224 } \ 1225 \ 1226 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) 1227 1228 1229 /* ---------- 10 parameters ---------- */ 1230 #define ODINFUNCTIONNODBG10(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \ 1231 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); \ 1232 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \ 1233 { \ 1234 unsigned short sel = RestoreOS2FS(); \ 1235 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \ 1236 SetFS(sel); \ 1237 return rc; \ 1238 } \ 1239 \ 1240 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) 1241 1242 #define ODINPROCEDURENODBG10(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \ 1243 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); \ 1244 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \ 1245 { \ 1246 unsigned short sel = RestoreOS2FS(); \ 1247 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \ 1248 SetFS(sel); \ 1249 } \ 1250 \ 1251 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) 1252 1253 1254 /* ---------- 11 parameters ---------- */ 1255 #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) \ 1256 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); \ 1257 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) \ 1258 { \ 1259 unsigned short sel = RestoreOS2FS(); \ 1260 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \ 1261 SetFS(sel); \ 1262 return rc; \ 1263 } \ 1264 \ 1265 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) 1266 1267 #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) \ 1268 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); \ 1269 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) \ 1270 { \ 1271 unsigned short sel = RestoreOS2FS(); \ 1272 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \ 1273 SetFS(sel); \ 1274 } \ 1275 \ 1276 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) 1277 1278 1279 /* ---------- 12 parameters ---------- */ 1280 #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) \ 1281 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); \ 1282 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) \ 1283 { \ 1284 unsigned short sel = RestoreOS2FS(); \ 1285 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \ 1286 SetFS(sel); \ 1287 return rc; \ 1288 } \ 1289 \ 1290 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) 1291 1292 #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) \ 1293 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); \ 1294 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) \ 1295 { \ 1296 unsigned short sel = RestoreOS2FS(); \ 1297 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \ 1298 SetFS(sel); \ 1299 } \ 1300 \ 1301 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) 1302 1303 1304 1305 935 1306 #endif /* _ODINWRAP_H_ */
Note:
See TracChangeset
for help on using the changeset viewer.