source: trunk/include/odinwrap.h@ 1489

Last change on this file since 1489 was 1439, checked in by phaller, 26 years ago

Fix: include malloc.h

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