source: trunk/include/odinwrap.h@ 488

Last change on this file since 488 was 484, checked in by phaller, 26 years ago

Fix: update

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