source: trunk/include/odinwrap.h@ 4124

Last change on this file since 4124 was 4124, checked in by sandervl, 25 years ago

header updates

File size: 75.2 KB
Line 
1/* $Id: odinwrap.h,v 1.23 2000-08-30 13:56:37 sandervl 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 _ODINWRAP_H_
15
16#include <os2sel.h>
17
18/****************************************************************************
19 * Defines *
20 ****************************************************************************/
21
22// override debugging
23//#undef DEBUG
24//#define DEBUG
25
26// override profiling
27//#undef PROFILE_ODIN
28//#define PROFILE_ODIN
29
30
31
32#define ODIN_INTERNAL _Optlink
33
34
35#ifdef DEBUG
36# define ODINDEBUGCHANNEL(a) static char* pszOdinDebugChannel=#a;
37# define ODINDEBUGCHANNEL1(a) static char* pszOdinDebugChannel1=#a;
38#else
39# define ODINDEBUGCHANNEL(a)
40# define ODINDEBUGCHANNEL1(a)
41#endif
42
43
44//SvL: Define this to use the internal wrapper function of a specific api
45#define ODIN_EXTERN(a) ODIN_INTERNAL ODIN_##a
46
47#ifdef DEBUG
48
49//@@@PH 1999/10/25 IBM VAC++ debug memory support
50#include <malloc.h>
51
52#if 1
53#define CheckFS(a)
54#else
55//SvL: Eases locating apis that corrupt FS
56#define error_FSSelector "FS Selector for thread %d corrupted!!!"
57
58extern int IsExeStarted(); //kernel32
59
60#define CheckFS(sel) if(sel == 0x150b && IsExeStarted()) { \
61 dprintf(((char *)error_FSSelector, GetCurrentThreadId())); \
62 }
63#endif
64
65//SvL: Only check the heap very frequently when there are problems
66//#define DEBUG_ODINHEAP
67
68#ifdef DEBUG_ODINHEAP
69#define ODIN_HEAPCHECK() _heap_check()
70#else
71#define ODIN_HEAPCHECK()
72#endif
73
74// PH: this is for profiling cumulative method call times
75#ifdef PROFILE_ODIN
76
77# define PROFILE_START(a) \
78 LARGE_INTEGER liStart; \
79 LARGE_INTEGER liEnd; \
80 unsigned long ulElapsed; \
81 QueryPerformanceCounter(&liStart);
82
83
84# define PROFILE_STOP(a) \
85 QueryPerformanceCounter(&liEnd);\
86 if (liStart.LowPart > liEnd.LowPart) \
87 ulElapsed = 0xFFFFFFFF - liStart.LowPart + liEnd.LowPart; \
88 else \
89 ulElapsed = liEnd.LowPart - liStart.LowPart; \
90 \
91 dprintf(("%s: %s %u ticks\n",\
92 pszOdinDebugChannel,\
93 a, \
94 ulElapsed));
95#else
96# define PROFILE_START(a)
97# define PROFILE_STOP(a)
98#endif
99
100/****************************************************************************
101 * General Wrapper Macros (debug instrumented) *
102 ****************************************************************************/
103
104/* ---------- 0 parameters ---------- */
105#define ODINFUNCTION0(cRet,cName) \
106 cRet ODIN_INTERNAL ODIN_##cName (void); \
107 cRet WINAPI cName(void) \
108 { \
109 unsigned short sel = RestoreOS2FS(); \
110 dprintf(("%s: "#cRet" "#cName"() enter\n",\
111 pszOdinDebugChannel)); \
112 CheckFS(sel) \
113 ODIN_HEAPCHECK(); \
114 PROFILE_START(#cName) \
115 cRet rc = ODIN_##cName(); \
116 PROFILE_STOP(#cName) \
117 ODIN_HEAPCHECK(); \
118 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
119 pszOdinDebugChannel, \
120 rc)); \
121 SetFS(sel); \
122 return rc; \
123 } \
124 \
125 cRet ODIN_INTERNAL ODIN_##cName (void)
126
127
128#define ODINPROCEDURE0(cName) \
129 void ODIN_INTERNAL ODIN_##cName (void); \
130 void WINAPI cName(void) \
131 { \
132 unsigned short sel = RestoreOS2FS(); \
133 dprintf(("%s: void "#cName"() enter\n", \
134 pszOdinDebugChannel)); \
135 CheckFS(sel) \
136 ODIN_HEAPCHECK(); \
137 PROFILE_START(#cName) \
138 ODIN_##cName(); \
139 PROFILE_STOP(#cName) \
140 ODIN_HEAPCHECK(); \
141 dprintf(("%s: void "#cName"() leave\n", \
142 pszOdinDebugChannel)); \
143 SetFS(sel); \
144 } \
145 \
146 void ODIN_INTERNAL ODIN_##cName (void)
147
148
149/* ---------- 1 parameters ---------- */
150#define ODINFUNCTION1(cRet,cName,t1,a1) \
151 cRet ODIN_INTERNAL ODIN_##cName (t1 a1); \
152 cRet WINAPI cName(t1 a1) \
153 { \
154 unsigned short sel = RestoreOS2FS(); \
155 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh) enter\n", \
156 pszOdinDebugChannel, \
157 a1)); \
158 CheckFS(sel) \
159 ODIN_HEAPCHECK(); \
160 PROFILE_START(#cName) \
161 cRet rc = ODIN_##cName(a1); \
162 PROFILE_STOP(#cName) \
163 ODIN_HEAPCHECK(); \
164 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
165 pszOdinDebugChannel, \
166 rc)); \
167 SetFS(sel); \
168 return rc; \
169 } \
170 \
171 cRet ODIN_INTERNAL ODIN_##cName (t1 a1)
172
173#define ODINPROCEDURE1(cName,t1,a1) \
174 void ODIN_INTERNAL ODIN_##cName (t1 a1); \
175 void WINAPI cName(t1 a1) \
176 { \
177 unsigned short sel = RestoreOS2FS(); \
178 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh) enter\n", \
179 pszOdinDebugChannel, \
180 a1)); \
181 CheckFS(sel) \
182 ODIN_HEAPCHECK(); \
183 PROFILE_START(#cName) \
184 ODIN_##cName(a1); \
185 PROFILE_STOP(#cName) \
186 ODIN_HEAPCHECK(); \
187 dprintf(("%s: void "#cName"() leave\n", \
188 pszOdinDebugChannel)); \
189 SetFS(sel); \
190 } \
191 \
192 void ODIN_INTERNAL ODIN_##cName (t1 a1)
193
194
195/* ---------- 2 parameters ---------- */
196#define ODINFUNCTION2(cRet,cName,t1,a1,t2,a2) \
197 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2); \
198 cRet WINAPI cName(t1 a1,t2 a2) \
199 { \
200 unsigned short sel = RestoreOS2FS(); \
201 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh) enter\n", \
202 pszOdinDebugChannel, \
203 a1,a2)); \
204 CheckFS(sel) \
205 ODIN_HEAPCHECK(); \
206 PROFILE_START(#cName) \
207 cRet rc = ODIN_##cName(a1,a2); \
208 PROFILE_STOP(#cName) \
209 ODIN_HEAPCHECK(); \
210 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
211 pszOdinDebugChannel, \
212 rc)); \
213 SetFS(sel); \
214 return rc; \
215 } \
216 \
217 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
218
219#define ODINPROCEDURE2(cName,t1,a1,t2,a2) \
220 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2); \
221 void WINAPI cName(t1 a1,t2 a2) \
222 { \
223 unsigned short sel = RestoreOS2FS(); \
224 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh) enter\n", \
225 pszOdinDebugChannel, \
226 a1,a2)); \
227 CheckFS(sel) \
228 ODIN_HEAPCHECK(); \
229 PROFILE_START(#cName) \
230 ODIN_##cName(a1,a2); \
231 PROFILE_STOP(#cName) \
232 ODIN_HEAPCHECK(); \
233 dprintf(("%s: void "#cName"() leave\n", \
234 pszOdinDebugChannel)); \
235 SetFS(sel); \
236 } \
237 \
238 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
239
240
241/* ---------- 3 parameters ---------- */
242#define ODINFUNCTION3(cRet,cName,t1,a1,t2,a2,t3,a3) \
243 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
244 cRet WINAPI cName(t1 a1,t2 a2,t3 a3) \
245 { \
246 unsigned short sel = RestoreOS2FS(); \
247 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \
248 pszOdinDebugChannel, \
249 a1,a2,a3)); \
250 CheckFS(sel) \
251 ODIN_HEAPCHECK(); \
252 PROFILE_START(#cName) \
253 cRet rc = ODIN_##cName(a1,a2,a3); \
254 PROFILE_STOP(#cName) \
255 ODIN_HEAPCHECK(); \
256 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
257 pszOdinDebugChannel, \
258 rc)); \
259 SetFS(sel); \
260 return rc; \
261 } \
262 \
263 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
264
265#define ODINPROCEDURE3(cName,t1,a1,t2,a2,t3,a3) \
266 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
267 void WINAPI cName(t1 a1,t2 a2,t3 a3) \
268 { \
269 unsigned short sel = RestoreOS2FS(); \
270 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh) enter\n", \
271 pszOdinDebugChannel, \
272 a1,a2,a3)); \
273 CheckFS(sel) \
274 ODIN_HEAPCHECK(); \
275 PROFILE_START(#cName) \
276 ODIN_##cName(a1,a2,a3); \
277 PROFILE_STOP(#cName) \
278 ODIN_HEAPCHECK(); \
279 dprintf(("%s: void "#cName"() leave\n", \
280 pszOdinDebugChannel)); \
281 SetFS(sel); \
282 } \
283 \
284 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
285
286
287/* ---------- 4 parameters ---------- */
288#define ODINFUNCTION4(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4) \
289 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
290 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
291 { \
292 unsigned short sel = RestoreOS2FS(); \
293 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh, "#t4" "#a4"=%08xh) enter\n", \
294 pszOdinDebugChannel, \
295 a1,a2,a3,a4)); \
296 CheckFS(sel) \
297 ODIN_HEAPCHECK(); \
298 PROFILE_START(#cName) \
299 cRet rc = ODIN_##cName(a1,a2,a3,a4); \
300 PROFILE_STOP(#cName) \
301 ODIN_HEAPCHECK(); \
302 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
303 pszOdinDebugChannel, \
304 rc)); \
305 SetFS(sel); \
306 return rc; \
307 } \
308 \
309 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
310
311#define ODINPROCEDURE4(cName,t1,a1,t2,a2,t3,a3,t4,a4) \
312 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
313 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
314 { \
315 unsigned short sel = RestoreOS2FS(); \
316 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh, "#t4" "#a4"=%08xh) enter\n", \
317 pszOdinDebugChannel, \
318 a1,a2,a3,a4)); \
319 CheckFS(sel) \
320 ODIN_HEAPCHECK(); \
321 PROFILE_START(#cName) \
322 ODIN_##cName(a1,a2,a3,a4); \
323 PROFILE_STOP(#cName) \
324 ODIN_HEAPCHECK(); \
325 dprintf(("%s: void "#cName"() leave\n", \
326 pszOdinDebugChannel)); \
327 SetFS(sel); \
328 } \
329 \
330 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
331
332
333/* ---------- 5 parameters ---------- */
334#define ODINFUNCTION5(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
335 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
336 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
337 { \
338 unsigned short sel = RestoreOS2FS(); \
339 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh" \
340 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh) enter\n", \
341 pszOdinDebugChannel, \
342 a1,a2,a3,a4,a5)); \
343 CheckFS(sel) \
344 ODIN_HEAPCHECK(); \
345 PROFILE_START(#cName) \
346 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5); \
347 PROFILE_STOP(#cName) \
348 ODIN_HEAPCHECK(); \
349 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
350 pszOdinDebugChannel, \
351 rc)); \
352 SetFS(sel); \
353 return rc; \
354 } \
355 \
356 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
357
358#define ODINPROCEDURE5(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
359 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
360 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
361 { \
362 unsigned short sel = RestoreOS2FS(); \
363 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
364 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh) enter\n", \
365 pszOdinDebugChannel, \
366 a1,a2,a3,a4,a5)); \
367 CheckFS(sel) \
368 ODIN_HEAPCHECK(); \
369 PROFILE_START(#cName) \
370 ODIN_##cName(a1,a2,a3,a4,a5); \
371 PROFILE_STOP(#cName) \
372 ODIN_HEAPCHECK(); \
373 dprintf(("%s: void "#cName"() leave\n", \
374 pszOdinDebugChannel)); \
375 SetFS(sel); \
376 } \
377 \
378 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
379
380
381/* ---------- 6 parameters ---------- */
382#define ODINFUNCTION6(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
383 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
384 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
385 { \
386 unsigned short sel = RestoreOS2FS(); \
387 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
388 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh) enter\n", \
389 pszOdinDebugChannel, \
390 a1,a2,a3,a4,a5,a6)); \
391 CheckFS(sel) \
392 ODIN_HEAPCHECK(); \
393 PROFILE_START(#cName) \
394 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6); \
395 PROFILE_STOP(#cName) \
396 ODIN_HEAPCHECK(); \
397 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
398 pszOdinDebugChannel, \
399 rc)); \
400 SetFS(sel); \
401 return rc; \
402 } \
403 \
404 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
405
406// @@@PH 1999/12/28 the following macro is a workaround for WINMM:waveOutOpen
407// where the system needs to know about the win32 tib fs selector
408#define ODINFUNCTION6FS(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
409 cRet ODIN_INTERNAL ODIN_##cName (unsigned short selFS, t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
410 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
411 { \
412 unsigned short sel = RestoreOS2FS(); \
413 dprintf(("%s: "#cRet" "#cName"(selFS=%04xh, "#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
414 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh) enter\n", \
415 pszOdinDebugChannel, \
416 sel, \
417 a1,a2,a3,a4,a5,a6)); \
418 CheckFS(sel) \
419 ODIN_HEAPCHECK(); \
420 PROFILE_START(#cName) \
421 cRet rc = ODIN_##cName(sel,a1,a2,a3,a4,a5,a6); \
422 PROFILE_STOP(#cName) \
423 ODIN_HEAPCHECK(); \
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 (unsigned short selFS, t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
432
433
434#define ODINPROCEDURE6(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
435 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
436 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
437 { \
438 unsigned short sel = RestoreOS2FS(); \
439 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
440 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh) enter\n", \
441 pszOdinDebugChannel, \
442 a1,a2,a3,a4,a5,a6)); \
443 CheckFS(sel) \
444 ODIN_HEAPCHECK(); \
445 PROFILE_START(#cName) \
446 ODIN_##cName(a1,a2,a3,a4,a5,a6); \
447 PROFILE_STOP(#cName) \
448 ODIN_HEAPCHECK(); \
449 dprintf(("%s: void "#cName"() leave\n", \
450 pszOdinDebugChannel)); \
451 SetFS(sel); \
452 } \
453 \
454 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
455
456
457/* ---------- 7 parameters ---------- */
458#define ODINFUNCTION7(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
459 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
460 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
461 { \
462 unsigned short sel = RestoreOS2FS(); \
463 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
464 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh) enter\n", \
465 pszOdinDebugChannel, \
466 a1,a2,a3,a4,a5,a6,a7)); \
467 CheckFS(sel) \
468 ODIN_HEAPCHECK(); \
469 PROFILE_START(#cName) \
470 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
471 PROFILE_STOP(#cName) \
472 ODIN_HEAPCHECK(); \
473 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
474 pszOdinDebugChannel, \
475 rc)); \
476 SetFS(sel); \
477 return rc; \
478 } \
479 \
480 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
481
482#define ODINPROCEDURE7(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
483 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
484 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
485 { \
486 unsigned short sel = RestoreOS2FS(); \
487 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
488 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh) enter\n", \
489 pszOdinDebugChannel, \
490 a1,a2,a3,a4,a5,a6,a7)); \
491 CheckFS(sel) \
492 ODIN_HEAPCHECK(); \
493 PROFILE_START(#cName) \
494 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
495 PROFILE_STOP(#cName) \
496 ODIN_HEAPCHECK(); \
497 dprintf(("%s: void "#cName"() leave\n", \
498 pszOdinDebugChannel)); \
499 SetFS(sel); \
500 } \
501 \
502 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
503
504
505/* ---------- 8 parameters ---------- */
506#define ODINFUNCTION8(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
507 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
508 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
509 { \
510 unsigned short sel = RestoreOS2FS(); \
511 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
512 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
513 ", "#t8" "#a8"=%08xh) enter\n", \
514 pszOdinDebugChannel, \
515 a1,a2,a3,a4,a5,a6,a7,a8)); \
516 CheckFS(sel) \
517 ODIN_HEAPCHECK(); \
518 PROFILE_START(#cName) \
519 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
520 PROFILE_STOP(#cName) \
521 ODIN_HEAPCHECK(); \
522 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
523 pszOdinDebugChannel, \
524 rc)); \
525 SetFS(sel); \
526 return rc; \
527 } \
528 \
529 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
530
531#define ODINPROCEDURE8(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
532 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
533 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
534 { \
535 unsigned short sel = RestoreOS2FS(); \
536 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
537 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
538 ", "#t8" "#a8"=%08xh) enter\n", \
539 pszOdinDebugChannel, \
540 a1,a2,a3,a4,a5,a6,a7,a8)); \
541 ODIN_HEAPCHECK(); \
542 CheckFS(sel) \
543 PROFILE_START(#cName) \
544 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
545 PROFILE_STOP(#cName) \
546 ODIN_HEAPCHECK(); \
547 dprintf(("%s: void "#cName"() leave\n", \
548 pszOdinDebugChannel)); \
549 SetFS(sel); \
550 } \
551 \
552 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
553
554
555/* ---------- 9 parameters ---------- */
556#define ODINFUNCTION9(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
557 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
558 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
559 { \
560 unsigned short sel = RestoreOS2FS(); \
561 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
562 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
563 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh) enter\n", \
564 pszOdinDebugChannel, \
565 a1,a2,a3,a4,a5,a6,a7,a8,a9)); \
566 CheckFS(sel) \
567 ODIN_HEAPCHECK(); \
568 PROFILE_START(#cName) \
569 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
570 PROFILE_STOP(#cName) \
571 ODIN_HEAPCHECK(); \
572 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
573 pszOdinDebugChannel, \
574 rc)); \
575 SetFS(sel); \
576 return rc; \
577 } \
578 \
579 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
580
581#define ODINPROCEDURE9(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
582 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
583 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
584 { \
585 unsigned short sel = RestoreOS2FS(); \
586 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
587 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
588 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh) enter\n", \
589 pszOdinDebugChannel, \
590 a1,a2,a3,a4,a5,a6,a7,a8,a9)); \
591 CheckFS(sel) \
592 ODIN_HEAPCHECK(); \
593 PROFILE_START(#cName) \
594 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
595 PROFILE_STOP(#cName) \
596 ODIN_HEAPCHECK(); \
597 dprintf(("%s: void "#cName"() leave\n", \
598 pszOdinDebugChannel)); \
599 SetFS(sel); \
600 } \
601 \
602 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
603
604
605/* ---------- 10 parameters ---------- */
606#define ODINFUNCTION10(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
607 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); \
608 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
609 { \
610 unsigned short sel = RestoreOS2FS(); \
611 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
612 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
613 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh) enter\n", \
614 pszOdinDebugChannel, \
615 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10));\
616 CheckFS(sel) \
617 ODIN_HEAPCHECK(); \
618 PROFILE_START(#cName) \
619 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
620 PROFILE_STOP(#cName) \
621 ODIN_HEAPCHECK(); \
622 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
623 pszOdinDebugChannel, \
624 rc)); \
625 SetFS(sel); \
626 return rc; \
627 } \
628 \
629 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)
630
631#define ODINPROCEDURE10(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
632 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); \
633 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
634 { \
635 unsigned short sel = RestoreOS2FS(); \
636 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
637 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
638 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh) enter\n", \
639 pszOdinDebugChannel, \
640 a1,a2,a3)); \
641 CheckFS(sel) \
642 ODIN_HEAPCHECK(); \
643 PROFILE_START(#cName) \
644 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
645 PROFILE_STOP(#cName) \
646 ODIN_HEAPCHECK(); \
647 dprintf(("%s: void "#cName"() leave\n", \
648 pszOdinDebugChannel)); \
649 SetFS(sel); \
650 } \
651 \
652 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)
653
654
655/* ---------- 11 parameters ---------- */
656#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) \
657 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); \
658 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) \
659 { \
660 unsigned short sel = RestoreOS2FS(); \
661 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
662 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
663 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh) enter\n", \
664 pszOdinDebugChannel, \
665 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)); \
666 CheckFS(sel) \
667 ODIN_HEAPCHECK(); \
668 PROFILE_START(#cName) \
669 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
670 PROFILE_STOP(#cName) \
671 ODIN_HEAPCHECK(); \
672 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
673 pszOdinDebugChannel, \
674 rc)); \
675 SetFS(sel); \
676 return rc; \
677 } \
678 \
679 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)
680
681#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) \
682 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); \
683 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) \
684 { \
685 unsigned short sel = RestoreOS2FS(); \
686 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
687 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
688 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh) enter\n", \
689 pszOdinDebugChannel, \
690 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)); \
691 CheckFS(sel) \
692 ODIN_HEAPCHECK(); \
693 PROFILE_START(#cName) \
694 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
695 PROFILE_STOP(#cName) \
696 ODIN_HEAPCHECK(); \
697 dprintf(("%s: void "#cName"() leave\n", \
698 pszOdinDebugChannel)); \
699 SetFS(sel); \
700 } \
701 \
702 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)
703
704
705/* ---------- 12 parameters ---------- */
706#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) \
707 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); \
708 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) \
709 { \
710 unsigned short sel = RestoreOS2FS(); \
711 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
712 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
713 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
714 ", "#t12" "#a12"=%08xh) enter\n", \
715 pszOdinDebugChannel, \
716 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)); \
717 CheckFS(sel) \
718 ODIN_HEAPCHECK(); \
719 PROFILE_START(#cName) \
720 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
721 PROFILE_STOP(#cName) \
722 ODIN_HEAPCHECK(); \
723 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
724 pszOdinDebugChannel, \
725 rc)); \
726 SetFS(sel); \
727 return rc; \
728 } \
729 \
730 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)
731
732#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) \
733 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); \
734 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) \
735 { \
736 unsigned short sel = RestoreOS2FS(); \
737 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
738 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
739 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
740 ", "#t12" "#a12"=%08xh) enter\n", \
741 pszOdinDebugChannel, \
742 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)); \
743 CheckFS(sel) \
744 ODIN_HEAPCHECK(); \
745 PROFILE_START(#cName) \
746 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
747 PROFILE_STOP(#cName) \
748 ODIN_HEAPCHECK(); \
749 dprintf(("%s: void "#cName"() leave\n", \
750 pszOdinDebugChannel)); \
751 SetFS(sel); \
752 } \
753 \
754 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)
755
756
757/* ---------- 13 parameters ---------- */
758#define ODINFUNCTION13(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,t13,a13) \
759 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,t13 a13); \
760 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,t13 a13) \
761 { \
762 unsigned short sel = RestoreOS2FS(); \
763 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
764 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
765 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
766 ", "#t12" "#a12"=%08xh, "#t13" "#a13"=%08xh) enter\n", \
767 pszOdinDebugChannel, \
768 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)); \
769 CheckFS(sel) \
770 ODIN_HEAPCHECK(); \
771 PROFILE_START(#cName) \
772 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13); \
773 PROFILE_STOP(#cName) \
774 ODIN_HEAPCHECK(); \
775 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
776 pszOdinDebugChannel, \
777 rc)); \
778 SetFS(sel); \
779 return rc; \
780 } \
781 \
782 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,t13 a13)
783
784#define ODINPROCEDURE13(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,t13,a13) \
785 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,t13 a13); \
786 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,t13 a13) \
787 { \
788 unsigned short sel = RestoreOS2FS(); \
789 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
790 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
791 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
792 ", "#t12" "#a12"=%08xh, "#t13" "#a13"=%08xh, ) enter\n", \
793 pszOdinDebugChannel, \
794 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)); \
795 CheckFS(sel) \
796 ODIN_HEAPCHECK(); \
797 PROFILE_START(#cName) \
798 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13); \
799 PROFILE_STOP(#cName) \
800 ODIN_HEAPCHECK(); \
801 dprintf(("%s: void "#cName"() leave\n", \
802 pszOdinDebugChannel)); \
803 SetFS(sel); \
804 } \
805 \
806 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,t13 a13)
807
808
809/* ---------- 14 parameters ---------- */
810#define ODINFUNCTION14(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,t13,a13,t14,a14) \
811 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,t13 a13,t14 a14); \
812 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,t13 a13,t14 a14) \
813 { \
814 unsigned short sel = RestoreOS2FS(); \
815 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
816 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
817 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
818 ", "#t12" "#a12"=%08xh, "#t13" "#a13"=%08xh, "#t14" "#a14"=%08xh) enter\n", \
819 pszOdinDebugChannel, \
820 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14)); \
821 CheckFS(sel) \
822 ODIN_HEAPCHECK(); \
823 PROFILE_START(#cName) \
824 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14); \
825 ODIN_HEAPCHECK(); \
826 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
827 pszOdinDebugChannel, \
828 rc)); \
829 SetFS(sel); \
830 return rc; \
831 } \
832 \
833 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,t13 a13,t14 a14)
834
835#define ODINPROCEDURE14(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,t13,a13,t14,a14) \
836 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,t13 a13,t14 a14); \
837 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,t13 a13,t14 a14) \
838 { \
839 unsigned short sel = RestoreOS2FS(); \
840 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
841 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
842 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
843 ", "#t12" "#a12"=%08xh, "#t13" "#a13"=%08xh, "#t14" "#a14"=%08xh) enter\n", \
844 pszOdinDebugChannel, \
845 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14)); \
846 CheckFS(sel) \
847 ODIN_HEAPCHECK(); \
848 PROFILE_START(#cName) \
849 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14); \
850 PROFILE_STOP(#cName) \
851 ODIN_HEAPCHECK(); \
852 dprintf(("%s: void "#cName"() leave\n", \
853 pszOdinDebugChannel)); \
854 SetFS(sel); \
855 } \
856 \
857 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,t13 a13,t14 a14)
858
859
860#else
861
862/****************************************************************************
863 * General Wrapper Macros *
864 ****************************************************************************/
865
866/* ---------- 0 parameters ---------- */
867#define ODINFUNCTION0(cRet,cName) \
868 cRet ODIN_INTERNAL ODIN_##cName (void);\
869 cRet WINAPI cName(void) \
870 { \
871 unsigned short sel = RestoreOS2FS(); \
872 cRet rc = ODIN_##cName(); \
873 SetFS(sel); \
874 return rc; \
875 } \
876 \
877 cRet ODIN_INTERNAL ODIN_##cName (void)
878
879
880#define ODINPROCEDURE0(cName) \
881 void ODIN_INTERNAL ODIN_##cName (void);\
882 void WINAPI cName(void) \
883 { \
884 unsigned short sel = RestoreOS2FS(); \
885 ODIN_##cName(); \
886 SetFS(sel); \
887 } \
888 \
889 void ODIN_INTERNAL ODIN_##cName (void)
890
891
892/* ---------- 1 parameters ---------- */
893#define ODINFUNCTION1(cRet,cName,t1,a1) \
894 cRet ODIN_INTERNAL ODIN_##cName (t1 a1);\
895 cRet WINAPI cName(t1 a1) \
896 { \
897 unsigned short sel = RestoreOS2FS(); \
898 cRet rc = ODIN_##cName(a1); \
899 SetFS(sel); \
900 return rc; \
901 } \
902 \
903 cRet ODIN_INTERNAL ODIN_##cName (t1 a1)
904
905#define ODINPROCEDURE1(cName,t1,a1) \
906 void ODIN_INTERNAL ODIN_##cName (t1 a1);\
907 void WINAPI cName(t1 a1) \
908 { \
909 unsigned short sel = RestoreOS2FS(); \
910 ODIN_##cName(a1); \
911 SetFS(sel); \
912 } \
913 \
914 void ODIN_INTERNAL ODIN_##cName (t1 a1)
915
916
917/* ---------- 2 parameters ---------- */
918#define ODINFUNCTION2(cRet,cName,t1,a1,t2,a2) \
919 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2); \
920 cRet WINAPI cName(t1 a1,t2 a2) \
921 { \
922 unsigned short sel = RestoreOS2FS(); \
923 cRet rc = ODIN_##cName(a1,a2); \
924 SetFS(sel); \
925 return rc; \
926 } \
927 \
928 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
929
930#define ODINPROCEDURE2(cName,t1,a1,t2,a2) \
931 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2);\
932 void WINAPI cName(t1 a1,t2 a2) \
933 { \
934 unsigned short sel = RestoreOS2FS(); \
935 ODIN_##cName(a1,a2); \
936 SetFS(sel); \
937 } \
938 \
939 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
940
941
942/* ---------- 3 parameters ---------- */
943#define ODINFUNCTION3(cRet,cName,t1,a1,t2,a2,t3,a3) \
944 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
945 cRet WINAPI cName(t1 a1,t2 a2,t3 a3) \
946 { \
947 unsigned short sel = RestoreOS2FS(); \
948 cRet rc = ODIN_##cName(a1,a2,a3); \
949 SetFS(sel); \
950 return rc; \
951 } \
952 \
953 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
954
955#define ODINPROCEDURE3(cName,t1,a1,t2,a2,t3,a3) \
956 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
957 void WINAPI cName(t1 a1,t2 a2,t3 a3) \
958 { \
959 unsigned short sel = RestoreOS2FS(); \
960 ODIN_##cName(a1,a2,a3); \
961 SetFS(sel); \
962 } \
963 \
964 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
965
966
967/* ---------- 4 parameters ---------- */
968#define ODINFUNCTION4(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4) \
969 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
970 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
971 { \
972 unsigned short sel = RestoreOS2FS(); \
973 cRet rc = ODIN_##cName(a1,a2,a3,a4); \
974 SetFS(sel); \
975 return rc; \
976 } \
977 \
978 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
979
980#define ODINPROCEDURE4(cName,t1,a1,t2,a2,t3,a3,t4,a4) \
981 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
982 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
983 { \
984 unsigned short sel = RestoreOS2FS(); \
985 ODIN_##cName(a1,a2,a3,a4); \
986 SetFS(sel); \
987 } \
988 \
989 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
990
991
992/* ---------- 5 parameters ---------- */
993#define ODINFUNCTION5(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
994 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
995 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
996 { \
997 unsigned short sel = RestoreOS2FS(); \
998 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5); \
999 SetFS(sel); \
1000 return rc; \
1001 } \
1002 \
1003 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
1004
1005#define ODINPROCEDURE5(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
1006 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
1007 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
1008 { \
1009 unsigned short sel = RestoreOS2FS(); \
1010 ODIN_##cName(a1,a2,a3,a4,a5); \
1011 SetFS(sel); \
1012 } \
1013 \
1014 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
1015
1016
1017/* ---------- 6 parameters ---------- */
1018#define ODINFUNCTION6(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
1019 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
1020 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
1021 { \
1022 unsigned short sel = RestoreOS2FS(); \
1023 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6); \
1024 SetFS(sel); \
1025 return rc; \
1026 } \
1027 \
1028 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
1029
1030
1031// @@@PH 1999/12/28 the following macro is a workaround for WINMM:waveOutOpen
1032// where the system needs to know about the win32 tib fs selector
1033#define ODINFUNCTION6FS(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
1034 cRet ODIN_INTERNAL ODIN_##cName (unsigned short selFS, t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
1035 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
1036 { \
1037 unsigned short sel = RestoreOS2FS(); \
1038 cRet rc = ODIN_##cName(sel,a1,a2,a3,a4,a5,a6); \
1039 SetFS(sel); \
1040 return rc; \
1041 } \
1042 \
1043 cRet ODIN_INTERNAL ODIN_##cName (unsigned short selFS, t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
1044
1045
1046#define ODINPROCEDURE6(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
1047 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
1048 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
1049 { \
1050 unsigned short sel = RestoreOS2FS(); \
1051 ODIN_##cName(a1,a2,a3,a4,a5,a6); \
1052 SetFS(sel); \
1053 } \
1054 \
1055 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
1056
1057
1058/* ---------- 7 parameters ---------- */
1059#define ODINFUNCTION7(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
1060 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
1061 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
1062 { \
1063 unsigned short sel = RestoreOS2FS(); \
1064 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
1065 SetFS(sel); \
1066 return rc; \
1067 } \
1068 \
1069 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
1070
1071#define ODINPROCEDURE7(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
1072 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
1073 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
1074 { \
1075 unsigned short sel = RestoreOS2FS(); \
1076 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
1077 SetFS(sel); \
1078 } \
1079 \
1080 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
1081
1082
1083/* ---------- 8 parameters ---------- */
1084#define ODINFUNCTION8(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
1085 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
1086 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
1087 { \
1088 unsigned short sel = RestoreOS2FS(); \
1089 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
1090 SetFS(sel); \
1091 return rc; \
1092 } \
1093 \
1094 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
1095
1096#define ODINPROCEDURE8(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
1097 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
1098 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
1099 { \
1100 unsigned short sel = RestoreOS2FS(); \
1101 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
1102 SetFS(sel); \
1103 } \
1104 \
1105 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
1106
1107
1108/* ---------- 9 parameters ---------- */
1109#define ODINFUNCTION9(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
1110 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
1111 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
1112 { \
1113 unsigned short sel = RestoreOS2FS(); \
1114 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
1115 SetFS(sel); \
1116 return rc; \
1117 } \
1118 \
1119 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
1120
1121#define ODINPROCEDURE9(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
1122 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
1123 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
1124 { \
1125 unsigned short sel = RestoreOS2FS(); \
1126 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
1127 SetFS(sel); \
1128 } \
1129 \
1130 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
1131
1132
1133/* ---------- 10 parameters ---------- */
1134#define ODINFUNCTION10(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
1135 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); \
1136 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
1137 { \
1138 unsigned short sel = RestoreOS2FS(); \
1139 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
1140 SetFS(sel); \
1141 return rc; \
1142 } \
1143 \
1144 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)
1145
1146#define ODINPROCEDURE10(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
1147 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); \
1148 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
1149 { \
1150 unsigned short sel = RestoreOS2FS(); \
1151 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
1152 SetFS(sel); \
1153 } \
1154 \
1155 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)
1156
1157
1158/* ---------- 11 parameters ---------- */
1159#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) \
1160 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); \
1161 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) \
1162 { \
1163 unsigned short sel = RestoreOS2FS(); \
1164 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
1165 SetFS(sel); \
1166 return rc; \
1167 } \
1168 \
1169 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)
1170
1171#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) \
1172 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); \
1173 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) \
1174 { \
1175 unsigned short sel = RestoreOS2FS(); \
1176 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
1177 SetFS(sel); \
1178 } \
1179 \
1180 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)
1181
1182
1183/* ---------- 12 parameters ---------- */
1184#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) \
1185 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); \
1186 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) \
1187 { \
1188 unsigned short sel = RestoreOS2FS(); \
1189 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
1190 SetFS(sel); \
1191 return rc; \
1192 } \
1193 \
1194 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)
1195
1196#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) \
1197 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); \
1198 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) \
1199 { \
1200 unsigned short sel = RestoreOS2FS(); \
1201 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
1202 SetFS(sel); \
1203 } \
1204 \
1205 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)
1206
1207
1208
1209#endif
1210
1211/****************************************************************************
1212 * General Wrapper Macros *
1213 ****************************************************************************/
1214
1215/* ---------- 0 parameters ---------- */
1216#define ODINFUNCTIONNODBG0(cRet,cName) \
1217 cRet ODIN_INTERNAL ODIN_##cName (void);\
1218 cRet WINAPI cName(void) \
1219 { \
1220 unsigned short sel = RestoreOS2FS(); \
1221 cRet rc = ODIN_##cName(); \
1222 SetFS(sel); \
1223 return rc; \
1224 } \
1225 \
1226 cRet ODIN_INTERNAL ODIN_##cName (void)
1227
1228
1229#define ODINPROCEDURENODBG0(cName) \
1230 void ODIN_INTERNAL ODIN_##cName (void);\
1231 void WINAPI cName(void) \
1232 { \
1233 unsigned short sel = RestoreOS2FS(); \
1234 ODIN_##cName(); \
1235 SetFS(sel); \
1236 } \
1237 \
1238 void ODIN_INTERNAL ODIN_##cName (void)
1239
1240
1241/* ---------- 1 parameters ---------- */
1242#define ODINFUNCTIONNODBG1(cRet,cName,t1,a1) \
1243 cRet ODIN_INTERNAL ODIN_##cName (t1 a1);\
1244 cRet WINAPI cName(t1 a1) \
1245 { \
1246 unsigned short sel = RestoreOS2FS(); \
1247 cRet rc = ODIN_##cName(a1); \
1248 SetFS(sel); \
1249 return rc; \
1250 } \
1251 \
1252 cRet ODIN_INTERNAL ODIN_##cName (t1 a1)
1253
1254#define ODINPROCEDURENODBG1(cName,t1,a1) \
1255 void ODIN_INTERNAL ODIN_##cName (t1 a1);\
1256 void WINAPI cName(t1 a1) \
1257 { \
1258 unsigned short sel = RestoreOS2FS(); \
1259 ODIN_##cName(a1); \
1260 SetFS(sel); \
1261 } \
1262 \
1263 void ODIN_INTERNAL ODIN_##cName (t1 a1)
1264
1265
1266/* ---------- 2 parameters ---------- */
1267#define ODINFUNCTIONNODBG2(cRet,cName,t1,a1,t2,a2) \
1268 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2); \
1269 cRet WINAPI cName(t1 a1,t2 a2) \
1270 { \
1271 unsigned short sel = RestoreOS2FS(); \
1272 cRet rc = ODIN_##cName(a1,a2); \
1273 SetFS(sel); \
1274 return rc; \
1275 } \
1276 \
1277 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
1278
1279#define ODINPROCEDURENODBG2(cName,t1,a1,t2,a2) \
1280 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2);\
1281 void WINAPI cName(t1 a1,t2 a2) \
1282 { \
1283 unsigned short sel = RestoreOS2FS(); \
1284 ODIN_##cName(a1,a2); \
1285 SetFS(sel); \
1286 } \
1287 \
1288 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
1289
1290
1291/* ---------- 3 parameters ---------- */
1292#define ODINFUNCTIONNODBG3(cRet,cName,t1,a1,t2,a2,t3,a3) \
1293 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
1294 cRet WINAPI cName(t1 a1,t2 a2,t3 a3) \
1295 { \
1296 unsigned short sel = RestoreOS2FS(); \
1297 cRet rc = ODIN_##cName(a1,a2,a3); \
1298 SetFS(sel); \
1299 return rc; \
1300 } \
1301 \
1302 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
1303
1304#define ODINPROCEDURENODBG3(cName,t1,a1,t2,a2,t3,a3) \
1305 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
1306 void WINAPI cName(t1 a1,t2 a2,t3 a3) \
1307 { \
1308 unsigned short sel = RestoreOS2FS(); \
1309 ODIN_##cName(a1,a2,a3); \
1310 SetFS(sel); \
1311 } \
1312 \
1313 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
1314
1315
1316/* ---------- 4 parameters ---------- */
1317#define ODINFUNCTIONNODBG4(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4) \
1318 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
1319 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
1320 { \
1321 unsigned short sel = RestoreOS2FS(); \
1322 cRet rc = ODIN_##cName(a1,a2,a3,a4); \
1323 SetFS(sel); \
1324 return rc; \
1325 } \
1326 \
1327 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
1328
1329#define ODINPROCEDURENODBG4(cName,t1,a1,t2,a2,t3,a3,t4,a4) \
1330 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
1331 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
1332 { \
1333 unsigned short sel = RestoreOS2FS(); \
1334 ODIN_##cName(a1,a2,a3,a4); \
1335 SetFS(sel); \
1336 } \
1337 \
1338 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
1339
1340
1341/* ---------- 5 parameters ---------- */
1342#define ODINFUNCTIONNODBG5(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
1343 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
1344 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
1345 { \
1346 unsigned short sel = RestoreOS2FS(); \
1347 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5); \
1348 SetFS(sel); \
1349 return rc; \
1350 } \
1351 \
1352 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
1353
1354#define ODINPROCEDURENODBG5(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
1355 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
1356 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
1357 { \
1358 unsigned short sel = RestoreOS2FS(); \
1359 ODIN_##cName(a1,a2,a3,a4,a5); \
1360 SetFS(sel); \
1361 } \
1362 \
1363 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
1364
1365
1366/* ---------- 6 parameters ---------- */
1367#define ODINFUNCTIONNODBG6(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
1368 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
1369 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
1370 { \
1371 unsigned short sel = RestoreOS2FS(); \
1372 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6); \
1373 SetFS(sel); \
1374 return rc; \
1375 } \
1376 \
1377 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
1378
1379#define ODINPROCEDURENODBG6(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
1380 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
1381 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
1382 { \
1383 unsigned short sel = RestoreOS2FS(); \
1384 ODIN_##cName(a1,a2,a3,a4,a5,a6); \
1385 SetFS(sel); \
1386 } \
1387 \
1388 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
1389
1390
1391/* ---------- 7 parameters ---------- */
1392#define ODINFUNCTIONNODBG7(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
1393 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
1394 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
1395 { \
1396 unsigned short sel = RestoreOS2FS(); \
1397 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
1398 SetFS(sel); \
1399 return rc; \
1400 } \
1401 \
1402 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
1403
1404#define ODINPROCEDURENODBG7(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
1405 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
1406 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
1407 { \
1408 unsigned short sel = RestoreOS2FS(); \
1409 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
1410 SetFS(sel); \
1411 } \
1412 \
1413 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
1414
1415
1416/* ---------- 8 parameters ---------- */
1417#define ODINFUNCTIONNODBG8(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
1418 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
1419 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
1420 { \
1421 unsigned short sel = RestoreOS2FS(); \
1422 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
1423 SetFS(sel); \
1424 return rc; \
1425 } \
1426 \
1427 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
1428
1429#define ODINPROCEDURENODBG8(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
1430 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
1431 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
1432 { \
1433 unsigned short sel = RestoreOS2FS(); \
1434 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
1435 SetFS(sel); \
1436 } \
1437 \
1438 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
1439
1440
1441/* ---------- 9 parameters ---------- */
1442#define ODINFUNCTIONNODBG9(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
1443 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
1444 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
1445 { \
1446 unsigned short sel = RestoreOS2FS(); \
1447 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
1448 SetFS(sel); \
1449 return rc; \
1450 } \
1451 \
1452 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
1453
1454#define ODINPROCEDURENODBG9(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
1455 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
1456 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
1457 { \
1458 unsigned short sel = RestoreOS2FS(); \
1459 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
1460 SetFS(sel); \
1461 } \
1462 \
1463 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
1464
1465
1466/* ---------- 10 parameters ---------- */
1467#define ODINFUNCTIONNODBG10(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
1468 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); \
1469 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
1470 { \
1471 unsigned short sel = RestoreOS2FS(); \
1472 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
1473 SetFS(sel); \
1474 return rc; \
1475 } \
1476 \
1477 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)
1478
1479#define ODINPROCEDURENODBG10(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
1480 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); \
1481 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
1482 { \
1483 unsigned short sel = RestoreOS2FS(); \
1484 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
1485 SetFS(sel); \
1486 } \
1487 \
1488 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)
1489
1490
1491/* ---------- 11 parameters ---------- */
1492#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) \
1493 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); \
1494 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) \
1495 { \
1496 unsigned short sel = RestoreOS2FS(); \
1497 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
1498 SetFS(sel); \
1499 return rc; \
1500 } \
1501 \
1502 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)
1503
1504#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) \
1505 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); \
1506 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) \
1507 { \
1508 unsigned short sel = RestoreOS2FS(); \
1509 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
1510 SetFS(sel); \
1511 } \
1512 \
1513 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)
1514
1515
1516/* ---------- 12 parameters ---------- */
1517#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) \
1518 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); \
1519 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) \
1520 { \
1521 unsigned short sel = RestoreOS2FS(); \
1522 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
1523 SetFS(sel); \
1524 return rc; \
1525 } \
1526 \
1527 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)
1528
1529#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) \
1530 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); \
1531 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) \
1532 { \
1533 unsigned short sel = RestoreOS2FS(); \
1534 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
1535 SetFS(sel); \
1536 } \
1537 \
1538 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)
1539
1540
1541/* ---------- 13 parameters ---------- */
1542#define ODINFUNCTIONNODBG13(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,t13,a13) \
1543 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,t13 a13); \
1544 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,t13 a13) \
1545 { \
1546 unsigned short sel = RestoreOS2FS(); \
1547 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13); \
1548 SetFS(sel); \
1549 return rc; \
1550 } \
1551 \
1552 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,t13 a13)
1553
1554#define ODINPROCEDURENODBG13(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,t13,a13) \
1555 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,t13 a13); \
1556 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,t13 a13) \
1557 { \
1558 unsigned short sel = RestoreOS2FS(); \
1559 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13); \
1560 SetFS(sel); \
1561 } \
1562 \
1563 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,t13 a13)
1564
1565
1566/* ---------- 14 parameters ---------- */
1567#define ODINFUNCTIONNODBG14(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,t13,a13,t14,a14) \
1568 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,t13 a13,t14 a14); \
1569 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,t13 a13,t14 a14) \
1570 { \
1571 unsigned short sel = RestoreOS2FS(); \
1572 cRet rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14); \
1573 SetFS(sel); \
1574 return rc; \
1575 } \
1576 \
1577 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,t13 a13,t14 a14)
1578
1579#define ODINPROCEDURENODBG14(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,t13,a13,t14,a14) \
1580 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,t13 a13,t14 a14); \
1581 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,t13 a13,t14 a14) \
1582 { \
1583 unsigned short sel = RestoreOS2FS(); \
1584 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14); \
1585 SetFS(sel); \
1586 } \
1587 \
1588 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,t13 a13,t14 a14)
1589
1590
1591#endif /* _ODINWRAP_H_ */
Note: See TracBrowser for help on using the repository browser.