socsvn commit: r240506 - soc2012/jhagewood/sdiff
jhagewood at FreeBSD.org
jhagewood at FreeBSD.org
Sat Aug 18 22:39:02 UTC 2012
Author: jhagewood
Date: Sat Aug 18 22:38:59 2012
New Revision: 240506
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=240506
Log:
Modified:
soc2012/jhagewood/sdiff/decompress.c
soc2012/jhagewood/sdiff/sdiff.c
Modified: soc2012/jhagewood/sdiff/decompress.c
==============================================================================
--- soc2012/jhagewood/sdiff/decompress.c Sat Aug 18 22:04:52 2012 (r240505)
+++ soc2012/jhagewood/sdiff/decompress.c Sat Aug 18 22:38:59 2012 (r240506)
@@ -86,17 +86,3 @@
return file;
}
-
-/* Checks for a gz file extension. */
-int
-isgzip(char *filename)
-{
-
- int length = (sizeof filename)-1;
-
- if (filename[length-1] == 'g' && filename[length] == 'z')
- return 1;
-
- return 0;
-
-}
Modified: soc2012/jhagewood/sdiff/sdiff.c
==============================================================================
--- soc2012/jhagewood/sdiff/sdiff.c Sat Aug 18 22:04:52 2012 (r240505)
+++ soc2012/jhagewood/sdiff/sdiff.c Sat Aug 18 22:38:59 2012 (r240506)
@@ -62,7 +62,6 @@
};
extern FILE *decompressfile(char *, char *);
-extern int isgzip(char *);
static void astrcat(char **, const char *);
static void enqueue(char *, char, char *);
@@ -444,14 +443,7 @@
/* Open pipe to diff command. */
if ((diffpipe = fdopen(fd[0], "r")) == NULL)
err(2, "could not open diff pipe");
- }
-
- /* Checks for file extension to determine behavior. */
- if (isgzip(filename1) || isgzip(filename2))
- filebehave = FILE_GZIP;
- else
- filebehave = FILE_NORMAL;
-
+ }
if (filebehave == FILE_NORMAL) {
if ((file1 = fopen(filename1, "r")) == NULL)
err(2, "could not open %s", filename1);
More information about the svn-soc-all
mailing list