[sword-svn] r2697 - trunk/src/utilfuns/zlib

scribe at crosswire.org scribe at crosswire.org
Tue Apr 24 22:21:33 MST 2012


Author: scribe
Date: 2012-04-24 22:21:33 -0700 (Tue, 24 Apr 2012)
New Revision: 2697

Modified:
   trunk/src/utilfuns/zlib/untgz.c
Log:
removed unused method and added additional includes to remove warnings


Modified: trunk/src/utilfuns/zlib/untgz.c
===================================================================
--- trunk/src/utilfuns/zlib/untgz.c	2012-04-25 05:19:01 UTC (rev 2696)
+++ trunk/src/utilfuns/zlib/untgz.c	2012-04-25 05:21:33 UTC (rev 2697)
@@ -12,7 +12,10 @@
 #include <errno.h>
 #include <fcntl.h>
 #ifdef unix
-# include <unistd.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
 #else
 # include <direct.h>
 # include <io.h>
@@ -80,7 +83,6 @@
 
 enum { TGZ_EXTRACT = 0, TGZ_LIST };
 
-static char *TGZfname	OF((const char *));
 void TGZnotfound	OF((const char *));
 
 int getoct		OF((char *, int));
@@ -105,23 +107,6 @@
 /* Return the real name of the TGZ archive */
 /* or NULL if it does not exist. */
 
-static char *TGZfname OF((const char *fname))
-{
-  static char buffer[1024];
-  int origlen,i;
-  
-  strcpy(buffer,fname);
-  origlen = strlen(buffer);
-
-  for (i=0; TGZprefix[i]; i++)
-    {
-       strcpy(buffer+origlen,TGZprefix[i]);
-       if (access(buffer,F_OK) == 0)
-         return buffer;
-    }
-  return NULL;
-}
-
 /* error message for the filename */
 
 void TGZnotfound OF((const char *fname))




More information about the sword-cvs mailing list