From owner-svn-soc-all@FreeBSD.ORG Sat Aug 18 22:39:01 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id CB334106564A for ; Sat, 18 Aug 2012 22:38:59 +0000 (UTC) (envelope-from jhagewood@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Sat, 18 Aug 2012 22:38:59 +0000 Date: Sat, 18 Aug 2012 22:38:59 +0000 From: jhagewood@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120818223859.CB334106564A@hub.freebsd.org> Cc: Subject: socsvn commit: r240506 - soc2012/jhagewood/sdiff X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Aug 2012 22:39:02 -0000 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);