source: trunk/include/odinwrap.h@ 7326

Last change on this file since 7326 was 7326, checked in by phaller, 24 years ago

.

File size: 58.8 KB
Line 
1/*
2 * Project Odin Software License can be found in LICENSE.TXT
3 *
4 * ODIN FS: Selector function wrapper macros
5 *
6 * Copyright 1999 Patrick Haller
7 *
8 */
9
10
11#ifndef _ODINWRAP_H_
12#define _ODINWRAP_H_
13
14#include <os2sel.h>
15
16/****************************************************************************
17 * Defines *
18 ****************************************************************************/
19
20// override debugging
21//#undef DEBUG
22//#define DEBUG
23
24// override profiling
25//#undef PROFILE
26//#define PROFILE
27
28
29
30#define ODIN_INTERNAL _Optlink
31
32
33#ifdef DEBUG
34# define ODINDEBUGCHANNEL(a) static char* pszOdinDebugChannel=#a;
35# define ODINDEBUGCHANNEL1(a) static char* pszOdinDebugChannel1=#a;
36#else
37# define ODINDEBUGCHANNEL(a)
38# define ODINDEBUGCHANNEL1(a)
39#endif
40
41
42//SvL: Define this to use the internal wrapper function of a specific api
43#ifdef DEBUG
44#define ODIN_EXTERN(a) ODIN_INTERNAL ODIN_##a
45#define CALL_ODINFUNC(a) ODIN_##a
46#else
47#define ODIN_EXTERN(a) ODIN_INTERNAL a
48#define CALL_ODINFUNC(a) a
49#endif
50
51
52#ifdef DEBUG
53
54//@@@PH 1999/10/25 IBM VAC++ debug memory support
55#include <malloc.h>
56#include <odin.h>
57
58// ---------------------------------------------------------------------------
59#ifdef __WATCOMC__
60//this doens't work with watcom because doubly declared somewhere :-(
61//extern unsigned long int WIN32API GetCurrentThreadId(void); // kernel32
62#else
63extern unsigned long int WIN32API GetCurrentThreadId(void); // kernel32
64#endif
65extern unsigned long int WIN32API dbg_GetThreadCallDepth(void); // kernel32
66extern void WIN32API dbg_IncThreadCallDepth(void); // kernel32
67extern void WIN32API dbg_DecThreadCallDepth(void); // kernel32
68extern void WIN32API dbg_ThreadPushCall(char *pszCaller);
69extern void WIN32API dbg_ThreadPopCall();
70extern char* WIN32API dbg_GetLastCallerName();
71
72
73
74// ---------------------------------------------------------------------------
75//SvL: Only check the heap very frequently when there are problems
76//#define DEBUG_ODINHEAP
77#ifdef DEBUG_ODINHEAP
78#define ODIN_HEAPCHECK() _heap_check()
79#else
80#define ODIN_HEAPCHECK()
81#endif
82
83
84// ---------------------------------------------------------------------------
85// PH: this is for profiling cumulative method call times
86#ifdef PROFILE
87
88#include <perfview.h>
89
90
91#define FNINIT \
92 LARGE_INTEGER liStart; \
93 LARGE_INTEGER liEnd; \
94 unsigned long ulElapsed; \
95 unsigned short sel;
96
97# define PROFILE_START(a) \
98 QueryPerformanceCounter(&liStart);
99
100
101# define PROFILE_STOP(a) \
102 QueryPerformanceCounter(&liEnd);\
103 if (liStart.LowPart > liEnd.LowPart) \
104 ulElapsed = 0xFFFFFFFF - liStart.LowPart + liEnd.LowPart; \
105 else \
106 ulElapsed = liEnd.LowPart - liStart.LowPart; \
107 \
108 PerfView_RegisterCall(dbg_GetLastCallerName(), a, ulElapsed); \
109 \
110 dprintf(("%s: %s %u ticks\n",\
111 pszOdinDebugChannel,\
112 a, \
113 ulElapsed));
114#else
115# define PROFILE_START(a)
116# define PROFILE_STOP(a)
117#endif
118
119
120
121#if defined(PROFILE) || defined(DEBUG)
122
123#ifndef FNINIT
124#define FNINIT \
125 unsigned short sel;
126#endif
127
128#define FNPROLOGUE(a) \
129 sel = GetFS(); \
130 dbg_ThreadPushCall(a); \
131 ODIN_HEAPCHECK(); \
132 PROFILE_START(a)
133
134#define FNEPILOGUE(a) \
135 PROFILE_STOP(a) \
136 ODIN_HEAPCHECK(); \
137 dbg_ThreadPopCall(); \
138 if (sel != GetFS()) { \
139 SetFS(sel); \
140 dprintf(("WARNING: FS: for thread %08xh corrupted by "a, GetCurrentThreadId())); \
141 }
142
143#endif
144
145
146#if defined(RELEASE)
147
148#define FNINIT
149#define FNPROLOGUE(a)
150#define FNEPILOGUE(a)
151
152#endif
153
154// check if all macros are defined
155#ifndef FNINIT
156#error FNINIT not defined: DEBUG, PROFILE, or RELEASE not specified
157#endif
158
159#ifndef FNPROLOGUE
160#error FNPROLOGUE not defined: DEBUG, PROFILE, or RELEASE not specified
161#endif
162
163#ifndef FNEPILOGUE
164#error FNEPILOGUE not defined: DEBUG, PROFILE, or RELEASE not specified
165#endif
166
167
168/****************************************************************************
169 * General Wrapper Macros (debug instrumented) *
170 ****************************************************************************/
171
172/* ---------- 0 parameters ---------- */
173#define ODINFUNCTION0(cRet,cName) \
174 cRet ODIN_INTERNAL ODIN_##cName (void); \
175 cRet WINAPI cName(void) \
176 { \
177 FNINIT \
178 cRet rc; \
179 dprintf(("%s: "#cRet" "#cName"()", \
180 pszOdinDebugChannel)); \
181 FNPROLOGUE(#cName) \
182 rc = ODIN_##cName(); \
183 FNEPILOGUE(#cName) \
184 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
185 pszOdinDebugChannel, \
186 rc)); \
187 return rc; \
188 } \
189 \
190 cRet ODIN_INTERNAL ODIN_##cName (void)
191
192
193#define ODINPROCEDURE0(cName) \
194 void ODIN_INTERNAL ODIN_##cName (void); \
195 void WINAPI cName(void) \
196 { \
197 FNINIT \
198 dprintf(("%s: void "#cName"()", \
199 pszOdinDebugChannel)); \
200 FNPROLOGUE(#cName) \
201 ODIN_##cName(); \
202 FNEPILOGUE(#cName) \
203 dprintf(("%s: void "#cName"() leave\n", \
204 pszOdinDebugChannel)); \
205 } \
206 \
207 void ODIN_INTERNAL ODIN_##cName (void)
208
209
210/* ---------- 1 parameters ---------- */
211#define ODINFUNCTION1(cRet,cName,t1,a1) \
212 cRet ODIN_INTERNAL ODIN_##cName (t1 a1); \
213 cRet WINAPI cName(t1 a1) \
214 { \
215 FNINIT \
216 cRet rc; \
217 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh)", \
218 pszOdinDebugChannel, \
219 a1)); \
220 FNPROLOGUE(#cName) \
221 rc = ODIN_##cName(a1); \
222 FNEPILOGUE(#cName) \
223 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
224 pszOdinDebugChannel, \
225 rc)); \
226 return rc; \
227 } \
228 \
229 cRet ODIN_INTERNAL ODIN_##cName (t1 a1)
230
231#define ODINPROCEDURE1(cName,t1,a1) \
232 void ODIN_INTERNAL ODIN_##cName (t1 a1); \
233 void WINAPI cName(t1 a1) \
234 { \
235 FNINIT \
236 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh)", \
237 pszOdinDebugChannel, \
238 a1)); \
239 FNPROLOGUE(#cName) \
240 ODIN_##cName(a1); \
241 FNEPILOGUE(#cName) \
242 dprintf(("%s: void "#cName"() leave\n", \
243 pszOdinDebugChannel)); \
244 } \
245 \
246 void ODIN_INTERNAL ODIN_##cName (t1 a1)
247
248
249/* ---------- 2 parameters ---------- */
250#define ODINFUNCTION2(cRet,cName,t1,a1,t2,a2) \
251 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2); \
252 cRet WINAPI cName(t1 a1,t2 a2) \
253 { \
254 FNINIT \
255 cRet rc; \
256 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh)", \
257 pszOdinDebugChannel, \
258 a1,a2)); \
259 FNPROLOGUE(#cName) \
260 rc = ODIN_##cName(a1,a2); \
261 FNEPILOGUE(#cName) \
262 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
263 pszOdinDebugChannel, \
264 rc)); \
265 return rc; \
266 } \
267 \
268 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
269
270#define ODINPROCEDURE2(cName,t1,a1,t2,a2) \
271 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2); \
272 void WINAPI cName(t1 a1,t2 a2) \
273 { \
274 FNINIT \
275 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh)", \
276 pszOdinDebugChannel, \
277 a1,a2)); \
278 FNPROLOGUE(#cName) \
279 ODIN_##cName(a1,a2); \
280 FNEPILOGUE(#cName) \
281 dprintf(("%s: void "#cName"() leave\n", \
282 pszOdinDebugChannel)); \
283 } \
284 \
285 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
286
287
288/* ---------- 3 parameters ---------- */
289#define ODINFUNCTION3(cRet,cName,t1,a1,t2,a2,t3,a3) \
290 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
291 cRet WINAPI cName(t1 a1,t2 a2,t3 a3) \
292 { \
293 FNINIT \
294 cRet rc; \
295 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)", \
296 pszOdinDebugChannel, \
297 a1,a2,a3)); \
298 FNPROLOGUE(#cName) \
299 rc = ODIN_##cName(a1,a2,a3); \
300 FNEPILOGUE(#cName) \
301 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
302 pszOdinDebugChannel, \
303 rc)); \
304 return rc; \
305 } \
306 \
307 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
308
309#define ODINPROCEDURE3(cName,t1,a1,t2,a2,t3,a3) \
310 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
311 void WINAPI cName(t1 a1,t2 a2,t3 a3) \
312 { \
313 FNINIT \
314 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)", \
315 pszOdinDebugChannel, \
316 a1,a2,a3)); \
317 FNPROLOGUE(#cName) \
318 ODIN_##cName(a1,a2,a3); \
319 FNEPILOGUE(#cName) \
320 dprintf(("%s: void "#cName"() leave\n", \
321 pszOdinDebugChannel)); \
322 } \
323 \
324 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
325
326
327/* ---------- 4 parameters ---------- */
328#define ODINFUNCTION4(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4) \
329 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
330 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
331 { \
332 FNINIT \
333 cRet rc; \
334 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh, "#t4" "#a4"=%08xh)", \
335 pszOdinDebugChannel, \
336 a1,a2,a3,a4)); \
337 FNPROLOGUE(#cName) \
338 rc = ODIN_##cName(a1,a2,a3,a4); \
339 FNEPILOGUE(#cName) \
340 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
341 pszOdinDebugChannel, \
342 rc)); \
343 return rc; \
344 } \
345 \
346 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
347
348#define ODINPROCEDURE4(cName,t1,a1,t2,a2,t3,a3,t4,a4) \
349 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
350 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
351 { \
352 FNINIT \
353 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh, "#t4" "#a4"=%08xh)", \
354 pszOdinDebugChannel, \
355 a1,a2,a3,a4)); \
356 FNPROLOGUE(#cName) \
357 ODIN_##cName(a1,a2,a3,a4); \
358 FNEPILOGUE(#cName) \
359 dprintf(("%s: void "#cName"() leave\n", \
360 pszOdinDebugChannel)); \
361 } \
362 \
363 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
364
365
366/* ---------- 5 parameters ---------- */
367#define ODINFUNCTION5(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
368 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
369 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
370 { \
371 FNINIT \
372 cRet rc; \
373 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh" \
374 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh)", \
375 pszOdinDebugChannel, \
376 a1,a2,a3,a4,a5)); \
377 FNPROLOGUE(#cName) \
378 rc = ODIN_##cName(a1,a2,a3,a4,a5); \
379 FNEPILOGUE(#cName) \
380 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
381 pszOdinDebugChannel, \
382 rc)); \
383 return rc; \
384 } \
385 \
386 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
387
388#define ODINPROCEDURE5(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
389 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
390 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
391 { \
392 FNINIT \
393 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
394 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh)", \
395 pszOdinDebugChannel, \
396 a1,a2,a3,a4,a5)); \
397 FNPROLOGUE(#cName) \
398 ODIN_##cName(a1,a2,a3,a4,a5); \
399 FNEPILOGUE(#cName) \
400 dprintf(("%s: void "#cName"() leave\n", \
401 pszOdinDebugChannel)); \
402 } \
403 \
404 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
405
406
407/* ---------- 6 parameters ---------- */
408#define ODINFUNCTION6(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
409 cRet ODIN_INTERNAL ODIN_##cName (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 FNINIT \
413 cRet rc; \
414 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
415 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh)", \
416 pszOdinDebugChannel, \
417 a1,a2,a3,a4,a5,a6)); \
418 FNPROLOGUE(#cName) \
419 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6); \
420 FNEPILOGUE(#cName) \
421 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
422 pszOdinDebugChannel, \
423 rc)); \
424 return rc; \
425 } \
426 \
427 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
428
429#define ODINPROCEDURE6(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
430 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
431 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
432 { \
433 FNINIT \
434 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
435 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh)", \
436 pszOdinDebugChannel, \
437 a1,a2,a3,a4,a5,a6)); \
438 FNPROLOGUE(#cName) \
439 ODIN_##cName(a1,a2,a3,a4,a5,a6); \
440 FNEPILOGUE(#cName) \
441 dprintf(("%s: void "#cName"() leave\n", \
442 pszOdinDebugChannel)); \
443 } \
444 \
445 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
446
447
448/* ---------- 7 parameters ---------- */
449#define ODINFUNCTION7(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
450 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
451 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
452 { \
453 FNINIT \
454 cRet rc; \
455 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
456 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh)", \
457 pszOdinDebugChannel, \
458 a1,a2,a3,a4,a5,a6,a7)); \
459 FNPROLOGUE(#cName) \
460 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
461 FNEPILOGUE(#cName) \
462 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
463 pszOdinDebugChannel, \
464 rc)); \
465 return rc; \
466 } \
467 \
468 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
469
470#define ODINPROCEDURE7(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
471 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
472 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
473 { \
474 FNINIT \
475 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
476 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh)", \
477 pszOdinDebugChannel, \
478 a1,a2,a3,a4,a5,a6,a7)); \
479 FNPROLOGUE(#cName) \
480 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
481 FNEPILOGUE(#cName) \
482 dprintf(("%s: void "#cName"() leave\n", \
483 pszOdinDebugChannel)); \
484 } \
485 \
486 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
487
488
489/* ---------- 8 parameters ---------- */
490#define ODINFUNCTION8(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
491 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
492 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
493 { \
494 FNINIT \
495 cRet rc; \
496 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
497 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
498 ", "#t8" "#a8"=%08xh)", \
499 pszOdinDebugChannel, \
500 a1,a2,a3,a4,a5,a6,a7,a8)); \
501 FNPROLOGUE(#cName) \
502 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
503 FNEPILOGUE(#cName) \
504 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
505 pszOdinDebugChannel, \
506 rc)); \
507 return rc; \
508 } \
509 \
510 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
511
512#define ODINPROCEDURE8(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
513 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
514 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
515 { \
516 FNINIT \
517 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
518 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
519 ", "#t8" "#a8"=%08xh)", \
520 pszOdinDebugChannel, \
521 a1,a2,a3,a4,a5,a6,a7,a8)); \
522 FNPROLOGUE(#cName) \
523 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
524 FNEPILOGUE(#cName) \
525 dprintf(("%s: void "#cName"() leave\n", \
526 pszOdinDebugChannel)); \
527 } \
528 \
529 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
530
531
532/* ---------- 9 parameters ---------- */
533#define ODINFUNCTION9(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
534 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
535 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
536 { \
537 FNINIT \
538 cRet rc; \
539 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
540 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
541 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh)", \
542 pszOdinDebugChannel, \
543 a1,a2,a3,a4,a5,a6,a7,a8,a9)); \
544 FNPROLOGUE(#cName) \
545 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
546 FNEPILOGUE(#cName) \
547 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
548 pszOdinDebugChannel, \
549 rc)); \
550 return rc; \
551 } \
552 \
553 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
554
555#define ODINPROCEDURE9(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
556 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
557 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
558 { \
559 FNINIT \
560 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
561 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
562 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh)", \
563 pszOdinDebugChannel, \
564 a1,a2,a3,a4,a5,a6,a7,a8,a9)); \
565 FNPROLOGUE(#cName) \
566 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
567 FNEPILOGUE(#cName) \
568 dprintf(("%s: void "#cName"() leave\n", \
569 pszOdinDebugChannel)); \
570 } \
571 \
572 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
573
574
575/* ---------- 10 parameters ---------- */
576#define ODINFUNCTION10(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
577 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); \
578 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
579 { \
580 FNINIT \
581 cRet rc; \
582 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
583 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
584 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh)", \
585 pszOdinDebugChannel, \
586 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10));\
587 FNPROLOGUE(#cName) \
588 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
589 FNEPILOGUE(#cName) \
590 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
591 pszOdinDebugChannel, \
592 rc)); \
593 return rc; \
594 } \
595 \
596 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)
597
598#define ODINPROCEDURE10(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
599 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); \
600 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
601 { \
602 FNINIT \
603 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
604 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
605 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh)", \
606 pszOdinDebugChannel, \
607 a1,a2,a3)); \
608 FNPROLOGUE(#cName) \
609 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
610 FNEPILOGUE(#cName) \
611 dprintf(("%s: void "#cName"() leave\n", \
612 pszOdinDebugChannel)); \
613 } \
614 \
615 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)
616
617
618/* ---------- 11 parameters ---------- */
619#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) \
620 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); \
621 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) \
622 { \
623 FNINIT \
624 cRet rc; \
625 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
626 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
627 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh)", \
628 pszOdinDebugChannel, \
629 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)); \
630 FNPROLOGUE(#cName) \
631 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
632 FNEPILOGUE(#cName) \
633 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
634 pszOdinDebugChannel, \
635 rc)); \
636 return rc; \
637 } \
638 \
639 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)
640
641#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) \
642 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); \
643 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) \
644 { \
645 FNINIT \
646 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
647 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
648 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh)", \
649 pszOdinDebugChannel, \
650 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)); \
651 FNPROLOGUE(#cName) \
652 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
653 FNEPILOGUE(#cName) \
654 dprintf(("%s: void "#cName"() leave\n", \
655 pszOdinDebugChannel)); \
656 } \
657 \
658 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)
659
660
661/* ---------- 12 parameters ---------- */
662#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) \
663 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); \
664 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) \
665 { \
666 FNINIT \
667 cRet rc; \
668 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
669 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
670 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
671 ", "#t12" "#a12"=%08xh)", \
672 pszOdinDebugChannel, \
673 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)); \
674 FNPROLOGUE(#cName) \
675 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
676 FNEPILOGUE(#cName) \
677 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
678 pszOdinDebugChannel, \
679 rc)); \
680 return rc; \
681 } \
682 \
683 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)
684
685#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) \
686 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); \
687 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) \
688 { \
689 FNINIT \
690 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
691 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
692 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
693 ", "#t12" "#a12"=%08xh)", \
694 pszOdinDebugChannel, \
695 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)); \
696 FNPROLOGUE(#cName) \
697 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
698 FNEPILOGUE(#cName) \
699 dprintf(("%s: void "#cName"() leave\n", \
700 pszOdinDebugChannel)); \
701 } \
702 \
703 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)
704
705
706/* ---------- 13 parameters ---------- */
707#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) \
708 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); \
709 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) \
710 { \
711 FNINIT \
712 cRet rc; \
713 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
714 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
715 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
716 ", "#t12" "#a12"=%08xh, "#t13" "#a13"=%08xh)", \
717 pszOdinDebugChannel, \
718 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)); \
719 FNPROLOGUE(#cName) \
720 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13); \
721 FNEPILOGUE(#cName) \
722 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
723 pszOdinDebugChannel, \
724 rc)); \
725 return rc; \
726 } \
727 \
728 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)
729
730#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) \
731 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); \
732 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) \
733 { \
734 FNINIT \
735 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
736 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
737 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
738 ", "#t12" "#a12"=%08xh, "#t13" "#a13"=%08xh, )", \
739 pszOdinDebugChannel, \
740 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)); \
741 FNPROLOGUE(#cName) \
742 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13); \
743 FNEPILOGUE(#cName) \
744 dprintf(("%s: void "#cName"() leave\n", \
745 pszOdinDebugChannel)); \
746 } \
747 \
748 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)
749
750
751/* ---------- 14 parameters ---------- */
752#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) \
753 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); \
754 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) \
755 { \
756 FNINIT \
757 cRet rc; \
758 dprintf(("%s: "#cRet" "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
759 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
760 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
761 ", "#t12" "#a12"=%08xh, "#t13" "#a13"=%08xh, "#t14" "#a14"=%08xh)", \
762 pszOdinDebugChannel, \
763 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14)); \
764 FNPROLOGUE(#cName) \
765 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14); \
766 FNEPILOGUE(#cName) \
767 dprintf(("%s: "#cRet" "#cName"() leave = %08xh\n", \
768 pszOdinDebugChannel, \
769 rc)); \
770 return rc; \
771 } \
772 \
773 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)
774
775#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) \
776 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); \
777 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) \
778 { \
779 FNINIT \
780 dprintf(("%s: void "#cName"("#t1" "#a1"=%08xh, "#t2" "#a2"=%08xh, "#t3" "#a3"=%08xh)" \
781 ", "#t4" "#a4"=%08xh, "#t5" "#a5"=%08xh, "#t6" "#a6"=%08xh, "#t7" "#a7"=%08xh" \
782 ", "#t8" "#a8"=%08xh, "#t9" "#a9"=%08xh, "#t10" "#a10"=%08xh, "#t11" "#a11"=%08xh" \
783 ", "#t12" "#a12"=%08xh, "#t13" "#a13"=%08xh, "#t14" "#a14"=%08xh)", \
784 pszOdinDebugChannel, \
785 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14)); \
786 FNPROLOGUE(#cName) \
787 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14); \
788 FNEPILOGUE(#cName) \
789 dprintf(("%s: void "#cName"() leave\n", \
790 pszOdinDebugChannel)); \
791 } \
792 \
793 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)
794
795
796#else
797
798/****************************************************************************
799 * General Wrapper Macros *
800 ****************************************************************************/
801
802#define FNINIT \
803 unsigned short sel;
804
805#define FNPROLOGUE(a) \
806 sel = GetFS();
807
808#define FNEPILOGUE(a) \
809 SetFS(sel);
810
811#define ODINFUNCTION0 ODINFUNCTIONNODBG0
812#define ODINFUNCTION1 ODINFUNCTIONNODBG1
813#define ODINFUNCTION2 ODINFUNCTIONNODBG2
814#define ODINFUNCTION3 ODINFUNCTIONNODBG3
815#define ODINFUNCTION4 ODINFUNCTIONNODBG4
816#define ODINFUNCTION5 ODINFUNCTIONNODBG5
817#define ODINFUNCTION6 ODINFUNCTIONNODBG6
818#define ODINFUNCTION7 ODINFUNCTIONNODBG7
819#define ODINFUNCTION8 ODINFUNCTIONNODBG8
820#define ODINFUNCTION9 ODINFUNCTIONNODBG9
821#define ODINFUNCTION10 ODINFUNCTIONNODBG10
822#define ODINFUNCTION11 ODINFUNCTIONNODBG11
823#define ODINFUNCTION12 ODINFUNCTIONNODBG12
824#define ODINFUNCTION13 ODINFUNCTIONNODBG13
825#define ODINFUNCTION14 ODINFUNCTIONNODBG14
826
827#define ODINPROCEDURE0 ODINPROCEDURENODBG0
828#define ODINPROCEDURE1 ODINPROCEDURENODBG1
829#define ODINPROCEDURE2 ODINPROCEDURENODBG2
830#define ODINPROCEDURE3 ODINPROCEDURENODBG3
831#define ODINPROCEDURE4 ODINPROCEDURENODBG4
832#define ODINPROCEDURE5 ODINPROCEDURENODBG5
833#define ODINPROCEDURE6 ODINPROCEDURENODBG6
834#define ODINPROCEDURE7 ODINPROCEDURENODBG7
835#define ODINPROCEDURE8 ODINPROCEDURENODBG8
836#define ODINPROCEDURE9 ODINPROCEDURENODBG9
837#define ODINPROCEDURE10 ODINPROCEDURENODBG10
838#define ODINPROCEDURE11 ODINPROCEDURENODBG11
839#define ODINPROCEDURE12 ODINPROCEDURENODBG12
840#define ODINPROCEDURE13 ODINPROCEDURENODBG13
841#define ODINPROCEDURE14 ODINPROCEDURENODBG14
842
843#endif
844
845/****************************************************************************
846 * General Wrapper Macros *
847 ****************************************************************************/
848
849
850/* ---------- 0 parameters ---------- */
851#define ODINFUNCTIONNODBG0(cRet,cName) \
852 cRet ODIN_INTERNAL ODIN_##cName (void); \
853 cRet WINAPI cName(void) \
854 { \
855 FNINIT \
856 cRet rc; \
857 FNPROLOGUE(#cName) \
858 rc = ODIN_##cName(); \
859 FNEPILOGUE(#cName) \
860 return rc; \
861 } \
862 \
863 cRet ODIN_INTERNAL ODIN_##cName (void)
864
865
866#define ODINPROCEDURENODBG0(cName) \
867 void ODIN_INTERNAL ODIN_##cName (void); \
868 void WINAPI cName(void) \
869 { \
870 FNINIT \
871 FNPROLOGUE(#cName) \
872 ODIN_##cName(); \
873 FNEPILOGUE(#cName) \
874 } \
875 \
876 void ODIN_INTERNAL ODIN_##cName (void)
877
878
879/* ---------- 1 parameters ---------- */
880#define ODINFUNCTIONNODBG1(cRet,cName,t1,a1) \
881 cRet ODIN_INTERNAL ODIN_##cName (t1 a1); \
882 cRet WINAPI cName(t1 a1) \
883 { \
884 FNINIT \
885 cRet rc; \
886 FNPROLOGUE(#cName) \
887 rc = ODIN_##cName(a1); \
888 FNEPILOGUE(#cName) \
889 return rc; \
890 } \
891 \
892 cRet ODIN_INTERNAL ODIN_##cName (t1 a1)
893
894#define ODINPROCEDURENODBG1(cName,t1,a1) \
895 void ODIN_INTERNAL ODIN_##cName (t1 a1); \
896 void WINAPI cName(t1 a1) \
897 { \
898 FNINIT \
899 FNPROLOGUE(#cName) \
900 ODIN_##cName(a1); \
901 FNEPILOGUE(#cName) \
902 } \
903 \
904 void ODIN_INTERNAL ODIN_##cName (t1 a1)
905
906
907/* ---------- 2 parameters ---------- */
908#define ODINFUNCTIONNODBG2(cRet,cName,t1,a1,t2,a2) \
909 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2); \
910 cRet WINAPI cName(t1 a1,t2 a2) \
911 { \
912 FNINIT \
913 cRet rc; \
914 FNPROLOGUE(#cName) \
915 rc = ODIN_##cName(a1,a2); \
916 FNEPILOGUE(#cName) \
917 return rc; \
918 } \
919 \
920 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
921
922#define ODINPROCEDURENODBG2(cName,t1,a1,t2,a2) \
923 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2); \
924 void WINAPI cName(t1 a1,t2 a2) \
925 { \
926 FNINIT \
927 FNPROLOGUE(#cName) \
928 ODIN_##cName(a1,a2); \
929 FNEPILOGUE(#cName) \
930 } \
931 \
932 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2)
933
934
935/* ---------- 3 parameters ---------- */
936#define ODINFUNCTIONNODBG3(cRet,cName,t1,a1,t2,a2,t3,a3) \
937 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
938 cRet WINAPI cName(t1 a1,t2 a2,t3 a3) \
939 { \
940 FNINIT \
941 cRet rc; \
942 FNPROLOGUE(#cName) \
943 rc = ODIN_##cName(a1,a2,a3); \
944 FNEPILOGUE(#cName) \
945 return rc; \
946 } \
947 \
948 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
949
950#define ODINPROCEDURENODBG3(cName,t1,a1,t2,a2,t3,a3) \
951 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3); \
952 void WINAPI cName(t1 a1,t2 a2,t3 a3) \
953 { \
954 FNINIT \
955 FNPROLOGUE(#cName) \
956 ODIN_##cName(a1,a2,a3); \
957 FNEPILOGUE(#cName) \
958 } \
959 \
960 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3)
961
962
963/* ---------- 4 parameters ---------- */
964#define ODINFUNCTIONNODBG4(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4) \
965 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
966 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
967 { \
968 FNINIT \
969 cRet rc; \
970 FNPROLOGUE(#cName) \
971 rc = ODIN_##cName(a1,a2,a3,a4); \
972 FNEPILOGUE(#cName) \
973 return rc; \
974 } \
975 \
976 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
977
978#define ODINPROCEDURENODBG4(cName,t1,a1,t2,a2,t3,a3,t4,a4) \
979 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4); \
980 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4) \
981 { \
982 FNINIT \
983 FNPROLOGUE(#cName) \
984 ODIN_##cName(a1,a2,a3,a4); \
985 FNEPILOGUE(#cName) \
986 } \
987 \
988 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4)
989
990
991/* ---------- 5 parameters ---------- */
992#define ODINFUNCTIONNODBG5(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
993 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
994 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
995 { \
996 FNINIT \
997 cRet rc; \
998 FNPROLOGUE(#cName) \
999 rc = ODIN_##cName(a1,a2,a3,a4,a5); \
1000 FNEPILOGUE(#cName) \
1001 return rc; \
1002 } \
1003 \
1004 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
1005
1006#define ODINPROCEDURENODBG5(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \
1007 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5); \
1008 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5) \
1009 { \
1010 FNINIT \
1011 FNPROLOGUE(#cName) \
1012 ODIN_##cName(a1,a2,a3,a4,a5); \
1013 FNEPILOGUE(#cName) \
1014 } \
1015 \
1016 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5)
1017
1018
1019/* ---------- 6 parameters ---------- */
1020#define ODINFUNCTIONNODBG6(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
1021 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
1022 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
1023 { \
1024 FNINIT \
1025 cRet rc; \
1026 FNPROLOGUE(#cName) \
1027 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6); \
1028 FNEPILOGUE(#cName) \
1029 return rc; \
1030 } \
1031 \
1032 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
1033
1034#define ODINPROCEDURENODBG6(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6) \
1035 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6); \
1036 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6) \
1037 { \
1038 FNINIT \
1039 FNPROLOGUE(#cName) \
1040 ODIN_##cName(a1,a2,a3,a4,a5,a6); \
1041 FNEPILOGUE(#cName) \
1042 } \
1043 \
1044 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6)
1045
1046
1047/* ---------- 7 parameters ---------- */
1048#define ODINFUNCTIONNODBG7(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
1049 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
1050 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
1051 { \
1052 FNINIT \
1053 cRet rc; \
1054 FNPROLOGUE(#cName) \
1055 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
1056 FNEPILOGUE(#cName) \
1057 return rc; \
1058 } \
1059 \
1060 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
1061
1062#define ODINPROCEDURENODBG7(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \
1063 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7); \
1064 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7) \
1065 { \
1066 FNINIT \
1067 FNPROLOGUE(#cName) \
1068 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7); \
1069 FNEPILOGUE(#cName) \
1070 } \
1071 \
1072 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7)
1073
1074
1075/* ---------- 8 parameters ---------- */
1076#define ODINFUNCTIONNODBG8(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
1077 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
1078 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
1079 { \
1080 FNINIT \
1081 cRet rc; \
1082 FNPROLOGUE(#cName) \
1083 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
1084 FNEPILOGUE(#cName) \
1085 return rc; \
1086 } \
1087 \
1088 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
1089
1090#define ODINPROCEDURENODBG8(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8) \
1091 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8); \
1092 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8) \
1093 { \
1094 FNINIT \
1095 FNPROLOGUE(#cName) \
1096 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8); \
1097 FNEPILOGUE(#cName) \
1098 } \
1099 \
1100 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8)
1101
1102
1103/* ---------- 9 parameters ---------- */
1104#define ODINFUNCTIONNODBG9(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
1105 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
1106 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
1107 { \
1108 FNINIT \
1109 cRet rc; \
1110 FNPROLOGUE(#cName) \
1111 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
1112 FNEPILOGUE(#cName) \
1113 return rc; \
1114 } \
1115 \
1116 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
1117
1118#define ODINPROCEDURENODBG9(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9) \
1119 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9); \
1120 void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9) \
1121 { \
1122 FNINIT \
1123 FNPROLOGUE(#cName) \
1124 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9); \
1125 FNEPILOGUE(#cName) \
1126 } \
1127 \
1128 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9)
1129
1130
1131/* ---------- 10 parameters ---------- */
1132#define ODINFUNCTIONNODBG10(cRet,cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10) \
1133 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); \
1134 cRet WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10) \
1135 { \
1136 FNINIT \
1137 cRet rc; \
1138 FNPROLOGUE(#cName) \
1139 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
1140 FNEPILOGUE(#cName) \
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 ODINPROCEDURENODBG10(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 FNINIT \
1151 FNPROLOGUE(#cName) \
1152 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); \
1153 FNEPILOGUE(#cName) \
1154 } \
1155 \
1156 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)
1157
1158
1159/* ---------- 11 parameters ---------- */
1160#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) \
1161 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); \
1162 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) \
1163 { \
1164 FNINIT \
1165 cRet rc; \
1166 FNPROLOGUE(#cName) \
1167 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
1168 FNEPILOGUE(#cName) \
1169 return rc; \
1170 } \
1171 \
1172 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)
1173
1174#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) \
1175 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); \
1176 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) \
1177 { \
1178 FNINIT \
1179 FNPROLOGUE(#cName) \
1180 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); \
1181 FNEPILOGUE(#cName) \
1182 } \
1183 \
1184 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)
1185
1186
1187/* ---------- 12 parameters ---------- */
1188#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) \
1189 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); \
1190 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) \
1191 { \
1192 FNINIT \
1193 cRet rc; \
1194 FNPROLOGUE(#cName) \
1195 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
1196 FNEPILOGUE(#cName) \
1197 return rc; \
1198 } \
1199 \
1200 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)
1201
1202#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) \
1203 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); \
1204 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) \
1205 { \
1206 FNINIT \
1207 FNPROLOGUE(#cName) \
1208 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); \
1209 FNEPILOGUE(#cName) \
1210 } \
1211 \
1212 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)
1213
1214
1215/* ---------- 13 parameters ---------- */
1216#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) \
1217 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); \
1218 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) \
1219 { \
1220 FNINIT \
1221 cRet rc; \
1222 FNPROLOGUE(#cName) \
1223 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13); \
1224 FNEPILOGUE(#cName) \
1225 return rc; \
1226 } \
1227 \
1228 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)
1229
1230#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) \
1231 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); \
1232 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) \
1233 { \
1234 FNINIT \
1235 FNPROLOGUE(#cName) \
1236 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13); \
1237 FNEPILOGUE(#cName) \
1238 } \
1239 \
1240 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)
1241
1242
1243/* ---------- 14 parameters ---------- */
1244#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) \
1245 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); \
1246 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) \
1247 { \
1248 FNINIT \
1249 cRet rc; \
1250 FNPROLOGUE(#cName) \
1251 rc = ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14); \
1252 FNEPILOGUE(#cName) \
1253 return rc; \
1254 } \
1255 \
1256 cRet ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11,t12 a12,t13 a13,t14 a14)
1257
1258#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) \
1259 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); \
1260 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) \
1261 { \
1262 FNINIT \
1263 FNPROLOGUE(#cName) \
1264 ODIN_##cName(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14); \
1265 FNEPILOGUE(#cName) \
1266 } \
1267 \
1268 void ODIN_INTERNAL ODIN_##cName (t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11,t12 a12,t13 a13,t14 a14)
1269
1270#endif /* _ODINWRAP_H_ */
Note: See TracBrowser for help on using the repository browser.