bouyer
41bff69bbe
Always initialise savename. Fix gzip -c core dump on sparc (and probably
...
others). OK'd by mrg@.
2004-05-06 17:43:57 +00:00
mrg
99d2aa3dc3
clean up file descriptor handling. don't lose them...
2004-04-27 13:45:50 +00:00
mrg
a9c239e635
- the default compression level in GNU gzip is 6 not 5; copy that default.
...
- note that -t/-l/-v & bzip2 is not handled the same as gzip in a comment.
2004-04-27 11:26:28 +00:00
mrg
b02eba12c2
crank version.
2004-04-27 02:25:06 +00:00
mrg
d6dd48bc60
- fix "gunzip file.gz"
...
- fix "gzip <lots of files>"
both reported by tron@.
2004-04-27 01:23:35 +00:00
mrg
4db02197fc
- properly parse --fast/--best/-1..-9 again. noted by taca@.
...
- minor clean up.
2004-04-26 03:01:55 +00:00
mrg
1d0e9794a0
significantly rototill. don't use the high-level gzio functions
...
anymore, use the low-level inflate()/deflate() directly. this
allows support file-type detection on stdin; now can decompress
.Z and .bz2 files fed to stdin (fixes PR#25192) additionally it
makes -v work with stdin or stdout (fixes PR#25215.)
(with these changes, we no longer need gzopenfull(3) in libz.)
thanks to martin@ for the code gzip.c:gz_uncompress() is based on.
2004-04-25 16:20:33 +00:00
mrg
98445d2478
be sure we don't try to remove an output file we haven't actually created.
...
(reported by kimmo.)
2004-04-12 14:42:14 +00:00
mrg
ff187e728e
- completely rewrite print_ratio(). fixes PR#25072 and a few other cases
...
- print_list() was getting the compressed/uncompressed sizes backwards.
2004-04-07 14:25:43 +00:00
mrg
8a618ce17c
remove a chunk more code with -DSMALL and in the process fix -DSMALL
...
that was broken in the previous commit (by exposing "fflag".)
2004-03-31 15:46:25 +00:00
tron
17ebf9b589
Handle files with link count larger than 1 if "-f" option is used. This
...
is consistent with the old "gzip" and required by "pkgsrc" to implement
"MANZ" properly.
2004-03-31 15:19:14 +00:00
mrg
7149a52947
factor out filetype checking code
2004-03-30 11:42:04 +00:00
mrg
d4e27c8dfb
use off_t instead of ssize_t in a few places.
...
fix "gzip -l" in -DSMALL (it wasn't doing a stat(2)).
2004-03-30 09:42:58 +00:00
mrg
70da2f0f10
patch from tron@ to convert to using public bz interfaces. simonb says
...
no reason not to and this fixes PR#24964.
2004-03-30 09:15:07 +00:00
mrg
ed20265f67
shave another 612 bytes off -DSMALL on x86. now x_gzip with -l support
...
is actually smaller than the older x_gzip without it!
2004-03-28 13:54:44 +00:00
mrg
15fba948a6
still do argv[0] processing -DSMALL, from tsutsui.
...
pass the smaller list of options to getopt with -DSMALL.
2004-03-28 08:18:14 +00:00
mrg
720263a2ef
crank version
2004-03-28 04:13:40 +00:00
mrg
d7f0a538e2
remove a bunch more stuff with -DSMALL. now we are about 400 bytes larger
...
than x_gzip... given we add -l support, time to retire x_gzip/gzip.c.
2004-03-28 04:07:45 +00:00
mrg
57a27c0187
remove another 3KB or so of text/data on i386 with -DSMALL. now only
...
about 1.1KB larger than the old x_gzip sources, but includes (required
for sysinst) gzip -l support.
2004-03-28 03:47:18 +00:00
tsutsui
b6e59003c4
Allow disabling bzip2 (.bz2) and compress (.Z) support
...
by -DNO_BZIP2_SUPPORT and -DNO_COMPRESS_SUPPORT.
OK'ed by mrg.
2004-03-27 22:33:43 +00:00
mrg
6506e19a17
minor cleanup.
2004-03-06 09:41:36 +00:00
mrg
91d1fa9407
support decompressing "compress"ed files. from rtr@ with a few minor edits
...
from me. code in zuncompress liberally borrowed from usr.bin/compress.
2004-02-18 08:19:48 +00:00
mrg
49637d1931
use gzopenfull()
2004-01-29 13:18:58 +00:00
grant
23032f5513
void functions need not call return
2004-01-25 05:19:49 +00:00
jmmv
b635f565e7
Homogenize usage messages: make the 'usage' word all lowercase, as this seems
...
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
mrg
d8d414bd77
prepend_gzip: avoid searching beyond this string
2004-01-03 02:39:18 +00:00
simonb
95a042fe31
Fix off-by-one error in the malloc of the new argv in prepend_gzip().
2004-01-02 10:09:42 +00:00
wiz
7569ff6812
Fix typo in comment.
2004-01-02 03:12:21 +00:00
mrg
0b76a77c33
implement $GZIP handling.
2004-01-02 02:55:26 +00:00
mrg
91536bce55
note that $GZIP support is missing still
2004-01-02 01:40:59 +00:00
mrg
74e9c5767a
allow HAVE_ZLIB_GZOPENFULL to be overriden externally
2004-01-02 01:34:01 +00:00
mrg
e4b2fd8644
don't dump core in the face of unknown long options. from cjep@
2004-01-01 05:28:44 +00:00
mrg
09e6110c19
add some simple -DSMALL support. reduces the size of gzip(1) itself a by
...
nearly 2.5KB text.
2004-01-01 02:58:36 +00:00
mrg
ecadec7f36
port simonb's bzip2 support.
...
misc cleanups.
2004-01-01 02:44:09 +00:00
mrg
0889156103
GNU gzip compatibility: don't let "gzip -dc" (zcat) operate on non-gzip
...
files by default. -f must be used.
2003-12-28 13:42:28 +00:00
mrg
a4624b06a5
- document --list
...
- use unsigned char's that are used in unsigned calculations later.
2003-12-26 15:15:49 +00:00
mrg
9e3ca570b9
support gzip -l -v.
2003-12-26 15:06:16 +00:00
mrg
88899e3372
- print totals for --list.
...
- round down percentages, like GNU gzip does
- use "stdout" not "-", like GNU gzip does
- factor percent calculation code.
2003-12-26 14:49:37 +00:00
mrg
78b17b7b2b
begin to start to support --list.
2003-12-26 14:11:01 +00:00
mrg
75fa5559f5
- make this WARNS=3 happy
...
- add RCSID()
- document the version number
2003-12-23 15:02:40 +00:00
jdolecek
3c67b87463
some const-poisoing, depend on bss to set gzipflags[]
2003-12-23 08:11:58 +00:00
mrg
874b680779
delete unused variables
2003-12-23 06:23:18 +00:00
mrg
4084ec5402
import distrib/utils/x_gzip into usr.bin/gzip, with these enhancements:
...
- fully updated manual
- -n/-N support
- time stamp/owner/etc saved properly
- GNU gzip --long-options supported (missing --ascii, --list
and --licence)
- various cleanups & fixes
note that "-n" (save filename) support is currently disabled due to
depending on API changes in zlib. for now, this support is disabled
(however "gzip -N -d" works.)
this gzip(1) replacement is ready for serious testing. issues are:
- might implement --list one day
- zlib API addition
2003-12-23 05:16:31 +00:00