archivers/grp.c
changeset 163 fc2b8ee5b420
parent 161 4fcc863fdc5f
child 175 45e423c38ff8
--- a/archivers/grp.c	Wed Apr 03 07:38:10 2002 +0000
+++ b/archivers/grp.c	Wed Apr 03 07:40:27 2002 +0000
@@ -130,8 +130,7 @@
     void *fh = finfo->handle;
     PHYSFS_sint64 curPos = __PHYSFS_platformTell(fh);
     PHYSFS_uint64 bytesLeft = (finfo->startPos + finfo->size) - curPos;
-    /*!!! If objSize is '1' it's quite likely that objsLeft will be greater than 32-bits */
-    PHYSFS_uint32 objsLeft = (PHYSFS_uint32)(bytesLeft / objSize);
+    PHYSFS_uint64 objsLeft = (bytesLeft / objSize);
 
     if (objsLeft < objCount)
         objCount = objsLeft;
@@ -158,8 +157,7 @@
 static int GRP_seek(FileHandle *handle, PHYSFS_uint64 offset)
 {
     GRPfileinfo *finfo = (GRPfileinfo *) (handle->opaque);
-    /*!!! Why isn't newPos a 64-bit??? */
-    int newPos = (int)(finfo->startPos + offset);
+    PHYSFS_uint64 newPos = (finfo->startPos + offset);
 
     BAIL_IF_MACRO(offset < 0, ERR_INVALID_ARGUMENT, 0);
     BAIL_IF_MACRO(newPos > finfo->startPos + finfo->size, ERR_PAST_EOF, 0);
@@ -289,7 +287,6 @@
     PHYSFS_uint8 buf[16];
     GRPinfo *g = (GRPinfo *) (h->opaque);
     void *fh = g->handle;
-    /*!!! This should be a uint32 and not an int...look at loops below */
     PHYSFS_uint32 i;
     LinkedStringList *retval = NULL;
     LinkedStringList *l = NULL;
@@ -302,7 +299,6 @@
         /* jump to first file entry... */
     BAIL_IF_MACRO(!__PHYSFS_platformSeek(fh, 16), NULL, NULL);
 
-    /*!!! i needs to be unsigned */
     for (i = 0; i < g->totalEntries; i++)
     {
         BAIL_IF_MACRO(__PHYSFS_platformRead(fh, buf, 16, 1) != 1, NULL, retval);
@@ -341,7 +337,6 @@
     PHYSFS_uint8 buf[16];
     GRPinfo *g = (GRPinfo *) (h->opaque);
     void *fh = g->handle;
-    /*!!! This should be a uint32 and not an int...look at loops below */
     PHYSFS_uint32 i;
     char *ptr;
     int retval = (g->totalEntries + 1) * 16; /* offset of raw file data */