Changeset 1669 for trunk/include


Ignore:
Timestamp:
Nov 9, 1999, 8:21:36 PM (26 years ago)
Author:
sandervl
Message:

dprintf & wrapper updates

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 achimha Exp $ */
     1/* $Id: misc.h,v 1.10 1999-11-09 19:21:36 sandervl Exp $ */
    22
    33/*
     
    3535  #define dassert(a, b)   if(!(a)) WriteLogError b
    3636  #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
    3744#else
    3845  #define dprintf(a)
  • trunk/include/odinwrap.h

    r1642 r1669  
    1 /* $Id: odinwrap.h,v 1.14 1999-11-08 20:54:09 sandervl Exp $ */
     1/* $Id: odinwrap.h,v 1.15 1999-11-09 19:21:35 sandervl Exp $ */
    22
    33/*
     
    3838#include <malloc.h>
    3939
     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
     46extern int IsExeStarted(); //kernel32
     47
     48#define CheckFS(sel) if(sel == 0x150b && IsExeStarted()) {          \
     49                          dprintf(((char *)error_FSSelector, GetCurrentThreadId()));    \
     50                     }
     51#endif
     52
    4053//SvL: Only check the heap very frequently when there are problems
    4154//#define DEBUG_ODINHEAP
     
    5972    dprintf(("%s: "#cRet" "#cName"() enter\n",  \
    6073             pszOdinDebugChannel));           \
    61     ODIN_HEAPCHECK();                            \
     74    CheckFS(sel)                              \
     75    _heap_check();                            \
    6276    cRet   rc  = ODIN_##cName();              \
    63     ODIN_HEAPCHECK();                            \
     77    _heap_check();                            \
    6478    dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
    6579             pszOdinDebugChannel,             \
     
    7993    dprintf(("%s: void "#cName"() enter\n",    \
    8094             pszOdinDebugChannel));           \
    81     ODIN_HEAPCHECK();                            \
     95    CheckFS(sel)                              \
     96    _heap_check();                            \
    8297    ODIN_##cName();                                  \
    83     ODIN_HEAPCHECK();                            \
     98    _heap_check();                            \
    8499    dprintf(("%s: void "#cName"() leave\n",    \
    85100             pszOdinDebugChannel));           \
     
    99114             pszOdinDebugChannel,             \
    100115             a1));                            \
    101     ODIN_HEAPCHECK();                            \
     116    CheckFS(sel)                              \
     117    _heap_check();                            \
    102118    cRet   rc  = ODIN_##cName(a1);                   \
    103     ODIN_HEAPCHECK();                            \
     119    _heap_check();                            \
    104120    dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
    105121             pszOdinDebugChannel,             \
     
    119135             pszOdinDebugChannel,             \
    120136             a1));                            \
    121     ODIN_HEAPCHECK();                            \
     137    CheckFS(sel)                              \
     138    _heap_check();                            \
    122139    ODIN_##cName(a1);                                \
    123     ODIN_HEAPCHECK();                            \
     140    _heap_check();                            \
    124141    dprintf(("%s: void "#cName"() leave\n",    \
    125142             pszOdinDebugChannel));           \
     
    139156             pszOdinDebugChannel,             \
    140157             a1,a2));                         \
    141     ODIN_HEAPCHECK();                            \
     158    CheckFS(sel)                              \
     159    _heap_check();                            \
    142160    cRet   rc  = ODIN_##cName(a1,a2);                \
    143     ODIN_HEAPCHECK();                            \
     161    _heap_check();                            \
    144162    dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
    145163             pszOdinDebugChannel,             \
     
    159177             pszOdinDebugChannel,             \
    160178             a1,a2));                         \
    161     ODIN_HEAPCHECK();                            \
     179    CheckFS(sel)                              \
     180    _heap_check();                            \
    162181    ODIN_##cName(a1,a2);                             \
    163     ODIN_HEAPCHECK();                            \
     182    _heap_check();                            \
    164183    dprintf(("%s: void "#cName"() leave\n",    \
    165184             pszOdinDebugChannel));           \
     
    179198             pszOdinDebugChannel,             \
    180199             a1,a2,a3));                      \
    181     ODIN_HEAPCHECK();                            \
     200    CheckFS(sel)                              \
     201    _heap_check();                            \
    182202    cRet   rc  = ODIN_##cName(a1,a2,a3); \
    183     ODIN_HEAPCHECK();                            \
     203    _heap_check();                            \
    184204    dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
    185205             pszOdinDebugChannel,             \
     
    199219             pszOdinDebugChannel,             \
    200220             a1,a2,a3));                      \
    201     ODIN_HEAPCHECK();                            \
     221    CheckFS(sel)                              \
     222    _heap_check();                            \
    202223    ODIN_##cName(a1,a2,a3);              \
    203     ODIN_HEAPCHECK();                            \
     224    _heap_check();                            \
    204225    dprintf(("%s: void "#cName"() leave\n",    \
    205226             pszOdinDebugChannel));           \
     
    219240             pszOdinDebugChannel,             \
    220241             a1,a2,a3,a4));                   \
    221     ODIN_HEAPCHECK();                            \
     242    CheckFS(sel)                              \
     243    _heap_check();                            \
    222244    cRet   rc  = ODIN_##cName(a1,a2,a3,a4); \
    223     ODIN_HEAPCHECK();                            \
     245    _heap_check();                            \
    224246    dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
    225247             pszOdinDebugChannel,             \
     
    239261             pszOdinDebugChannel,             \
    240262             a1,a2,a3,a4));                    \
    241     ODIN_HEAPCHECK();                            \
     263    CheckFS(sel)                              \
     264    _heap_check();                            \
    242265    ODIN_##cName(a1,a2,a3,a4); \
    243     ODIN_HEAPCHECK();                            \
     266    _heap_check();                            \
    244267    dprintf(("%s: void "#cName"() leave\n",    \
    245268             pszOdinDebugChannel));           \
     
    260283             pszOdinDebugChannel,             \
    261284             a1,a2,a3,a4,a5));                \
    262     ODIN_HEAPCHECK();                            \
     285    CheckFS(sel)                              \
     286    _heap_check();                            \
    263287    cRet   rc  = ODIN_##cName(a1,a2,a3,a4,a5); \
    264     ODIN_HEAPCHECK();                            \
     288    _heap_check();                            \
    265289    dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
    266290             pszOdinDebugChannel,             \
     
    281305             pszOdinDebugChannel,             \
    282306             a1,a2,a3,a4,a5));                \
    283     ODIN_HEAPCHECK();                            \
     307    CheckFS(sel)                              \
     308    _heap_check();                            \
    284309    ODIN_##cName(a1,a2,a3,a4,a5); \
    285     ODIN_HEAPCHECK();                            \
     310    _heap_check();                            \
    286311    dprintf(("%s: void "#cName"() leave\n",    \
    287312             pszOdinDebugChannel));           \
     
    302327             pszOdinDebugChannel,             \
    303328             a1,a2,a3,a4,a5,a6));             \
    304     ODIN_HEAPCHECK();                            \
     329    CheckFS(sel)                              \
     330    _heap_check();                            \
    305331    cRet   rc  = ODIN_##cName(a1,a2,a3,a4,a5,a6); \
    306     ODIN_HEAPCHECK();                            \
     332    _heap_check();                            \
    307333    dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
    308334             pszOdinDebugChannel,             \
     
    323349             pszOdinDebugChannel,             \
    324350             a1,a2,a3,a4,a5,a6));             \
    325     ODIN_HEAPCHECK();                            \
     351    CheckFS(sel)                              \
     352    _heap_check();                            \
    326353    ODIN_##cName(a1,a2,a3,a4,a5,a6); \
    327     ODIN_HEAPCHECK();                            \
     354    _heap_check();                            \
    328355    dprintf(("%s: void "#cName"() leave\n",    \
    329356             pszOdinDebugChannel));           \
     
    344371             pszOdinDebugChannel,             \
    345372             a1,a2,a3,a4,a5,a6,a7));          \
    346     ODIN_HEAPCHECK();                            \
     373    CheckFS(sel)                              \
     374    _heap_check();                            \
    347375    cRet   rc  = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
    348     ODIN_HEAPCHECK();                            \
     376    _heap_check();                            \
    349377    dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
    350378             pszOdinDebugChannel,             \
     
    365393             pszOdinDebugChannel,             \
    366394             a1,a2,a3,a4,a5,a6,a7));          \
    367     ODIN_HEAPCHECK();                            \
     395    CheckFS(sel)                              \
     396    _heap_check();                            \
    368397    ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
    369     ODIN_HEAPCHECK();                            \
     398    _heap_check();                            \
    370399    dprintf(("%s: void "#cName"() leave\n",    \
    371400             pszOdinDebugChannel));           \
     
    387416             pszOdinDebugChannel,             \
    388417             a1,a2,a3,a4,a5,a6,a7,a8));       \
    389     ODIN_HEAPCHECK();                            \
     418    CheckFS(sel)                              \
     419    _heap_check();                            \
    390420    cRet   rc  = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
    391     ODIN_HEAPCHECK();                            \
     421    _heap_check();                            \
    392422    dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
    393423             pszOdinDebugChannel,             \
     
    409439             pszOdinDebugChannel,             \
    410440             a1,a2,a3,a4,a5,a6,a7,a8));       \
    411     ODIN_HEAPCHECK();                            \
     441    _heap_check();                            \
     442    CheckFS(sel)                              \
    412443    ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
    413     ODIN_HEAPCHECK();                            \
     444    _heap_check();                            \
    414445    dprintf(("%s: void "#cName"() leave\n",    \
    415446             pszOdinDebugChannel));           \
     
    431462             pszOdinDebugChannel,             \
    432463             a1,a2,a3,a4,a5,a6,a7,a8,a9));    \
    433     ODIN_HEAPCHECK();                            \
     464    CheckFS(sel)                              \
     465    _heap_check();                            \
    434466    cRet   rc  = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
    435     ODIN_HEAPCHECK();                            \
     467    _heap_check();                            \
    436468    dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
    437469             pszOdinDebugChannel,             \
     
    453485             pszOdinDebugChannel,             \
    454486             a1,a2,a3,a4,a5,a6,a7,a8,a9));    \
    455     ODIN_HEAPCHECK();                            \
     487    CheckFS(sel)                              \
     488    _heap_check();                            \
    456489    ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
    457     ODIN_HEAPCHECK();                            \
     490    _heap_check();                            \
    458491    dprintf(("%s: void "#cName"() leave\n",    \
    459492             pszOdinDebugChannel));           \
     
    475508             pszOdinDebugChannel,             \
    476509             a1,a2,a3,a4,a5,a6,a7,a8,a9,a10));\
    477     ODIN_HEAPCHECK();                            \
     510    CheckFS(sel)                              \
     511    _heap_check();                            \
    478512    cRet   rc  = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
    479     ODIN_HEAPCHECK();                            \
     513    _heap_check();                            \
    480514    dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
    481515             pszOdinDebugChannel,             \
     
    497531             pszOdinDebugChannel,             \
    498532             a1,a2,a3));                      \
    499     ODIN_HEAPCHECK();                            \
     533    CheckFS(sel)                              \
     534    _heap_check();                            \
    500535    ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
    501     ODIN_HEAPCHECK();                            \
     536    _heap_check();                            \
    502537    dprintf(("%s: void "#cName"() leave\n",    \
    503538             pszOdinDebugChannel));           \
     
    519554             pszOdinDebugChannel,             \
    520555             a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)); \
    521     ODIN_HEAPCHECK();                            \
     556    CheckFS(sel)                              \
     557    _heap_check();                            \
    522558    cRet   rc  = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
    523     ODIN_HEAPCHECK();                            \
     559    _heap_check();                            \
    524560    dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
    525561             pszOdinDebugChannel,             \
     
    541577             pszOdinDebugChannel,             \
    542578             a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)); \
    543     ODIN_HEAPCHECK();                            \
     579    CheckFS(sel)                              \
     580    _heap_check();                            \
    544581    ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
    545     ODIN_HEAPCHECK();                            \
     582    _heap_check();                            \
    546583    dprintf(("%s: void "#cName"() leave\n",    \
    547584             pszOdinDebugChannel));           \
     
    564601             pszOdinDebugChannel,             \
    565602             a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)); \
    566     ODIN_HEAPCHECK();                            \
     603    CheckFS(sel)                              \
     604    _heap_check();                            \
    567605    cRet   rc  = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
    568     ODIN_HEAPCHECK();                            \
     606    _heap_check();                            \
    569607    dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
    570608             pszOdinDebugChannel,             \
     
    587625             pszOdinDebugChannel,             \
    588626             a1,a2,a3,a4,a5,a6,a7,a8,a9,10,a11,a12));  \
    589     ODIN_HEAPCHECK();                            \
     627    CheckFS(sel)                              \
     628    _heap_check();                            \
    590629    ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
    591     ODIN_HEAPCHECK();                            \
     630    _heap_check();                            \
    592631    dprintf(("%s: void "#cName"() leave\n",    \
    593632             pszOdinDebugChannel));           \
     
    933972#endif
    934973
     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
    9351306#endif /* _ODINWRAP_H_ */
Note: See TracChangeset for help on using the changeset viewer.