Resurrected native codesetslib from r27301
[cake.git] / workbench / libs / codesetslib / include / codesets_68k.c
blobe81a8018377c26a26456e630e64f8cbf97bf3321
1 /*
2 ** This file was automatically generated by fdtrans 51.17.
3 ** Do not edit it by hand. Instead, edit the sfd file
4 ** that was used to generate this file
5 */
7 #ifdef __USE_INLINE__
8 #undef __USE_INLINE__
9 #endif
10 #ifndef __NOGLOBALIFACE__
11 #define __NOGLOBALIFACE__
12 #endif
14 #include <exec/interfaces.h>
15 #include <exec/libraries.h>
16 #include <exec/emulation.h>
17 #include <interfaces/exec.h>
18 #include <interfaces/codesets.h>
19 #include <proto/codesets.h>
22 static inline int8 convert_int8 (uint32 x) { return x; }
23 static inline int16 convert_int16(uint32 x) { return x; }
26 STATIC struct Library * stub_OpenPPC(ULONG *regarray)
28 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
29 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
30 struct LibraryManagerInterface *Self = (struct LibraryManagerInterface *) ExtLib->ILibrary;
32 return Self->Open(0);
34 STATIC CONST struct EmuTrap stub_Open = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_OpenPPC };
36 STATIC APTR stub_ClosePPC(ULONG *regarray)
38 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
39 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
40 struct LibraryManagerInterface *Self = (struct LibraryManagerInterface *) ExtLib->ILibrary;
42 return Self->Close();
44 STATIC CONST struct EmuTrap stub_Close = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_ClosePPC };
46 STATIC APTR stub_ExpungePPC(ULONG *regarray __attribute__((unused)))
48 return NULL;
50 STATIC CONST struct EmuTrap stub_Expunge = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_ExpungePPC };
52 STATIC ULONG stub_ReservedPPC(ULONG *regarray __attribute__((unused)))
54 return 0UL;
56 STATIC CONST struct EmuTrap stub_Reserved = { TRAPINST, TRAPTYPE, stub_ReservedPPC };
58 static ULONG stub_CodesetsConvertUTF32toUTF16PPC(ULONG *regarray)
60 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
61 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
62 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
64 return Self->CodesetsConvertUTF32toUTF16(
65 (const UTF32 **)regarray[8],
66 (const UTF32 *)regarray[9],
67 (UTF16 **)regarray[10],
68 (UTF16 *)regarray[11],
69 (ULONG)regarray[0]
72 STATIC CONST struct EmuTrap stub_CodesetsConvertUTF32toUTF16 = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsConvertUTF32toUTF16PPC };
74 static ULONG stub_CodesetsConvertUTF16toUTF32PPC(ULONG *regarray)
76 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
77 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
78 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
80 return Self->CodesetsConvertUTF16toUTF32(
81 (const UTF16 **)regarray[8],
82 (const UTF16 *)regarray[9],
83 (UTF32 **)regarray[10],
84 (UTF32 *)regarray[11],
85 (ULONG)regarray[0]
88 STATIC CONST struct EmuTrap stub_CodesetsConvertUTF16toUTF32 = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsConvertUTF16toUTF32PPC };
90 static ULONG stub_CodesetsConvertUTF16toUTF8PPC(ULONG *regarray)
92 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
93 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
94 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
96 return Self->CodesetsConvertUTF16toUTF8(
97 (const UTF16 **)regarray[8],
98 (const UTF16 *)regarray[9],
99 (UTF8 **)regarray[10],
100 (UTF8 *)regarray[11],
101 (ULONG)regarray[0]
104 STATIC CONST struct EmuTrap stub_CodesetsConvertUTF16toUTF8 = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsConvertUTF16toUTF8PPC };
106 static BOOL stub_CodesetsIsLegalUTF8PPC(ULONG *regarray)
108 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
109 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
110 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
112 return Self->CodesetsIsLegalUTF8(
113 (const UTF8 *)regarray[8],
114 (ULONG)regarray[0]
117 STATIC CONST struct EmuTrap stub_CodesetsIsLegalUTF8 = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsIsLegalUTF8PPC };
119 static BOOL stub_CodesetsIsLegalUTF8SequencePPC(ULONG *regarray)
121 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
122 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
123 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
125 return Self->CodesetsIsLegalUTF8Sequence(
126 (const UTF8 *)regarray[8],
127 (const UTF8 *)regarray[9]
130 STATIC CONST struct EmuTrap stub_CodesetsIsLegalUTF8Sequence = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsIsLegalUTF8SequencePPC };
132 static ULONG stub_CodesetsConvertUTF8toUTF16PPC(ULONG *regarray)
134 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
135 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
136 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
138 return Self->CodesetsConvertUTF8toUTF16(
139 (const UTF8 **)regarray[8],
140 (const UTF8 *)regarray[9],
141 (UTF16 **)regarray[10],
142 (UTF16 *)regarray[11],
143 (ULONG)regarray[0]
146 STATIC CONST struct EmuTrap stub_CodesetsConvertUTF8toUTF16 = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsConvertUTF8toUTF16PPC };
148 static ULONG stub_CodesetsConvertUTF32toUTF8PPC(ULONG *regarray)
150 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
151 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
152 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
154 return Self->CodesetsConvertUTF32toUTF8(
155 (const UTF32 **)regarray[8],
156 (const UTF32 *)regarray[9],
157 (UTF8 **)regarray[10],
158 (UTF8 *)regarray[11],
159 (ULONG)regarray[0]
162 STATIC CONST struct EmuTrap stub_CodesetsConvertUTF32toUTF8 = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsConvertUTF32toUTF8PPC };
164 static ULONG stub_CodesetsConvertUTF8toUTF32PPC(ULONG *regarray)
166 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
167 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
168 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
170 return Self->CodesetsConvertUTF8toUTF32(
171 (const UTF8 **)regarray[8],
172 (const UTF8 *)regarray[9],
173 (UTF32 **)regarray[10],
174 (UTF32 *)regarray[11],
175 (ULONG)regarray[0]
178 STATIC CONST struct EmuTrap stub_CodesetsConvertUTF8toUTF32 = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsConvertUTF8toUTF32PPC };
180 static struct codeset * stub_CodesetsSetDefaultAPPC(ULONG *regarray)
182 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
183 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
184 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
186 return Self->CodesetsSetDefaultA(
187 (STRPTR)regarray[8],
188 (struct TagItem *)regarray[9]
191 STATIC CONST struct EmuTrap stub_CodesetsSetDefaultA = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsSetDefaultAPPC };
193 static void stub_CodesetsFreeAPPC(ULONG *regarray)
195 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
196 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
197 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
199 Self->CodesetsFreeA(
200 (APTR)regarray[8],
201 (struct TagItem *)regarray[9]
204 STATIC CONST struct EmuTrap stub_CodesetsFreeA = { TRAPINST, TRAPTYPENR, (ULONG (*)(ULONG *))stub_CodesetsFreeAPPC };
206 static STRPTR * stub_CodesetsSupportedAPPC(ULONG *regarray)
208 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
209 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
210 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
212 return Self->CodesetsSupportedA(
213 (struct TagItem *)regarray[8]
216 STATIC CONST struct EmuTrap stub_CodesetsSupportedA = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsSupportedAPPC };
218 static struct codeset * stub_CodesetsFindAPPC(ULONG *regarray)
220 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
221 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
222 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
224 return Self->CodesetsFindA(
225 (STRPTR)regarray[8],
226 (struct TagItem *)regarray[9]
229 STATIC CONST struct EmuTrap stub_CodesetsFindA = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsFindAPPC };
231 static struct codeset * stub_CodesetsFindBestAPPC(ULONG *regarray)
233 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
234 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
235 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
237 return Self->CodesetsFindBestA(
238 (struct TagItem *)regarray[8]
241 STATIC CONST struct EmuTrap stub_CodesetsFindBestA = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsFindBestAPPC };
243 static ULONG stub_CodesetsUTF8LenPPC(ULONG *regarray)
245 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
246 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
247 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
249 return Self->CodesetsUTF8Len(
250 (const UTF8 *)regarray[8]
253 STATIC CONST struct EmuTrap stub_CodesetsUTF8Len = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsUTF8LenPPC };
255 static STRPTR stub_CodesetsUTF8ToStrAPPC(ULONG *regarray)
257 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
258 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
259 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
261 return Self->CodesetsUTF8ToStrA(
262 (struct TagItem *)regarray[8]
265 STATIC CONST struct EmuTrap stub_CodesetsUTF8ToStrA = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsUTF8ToStrAPPC };
267 static UTF8 * stub_CodesetsUTF8CreateAPPC(ULONG *regarray)
269 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
270 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
271 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
273 return Self->CodesetsUTF8CreateA(
274 (struct TagItem *)regarray[8]
277 STATIC CONST struct EmuTrap stub_CodesetsUTF8CreateA = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsUTF8CreateAPPC };
279 static ULONG stub_CodesetsEncodeB64APPC(ULONG *regarray)
281 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
282 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
283 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
285 return Self->CodesetsEncodeB64A(
286 (struct TagItem *)regarray[8]
289 STATIC CONST struct EmuTrap stub_CodesetsEncodeB64A = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsEncodeB64APPC };
291 static ULONG stub_CodesetsDecodeB64APPC(ULONG *regarray)
293 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
294 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
295 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
297 return Self->CodesetsDecodeB64A(
298 (struct TagItem *)regarray[8]
301 STATIC CONST struct EmuTrap stub_CodesetsDecodeB64A = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsDecodeB64APPC };
303 static ULONG stub_CodesetsStrLenAPPC(ULONG *regarray)
305 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
306 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
307 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
309 return Self->CodesetsStrLenA(
310 (STRPTR)regarray[8],
311 (struct TagItem *)regarray[9]
314 STATIC CONST struct EmuTrap stub_CodesetsStrLenA = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsStrLenAPPC };
316 static BOOL stub_CodesetsIsValidUTF8PPC(ULONG *regarray)
318 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
319 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
320 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
322 return Self->CodesetsIsValidUTF8(
323 (STRPTR)regarray[8]
326 STATIC CONST struct EmuTrap stub_CodesetsIsValidUTF8 = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsIsValidUTF8PPC };
328 static void stub_CodesetsFreeVecPooledAPPC(ULONG *regarray)
330 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
331 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
332 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
334 Self->CodesetsFreeVecPooledA(
335 (APTR)regarray[8],
336 (APTR)regarray[9],
337 (struct TagItem *)regarray[10]
340 STATIC CONST struct EmuTrap stub_CodesetsFreeVecPooledA = { TRAPINST, TRAPTYPENR, (ULONG (*)(ULONG *))stub_CodesetsFreeVecPooledAPPC };
342 static STRPTR stub_CodesetsConvertStrAPPC(ULONG *regarray)
344 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
345 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
346 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
348 return Self->CodesetsConvertStrA(
349 (struct TagItem *)regarray[8]
352 STATIC CONST struct EmuTrap stub_CodesetsConvertStrA = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsConvertStrAPPC };
354 static struct codesetList * stub_CodesetsListCreateAPPC(ULONG *regarray)
356 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
357 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
358 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
360 return Self->CodesetsListCreateA(
361 (struct TagItem *)regarray[8]
364 STATIC CONST struct EmuTrap stub_CodesetsListCreateA = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsListCreateAPPC };
366 static BOOL stub_CodesetsListDeleteAPPC(ULONG *regarray)
368 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
369 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
370 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
372 return Self->CodesetsListDeleteA(
373 (struct TagItem *)regarray[8]
376 STATIC CONST struct EmuTrap stub_CodesetsListDeleteA = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsListDeleteAPPC };
378 static BOOL stub_CodesetsListAddAPPC(ULONG *regarray)
380 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
381 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
382 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
384 return Self->CodesetsListAddA(
385 (struct codesetList *)regarray[8],
386 (struct TagItem *)regarray[9]
389 STATIC CONST struct EmuTrap stub_CodesetsListAddA = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsListAddAPPC };
391 static BOOL stub_CodesetsListRemoveAPPC(ULONG *regarray)
393 struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
394 struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((ULONG)Base + Base->lib_PosSize);
395 struct CodesetsIFace *Self = (struct CodesetsIFace *) ExtLib->MainIFace;
397 return Self->CodesetsListRemoveA(
398 (struct TagItem *)regarray[8]
401 STATIC CONST struct EmuTrap stub_CodesetsListRemoveA = { TRAPINST, TRAPTYPE, (ULONG (*)(ULONG *))stub_CodesetsListRemoveAPPC };
403 CONST CONST_APTR VecTable68K[] =
405 &stub_Open,
406 &stub_Close,
407 &stub_Expunge,
408 &stub_Reserved,
409 &stub_Reserved,
410 &stub_CodesetsConvertUTF32toUTF16,
411 &stub_CodesetsConvertUTF16toUTF32,
412 &stub_CodesetsConvertUTF16toUTF8,
413 &stub_CodesetsIsLegalUTF8,
414 &stub_CodesetsIsLegalUTF8Sequence,
415 &stub_CodesetsConvertUTF8toUTF16,
416 &stub_CodesetsConvertUTF32toUTF8,
417 &stub_CodesetsConvertUTF8toUTF32,
418 &stub_CodesetsSetDefaultA,
419 &stub_CodesetsFreeA,
420 &stub_CodesetsSupportedA,
421 &stub_CodesetsFindA,
422 &stub_CodesetsFindBestA,
423 &stub_CodesetsUTF8Len,
424 &stub_CodesetsUTF8ToStrA,
425 &stub_CodesetsUTF8CreateA,
426 &stub_CodesetsEncodeB64A,
427 &stub_CodesetsDecodeB64A,
428 &stub_CodesetsStrLenA,
429 &stub_CodesetsIsValidUTF8,
430 &stub_CodesetsFreeVecPooledA,
431 &stub_CodesetsConvertStrA,
432 &stub_CodesetsListCreateA,
433 &stub_CodesetsListDeleteA,
434 &stub_CodesetsListAddA,
435 &stub_CodesetsListRemoveA,
436 (CONST_APTR)-1