1 /***************************************************************************
3 YAM - Yet Another Mailer
4 Copyright (C) 1995-2000 by Marcel Beck <mbeck@yam.ch>
5 Copyright (C) 2000-2010 by YAM 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
10 (at your option) any later version.
12 This program 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
15 GNU 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 YAM Official Support Site : http://www.yam.ch/
22 YAM OpenSource project : http://sourceforge.net/projects/yamos/
24 $Id: vastubs.c,v 1.1 2010/04/29 06:37:53 thboeckel Exp $
26 ***************************************************************************/
29 Stubs for the variable argument functions of the shared libraries used by
30 YAM. Please note that these stubs should only be used if the compiler
31 suite/SDK doesn't come with own stubs/inline functions.
33 Also note that these stubs are only safe on m68k machines as it
34 requires a linear stack layout!
37 #if !defined(__AROS__) && (defined(__VBCC__) || defined(NO_INLINE_STDARG))
38 #if defined(_M68000) || defined(__M68000) || defined(__mc68000)
40 #include <exec/types.h>
42 /* FIX V45 breakage... */
43 #if INCLUDE_VERSION < 45
44 #define MY_CONST_STRPTR CONST_STRPTR
46 #define MY_CONST_STRPTR CONST STRPTR
49 #include <proto/intuition.h>
50 APTR
NewObject( struct IClass
*classPtr
, CONST_STRPTR classID
, Tag tag1
, ... )
51 { return NewObjectA(classPtr
, classID
, (struct TagItem
*)&tag1
); }
52 ULONG
SetAttrs( APTR object
, ULONG tag1
, ... )
53 { return SetAttrsA(object
, (struct TagItem
*)&tag1
); }
54 LONG
EasyRequest(struct Window
*window
, CONST
struct EasyStruct
*es
, ULONG
*idcmpPtr
, ... )
55 { return EasyRequestArgs(window
, es
, idcmpPtr
, (CONST APTR
)(&idcmpPtr
+1)); }
57 #include <proto/dos.h>
58 LONG
Printf( CONST_STRPTR format
, ... )
59 { return VPrintf(format
, (CONST APTR
)(&format
+1)); }
60 LONG
FPrintf( BPTR fh
, CONST_STRPTR format
, ... )
61 { return VFPrintf(fh
, format
, (CONST APTR
)(&format
+1)); }
63 #include <proto/locale.h>
64 struct Catalog
*OpenCatalog( struct Locale
*locale
, STRPTR name
, Tag tag1
, ... )
65 { return OpenCatalogA(locale
, name
, (struct TagItem
*)&tag1
); }
67 #include <proto/mmu.h>
68 ULONG
GetProperties(struct MMUContext
*ctx
, ULONG lower
, Tag tag1
, ... )
69 { return GetPropertiesA(ctx
, lower
, (struct TagItem
*)&tag1
); }
71 #include <proto/identify.h>
72 LONG
IdAlertTags(ULONG alert
, Tag tag1
, ... )
73 { return IdAlert(alert
, (struct TagItem
*)&tag1
); }
74 LONG
IdExpansionTags(Tag tag1
, ... )
75 { return IdExpansion((struct TagItem
*)&tag1
); }
76 LONG
IdFunctionTags(STRPTR libName
, LONG offset
, Tag tag1
, ... )
77 { return IdFunction(libName
, offset
, (struct TagItem
*)&tag1
); }
78 STRPTR
IdHardwareTags(ULONG type
, Tag tag1
, ... )
79 { return IdHardware(type
, (struct TagItem
*)&tag1
); }
80 ULONG
IdHardwareNumTags(ULONG type
, Tag tag1
, ... )
81 { return IdHardwareNum(type
, (struct TagItem
*)&tag1
); }
83 #include <proto/ahi.h>
84 BOOL
AHI_GetAudioAttrs(ULONG ID
, struct AHIAudioCtrl
*ctrl
, Tag tag1
, ... )
85 { return AHI_GetAudioAttrsA(ID
, ctrl
, (struct TagItem
*)&tag1
); }
88 #error "VARGS stubs are only save on m68k systems!"
89 #endif // !defined(__PPC__)