revert between 56095 -> 55830 in arch
[AROS.git] / workbench / libs / codesets / src / stubs-aros.c
blobdcde4f2b1e609820cf19e361bab83d432c2ead41
1 /***************************************************************************
3 codesets.library - Amiga shared library for handling different codesets
4 Copyright (C) 2001-2005 by Alfonso [alfie] Ranieri <alforan@tin.it>.
5 Copyright (C) 2005-2014 codesets.library Open Source Team
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
17 codesets.library project: http://sourceforge.net/projects/codesetslib/
19 $Id$
21 ***************************************************************************/
23 #include <libraries/codesets.h>
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* __cplusplus */
29 #include <aros/libcall.h>
30 #include <SDI_lib.h>
32 #include "lib.h"
34 AROS_LH5(ULONG, CodesetsConvertUTF32toUTF16,
35 AROS_LHA(const UTF32 **, ___sourceStart, A0),
36 AROS_LHA(const UTF32 *, ___sourceEnd, A1),
37 AROS_LHA(UTF16 **, ___targetStart, A2),
38 AROS_LHA(UTF16 *, ___targetEnd, A3),
39 AROS_LHA(ULONG, ___flags, D0),
40 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
43 AROS_LIBFUNC_INIT
44 return CALL_LFUNC(CodesetsConvertUTF32toUTF16,___sourceStart, ___sourceEnd, ___targetStart, ___targetEnd, ___flags);
45 AROS_LIBFUNC_EXIT
48 AROS_LH5(ULONG, CodesetsConvertUTF16toUTF32,
49 AROS_LHA(const UTF16 **, ___sourceStart, A0),
50 AROS_LHA(const UTF16 *, ___sourceEnd, A1),
51 AROS_LHA(UTF32 **, ___targetStart, A2),
52 AROS_LHA(UTF32 *, ___targetEnd, A3),
53 AROS_LHA(ULONG, ___flags, D0),
54 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
57 AROS_LIBFUNC_INIT
58 return CALL_LFUNC(CodesetsConvertUTF16toUTF32,___sourceStart, ___sourceEnd, ___targetStart, ___targetEnd, ___flags);
59 AROS_LIBFUNC_EXIT
62 AROS_LH5(ULONG, CodesetsConvertUTF16toUTF8,
63 AROS_LHA(const UTF16 **, ___sourceStart, A0),
64 AROS_LHA(const UTF16 *, ___sourceEnd, A1),
65 AROS_LHA(UTF8 **, ___targetStart, A2),
66 AROS_LHA(UTF8 *, ___targetEnd, A3),
67 AROS_LHA(ULONG, ___flags, D0),
68 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
71 AROS_LIBFUNC_INIT
72 return CALL_LFUNC(CodesetsConvertUTF16toUTF8,___sourceStart, ___sourceEnd, ___targetStart, ___targetEnd, ___flags);
73 AROS_LIBFUNC_EXIT
76 AROS_LH2(BOOL, CodesetsIsLegalUTF8,
77 AROS_LHA(const UTF8 *, ___source, A0),
78 AROS_LHA(ULONG, ___length, D0),
79 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
82 AROS_LIBFUNC_INIT
83 return CALL_LFUNC(CodesetsIsLegalUTF8,___source, ___length);
84 AROS_LIBFUNC_EXIT
87 AROS_LH2(BOOL, CodesetsIsLegalUTF8Sequence,
88 AROS_LHA(const UTF8 *, ___source, A0),
89 AROS_LHA(const UTF8 *, ___sourceEnd, A1),
90 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
93 AROS_LIBFUNC_INIT
94 return CALL_LFUNC(CodesetsIsLegalUTF8Sequence,___source, ___sourceEnd);
95 AROS_LIBFUNC_EXIT
98 AROS_LH5(ULONG, CodesetsConvertUTF8toUTF16,
99 AROS_LHA(const UTF8 **, ___sourceStart, A0),
100 AROS_LHA(const UTF8 *, ___sourceEnd, A1),
101 AROS_LHA(UTF16 **, ___targetStart, A2),
102 AROS_LHA(UTF16 *, ___targetEnd, A3),
103 AROS_LHA(ULONG, ___flags, D0),
104 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
107 AROS_LIBFUNC_INIT
108 return CALL_LFUNC(CodesetsConvertUTF8toUTF16,___sourceStart, ___sourceEnd, ___targetStart, ___targetEnd, ___flags);
109 AROS_LIBFUNC_EXIT
112 AROS_LH5(ULONG, CodesetsConvertUTF32toUTF8,
113 AROS_LHA(const UTF32 **, ___sourceStart, A0),
114 AROS_LHA(const UTF32 *, ___sourceEnd, A1),
115 AROS_LHA(UTF8 **, ___targetStart, A2),
116 AROS_LHA(UTF8 *, ___targetEnd, A3),
117 AROS_LHA(ULONG, ___flags, D0),
118 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
121 AROS_LIBFUNC_INIT
122 return CALL_LFUNC(CodesetsConvertUTF32toUTF8,___sourceStart, ___sourceEnd, ___targetStart, ___targetEnd, ___flags);
123 AROS_LIBFUNC_EXIT
126 AROS_LH5(ULONG, CodesetsConvertUTF8toUTF32,
127 AROS_LHA(const UTF8 **, ___sourceStart, A0),
128 AROS_LHA(const UTF8 *, ___sourceEnd, A1),
129 AROS_LHA(UTF32 **, ___targetStart, A2),
130 AROS_LHA(UTF32 *, ___targetEnd, A3),
131 AROS_LHA(ULONG, ___flags, D0),
132 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
135 AROS_LIBFUNC_INIT
136 return CALL_LFUNC(CodesetsConvertUTF8toUTF32,___sourceStart, ___sourceEnd, ___targetStart, ___targetEnd, ___flags);
137 AROS_LIBFUNC_EXIT
140 AROS_LH2(struct codeset *, CodesetsSetDefaultA,
141 AROS_LHA(STRPTR, ___name, A0),
142 AROS_LHA(struct TagItem *, ___attrs, A1),
143 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
146 AROS_LIBFUNC_INIT
147 return CALL_LFUNC(CodesetsSetDefaultA,___name, ___attrs);
148 AROS_LIBFUNC_EXIT
151 AROS_LH2(void, CodesetsFreeA,
152 AROS_LHA(APTR, ___obj, A0),
153 AROS_LHA(struct TagItem *, ___attrs, A1),
154 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
157 AROS_LIBFUNC_INIT
158 return CALL_LFUNC(CodesetsFreeA,___obj, ___attrs);
159 AROS_LIBFUNC_EXIT
162 AROS_LH1(STRPTR *, CodesetsSupportedA,
163 AROS_LHA(struct TagItem *, ___attrs, A0),
164 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
167 AROS_LIBFUNC_INIT
168 return CALL_LFUNC(CodesetsSupportedA,___attrs);
169 AROS_LIBFUNC_EXIT
172 AROS_LH2(struct codeset *, CodesetsFindA,
173 AROS_LHA(STRPTR, ___name, A0),
174 AROS_LHA(struct TagItem *, ___attrs, A1),
175 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
178 AROS_LIBFUNC_INIT
179 return CALL_LFUNC(CodesetsFindA,___name, ___attrs);
180 AROS_LIBFUNC_EXIT
183 AROS_LH1(struct codeset *, CodesetsFindBestA,
184 AROS_LHA(struct TagItem *, ___attrs, A0),
185 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
188 AROS_LIBFUNC_INIT
189 return CALL_LFUNC(CodesetsFindBestA,___attrs);
190 AROS_LIBFUNC_EXIT
193 AROS_LH1(ULONG, CodesetsUTF8Len,
194 AROS_LHA(const UTF8 *, ___str, A0),
195 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
198 AROS_LIBFUNC_INIT
199 return CALL_LFUNC(CodesetsUTF8Len,___str);
200 AROS_LIBFUNC_EXIT
203 AROS_LH1(STRPTR, CodesetsUTF8ToStrA,
204 AROS_LHA(struct TagItem *, ___attrs, A0),
205 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
208 AROS_LIBFUNC_INIT
209 return CALL_LFUNC(CodesetsUTF8ToStrA,___attrs);
210 AROS_LIBFUNC_EXIT
213 AROS_LH1(UTF8 *, CodesetsUTF8CreateA,
214 AROS_LHA(struct TagItem *, ___attrs, A0),
215 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
218 AROS_LIBFUNC_INIT
219 return CALL_LFUNC(CodesetsUTF8CreateA,___attrs);
220 AROS_LIBFUNC_EXIT
223 AROS_LH1(ULONG, CodesetsEncodeB64A,
224 AROS_LHA(struct TagItem *, ___attrs, A0),
225 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
228 AROS_LIBFUNC_INIT
229 return CALL_LFUNC(CodesetsEncodeB64A,___attrs);
230 AROS_LIBFUNC_EXIT
233 AROS_LH1(ULONG, CodesetsDecodeB64A,
234 AROS_LHA(struct TagItem *, ___attrs, A0),
235 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
238 AROS_LIBFUNC_INIT
239 return CALL_LFUNC(CodesetsDecodeB64A,___attrs);
240 AROS_LIBFUNC_EXIT
243 AROS_LH2(ULONG, CodesetsStrLenA,
244 AROS_LHA(STRPTR, ___str, A0),
245 AROS_LHA(struct TagItem *, ___attrs, A1),
246 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
249 AROS_LIBFUNC_INIT
250 return CALL_LFUNC(CodesetsStrLenA,___str, ___attrs);
251 AROS_LIBFUNC_EXIT
254 AROS_LH1(BOOL, CodesetsIsValidUTF8,
255 AROS_LHA(STRPTR, ___str, A0),
256 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
259 AROS_LIBFUNC_INIT
260 return CALL_LFUNC(CodesetsIsValidUTF8,___str);
261 AROS_LIBFUNC_EXIT
264 AROS_LH3(void, CodesetsFreeVecPooledA,
265 AROS_LHA(APTR, ___pool, A0),
266 AROS_LHA(APTR, ___mem, A1),
267 AROS_LHA(struct TagItem *, ___attrs, A2),
268 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
271 AROS_LIBFUNC_INIT
272 return CALL_LFUNC(CodesetsFreeVecPooledA,___pool, ___mem, ___attrs);
273 AROS_LIBFUNC_EXIT
276 AROS_LH1(STRPTR, CodesetsConvertStrA,
277 AROS_LHA(struct TagItem *, ___attrs, A0),
278 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
281 AROS_LIBFUNC_INIT
282 return CALL_LFUNC(CodesetsConvertStrA,___attrs);
283 AROS_LIBFUNC_EXIT
286 AROS_LH1(struct codesetList *, CodesetsListCreateA,
287 AROS_LHA(struct TagItem *, ___attrs, A0),
288 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
291 AROS_LIBFUNC_INIT
292 return CALL_LFUNC(CodesetsListCreateA,___attrs);
293 AROS_LIBFUNC_EXIT
296 AROS_LH1(BOOL, CodesetsListDeleteA,
297 AROS_LHA(struct TagItem *, ___attrs, A0),
298 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
301 AROS_LIBFUNC_INIT
302 return CALL_LFUNC(CodesetsListDeleteA,___attrs);
303 AROS_LIBFUNC_EXIT
306 AROS_LH2(BOOL, CodesetsListAddA,
307 AROS_LHA(struct codesetList *, ___codesetsList, A0),
308 AROS_LHA(struct TagItem *, ___attrs, A1),
309 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
312 AROS_LIBFUNC_INIT
313 return CALL_LFUNC(CodesetsListAddA,___codesetsList, ___attrs);
314 AROS_LIBFUNC_EXIT
317 AROS_LH1(BOOL, CodesetsListRemoveA,
318 AROS_LHA(struct TagItem *, ___attrs, A0),
319 struct LibraryHeader *, __BASE_OR_IFACE_VAR, 0, LIBSTUB
322 AROS_LIBFUNC_INIT
323 return CALL_LFUNC(CodesetsListRemoveA,___attrs);
324 AROS_LIBFUNC_EXIT
328 #ifdef __cplusplus
330 #endif /* __cplusplus */