From owner-svn-soc-all@FreeBSD.ORG Wed Aug 8 16:45:16 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 53322106566C for ; Wed, 8 Aug 2012 16:45:14 +0000 (UTC) (envelope-from jhagewood@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Wed, 08 Aug 2012 16:45:14 +0000 Date: Wed, 08 Aug 2012 16:45:14 +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: <20120808164514.53322106566C@hub.freebsd.org> Cc: Subject: socsvn commit: r240197 - soc2012/jhagewood/diff 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: Wed, 08 Aug 2012 16:45:16 -0000 Author: jhagewood Date: Wed Aug 8 16:45:13 2012 New Revision: 240197 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=240197 Log: zdiff integration Modified: soc2012/jhagewood/diff/Makefile soc2012/jhagewood/diff/decompress.c soc2012/jhagewood/diff/diffreg.c Modified: soc2012/jhagewood/diff/Makefile ============================================================================== --- soc2012/jhagewood/diff/Makefile Wed Aug 8 16:07:26 2012 (r240196) +++ soc2012/jhagewood/diff/Makefile Wed Aug 8 16:45:13 2012 (r240197) @@ -4,7 +4,7 @@ DEBUG_FLAGS+= -g PROG= diff zdiff -SRCS= diff.c diffdir.c diffreg.c +SRCS= diff.c diffdir.c diffreg.c decompress.c CFLAGS+= -std=c99 -Wall -pedantic -lz .include Modified: soc2012/jhagewood/diff/decompress.c ============================================================================== --- soc2012/jhagewood/diff/decompress.c Wed Aug 8 16:07:26 2012 (r240196) +++ soc2012/jhagewood/diff/decompress.c Wed Aug 8 16:45:13 2012 (r240197) @@ -62,13 +62,13 @@ decompressfile(char *filename, char *mode) { FILE *file; - char *buf; + char *buf = ""; gzFile comprfile; if (comprfile = gzopen(filename, mode) == Z_NULL) err(1, "Could not open compressed file %s.", filename); gzread(comprfile, buf, MAXBUFSIZE); - file = fdopen(buf, mode); + fputs(buf, file); return file; } Modified: soc2012/jhagewood/diff/diffreg.c ============================================================================== --- soc2012/jhagewood/diff/diffreg.c Wed Aug 8 16:07:26 2012 (r240196) +++ soc2012/jhagewood/diff/diffreg.c Wed Aug 8 16:45:13 2012 (r240197) @@ -191,6 +191,8 @@ int d; /* end line in new file */ }; +extern FILE *decompressfile(char *, char *); + static FILE *opentemp(const char *); static void output(char *, FILE *, char *, FILE *, int); static void check(char *, FILE *, char *, FILE *);