2 Copyright © 1995-2004 The AROS Development Team. All rights reserved.
5 Desc: Tool to test openlib closelib functions.
9 #include <aros/debug.h>
11 #include <exec/memory.h>
13 #include <dos/exall.h>
14 #include <dos/datetime.h>
15 #include <proto/dos.h>
16 #include <proto/utility.h>
17 #include <utility/tagitem.h>
18 #include <utility/utility.h>
20 #include <proto/alib.h>
21 #include <proto/exec.h>
22 #include <proto/dos.h>
29 static const char version
[] = "$VER: openlib.c 45.0 (16.1.2004)\n";
31 #define ARG_TEMPLATE "LIBRARY/A,DIRTY/S"
40 int main(int argc
, char **argv
)
42 IPTR args
[NOOFARGS
] = {0, // ARG_LIBNAME
46 rda
= ReadArgs(ARG_TEMPLATE
, args
, NULL
);
49 if (args
[ARG_LIBNAME
]!=0)
51 APTR tmpBase
= OpenLibrary((CONST_STRPTR
) args
[ARG_LIBNAME
],0);
54 printf ("OPENLIB.c: Succesfully opened !\n");
56 if (args
[ARG_DIRTY
] == FALSE
)
58 CloseLibrary(tmpBase
);
59 printf ("OPENLIB.c: Library closed\n");
63 printf("OPENLIB.c: Library open FAILED!\n");
66 printf("OPENLIB.c: Please specify a library to open!\n");