Date: Wed, 08 Aug 2012 16:45:14 +0000 From: jhagewood@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r240197 - soc2012/jhagewood/diff Message-ID: <20120808164514.53322106566C@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <bsd.prog.mk> 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 *);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120808164514.53322106566C>