use the new flexcat's source description file
[AROS.git] / tools / flexcat / src / vastubs.c
blobfcfdbe62bad2af86f76bcd6c47cab4f4a092a40e
1 /*
2 * $Id$
4 * Copyright (C) 1993-1999 by Jochen Wiedmann and Marcin Orlowski
5 * Copyright (C) 2002-2010 by the FlexCat Open Source Team
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 Stubs for the variable argument functions of the shared libraries used.
25 Please note that these stubs should only be used if the compiler
26 suite/SDK doesn't come with own stubs/inline functions.
28 Also note that these stubs are only safe on m68k machines as it
29 requires a linear stack layout!
32 #if !defined(__AROS__) && (defined(__VBCC__) || defined(NO_INLINE_STDARG))
33 #if defined(_M68000) || defined(__M68000) || defined(__mc68000)
35 #include <exec/types.h>
37 /* FIX V45 breakage... */
38 #if INCLUDE_VERSION < 45
39 #define MY_CONST_STRPTR CONST_STRPTR
40 #else
41 #define MY_CONST_STRPTR CONST STRPTR
42 #endif
44 #include <proto/locale.h>
45 struct Catalog *OpenCatalog(struct Locale *locale, STRPTR name, Tag tag1, ...)
46 { return OpenCatalogA(locale, name, (struct TagItem *)&tag1); }
48 #include <proto/codesets.h>
49 struct codeset *CodesetsFind(STRPTR name, Tag tag1, ...)
50 { return CodesetsFindA(name, (struct TagItem *)&tag1); }
51 STRPTR CodesetsConvertStr(Tag tag1, ...)
52 { return CodesetsConvertStrA((struct TagItem *)&tag1); }
53 STRPTR CodesetsUTF8ToStr(Tag tag1, ...)
54 { return CodesetsUTF8ToStrA((struct TagItem *)&tag1); }
56 #else
57 #error "VARGS stubs are only save on m68k systems!"
58 #endif // !defined(__PPC__)
60 #elif defined(__AROS__)
62 #include <proto/codesets.h>
63 STRPTR *CodesetsSupported(Tag tag1, ...)
65 AROS_SLOWSTACKTAGS_PRE(tag1)
66 retval = (IPTR)CodesetsSupportedA((struct TagItem *)AROS_SLOWSTACKTAGS_ARG(tag1));
67 AROS_SLOWSTACKTAGS_POST
70 struct codeset *CodesetsFind(STRPTR name, Tag tag1, ...)
72 AROS_SLOWSTACKTAGS_PRE(tag1)
73 retval = (IPTR)CodesetsFindA(name, (struct TagItem *)AROS_SLOWSTACKTAGS_ARG(tag1));
74 AROS_SLOWSTACKTAGS_POST
77 struct codeset *CodesetsFindBest(Tag tag1, ...)
79 AROS_SLOWSTACKTAGS_PRE(tag1)
80 retval = (IPTR)CodesetsFindBestA((struct TagItem *)AROS_SLOWSTACKTAGS_ARG(tag1));
81 AROS_SLOWSTACKTAGS_POST
84 STRPTR CodesetsConvertStr(Tag tag1, ...)
86 AROS_SLOWSTACKTAGS_PRE(tag1)
87 retval = (IPTR)CodesetsConvertStrA((struct TagItem *)AROS_SLOWSTACKTAGS_ARG(tag1));
88 AROS_SLOWSTACKTAGS_POST
91 struct codesetList *CodesetsListCreate(Tag tag1, ...)
93 AROS_SLOWSTACKTAGS_PRE(tag1)
94 retval = (IPTR)CodesetsListCreateA((struct TagItem *)AROS_SLOWSTACKTAGS_ARG(tag1));
95 AROS_SLOWSTACKTAGS_POST
98 BOOL CodesetsListDelete(Tag tag1, ...)
100 AROS_SLOWSTACKTAGS_PRE(tag1)
101 retval = (IPTR)CodesetsListDeleteA((struct TagItem *)AROS_SLOWSTACKTAGS_ARG(tag1));
102 AROS_SLOWSTACKTAGS_POST
105 STRPTR CodesetsUTF8ToStr(Tag tag1, ...)
107 AROS_SLOWSTACKTAGS_PRE(tag1)
108 retval = (IPTR)CodesetsUTF8ToStrA((struct TagItem *)AROS_SLOWSTACKTAGS_ARG(tag1));
109 AROS_SLOWSTACKTAGS_POST
112 UTF8 *CodesetsUTF8Create(Tag tag1, ...)
114 AROS_SLOWSTACKTAGS_PRE(tag1)
115 retval = (IPTR)CodesetsUTF8CreateA((struct TagItem *)AROS_SLOWSTACKTAGS_ARG(tag1));
116 AROS_SLOWSTACKTAGS_POST
119 #endif // defined(__VBCC__) || defined(NO_INLINE_STDARG)