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>
28 static const char version
[] __attribute__((used
)) = "$VER: openlib.c 45.0 (16.1.2004)\n";
30 #define ARG_TEMPLATE "LIBRARY/A,DIRTY/S"
39 int main(int argc
, char **argv
)
41 IPTR args
[NOOFARGS
] = {0, // ARG_LIBNAME
45 rda
= ReadArgs(ARG_TEMPLATE
, args
, NULL
);
48 if (args
[ARG_LIBNAME
]!=0)
50 APTR tmpBase
= OpenLibrary((CONST_STRPTR
) args
[ARG_LIBNAME
],0);
53 printf ("OPENLIB.c: Succesfully opened !\n");
55 if (args
[ARG_DIRTY
] == FALSE
)
57 CloseLibrary(tmpBase
);
58 printf ("OPENLIB.c: Library closed\n");
62 printf("OPENLIB.c: Library open FAILED!\n");
65 printf("OPENLIB.c: Please specify a library to open!\n");