Tiny kprintf implementation, only decimal and hexadecimal output (unsigned).
[AROS.git] / test / versionlib.c
blob6569677a00d55ed278a004170afadefc62d20ddc
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <dos/dos.h>
7 #include <aros/debug.h>
9 #include <proto/version.h>
10 #include <proto/exec.h>
12 #include <stdlib.h>
14 int main(int argc, char **argv)
16 LONG retval = RETURN_ERROR;
17 ULONG version = 0;
19 if (argc == 2)
21 version = atoi(argv[1]);
24 struct Library *VersionBase = OpenLibrary("version.library", version);
25 if (VersionBase)
27 if (VersionBase->lib_Version == 40)
29 retval = RETURN_OK;
31 else
33 bug("lib_Version != 40\n");
35 CloseLibrary(VersionBase);
37 else
39 bug("Can't open version.library v%u\n", version);
41 return retval;