4 #include <exec/types.h>
5 #include <exec/libraries.h>
10 #if defined(__amigaos4__)
11 #define __BASE_OR_IFACE_TYPE struct ExampleIFace *
12 #define __BASE_OR_IFACE_VAR IExample
14 #define __BASE_OR_IFACE_TYPE struct LibraryHeader *
15 #define __BASE_OR_IFACE_VAR ExampleBase
17 #define __BASE_OR_IFACE __BASE_OR_IFACE_TYPE __BASE_OR_IFACE_VAR
21 struct Library libBase
;
22 struct Library
*sysBase
;
26 // first the prototypes of all our public library functions
27 LIBPROTO(SayHelloOS4
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
));
28 LIBPROTO(SayHelloOS3
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
));
29 LIBPROTO(SayHelloMOS
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
));
30 LIBPROTO(Uppercase
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
), REG(a0
, char *txt
));
31 LIBPROTO(SPrintfA
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
), REG(a0
, char *buf
), REG(a1
, char *format
), REG(a2
, RAWARG args
));
32 LIBPROTOVA(SPrintf
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
), REG(a0
, char *buf
), REG(a1
, char *format
), ...);
35 AROS_LD0(char *, SayHelloOS4
, struct LibraryHeader
*, __BASE_OR_IFACE_VAR
, 0, LIBSTUB
);
36 AROS_LD0(char *, SayHelloOS3
, struct LibraryHeader
*, __BASE_OR_IFACE_VAR
, 0, LIBSTUB
);
37 AROS_LD0(char *, SayHelloMOS
, struct LibraryHeader
*, __BASE_OR_IFACE_VAR
, 0, LIBSTUB
);
38 AROS_LD1(char *, Uppercase
, AROS_LDA(char *, txt
, A0
), struct LibraryHeader
*, __BASE_OR_IFACE_VAR
, 0, LIBSTUB
);
39 AROS_LD3(char *, SPrintfA
,
40 AROS_LDA(char *, buf
, A0
),
41 AROS_LDA(char *, format
, A1
),
42 AROS_LDA(RAWARG
, args
, A1
),
43 struct LibraryHeader
*, __BASE_OR_IFACE_VAR
, 0, LIBSTUB
);