diff options
author | pixel <pixel> | 2007-07-10 13:09:37 +0000 |
---|---|---|
committer | pixel <pixel> | 2007-07-10 13:09:37 +0000 |
commit | dcd04bd6d9569aff386d438dcaa1194e9ce7d36e (patch) | |
tree | 5c174e53193c6f14f713d47850139bbca316bd61 /test-it.c | |
parent | da769d1be51b4251854b10f841b6764cbc1fde1f (diff) |
mpq-fs working.
Diffstat (limited to 'test-it.c')
-rw-r--r-- | test-it.c | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -2,6 +2,7 @@ #include <stdlib.h> #include "mpq-bios.h" #include "mpq-file.h" +#include "mpq-fs.h" #include "mpq-errors.h" int main(int argc, char ** argv) { @@ -38,6 +39,26 @@ int main(int argc, char ** argv) { printf("Dumping:\n"); printf("%s", b); printf("\nDone.\n"); + mpqlib_close(f1); + } + + mpqlib_fs_add_archive(t1); + f1 = mpqlib_fs_open("Interface\\FrameXML\\WorldMapFrame.lua"); + + if (f1) { + int size; + char * b; + printf("Found!\n"); + size = mpqlib_seek(f1, 0, MPQLIB_SEEK_END); + mpqlib_seek(f1, 0, MPQLIB_SEEK_SET); + printf("Filesize seems to be: %d.\n", size); + b = (char *) malloc(size + 1); + b[size] = 0; + mpqlib_read(f1, b, size); + printf("Dumping:\n"); + printf("%s", b); + printf("\nDone.\n"); + mpqlib_close(f1); } mpqlib_close_archive(t1); |