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