source: trunk/include/odinwrap.h@ 1630

Last change on this file since 1630 was 1545, checked in by sandervl, 26 years ago

conditional heapcheck

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