Mercurial > hg > dmlib
changeset 1108:5a8d29b88431
More fixes.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 04 Mar 2015 00:50:53 +0200 |
parents | 69c0d8ad2672 |
children | c8bcdddf233c |
files | src/dmpack.c tests/testdmzlib.c tools/packed.c tools/xm2jss.c |
diffstat | 4 files changed, 7 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dmpack.c Wed Mar 04 00:49:47 2015 +0200 +++ b/src/dmpack.c Wed Mar 04 00:50:53 2015 +0200 @@ -96,7 +96,7 @@ pack->filename = dm_strdup(filename); // Read PACK header - if (DM_FSEEK64(pack->file, 0L, SEEK_SET) != 0) + if (fseeko(pack->file, 0L, SEEK_SET) != 0) { ret = dmErrorDBG(dmGetErrno(), "Failed to seek to file start '%s'.\n", @@ -129,7 +129,7 @@ // Read directory if (hdr.dirOffset < sizeof(hdr) || - DM_FSEEK64(pack->file, hdr.dirOffset, SEEK_SET) != 0) + fseeko(pack->file, hdr.dirOffset, SEEK_SET) != 0) { ret = dmErrorDBG(DMERR_INVALID, "Error seeking to PACK file '%s' directory offset.\n",
--- a/tests/testdmzlib.c Wed Mar 04 00:49:47 2015 +0200 +++ b/tests/testdmzlib.c Wed Mar 04 00:50:53 2015 +0200 @@ -298,7 +298,7 @@ goto out; } - if (optSkip > 0 && DM_FSEEK64(inFile, optSkip, SEEK_CUR) != 0) + if (optSkip > 0 && fseeko(inFile, optSkip, SEEK_CUR) != 0) { int res = dmGetErrno(); dmErrorMsg("Failed to seek in input stream: %s\n",
--- a/tools/packed.c Wed Mar 04 00:49:47 2015 +0200 +++ b/tools/packed.c Wed Mar 04 00:50:53 2015 +0200 @@ -211,7 +211,7 @@ } // Write PACK header - if (DM_FSEEK64(pack->file, 0, SEEK_SET) != 0) + if (fseeko(pack->file, 0, SEEK_SET) != 0) return DMERR_FSEEK; if (!dm_fwrite_str(pack->file, (Uint8 *) & hdr.ident, sizeof(hdr.ident)) || @@ -221,7 +221,7 @@ return DMERR_FWRITE; // Write the directory - if (DM_FSEEK64(pack->file, hdr.dirOffset, SEEK_SET) != 0) + if (fseeko(pack->file, hdr.dirOffset, SEEK_SET) != 0) return DMERR_FSEEK; node = pack->entries; @@ -295,7 +295,7 @@ } // Seek to the position - if (DM_FSEEK64(pack->file, startOffs, SEEK_SET) != 0) + if (fseeko(pack->file, startOffs, SEEK_SET) != 0) return DMERR_INVALID; // Read file data @@ -413,7 +413,7 @@ return DMERR_FOPEN; // Seek to the position - if (DM_FSEEK64(pack->file, entry->offset, SEEK_SET) != 0) + if (fseeko(pack->file, entry->offset, SEEK_SET) != 0) return DMERR_FSEEK; // Open destination file