diff options
-rw-r--r-- | test-it.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test-it.c b/test-it.c new file mode 100644 index 0000000..0d13e87 --- /dev/null +++ b/test-it.c @@ -0,0 +1,25 @@ +#include <stdio.h> +#include <stdlib.h> +#include "mpq-bios.h" +#include "mpq-errors.h" + +int main(int argc, char ** argv) { + mpq_archive_t * t1; + char * fname = "test.mpq"; + + mpqlib_init(); + + if (argc == 2) + fname = argv[1]; + + t1 = mpqlib_open_archive(fname); + if (!t1) { + printf("Open error: %s.\n", mpqlib_error()); + perror("Details"); + exit(-1); + } + + mpqlib_printtables(t1); + + mpqlib_close_archive(t1); +} |