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