Fixed compatibility of output.
[AROS.git] / external / openurl / prefs / vastubs.c
blobd41dc71045f3df2a4891cd4f5e5a20695ba6f201
1 /***************************************************************************
3 openurl.library - universal URL display and browser launcher library
4 Copyright (C) 1998-2005 by Troels Walsted Hansen, et al.
5 Copyright (C) 2005-2013 by openurl.library Open Source Team
7 This library is free software; it has been placed in the public domain
8 and you can freely redistribute it and/or modify it. Please note, however,
9 that some components may be under the LGPL or GPL license.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 openurl.library project: http://sourceforge.net/projects/openurllib/
17 $Id$
19 ***************************************************************************/
22 Stubs for the variable argument functions of the shared libraries used.
23 Please note that these stubs should only be used if the compiler
24 suite/SDK doesn't come with own stubs/inline functions.
26 Also note that these stubs are only safe on m68k machines as it
27 requires a linear stack layout!
30 #if !defined(__AROS__) && (defined(__VBCC__) || defined(NO_INLINE_STDARG))
31 #if defined(_M68000) || defined(__M68000) || defined(__mc68000)
33 #include <exec/types.h>
35 /* FIX V45 breakage... */
36 #if INCLUDE_VERSION < 45
37 #define MY_CONST_STRPTR CONST_STRPTR
38 #else
39 #define MY_CONST_STRPTR CONST STRPTR
40 #endif
42 #include <proto/intuition.h>
43 APTR NewObject( struct IClass *classPtr, CONST_STRPTR classID, Tag tag1, ... )
44 { return NewObjectA(classPtr, classID, (struct TagItem *)&tag1); }
45 ULONG SetAttrs( APTR object, ULONG tag1, ... )
46 { return SetAttrsA(object, (struct TagItem *)&tag1); }
48 #include <proto/dos.h>
49 LONG Printf( CONST_STRPTR format, ... )
50 { return VPrintf(format, (APTR)(&format+1)); }
52 #include <proto/openurl.h>
53 ULONG URL_Open(STRPTR url, Tag tag1, ...)
54 { return URL_OpenA(url, (struct TagItem *)&tag1); }
55 struct URL_Prefs *URL_GetPrefs(Tag tag1, ...)
56 { return URL_GetPrefsA((struct TagItem *)&tag1); }
57 ULONG URL_SetPrefs(struct URL_Prefs *prefs, Tag tag1, ...)
58 { return URL_SetPrefsA(prefs, (struct TagItem *)&tag1); }
60 #include <proto/locale.h>
61 struct Catalog *OpenCatalog(struct Locale *locale, STRPTR name, Tag tag1, ...)
62 { return OpenCatalogA(locale, name, (struct TagItem *)&tag1); }
64 #else
65 #error "VARGS stubs are only save on m68k systems!"
66 #endif // !defined(__PPC__)
68 #endif // defined(__VBCC__) || defined(NO_INLINE_STDARG)