diff options
Diffstat (limited to 'mpq-bios.c')
-rw-r--r-- | mpq-bios.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -156,6 +156,8 @@ struct mpq_archive_t * mpqlib_reopen_archive(int fd) { uint16_t * mpq_extblocks = NULL; int i; + __mpqlib_errno = MPQLIB_ERROR_NO_ERROR; + /****TODO****/ /* Implement endianess a bit everywhere */ @@ -285,15 +287,15 @@ void mpqlib_printtables(struct mpq_archive_t * mpq_a) { int i; printf("Archive details:\n"); - printf("Header size: %8d\n", mpq_a->header_size); - printf("Archive size: %8d\n", mpq_a->archive_size); - printf("Format version: %8d\n", mpq_a->format_version); - printf("Sector size: %8d\n\n", mpq_a->sector_size); + printf("Header size: %10u\n", mpq_a->header_size); + printf("Archive size: %10u\n", mpq_a->archive_size); + printf("Format version: %10u\n", mpq_a->format_version); + printf("Sector size: %10u\n\n", mpq_a->sector_size); printf("Hash table offset: %016llX\n", mpq_a->hash_table_offset); printf("Block table offset: %016llX\n", mpq_a->block_table_offset); - printf("Hash table entries: %8d\n", mpq_a->hash_table_entries); - printf("Block table entries: %8d\n", mpq_a->block_table_entries); + printf("Hash table entries: %8u\n", mpq_a->hash_table_entries); + printf("Block table entries: %8u\n", mpq_a->block_table_entries); printf("Extended block table offset: %016llX\n\n\n", mpq_a->extended_block_table_offset); @@ -347,6 +349,8 @@ int __mpqlib_read(struct mpq_archive_t * mpq_a, void * buffer, uint32_t size) { } uint64_t mpqlib_ioctl(struct mpq_archive_t * mpq_a, enum mpqlib_ioctl_t command, int entry) { + __mpqlib_errno = MPQLIB_ERROR_NO_ERROR; + switch(command) { case MPQLIB_IOCTL_NO_ACTION: return 0; |