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__)
295 #elif defined(__AROS__)
296 __startup
int Main(void)
304 #if !defined(__amigaos4__)
305 LIBFUNC
static LONG
LibNull(VOID
)
311 /******************************************************************************/
312 /* Local data structures */
313 /******************************************************************************/
315 #if defined(__amigaos4__)
316 /* ------------------- OS4 Manager Interface ------------------------ */
317 STATIC ULONG
LibObtain(struct LibraryManagerInterface
*Self
)
319 return(Self
->Data
.RefCount
++);
322 STATIC ULONG
LibRelease(struct LibraryManagerInterface
*Self
)
324 return(Self
->Data
.RefCount
--);
327 STATIC CONST APTR LibManagerVectors
[] =
340 STATIC CONST
struct TagItem LibManagerTags
[] =
342 {MIT_Name
, (ULONG
)"__library"},
343 {MIT_VectorTable
, (ULONG
)LibManagerVectors
},
348 /* ------------------- Library Interface(s) ------------------------ */
350 STATIC CONST APTR LibVectors
[] =
360 STATIC CONST
struct TagItem MainTags
[] =
362 {MIT_Name
, (ULONG
)"main"},
363 {MIT_VectorTable
, (ULONG
)LibVectors
},
369 STATIC CONST ULONG LibInterfaces
[] =
371 (ULONG
)LibManagerTags
,
376 /* --------------------- m68k Library stubs ------------------------ */
378 STATIC ULONG
stub_OpenPPC(ULONG
*regarray
)
380 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
381 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
382 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
384 return (ULONG
) Self
->Open(0);
386 struct EmuTrap stub_Open
= { TRAPINST
, TRAPTYPE
, stub_OpenPPC
};
388 STATIC ULONG
stub_ClosePPC(ULONG
*regarray
)
390 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
391 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
392 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
394 return (ULONG
) Self
->Close();
396 struct EmuTrap stub_Close
= { TRAPINST
, TRAPTYPE
, stub_ClosePPC
};
398 STATIC ULONG
stub_ExpungePPC(ULONG
*regarray
)
402 struct EmuTrap stub_Expunge
= { TRAPINST
, TRAPTYPE
, stub_ExpungePPC
};
404 STATIC ULONG
stub_ReservedPPC(ULONG
*regarray
)
408 struct EmuTrap stub_Reserved
= { TRAPINST
, TRAPTYPE
, stub_ReservedPPC
};
410 STATIC ULONG
stub_SayHelloOS4PPC(ULONG
*regarray
)
412 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
413 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
414 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
416 return (char *)Self
->SayHelloOS4();
418 struct EmuTrap stub_SayHelloOS4
= { TRAPINST
, TRAPTYPE
, stub_SayHelloOS4PPC
};
420 STATIC ULONG
stub_SayHelloOS3PPC(ULONG
*regarray
)
422 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
423 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
424 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
426 return (char *)Self
->SayHelloOS3();
428 struct EmuTrap stub_SayHelloOS3
= { TRAPINST
, TRAPTYPE
, stub_SayHelloOS3PPC
};
430 STATIC ULONG
stub_SayHelloMOSPPC(ULONG
*regarray
)
432 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
433 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
434 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
436 return (char *)Self
->SayHelloMOS();
438 struct EmuTrap stub_SayHelloMOS
= { TRAPINST
, TRAPTYPE
, stub_SayHelloMOSPPC
};
440 STATIC ULONG
stub_UppercasePPC(ULONG
*regarray
)
442 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
443 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
444 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
446 return (char *)Self
->Uppercase(
450 struct EmuTrap stub_Uppercase
= { TRAPINST
, TRAPTYPE
, stub_UppercasePPC
};
452 STATIC ULONG
stub_SPrintfAPPC(ULONG
*regarray
)
454 struct Library
*Base
= (struct Library
*) regarray
[REG68K_A6
/4];
455 struct ExtendedLibrary
*ExtLib
= (struct ExtendedLibrary
*) ((ULONG
)Base
+ Base
->lib_PosSize
);
456 struct LibraryManagerInterface
*Self
= (struct LibraryManagerInterface
*) ExtLib
->ILibrary
;
458 return (char *)Self
->SPrintfA(
464 struct EmuTrap stub_SPrintfA
= { TRAPINST
, TRAPTYPE
, stub_SPrintfAPPC
};
466 STATIC ULONG VecTable68K
[] =
470 (ULONG
)&stub_Expunge
,
471 (ULONG
)&stub_Reserved
,
472 (ULONG
)&stub_SayHelloOS4
,
473 (ULONG
)&stub_SayHelloOS3
,
474 (ULONG
)&stub_SayHelloMOS
,
475 (ULONG
)&stub_Uppercase
,
476 (ULONG
)&stub_SprintfA
,
480 /* ----------------------- LibCreate Tags -------------------------- */
482 STATIC CONST
struct TagItem LibCreateTags
[] =
484 {CLT_DataSize
, (ULONG
)(sizeof(struct LibraryHeader
))},
485 {CLT_InitFunc
, (ULONG
)LibInit
},
486 {CLT_Interfaces
, (ULONG
)LibInterfaces
},
487 {CLT_Vector68K
, (ULONG
)VecTable68K
},
493 STATIC CONST APTR LibVectors
[] =
496 (APTR
)FUNCARRAY_32BIT_NATIVE
,
498 #if defined(__AROS__)
500 AROS_SLIB_ENTRY(LibOpen
, example
, 1),
501 AROS_SLIB_ENTRY(LibClose
, example
, 2),
502 AROS_SLIB_ENTRY(LibExpunge
, example
, 3),
504 AROS_SLIB_ENTRY(LibOpen
, example
),
505 AROS_SLIB_ENTRY(LibClose
, example
),
506 AROS_SLIB_ENTRY(LibExpunge
, example
),
518 STATIC CONST IPTR LibInitTab
[] =
520 sizeof(struct LibraryHeader
),
528 /* ------------------- ROM Tag ------------------------ */
529 static const USED_VAR
struct Resident ROMTag
=
532 (struct Resident
*)&ROMTag
,
533 (struct Resident
*)&ROMTag
+ 1,
534 #if defined(__amigaos4__)
535 RTF_AUTOINIT
|RTF_NATIVE
, // The Library should be set up according to the given table.
536 #elif defined(__MORPHOS__)
537 RTF_AUTOINIT
|RTF_PPC
,
538 #elif defined(__AROS__)
539 RTF_AUTOINIT
|RTF_EXTENDED
,
548 #if defined(__amigaos4__)
549 (APTR
)LibCreateTags
// This table is for initializing the Library.
555 #if defined(__MORPHOS__)
557 * To tell the loader that this is a new emulppc elf and not
558 * one for the ppc.library.
561 ULONG USED_VAR __amigappc__
=1;
562 ULONG USED_VAR __abox__
=1;
564 #endif /* __MORPHOS */
566 /******************************************************************************/
567 /* Standard Library Functions, all of them are called in Forbid() state. */
568 /******************************************************************************/
571 #define DeleteLibrary(LIB) \
572 FreeMem((STRPTR)(LIB)-(LIB)->lib_NegSize, (ULONG)((LIB)->lib_NegSize+(LIB)->lib_PosSize))
575 #if defined(__amigaos4__)
576 static struct LibraryHeader
* LibInit(struct LibraryHeader
*base
, BPTR librarySegment
, struct ExecIFace
*pIExec
)
578 struct ExecBase
*sb
= (struct ExecBase
*)pIExec
->Data
.LibBase
;
580 #elif defined(__MORPHOS__)
581 static struct LibraryHeader
* LibInit(struct LibraryHeader
*base
, BPTR librarySegment
, struct ExecBase
*sb
)
583 #elif defined(__AROS__)
584 static AROS_UFH3(struct LibraryHeader
*, LibInit
,
585 AROS_UFHA(struct LibraryHeader
*, base
, D0
),
586 AROS_UFHA(BPTR
, librarySegment
, A0
),
587 AROS_UFHA(struct ExecBase
*, sb
, A6
)
592 LIBFUNC
static struct LibraryHeader
* LibInit(REG(a0
, BPTR librarySegment
), REG(d0
, struct LibraryHeader
*base
), REG(a6
, struct ExecBase
*sb
))
598 base
->libBase
.lib_Node
.ln_Type
= NT_LIBRARY
;
599 base
->libBase
.lib_Node
.ln_Pri
= 0;
600 base
->libBase
.lib_Node
.ln_Name
= (char *)UserLibName
;
601 base
->libBase
.lib_Flags
= LIBF_CHANGED
| LIBF_SUMUSED
;
602 base
->libBase
.lib_Version
= VERSION
;
603 base
->libBase
.lib_Revision
= REVISION
;
604 base
->libBase
.lib_IdString
= (char *)UserLibID
;
606 base
->segList
= librarySegment
;
607 base
->sysBase
= (APTR
)SysBase
;
610 #if defined(__AROS__)
615 #if defined(__amigaos4__)
616 static BPTR
LibExpunge(struct LibraryManagerInterface
*Self
)
618 struct LibraryHeader
*base
= (struct LibraryHeader
*)Self
->Data
.LibBase
;
619 #elif defined(__MORPHOS__)
620 static BPTR
LibExpunge(void)
622 struct LibraryHeader
*base
= (struct LibraryHeader
*)REG_A6
;
623 #elif defined(__AROS__)
624 static AROS_LH1(BPTR
, LibExpunge
,
625 AROS_LHA(UNUSED
struct LibraryHeader
*, __extrabase
, D0
),
626 struct LibraryHeader
*, base
, 3, example
631 LIBFUNC
static BPTR
LibExpunge(REG(a6
, struct LibraryHeader
*base
))
636 if(base
->libBase
.lib_OpenCnt
> 0)
638 base
->libBase
.lib_Flags
|= LIBF_DELEXP
;
642 SysBase
= (APTR
)base
->sysBase
;
645 Remove((struct Node
*)base
);
646 DeleteLibrary(&base
->libBase
);
649 #if defined(__AROS__)
654 #if defined(__amigaos4__)
655 static struct LibraryHeader
*LibOpen(struct LibraryManagerInterface
*Self
, ULONG version
)
657 struct LibraryHeader
*base
= (struct LibraryHeader
*)Self
->Data
.LibBase
;
658 #elif defined(__MORPHOS__)
659 static struct LibraryHeader
*LibOpen(void)
661 struct LibraryHeader
*base
= (struct LibraryHeader
*)REG_A6
;
662 #elif defined(__AROS__)
663 static AROS_LH1(struct LibraryHeader
*, LibOpen
,
664 AROS_LHA(UNUSED ULONG
, version
, D0
),
665 struct LibraryHeader
*, base
, 1, example
670 LIBFUNC
static struct LibraryHeader
* LibOpen(REG(a6
, struct LibraryHeader
*base
))
674 base
->libBase
.lib_Flags
&= ~LIBF_DELEXP
;
675 base
->libBase
.lib_OpenCnt
++;
678 #if defined(__AROS__)
683 #if defined(__amigaos4__)
684 static BPTR
LibClose(struct LibraryManagerInterface
*Self
)
686 struct LibraryHeader
*base
= (struct LibraryHeader
*)Self
->Data
.LibBase
;
687 #elif defined(__MORPHOS__)
688 static BPTR
LibClose(void)
690 struct LibraryHeader
*base
= (struct LibraryHeader
*)REG_A6
;
691 #elif defined(__AROS__)
692 static AROS_LH0(BPTR
, LibClose
,
693 struct LibraryHeader
*, base
, 2, example
698 LIBFUNC
static BPTR
LibClose(REG(a6
, struct LibraryHeader
*base
))
702 if(base
->libBase
.lib_OpenCnt
> 0 &&
703 --base
->libBase
.lib_OpenCnt
== 0)
705 if(base
->libBase
.lib_Flags
& LIBF_DELEXP
)
707 #if defined(__amigaos4__)
708 return LibExpunge(Self
);
709 #elif defined(__MORPHOS__)
711 #elif defined(__AROS__)
712 return example_3_LibExpunge(base
, base
);
714 return LibExpunge(base
);
720 #if defined(__AROS__)