4 Versionstring: $VER: example_lib.c 1.2 (21.06.2007)
7 Description: shows how the SDI_lib.h header include can be used
9 1.0 05.10.04 : initial version showing how the SDI_lib.h headers can help
10 when used for maintaining AmigaOS compatible shared library
11 interfaces upon compatible operating systems like AmigaOS3,
14 1.1 20.06.07 : moved LIBFUNC to be first in line acording to changes in
15 SDI_lib.h. (Guido Mersmann)
17 1.2 21.06.07 : added missing libvector to MorphOS/AmigaOS3 libvectors[]
20 Please note that this example is just for educational purposes and wasn't
21 checked for complete correctness. However, it should compile and probably also
22 work as expected. But please note that its purpose is to show how a shared
23 library can held platform independent over all different available AmigaOS
24 platforms like OS3, OS4 and MorphOS.
26 Feel free to comment and submit any suggestions directly to
27 Jens.Langner@light-speed.de
31 #include <exec/types.h>
32 #include <exec/libraries.h>
33 #include <exec/resident.h>
36 #include <proto/exec.h>
39 #include <exec/emulation.h>
47 #include <SDI_stdarg.h>
51 #define DATE "25.08.2014"
52 #define VERS "example.library 1.4"
53 #define VSTRING "example.library 1.4 25.08.2014)\r\n"
54 #define VERSTAG "\0$VER: example.library 1.4 25.08.2014)"
56 static const char UserLibName
[] = "example.library";
57 static const char UserLibID
[] = "\0$VER: example.library 1.4 25.08.2014)";
59 #if defined(__MORPHOS__) || defined(__AROS__)
60 struct ExecBase
*SysBase
;
63 /******************************************************************************/
64 /* >> User defineable library functions start here << */
65 /* The following section should illustrate how the SDI_lib.h macros make it */
66 /* possible to easily maintain a typical Amiga shared library interface if */
67 /* compatibility over all common (OS3/OS4, MorphOS) is required */
68 /******************************************************************************/
70 /******************************************************************************/
71 /* Local Structures & Prototypes */
72 /******************************************************************************/
76 struct Library libBase
;
77 struct Library
*sysBase
;
81 #if defined(__amigaos4__)
82 #define __BASE_OR_IFACE_TYPE struct ExampleIFace *
83 #define __BASE_OR_IFACE_VAR IExample
85 #define __BASE_OR_IFACE_TYPE struct LibraryHeader *
86 #define __BASE_OR_IFACE_VAR ExampleBase
88 #define __BASE_OR_IFACE __BASE_OR_IFACE_TYPE __BASE_OR_IFACE_VAR
90 // first the prototypes of all our public library functions
91 LIBPROTO(SayHelloOS4
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
));
92 LIBPROTO(SayHelloOS3
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
));
93 LIBPROTO(SayHelloMOS
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
));
94 LIBPROTO(Uppercase
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
), REG(a0
, char *txt
));
95 LIBPROTO(SPrintfA
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
), REG(a0
, char *buf
), REG(a1
, char *format
), REG(a2
, APTR args
));
96 LIBPROTOVA(SPrintf
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
), REG(a0
, char *buf
), REG(a1
, char *format
), ...);
98 // let us now create the libvector.
99 // Please note that the start of the vectors has to be always the "LFUNC_FAS"
101 #define libvector LFUNC_FAS(SayHelloOS4) \
102 LFUNC_FA_(SayHelloOS3) \
103 LFUNC_FA_(SayHelloMOS) \
104 LFUNC_FA_(Uppercase) \
105 LFUNC_FA_(SPrintfA) \
108 // Now the real implementations of the library functions above like in
109 // a normal AmigaOS shared library follow
110 LIBPROTO(SayHelloOS4
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
))
112 return "Hello AmigaOS4!!!";
115 LIBPROTO(SayHelloOS3
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
))
117 return "Hello AmigaOS3!!!";
120 LIBPROTO(SayHelloMOS
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
))
122 return "Hello MorphOS!!!";
125 LIBPROTO(Uppercase
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
), REG(a0
, char *txt
))
138 LIBPROTO(SPrintfA
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
), REG(a0
, char *buf
), REG(a1
, char *format
), REG(a2
, APTR args
))
140 RawDoFmt(format
, args
, NULL
, buf
);
145 #if defined(__amigaos4__)
146 // for AmigaOS4 varargs functions are separate entries in the interface structure and
147 // hence must be defined as separate functions
148 LIBPROTOVA(SPrintf
, char *, REG(a6
, UNUSED __BASE_OR_IFACE
), REG(a0
, char *buf
), REG(a1
, char *format
), ...)
153 VA_START(args
, format
);
154 // the SPrintf function will be call via the interface
155 ret
= SPrintfA(buf
, format
, VA_ARG(args
, ULONG
));
160 #elif defined(__MORPHOS__)
161 // define stub functions for all functions in the jump table which take the
162 // parameters from the emulated 68k registers. The parameters don't need to
163 // be specified again, because these are really functions taking no direct
164 // parameters. Only the type of the returned value is required.
165 LIBSTUB(SayHelloOS4
, char *)
167 __BASE_OR_IFACE
= (__BASE_OR_IFACE_TYPE
)REG_A6
;
168 return CALL_LFUNC_NP(SayHelloOS4
);
171 LIBSTUB(SayHelloOS3
, char *)
173 __BASE_OR_IFACE
= (__BASE_OR_IFACE_TYPE
)REG_A6
;
174 return CALL_LFUNC_NP(SayHelloOS3
);
177 LIBSTUB(SayHelloMOS
, char *)
179 __BASE_OR_IFACE
= (__BASE_OR_IFACE_TYPE
)REG_A6
;
180 return CALL_LFUNC_NP(SayHelloMOS
);
183 LIBSTUB(Uppercase
, char *)
185 __BASE_OR_IFACE
= (__BASE_OR_IFACE_TYPE
)REG_A6
;
186 return CALL_LFUNC(Uppercase
, (char *)REG_A0
);
189 LIBSTUB(SPrintfA
, char *)
191 __BASE_OR_IFACE
= (__BASE_OR_IFACE_TYPE
)REG_A6
;
192 return CALL_LFUNC(SprintfA
, (char)REG_A0
, (char *)REG_A1
, (APTR
)REG_A2
);
194 #elif defined(__AROS__)
195 AROS_LH0(char *, SayHelloOS4
, struct LibraryHeader
*, __BASE_OR_IFACE_VAR
, 0, LIBSTUB
)
198 return CALL_LFUNC_NP(SayHelloOS4
);
202 AROS_LH0(char *, SayHelloOS3
, struct LibraryHeader
*, __BASE_OR_IFACE_VAR
, 0, LIBSTUB
)
205 return CALL_LFUNC_NP(SayHelloOS3
);
209 AROS_LH0(char *, SayHelloMOS
, struct LibraryHeader
*, __BASE_OR_IFACE_VAR
, 0, LIBSTUB
)
212 return CALL_LFUNC_NP(SayHelloMOS
);
216 AROS_LH1(char *, Uppercase
, AROS_LHA(char *, txt
, A0
), struct LibraryHeader
*, __BASE_OR_IFACE_VAR
, 0, LIBSTUB
)
219 return CALL_LFUNC(Uppercase
, txt
);
223 AROS_LH3(char *, SPrintfA
,
224 AROS_LHA(char *, buf
, A0
),
225 AROS_LHA(char *, format
, A1
),
226 AROS_LHA(APTR
, args
, A1
),
227 struct LibraryHeader
*, __BASE_OR_IFACE_VAR
, 0, LIBSTUB
231 return CALL_LFUNC(SPrintfA
, buf
, format
, args
);
236 /******************************************************************************/
237 /* Starting from here starts the "standard" Amiga library initialization. */
238 /* All the above should have illustrated enough how "easy" it is to use the */
239 /* SDI_lib.h header file and how it can help in developing a shared library */
240 /* for multiple AmigaOS compatible platforms. */
241 /******************************************************************************/
243 #if defined(__amigaos4__)
245 LIBFUNC
static struct LibraryHeader
* LibInit (struct LibraryHeader
*base
, BPTR librarySegment
, struct ExecIFace
*pIExec
);
246 LIBFUNC
static BPTR
LibExpunge (struct LibraryManagerInterface
*Self
);
247 LIBFUNC
static struct LibraryHeader
* LibOpen (struct LibraryManagerInterface
*Self
, ULONG version
);
248 LIBFUNC
static BPTR
LibClose (struct LibraryManagerInterface
*Self
);
250 #elif defined(__MORPHOS__)
252 LIBFUNC
static struct LibraryHeader
* LibInit (struct LibraryHeader
*base
, BPTR librarySegment
, struct ExecBase
*sb
);
253 LIBFUNC
static BPTR
LibExpunge(void);
254 LIBFUNC
static struct LibraryHeader
* LibOpen (void);
255 LIBFUNC
static BPTR
LibClose (void);
256 LIBFUNC
static LONG
LibNull (void);
258 #elif defined(__AROS__)
260 #include <aros/libcall.h>
262 static AROS_UFP3 (struct LibraryHeader
*, LibInit
,
263 AROS_UFPA(struct LibraryHeader
*, base
, D0
),
264 AROS_UFPA(BPTR
, librarySegment
, A0
),
265 AROS_UFPA(struct ExecBase
*, sb
, A6
)
267 static AROS_LD1 (struct LibraryHeader
*, LibOpen
,
268 AROS_LPA (UNUSED ULONG
, version
, D0
),
269 struct LibraryHeader
*, base
, 1, example
271 static AROS_LD0 (BPTR
, LibClose
,
272 struct LibraryHeader
*, base
, 2, example
274 static AROS_LD1(BPTR
, LibExpunge
,
275 AROS_LPA(UNUSED
struct LibraryHeader
*, __extrabase
, D0
),
276 struct LibraryHeader
*, base
, 3, example
281 LIBFUNC
static struct LibraryHeader
* LibInit (REG(a0
, BPTR Segment
), REG(d0
, struct LibraryHeader
*lh
), REG(a6
, struct ExecBase
*sb
));
282 LIBFUNC
static BPTR
LibExpunge (REG(a6
, struct LibraryHeader
*base
));
283 LIBFUNC
static struct LibraryHeader
* LibOpen (REG(a6
, struct LibraryHeader
*base
));
284 LIBFUNC
static BPTR
LibClose (REG(a6
, struct LibraryHeader
*base
));
285 LIBFUNC
static LONG
LibNull (void);
289 /******************************************************************************/
290 /* Dummy entry point and LibNull() function all in one */
291 /******************************************************************************/
293 #if defined(__amigaos4__)
302 #if !defined(__amigaos4__)
303 LIBFUNC
static LONG
LibNull(VOID
)
309 /******************************************************************************/
310 /* Local data structures */
311 /******************************************************************************/
313 #if defined(__amigaos4__)
314 /* ------------------- OS4 Manager Interface ------------------------ */
315 STATIC ULONG
LibObtain(struct LibraryManagerInterface
*Self
)
317 return(Self
->Data
.RefCount
++);
320 STATIC ULONG
LibRelease(struct LibraryManagerInterface
*Self
)
322 return(Self
->Data
.RefCount
--);
325 STATIC CONST APTR LibManagerVectors
[] =
338 STATIC CONST
struct TagItem LibManagerTags
[] =
340 {MIT_Name
, (ULONG
)"__library"},
341 {MIT_VectorTable
, (ULONG
)LibManagerVectors
},
346 /* ------------------- Library Interface(s) ------------------------ */
348 STATIC CONST APTR LibVectors
[] =
358 STATIC CONST
struct TagItem MainTags
[] =
360 {MIT_Name
, (ULONG
)"main"},
361 {MIT_VectorTable
, (ULONG
)LibVectors
},
367 STATIC CONST ULONG LibInterfaces
[] =
369 (ULONG
)LibManagerTags
,
374 /* --------------------- m68k Library stubs ------------------------ */
376 STATIC ULONG
stub_OpenPPC(ULONG
*regarray
)
378 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
379 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
380 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
382 return (ULONG
) Self
->Open(0);
384 struct EmuTrap stub_Open
= { TRAPINST
, TRAPTYPE
, stub_OpenPPC
};
386 STATIC ULONG
stub_ClosePPC(ULONG
*regarray
)
388 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
389 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
390 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
392 return (ULONG
) Self
->Close();
394 struct EmuTrap stub_Close
= { TRAPINST
, TRAPTYPE
, stub_ClosePPC
};
396 STATIC ULONG
stub_ExpungePPC(ULONG
*regarray
)
400 struct EmuTrap stub_Expunge
= { TRAPINST
, TRAPTYPE
, stub_ExpungePPC
};
402 STATIC ULONG
stub_ReservedPPC(ULONG
*regarray
)
406 struct EmuTrap stub_Reserved
= { TRAPINST
, TRAPTYPE
, stub_ReservedPPC
};
408 STATIC ULONG
stub_SayHelloOS4PPC(ULONG
*regarray
)
410 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
411 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
412 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
414 return (char *)Self
->SayHelloOS4();
416 struct EmuTrap stub_SayHelloOS4
= { TRAPINST
, TRAPTYPE
, stub_SayHelloOS4PPC
};
418 STATIC ULONG
stub_SayHelloOS3PPC(ULONG
*regarray
)
420 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
421 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
422 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
424 return (char *)Self
->SayHelloOS3();
426 struct EmuTrap stub_SayHelloOS3
= { TRAPINST
, TRAPTYPE
, stub_SayHelloOS3PPC
};
428 STATIC ULONG
stub_SayHelloMOSPPC(ULONG
*regarray
)
430 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
431 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
432 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
434 return (char *)Self
->SayHelloMOS();
436 struct EmuTrap stub_SayHelloMOS
= { TRAPINST
, TRAPTYPE
, stub_SayHelloMOSPPC
};
438 STATIC ULONG
stub_UppercasePPC(ULONG
*regarray
)
440 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
441 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
442 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
444 return (char *)Self
->Uppercase(
448 struct EmuTrap stub_Uppercase
= { TRAPINST
, TRAPTYPE
, stub_UppercasePPC
};
450 STATIC ULONG
stub_SPrintfAPPC(ULONG
*regarray
)
452 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
453 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
454 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
456 return (char *)Self
->SPrintfA(
462 struct EmuTrap stub_SPrintfA
= { TRAPINST
, TRAPTYPE
, stub_SPrintfAPPC
};
464 STATIC ULONG VecTable68K
[] =
468 (ULONG
)&stub_Expunge
,
469 (ULONG
)&stub_Reserved
,
470 (ULONG
)&stub_SayHelloOS4
,
471 (ULONG
)&stub_SayHelloOS3
,
472 (ULONG
)&stub_SayHelloMOS
,
473 (ULONG
)&stub_Uppercase
,
474 (ULONG
)&stub_SprintfA
,
478 /* ----------------------- LibCreate Tags -------------------------- */
480 STATIC CONST
struct TagItem LibCreateTags
[] =
482 {CLT_DataSize
, (ULONG
)(sizeof(struct LibraryHeader
))},
483 {CLT_InitFunc
, (ULONG
)LibInit
},
484 {CLT_Interfaces
, (ULONG
)LibInterfaces
},
485 {CLT_Vector68K
, (ULONG
)VecTable68K
},
491 STATIC CONST APTR LibVectors
[] =
494 (APTR
)FUNCARRAY_32BIT_NATIVE
,
496 #if defined(__AROS__)
498 AROS_SLIB_ENTRY(LibOpen
, example
, 1),
499 AROS_SLIB_ENTRY(LibClose
, example
, 2),
500 AROS_SLIB_ENTRY(LibExpunge
, example
, 3),
502 AROS_SLIB_ENTRY(LibOpen
, example
),
503 AROS_SLIB_ENTRY(LibClose
, example
),
504 AROS_SLIB_ENTRY(LibExpunge
, example
),
516 STATIC CONST ULONG LibInitTab
[] =
518 sizeof(struct LibraryHeader
),
526 /* ------------------- ROM Tag ------------------------ */
527 static const USED_VAR
struct Resident ROMTag
=
530 (struct Resident
*)&ROMTag
,
531 (struct Resident
*)&ROMTag
+ 1,
532 #if defined(__amigaos4__)
533 RTF_AUTOINIT
|RTF_NATIVE
, // The Library should be set up according to the given table.
534 #elif defined(__MORPHOS__)
535 RTF_AUTOINIT
|RTF_PPC
,
536 #elif defined(__AROS__)
537 RTF_AUTOINIT
|RTF_EXTENDED
,
546 #if defined(__amigaos4__)
547 (APTR
)LibCreateTags
// This table is for initializing the Library.
553 #if defined(__MORPHOS__)
555 * To tell the loader that this is a new emulppc elf and not
556 * one for the ppc.library.
559 ULONG USED_VAR __amigappc__
=1;
560 ULONG USED_VAR __abox__
=1;
562 #endif /* __MORPHOS */
564 /******************************************************************************/
565 /* Standard Library Functions, all of them are called in Forbid() state. */
566 /******************************************************************************/
569 #define DeleteLibrary(LIB) \
570 FreeMem((STRPTR)(LIB)-(LIB)->lib_NegSize, (ULONG)((LIB)->lib_NegSize+(LIB)->lib_PosSize))
573 #if defined(__amigaos4__)
574 static struct LibraryHeader
* LibInit(struct LibraryHeader
*base
, BPTR librarySegment
, struct ExecIFace
*pIExec
)
576 struct ExecBase
*sb
= (struct ExecBase
*)pIExec
->Data
.LibBase
;
578 #elif defined(__MORPHOS__)
579 static struct LibraryHeader
* LibInit(struct LibraryHeader
*base
, BPTR librarySegment
, struct ExecBase
*sb
)
581 #elif defined(__AROS__)
582 static AROS_UFH3(struct LibraryHeader
*, LibInit
,
583 AROS_UFHA(struct LibraryHeader
*, base
, D0
),
584 AROS_UFHA(BPTR
, librarySegment
, A0
),
585 AROS_UFHA(struct ExecBase
*, sb
, A6
)
590 LIBFUNC
static struct LibraryHeader
* LibInit(REG(a0
, BPTR librarySegment
), REG(d0
, struct LibraryHeader
*base
), REG(a6
, struct ExecBase
*sb
))
596 base
->libBase
.lib_Node
.ln_Type
= NT_LIBRARY
;
597 base
->libBase
.lib_Node
.ln_Pri
= 0;
598 base
->libBase
.lib_Node
.ln_Name
= (char *)UserLibName
;
599 base
->libBase
.lib_Flags
= LIBF_CHANGED
| LIBF_SUMUSED
;
600 base
->libBase
.lib_Version
= VERSION
;
601 base
->libBase
.lib_Revision
= REVISION
;
602 base
->libBase
.lib_IdString
= (char *)UserLibID
;
604 base
->segList
= librarySegment
;
605 base
->sysBase
= (APTR
)SysBase
;
608 #if defined(__AROS__)
613 #if defined(__amigaos4__)
614 static BPTR
LibExpunge(struct LibraryManagerInterface
*Self
)
616 struct LibraryHeader
*base
= (struct LibraryHeader
*)Self
->Data
.LibBase
;
617 #elif defined(__MORPHOS__)
618 static BPTR
LibExpunge(void)
620 struct LibraryHeader
*base
= (struct LibraryHeader
*)REG_A6
;
621 #elif defined(__AROS__)
622 static AROS_LH1(BPTR
, LibExpunge
,
623 AROS_LHA(UNUSED
struct LibraryHeader
*, __extrabase
, D0
),
624 struct LibraryHeader
*, base
, 3, example
629 LIBFUNC
static BPTR
LibExpunge(REG(a6
, struct LibraryHeader
*base
))
634 if(base
->libBase
.lib_OpenCnt
> 0)
636 base
->libBase
.lib_Flags
|= LIBF_DELEXP
;
640 SysBase
= (APTR
)base
->sysBase
;
643 Remove((struct Node
*)base
);
644 DeleteLibrary(&base
->libBase
);
647 #if defined(__AROS__)
652 #if defined(__amigaos4__)
653 static struct LibraryHeader
*LibOpen(struct LibraryManagerInterface
*Self
, ULONG version
)
655 struct LibraryHeader
*base
= (struct LibraryHeader
*)Self
->Data
.LibBase
;
656 #elif defined(__MORPHOS__)
657 static struct LibraryHeader
*LibOpen(void)
659 struct LibraryHeader
*base
= (struct LibraryHeader
*)REG_A6
;
660 #elif defined(__AROS__)
661 static AROS_LH1(struct LibraryHeader
*, LibOpen
,
662 AROS_LHA(UNUSED ULONG
, version
, D0
),
663 struct LibraryHeader
*, base
, 1, example
668 LIBFUNC
static struct LibraryHeader
* LibOpen(REG(a6
, struct LibraryHeader
*base
))
672 base
->libBase
.lib_Flags
&= ~LIBF_DELEXP
;
673 base
->libBase
.lib_OpenCnt
++;
676 #if defined(__AROS__)
681 #if defined(__amigaos4__)
682 static BPTR
LibClose(struct LibraryManagerInterface
*Self
)
684 struct LibraryHeader
*base
= (struct LibraryHeader
*)Self
->Data
.LibBase
;
685 #elif defined(__MORPHOS__)
686 static BPTR
LibClose(void)
688 struct LibraryHeader
*base
= (struct LibraryHeader
*)REG_A6
;
689 #elif defined(__AROS__)
690 static AROS_LH0(BPTR
, LibClose
,
691 struct LibraryHeader
*, base
, 2, example
696 LIBFUNC
static BPTR
LibClose(REG(a6
, struct LibraryHeader
*base
))
700 if(base
->libBase
.lib_OpenCnt
> 0 &&
701 --base
->libBase
.lib_OpenCnt
== 0)
703 if(base
->libBase
.lib_Flags
& LIBF_DELEXP
)
705 #if defined(__amigaos4__)
706 return LibExpunge(Self
);
707 #elif defined(__MORPHOS__)
709 #elif defined(__AROS__)
710 return example_3_LibExpunge(base
, base
);
712 return LibExpunge(base
);
718 #if defined(__AROS__)