Subject: CVS commit: src/usr.bin/gzip
To: None <source-changes@NetBSD.org>
From: David Laight <dsl@netbsd.org>
List: source-changes
Date: 08/30/2004 14:36:51
Module Name:	src
Committed By:	dsl
Date:		Mon Aug 30 14:36:51 UTC 2004

Modified Files:
	src/usr.bin/gzip: gzip.c zuncompress.c

Log Message:
Redo suffix handling so that gunzip xxx.tgx => xxx.tar
Rework logic of gz_{un}compress to make it much less likely to leak fds
    (at least 2 non-error paths leaked them!)
Make -S ".xyz" and -S "" both do something sensible.
Make in-situ compression work - only lose the file on error.
Pass an open fd to zopen (renamed zdopen) to avoid fd leakage (was badly borked)
Write header into first 64k output block to writes are aligned.
    (more efficient and might avoid some problem with code that doesn't
    like receiving partial buffers)
Check file size on compression - double checks against fs full.
Remove some pointless casts, and otherwise simplify some logic.


To generate a diff of this commit:
cvs rdiff -r1.62 -r1.63 src/usr.bin/gzip/gzip.c
cvs rdiff -r1.4 -r1.5 src/usr.bin/gzip/zuncompress.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.