src/archiver_hog.c
changeset 1016 957c97389257
parent 972 254427fc42ab
child 1052 f87b0b7cca8e
--- a/src/archiver_hog.c	Mon Nov 16 12:26:28 2009 -0500
+++ b/src/archiver_hog.c	Thu Jan 28 02:27:45 2010 -0500
@@ -96,7 +96,7 @@
     if (rc > 0)
         finfo->curPos += (PHYSFS_uint32) (rc * objSize);
 
-    return(rc);
+    return rc;
 } /* HOG_read */
 
 
@@ -111,13 +111,13 @@
 {
     HOGfileinfo *finfo = (HOGfileinfo *) opaque;
     HOGentry *entry = finfo->entry;
-    return(finfo->curPos >= entry->size);
+    return (finfo->curPos >= entry->size);
 } /* HOG_eof */
 
 
 static PHYSFS_sint64 HOG_tell(fvoid *opaque)
 {
-    return(((HOGfileinfo *) opaque)->curPos);
+    return ((HOGfileinfo *) opaque)->curPos;
 } /* HOG_tell */
 
 
@@ -133,14 +133,14 @@
     if (rc)
         finfo->curPos = (PHYSFS_uint32) offset;
 
-    return(rc);
+    return rc;
 } /* HOG_seek */
 
 
 static PHYSFS_sint64 HOG_fileLength(fvoid *opaque)
 {
     HOGfileinfo *finfo = (HOGfileinfo *) opaque;
-    return((PHYSFS_sint64) finfo->entry->size);
+    return ((PHYSFS_sint64) finfo->entry->size);
 } /* HOG_fileLength */
 
 
@@ -149,7 +149,7 @@
     HOGfileinfo *finfo = (HOGfileinfo *) opaque;
     BAIL_IF_MACRO(!__PHYSFS_platformClose(finfo->handle), NULL, 0);
     allocator.Free(finfo);
-    return(1);
+    return 1;
 } /* HOG_fileClose */
 
 
@@ -201,7 +201,7 @@
     if (!__PHYSFS_platformSeek(*fh, 3))
         goto openHog_failed;
 
-    return(1);
+    return 1;
 
 openHog_failed:
     if (*fh != NULL)
@@ -209,7 +209,7 @@
 
     *count = -1;
     *fh = NULL;
-    return(0);
+    return 0;
 } /* hog_open */
 
 
@@ -222,7 +222,7 @@
     if (fh != NULL)
         __PHYSFS_platformClose(fh);
 
-    return(retval);
+    return retval;
 } /* HOG_isArchive */
 
 
@@ -231,7 +231,7 @@
     if (one != two)
     {
         const HOGentry *a = (const HOGentry *) _a;
-        return(__PHYSFS_stricmpASCII(a[one].name, a[two].name));
+        return __PHYSFS_stricmpASCII(a[one].name, a[two].name);
     } /* if */
 
     return 0;
@@ -272,13 +272,13 @@
         if (__PHYSFS_platformRead(fh, &entry->name, 13, 1) != 1)
         {
             __PHYSFS_platformClose(fh);
-            return(0);
+            return 0;
         } /* if */
 
         if (__PHYSFS_platformRead(fh, &entry->size, 4, 1) != 1)
         {
             __PHYSFS_platformClose(fh);
-            return(0);
+            return 0;
         } /* if */
 
         entry->size = PHYSFS_swapULE32(entry->size);
@@ -286,14 +286,14 @@
         if (entry->startPos == -1)
         {
             __PHYSFS_platformClose(fh);
-            return(0);
+            return 0;
         }
 
         /* Skip over entry */
         if (!__PHYSFS_platformSeek(fh, entry->startPos + entry->size))
         {
             __PHYSFS_platformClose(fh);
-            return(0);
+            return 0;
         }
     } /* for */
 
@@ -301,7 +301,7 @@
 
     __PHYSFS_sort(info->entries, info->entryCount,
                   hog_entry_cmp, hog_entry_swap);
-    return(1);
+    return 1;
 } /* hog_load_entries */
 
 
@@ -321,7 +321,7 @@
     strcpy(info->filename, name);
     info->last_mod_time = modtime;
 
-    return(info);
+    return info;
 
 HOG_openArchive_failed:
     if (info != NULL)
@@ -333,7 +333,7 @@
         allocator.Free(info);
     } /* if */
 
-    return(NULL);
+    return NULL;
 } /* HOG_openArchive */
 
 
@@ -377,7 +377,7 @@
         middle = lo + ((hi - lo) / 2);
         rc = __PHYSFS_stricmpASCII(name, a[middle].name);
         if (rc == 0)  /* found it! */
-            return(&a[middle]);
+            return &a[middle];
         else if (rc > 0)
             lo = middle + 1;
         else
@@ -390,21 +390,21 @@
 
 static int HOG_exists(dvoid *opaque, const char *name)
 {
-    return(hog_find_entry(((HOGinfo *) opaque), name) != NULL);
+    return (hog_find_entry(((HOGinfo *) opaque), name) != NULL);
 } /* HOG_exists */
 
 
 static int HOG_isDirectory(dvoid *opaque, const char *name, int *fileExists)
 {
     *fileExists = HOG_exists(opaque, name);
-    return(0);  /* never directories in a groupfile. */
+    return 0;  /* never directories in a groupfile. */
 } /* HOG_isDirectory */
 
 
 static int HOG_isSymLink(dvoid *opaque, const char *name, int *fileExists)
 {
     *fileExists = HOG_exists(opaque, name);
-    return(0);  /* never symlinks in a groupfile. */
+    return 0;  /* never symlinks in a groupfile. */
 } /* HOG_isSymLink */
 
 
@@ -419,7 +419,7 @@
     if (*fileExists)  /* use time of HOG itself in the physical filesystem. */
         retval = info->last_mod_time;
 
-    return(retval);
+    return retval;
 } /* HOG_getLastModTime */
 
 
@@ -441,12 +441,12 @@
          (!__PHYSFS_platformSeek(finfo->handle, entry->startPos)) )
     {
         allocator.Free(finfo);
-        return(NULL);
+        return NULL;
     } /* if */
 
     finfo->curPos = 0;
     finfo->entry = entry;
-    return(finfo);
+    return finfo;
 } /* HOG_openRead */