source: trunk/include/odinwrap.h@ 1659

Last change on this file since 1659 was 1642, checked in by sandervl, 26 years ago

ODIN_EXTERN added

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