The NetBSD Project

CVS log for src/usr.bin/gzip/gzip.c

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / gzip

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.118.2.1 / (download) - annotate - [select for diffs], Sun Feb 4 11:07:40 2024 UTC (7 weeks, 5 days ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4
Changes since 1.118: +29 -30 lines
Diff to previous 1.118 (colored) next main 1.119 (colored) to selected 1.71.2.7 (colored)

Pull up the following, requested by mrg in ticket #582:

	usr.bin/gzip/gzip.1                             up to 1.32
	usr.bin/gzip/gzip.c                             up to 1.122
	usr.bin/gzip/unlz.c                             up to 1.8
	usr.bin/gzip/unpack.c                           up to 1.4

Sync usr.bin/gzip to HEAD to fix a few minor issues, including
PR 57858 and PR 57855.

Revision 1.122 / (download) - annotate - [select for diffs], Sat Feb 3 22:40:29 2024 UTC (7 weeks, 5 days ago) by mrg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.121: +6 -7 lines
Diff to previous 1.121 (colored) to selected 1.71.2.7 (colored)

bump copyright and version.

Revision 1.121 / (download) - annotate - [select for diffs], Mon Jan 15 17:35:48 2024 UTC (2 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.120: +4 -4 lines
Diff to previous 1.120 (colored) to selected 1.71.2.7 (colored)

PR/57858: Ricardo Branco: Print the full pathname on errors.
from FreeBSD https://github.com/NetBSD/src/pull/25

Revision 1.120 / (download) - annotate - [select for diffs], Sun Jan 14 18:12:59 2024 UTC (2 months, 2 weeks ago) by mrg
Branch: MAIN
Changes since 1.119: +6 -6 lines
Diff to previous 1.119 (colored) to selected 1.71.2.7 (colored)

set file flags after setting other modes

otherwise permission to set modes may be revoked by the flags.
from PR#57855.  thanks!

XXX: pullup-all

Revision 1.119 / (download) - annotate - [select for diffs], Sat Jun 10 04:45:25 2023 UTC (9 months, 2 weeks ago) by simonb
Branch: MAIN
Changes since 1.118: +19 -19 lines
Diff to previous 1.118 (colored) to selected 1.71.2.7 (colored)

Pull git commit way-etc-20140221.tar.bz2 by Xin Li from FreeBSD:

    Remove unneeded checks for prelen.

    In order to determine the type of a compressed file, we have to read
    in the first four bytes which may also be important for decompression
    purposes, to do that we would pass the buffer that we have already
    read in, along with the size of it.

    Rename header1 to fourbytes to make that explicit, and remove all
    checks for prelen.

Revision 1.118 / (download) - annotate - [select for diffs], Sat Jan 22 14:00:45 2022 UTC (2 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Branch point for: netbsd-10
Changes since 1.117: +35 -14 lines
Diff to previous 1.117 (colored) to selected 1.71.2.7 (colored)

make siginfo handler print to /dev/tty.

Revision 1.117 / (download) - annotate - [select for diffs], Thu Jun 24 07:16:49 2021 UTC (2 years, 9 months ago) by simonb
Branch: MAIN
Changes since 1.116: +3 -2 lines
Diff to previous 1.116 (colored) to selected 1.71.2.7 (colored)

Call check_siginfo() in compression loop to provide SIGINFO compression
progress.
Suggested by mrg@.

Revision 1.113.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:10:20 2019 UTC (4 years, 9 months ago) by christos
Branch: phil-wifi
Changes since 1.113: +51 -5 lines
Diff to previous 1.113 (colored) next main 1.114 (colored) to selected 1.71.2.7 (colored)

Sync with HEAD

Revision 1.112.2.4 / (download) - annotate - [select for diffs], Mon Nov 26 12:05:55 2018 UTC (5 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.112.2.3: +2 -6 lines
Diff to previous 1.112.2.3 (colored) to branchpoint 1.112 (colored) next main 1.113 (colored) to selected 1.71.2.7 (colored)

Another missed pseudo-conflict

Revision 1.112.2.3 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:54 2018 UTC (5 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.112.2.2: +44 -2 lines
Diff to previous 1.112.2.2 (colored) to branchpoint 1.112 (colored) to selected 1.71.2.7 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.116 / (download) - annotate - [select for diffs], Sat Oct 27 11:39:12 2018 UTC (5 years, 5 months ago) by skrll
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.115: +3 -3 lines
Diff to previous 1.115 (colored) to selected 1.71.2.7 (colored)

Fix previous

Revision 1.115 / (download) - annotate - [select for diffs], Fri Oct 26 22:10:15 2018 UTC (5 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.114: +40 -2 lines
Diff to previous 1.114 (colored) to selected 1.71.2.7 (colored)

Add lzip support to gzip based on the example lzip decoder.

Revision 1.112.2.2 / (download) - annotate - [select for diffs], Sat Oct 20 06:58:47 2018 UTC (5 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.112.2.1: +13 -5 lines
Diff to previous 1.112.2.1 (colored) to branchpoint 1.112 (colored) to selected 1.71.2.7 (colored)

Sync with head

Revision 1.114 / (download) - annotate - [select for diffs], Sat Oct 6 16:36:45 2018 UTC (5 years, 5 months ago) by martin
Branch: MAIN
CVS Tags: pgoyette-compat-1020
Changes since 1.113: +13 -5 lines
Diff to previous 1.113 (colored) to selected 1.71.2.7 (colored)

Add -l support for xz files

Revision 1.112.2.1 / (download) - annotate - [select for diffs], Mon Jun 25 07:26:10 2018 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.112: +10 -6 lines
Diff to previous 1.112 (colored) to selected 1.71.2.7 (colored)

Sync with HEAD

Revision 1.113 / (download) - annotate - [select for diffs], Tue Jun 12 00:42:17 2018 UTC (5 years, 9 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.112: +10 -6 lines
Diff to previous 1.112 (colored) to selected 1.71.2.7 (colored)

Correct Undefined Behavior in gzip(1)

Unportable left shift reported with MKSANITIZER=yes USE_SANITIZER=undefined:

# progress -zf ./games.tgz  tar -xp -C "./" -f -
/public/src.git/usr.bin/gzip/gzip.c:2126:33: runtime error: left shift of 251 by 24 places cannot be represented in type 'int'
100% |****************************************************************************************************************| 44500 KiB  119.69 MiB/s    00:00 ETA


Refactor the following code into something that is more clear
and fix signed integer shift, by casting all buf[] elements to
(unsigned int):

unsigned char buf[8];
uint32_t usize;
[...]
else {
    usize = buf[4] | buf[5] << 8 |
            buf[6] << 16 | buf[7] << 24;
[...]

New version:

    usize = buf[4];
    usize |= (unsigned int)buf[5] << 8;
    usize |= (unsigned int)buf[6] << 16;
    usize |= (unsigned int)buf[7] << 24;

Only the "<< 24" part needs explicit cast, but for consistency make the
integer promotion explicit and clear to a code reader.

Sponsored by <The NetBSD Foundation>

Revision 1.112 / (download) - annotate - [select for diffs], Wed Aug 23 13:04:17 2017 UTC (6 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.111: +31 -8 lines
Diff to previous 1.111 (colored) to selected 1.71.2.7 (colored)

now that we are processing SIGINFO write can be interrupted and return
partial results (well, it could before too but it was harder to trigger);
provide write_fully like we have read_fully already.

Revision 1.111 / (download) - annotate - [select for diffs], Fri Aug 4 07:27:08 2017 UTC (6 years, 7 months ago) by mrg
Branch: MAIN
Changes since 1.110: +176 -62 lines
Diff to previous 1.110 (colored) to selected 1.71.2.7 (colored)

add SIGINFO support.

Revision 1.110 / (download) - annotate - [select for diffs], Sat Jun 3 21:28:48 2017 UTC (6 years, 9 months ago) by mrg
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.109: +6 -5 lines
Diff to previous 1.109 (colored) to selected 1.71.2.7 (colored)

update copyright strings.

Revision 1.109 / (download) - annotate - [select for diffs], Tue Oct 27 07:36:18 2015 UTC (8 years, 5 months ago) by mrg
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Changes since 1.108: +3 -2 lines
Diff to previous 1.108 (colored) to selected 1.71.2.7 (colored)

port across the change from freebsd rev 290024:

In gunzip(1), treat trailing garbage as a warning and not an error.  This
allows scripts to distinguish it between real fatal errors, for instance a
CRC mismatch.

Update manual page for the behavior change.

PR:		bin/203873
Submitted by:	Eugene Grosbein <eugen grosbein net>
MFC after:	2 weeks

Revision 1.108 / (download) - annotate - [select for diffs], Wed Apr 15 02:29:12 2015 UTC (8 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.107: +7 -4 lines
Diff to previous 1.107 (colored) to selected 1.71.2.7 (colored)

Coverity CID 1264915, Via FreeBSD (Xin Li)

When reading in the original file name from gzip header, we read
in PATH_MAX + 1 bytes from the file.  In r281500, strrchr() is
used to strip possible path portion of the file name to mitigate
a possible attack.  Unfortunately, strrchr() expects a buffer
that is NUL-terminated, and since we are processing potentially
untrusted data, we can not assert that be always true.

Solve this by reading in one less byte (now PATH_MAX) and
explicitly terminate the buffer after the read size with NUL.

Revision 1.93.4.3.6.1 / (download) - annotate - [select for diffs], Sun Mar 15 21:15:22 2015 UTC (9 years ago) by snj
Branch: netbsd-5-2
Changes since 1.93.4.3: +109 -46 lines
Diff to previous 1.93.4.3 (colored) next main 1.93.4.4 (colored) to selected 1.71.2.7 (colored)

Pull up following revision(s) (requested by mrg in ticket #1951):
	usr.bin/gzip/Makefile: patch
	usr.bin/gzip/gzip.1: revisions 1.20-1.24
	usr.bin/gzip/gzip.c: revisions 1.98-1.107
	usr.bin/gzip/zuncompress.c: revisions 1.7-1.8
Sync gzip core with HEAD.

Revision 1.93.4.3.2.1 / (download) - annotate - [select for diffs], Sun Mar 15 21:15:11 2015 UTC (9 years ago) by snj
Branch: netbsd-5-1
Changes since 1.93.4.3: +109 -46 lines
Diff to previous 1.93.4.3 (colored) next main 1.93.4.4 (colored) to selected 1.71.2.7 (colored)

Pull up following revision(s) (requested by mrg in ticket #1951):
	usr.bin/gzip/Makefile: patch
	usr.bin/gzip/gzip.1: revisions 1.20-1.24
	usr.bin/gzip/gzip.c: revisions 1.98-1.107
	usr.bin/gzip/zuncompress.c: revisions 1.7-1.8
Sync gzip core with HEAD.

Revision 1.93.4.4 / (download) - annotate - [select for diffs], Sun Mar 15 21:15:01 2015 UTC (9 years ago) by snj
Branch: netbsd-5
Changes since 1.93.4.3: +109 -46 lines
Diff to previous 1.93.4.3 (colored) to branchpoint 1.93 (colored) next main 1.94 (colored) to selected 1.71.2.7 (colored)

Pull up following revision(s) (requested by mrg in ticket #1951):
	usr.bin/gzip/Makefile: patch
	usr.bin/gzip/gzip.1: revisions 1.20-1.24
	usr.bin/gzip/gzip.c: revisions 1.98-1.107
	usr.bin/gzip/zuncompress.c: revisions 1.7-1.8
Sync gzip core with HEAD.

Revision 1.105.20.1 / (download) - annotate - [select for diffs], Sat Feb 28 07:59:22 2015 UTC (9 years, 1 month ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Changes since 1.105: +15 -6 lines
Diff to previous 1.105 (colored) next main 1.106 (colored) to selected 1.71.2.7 (colored)

Pull up following revision(s) (requested by mrg in ticket #557):
	external/zlib/pigz/dist/pigz.c: revision 1.2
	usr.bin/gzip/gzip.1: revision 1.24
	usr.bin/gzip/gzip.c: revision 1.107
merge https://github.com/madler/pigz/commit/fdad1406b3ec809f4954ff7cdf9e99eb18c2458f:
When decompressing with -N or -NT, strip any path from header name.
This uses the path of the compressed file combined with the name
from the header as the name of the decompressed output file.  Any
path information in the header name is stripped.  This avoids a
possible vulnerability where absolute or descending paths are put
in the gzip header.
--
do not use directory paths present in gzip files with the -N flag,
similar to the problem reported in pigz.

Revision 1.105.4.1 / (download) - annotate - [select for diffs], Sat Feb 28 05:38:37 2015 UTC (9 years, 1 month ago) by snj
Branch: netbsd-6
Changes since 1.105: +15 -6 lines
Diff to previous 1.105 (colored) next main 1.106 (colored) to selected 1.71.2.7 (colored)

Pull up following revision(s) (requested by mrg in ticket #1261):
	usr.bin/gzip/gzip.1: revision 1.24
	usr.bin/gzip/gzip.c: revision 1.107
do not use directory paths present in gzip files with the -N flag,
similar to the problem reported in pigz.

Revision 1.105.16.1 / (download) - annotate - [select for diffs], Sat Feb 28 05:37:42 2015 UTC (9 years, 1 month ago) by snj
Branch: netbsd-6-1
Changes since 1.105: +15 -6 lines
Diff to previous 1.105 (colored) next main 1.106 (colored) to selected 1.71.2.7 (colored)

Pull up following revision(s) (requested by mrg in ticket #1261):
	usr.bin/gzip/gzip.1: revision 1.24
	usr.bin/gzip/gzip.c: revision 1.107
do not use directory paths present in gzip files with the -N flag,
similar to the problem reported in pigz.

Revision 1.105.10.1 / (download) - annotate - [select for diffs], Sat Feb 28 05:36:33 2015 UTC (9 years, 1 month ago) by snj
Branch: netbsd-6-0
Changes since 1.105: +15 -6 lines
Diff to previous 1.105 (colored) next main 1.106 (colored) to selected 1.71.2.7 (colored)

Pull up following revision(s) (requested by mrg in ticket #1261):
	usr.bin/gzip/gzip.1: revision 1.24
	usr.bin/gzip/gzip.c: revision 1.107
do not use directory paths present in gzip files with the -N flag,
similar to the problem reported in pigz.

Revision 1.107 / (download) - annotate - [select for diffs], Tue Jan 13 02:37:20 2015 UTC (9 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.106: +15 -6 lines
Diff to previous 1.106 (colored) to selected 1.71.2.7 (colored)

do not use directory paths present in gzip files with the -N flag,
similar to the problem reported in pigz.

Revision 1.106 / (download) - annotate - [select for diffs], Sat Oct 18 08:33:30 2014 UTC (9 years, 5 months ago) by snj
Branch: MAIN
Changes since 1.105: +3 -3 lines
Diff to previous 1.105 (colored) to selected 1.71.2.7 (colored)

src is too big these days to tolerate superfluous apostrophes.  It's
"its", people!

Revision 1.105 / (download) - annotate - [select for diffs], Tue Aug 30 23:06:00 2011 UTC (12 years, 7 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-7-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, agc-symver-base, agc-symver
Branch point for: netbsd-7, netbsd-6-1, netbsd-6-0, netbsd-6
Changes since 1.104: +8 -14 lines
Diff to previous 1.104 (colored) to selected 1.71.2.7 (colored)

Use __printflike and __dead.

Revision 1.104 / (download) - annotate - [select for diffs], Wed Aug 17 14:07:31 2011 UTC (12 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.103: +4 -4 lines
Diff to previous 1.103 (colored) to selected 1.71.2.7 (colored)

add noreturn atttribute.

Revision 1.99.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:43 2011 UTC (12 years, 9 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.99: +59 -15 lines
Diff to previous 1.99 (colored) next main 1.100 (colored) to selected 1.71.2.7 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.103 / (download) - annotate - [select for diffs], Tue Jun 21 13:25:45 2011 UTC (12 years, 9 months ago) by joerg
Branch: MAIN
Changes since 1.102: +14 -13 lines
Diff to previous 1.102 (colored) to selected 1.71.2.7 (colored)

Add a few explicit casts for sign mismatches.

Revision 1.102 / (download) - annotate - [select for diffs], Sun Jun 19 02:19:09 2011 UTC (12 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.101: +5 -2 lines
Diff to previous 1.101 (colored) to selected 1.71.2.7 (colored)

recognize .xz suffix

Revision 1.101 / (download) - annotate - [select for diffs], Sun Jun 19 01:20:19 2011 UTC (12 years, 9 months ago) by tsutsui
Branch: MAIN
Changes since 1.100: +6 -4 lines
Diff to previous 1.100 (colored) to selected 1.71.2.7 (colored)

XZ_SUPPORT requires maybe_errx().

Revision 1.100 / (download) - annotate - [select for diffs], Sun Jun 19 00:43:54 2011 UTC (12 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.99: +52 -13 lines
Diff to previous 1.99 (colored) to selected 1.71.2.7 (colored)

Add lzma (.xz) support. Somehow this does not decode after the first read yet.

Revision 1.99 / (download) - annotate - [select for diffs], Wed Mar 23 12:59:44 2011 UTC (13 years ago) by tsutsui
Branch: MAIN
CVS Tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.98: +3 -3 lines
Diff to previous 1.98 (colored) to selected 1.71.2.7 (colored)

Fix OPT_LIST. -t is not available in SMALL case.

Revision 1.98 / (download) - annotate - [select for diffs], Sat Nov 6 21:42:32 2010 UTC (13 years, 4 months ago) by mrg
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.97: +16 -5 lines
Diff to previous 1.97 (colored) to selected 1.71.2.7 (colored)

pull across a few changes from the freebsd folks:

http://svn.freebsd.org/changeset/base/213044
	- fixes gunzip issues
http://svn.freebsd.org/changeset/base/213927
	- fixes various typos and comments

and also an older change to add support for bzip2's "-k" option:
	don't delete the input file


thanks!

Revision 1.93.10.1 / (download) - annotate - [select for diffs], Wed Apr 21 05:27:10 2010 UTC (13 years, 11 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.93: +45 -6 lines
Diff to previous 1.93 (colored) next main 1.94 (colored) to selected 1.71.2.7 (colored)

sync to netbsd-5

Revision 1.93.4.3 / (download) - annotate - [select for diffs], Sun Nov 8 22:55:24 2009 UTC (14 years, 4 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, matt-nb5-pq3-base, matt-nb5-pq3
Branch point for: netbsd-5-2, netbsd-5-1
Changes since 1.93.4.2: +3 -3 lines
Diff to previous 1.93.4.2 (colored) to branchpoint 1.93 (colored) to selected 1.71.2.7 (colored)

Pull up following revision(s) (requested by mrg in ticket #1131):
	usr.bin/gzip/gzip.c: revision 1.97
update version to today.

Revision 1.93.4.2 / (download) - annotate - [select for diffs], Sun Nov 8 22:54:25 2009 UTC (14 years, 4 months ago) by snj
Branch: netbsd-5
Changes since 1.93.4.1: +6 -3 lines
Diff to previous 1.93.4.1 (colored) to branchpoint 1.93 (colored) to selected 1.71.2.7 (colored)

Pull up following revision(s) (requested by mrg in ticket #1131):
	usr.bin/gzip/gzip.c: revision 1.96
avoid an overflow in suffix handling, from Xin LI <delphij@delphij.net>.

Revision 1.93.4.1 / (download) - annotate - [select for diffs], Sun Nov 8 22:53:21 2009 UTC (14 years, 4 months ago) by snj
Branch: netbsd-5
Changes since 1.93: +40 -4 lines
Diff to previous 1.93 (colored) to selected 1.71.2.7 (colored)

Pull up following revision(s) (requested by mrg in ticket #1131):
	usr.bin/gzip/unpack.c: revision 1.1
	usr.bin/gzip/gzip.c: revision 1.95
add "pack" uncompression support, from Xin LI <delphij@delphij.net>

Revision 1.97 / (download) - annotate - [select for diffs], Sun Oct 11 09:17:21 2009 UTC (14 years, 5 months ago) by mrg
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.96: +3 -3 lines
Diff to previous 1.96 (colored) to selected 1.71.2.7 (colored)

update version to today.

Revision 1.96 / (download) - annotate - [select for diffs], Sun Oct 11 07:09:39 2009 UTC (14 years, 5 months ago) by mrg
Branch: MAIN
Changes since 1.95: +6 -3 lines
Diff to previous 1.95 (colored) to selected 1.71.2.7 (colored)

avoid an overflow in suffix handling, from Xin LI <delphij@delphij.net>.

Revision 1.95 / (download) - annotate - [select for diffs], Sun Oct 11 07:07:54 2009 UTC (14 years, 5 months ago) by mrg
Branch: MAIN
Changes since 1.94: +40 -4 lines
Diff to previous 1.94 (colored) to selected 1.71.2.7 (colored)

add "pack" uncompression support, from Xin LI <delphij@delphij.net>

Revision 1.93.6.1 / (download) - annotate - [select for diffs], Wed May 13 19:19:52 2009 UTC (14 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.93: +4 -4 lines
Diff to previous 1.93 (colored) next main 1.94 (colored) to selected 1.71.2.7 (colored)

Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html

Revision 1.94 / (download) - annotate - [select for diffs], Sun Apr 12 10:31:14 2009 UTC (14 years, 11 months ago) by lukem
Branch: MAIN
CVS Tags: jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.93: +4 -4 lines
Diff to previous 1.93 (colored) to selected 1.71.2.7 (colored)

fix sign-compare issues

Revision 1.71.2.7 / (download) - annotate - [selected], Fri Nov 14 03:08:32 2008 UTC (15 years, 4 months ago) by snj
Branch: netbsd-3
Changes since 1.71.2.6: +3 -3 lines
Diff to previous 1.71.2.6 (colored) to branchpoint 1.71 (colored) next main 1.72 (colored)

Pull up following revision(s) (requested by mrg in ticket #1978):
	usr.bin/gzip/gzip.c: revision 1.89
properly detect when the output fails (eg, full filesystem) and do not
delete the input file.  patch from PR#35048.

Revision 1.90.12.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:29:12 2008 UTC (15 years, 6 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.90.12.1: +6 -5 lines
Diff to previous 1.90.12.1 (colored) to branchpoint 1.90 (colored) next main 1.91 (colored) to selected 1.71.2.7 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.93 / (download) - annotate - [select for diffs], Sun Aug 3 09:25:05 2008 UTC (15 years, 7 months ago) by skrll
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2
Branch point for: netbsd-5, matt-nb5-mips64, jym-xensuspend
Changes since 1.92: +4 -3 lines
Diff to previous 1.92 (colored) to selected 1.71.2.7 (colored)

WARNS=3

Revision 1.92 / (download) - annotate - [select for diffs], Mon Jul 21 14:19:22 2008 UTC (15 years, 8 months ago) by lukem
Branch: MAIN
Changes since 1.91: +4 -4 lines
Diff to previous 1.91 (colored) to selected 1.71.2.7 (colored)

Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.

Revision 1.90.12.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:32:11 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.90: +2 -4 lines
Diff to previous 1.90 (colored) to selected 1.71.2.7 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.90.10.1 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:58 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.90: +2 -4 lines
Diff to previous 1.90 (colored) next main 1.91 (colored) to selected 1.71.2.7 (colored)

sync with head

Revision 1.91 / (download) - annotate - [select for diffs], Thu May 29 14:51:27 2008 UTC (15 years, 10 months ago) by mrg
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Changes since 1.90: +2 -4 lines
Diff to previous 1.90 (colored) to selected 1.71.2.7 (colored)

remove clause #3 from my license where there are no other
copyright holders involved.

Revision 1.89.2.1 / (download) - annotate - [select for diffs], Wed Feb 7 13:00:18 2007 UTC (17 years, 1 month ago) by tron
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0
Changes since 1.89: +3 -3 lines
Diff to previous 1.89 (colored) next main 1.90 (colored) to selected 1.71.2.7 (colored)

Pull up following revision(s) (requested by martin in ticket #398):
	usr.bin/gzip/gzip.c: revision 1.90
Apply fix from PR bin/35526 from Xin LI: fix typo in message

Revision 1.90 / (download) - annotate - [select for diffs], Wed Jan 31 08:23:22 2007 UTC (17 years, 2 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base2, yamt-pf42-base, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf
Branch point for: yamt-pf42, wrstuden-revivesa
Changes since 1.89: +3 -3 lines
Diff to previous 1.89 (colored) to selected 1.71.2.7 (colored)

Apply fix from PR bin/35526 from Xin LI: fix typo in message

Revision 1.89 / (download) - annotate - [select for diffs], Mon Nov 13 21:57:59 2006 UTC (17 years, 4 months ago) by mrg
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.88: +3 -3 lines
Diff to previous 1.88 (colored) to selected 1.71.2.7 (colored)

properly detect when the output fails (eg, full filesystem) and do not
delete the input file.  patch from PR#35048.

Revision 1.88 / (download) - annotate - [select for diffs], Wed Oct 25 04:44:39 2006 UTC (17 years, 5 months ago) by mrg
Branch: MAIN
Changes since 1.87: +4 -3 lines
Diff to previous 1.87 (colored) to selected 1.71.2.7 (colored)

wrap a long line

Revision 1.87 / (download) - annotate - [select for diffs], Fri Oct 13 20:17:46 2006 UTC (17 years, 5 months ago) by mlelstv
Branch: MAIN
Changes since 1.86: +6 -2 lines
Diff to previous 1.86 (colored) to selected 1.71.2.7 (colored)

End a decompression when trailing garbage is found. It emits a warning
message and causes a non-zero exit status (similar to GNU gzip).
Fixes PR bin/33045.

Revision 1.86 / (download) - annotate - [select for diffs], Fri Oct 13 20:16:32 2006 UTC (17 years, 5 months ago) by mlelstv
Branch: MAIN
Changes since 1.85: +5 -3 lines
Diff to previous 1.85 (colored) to selected 1.71.2.7 (colored)

Abort decompression with an error when EOF is reached on input. The
test output will then be 'NOT OK'. Fixes PR bin/32933.

Revision 1.85 / (download) - annotate - [select for diffs], Wed Sep 27 22:20:31 2006 UTC (17 years, 6 months ago) by mrg
Branch: MAIN
Changes since 1.84: +7 -7 lines
Diff to previous 1.84 (colored) to selected 1.71.2.7 (colored)

redo the previous, based on a comment from and reviewed by christos.

Revision 1.84 / (download) - annotate - [select for diffs], Wed Sep 27 21:02:38 2006 UTC (17 years, 6 months ago) by mrg
Branch: MAIN
Changes since 1.83: +7 -5 lines
Diff to previous 1.83 (colored) to selected 1.71.2.7 (colored)

redo previous: move the EOF check back into non-dead code so that it
will be used again.

Revision 1.83 / (download) - annotate - [select for diffs], Wed Sep 27 19:09:14 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.82: +3 -4 lines
Diff to previous 1.82 (colored) to selected 1.71.2.7 (colored)

Coverity CID 4073: Delete impossible code.

Revision 1.82 / (download) - annotate - [select for diffs], Thu Jul 13 11:51:39 2006 UTC (17 years, 8 months ago) by mrg
Branch: MAIN
CVS Tags: abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.81: +24 -12 lines
Diff to previous 1.81 (colored) to selected 1.71.2.7 (colored)

properly check the return value of read() & pread().  PR#26688.

Revision 1.71.2.6 / (download) - annotate - [select for diffs], Thu Dec 29 16:04:17 2005 UTC (18 years, 3 months ago) by riz
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1
Changes since 1.71.2.5: +19 -18 lines
Diff to previous 1.71.2.5 (colored) to branchpoint 1.71 (colored) to selected 1.71.2.7 (colored)

Pull up following revision(s) (requested by wiz in ticket #1053):
	usr.bin/gzip/gzip.c: revision 1.81
Remove unhandled H option from getopt() argument.
Describe -l in usage. Both from Igor Sobrado in private mail.
While here, sort options.

Revision 1.29.2.29.2.6 / (download) - annotate - [select for diffs], Fri Dec 16 18:47:39 2005 UTC (18 years, 3 months ago) by jmc
Branch: netbsd-2
Changes since 1.29.2.29.2.5: +19 -18 lines
Diff to previous 1.29.2.29.2.5 (colored) to branchpoint 1.29.2.29 (colored) next main 1.30 (colored) to selected 1.71.2.7 (colored)

Pullup rev 1.81 (requested by wiz in ticket #10197)

	Remove unhandled H option from getopt() argument. Describe -l in usage.

Revision 1.29.2.29.2.5 / (download) - annotate - [select for diffs], Wed Dec 14 04:06:55 2005 UTC (18 years, 3 months ago) by jmc
Branch: netbsd-2
Changes since 1.29.2.29.2.4: +11 -12 lines
Diff to previous 1.29.2.29.2.4 (colored) to branchpoint 1.29.2.29 (colored) to selected 1.71.2.7 (colored)

Pullup rev 1.78 (requested by mrg in ticket #10172)

	Fix a few issues:
gzip -vt just prints the contents of a .Z file
gzip -vt will print OK even if the .gz file is corrupt
gzip -vt prints nothing with a .bz2 file
gzip can loop endlessly with a corrupt .bz2 file
Don't warn about >4GB files not having their size correctly stored.
PR#32105 PR#32070

Revision 1.81 / (download) - annotate - [select for diffs], Tue Dec 13 10:02:04 2005 UTC (18 years, 3 months ago) by wiz
Branch: MAIN
CVS Tags: chap-midi-nbase, chap-midi-base, chap-midi
Changes since 1.80: +19 -18 lines
Diff to previous 1.80 (colored) to selected 1.71.2.7 (colored)

Remove unhandled H option from getopt() argument.
Describe -l in usage. Both from Igor Sobrado in private mail.

While here, sort options.

Revision 1.71.2.5 / (download) - annotate - [select for diffs], Sun Nov 27 23:09:46 2005 UTC (18 years, 4 months ago) by riz
Branch: netbsd-3
CVS Tags: netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Changes since 1.71.2.4: +4 -2 lines
Diff to previous 1.71.2.4 (colored) to branchpoint 1.71 (colored) to selected 1.71.2.7 (colored)

Pull up following revision(s) (requested by mrg in ticket #1009):
	usr.bin/gzip/gzip.c: revision 1.80
Use of ``vflag'' should be protected by #ifndef SMALL.

Revision 1.71.2.4 / (download) - annotate - [select for diffs], Sun Nov 27 23:06:18 2005 UTC (18 years, 4 months ago) by riz
Branch: netbsd-3
Changes since 1.71.2.3: +4 -2 lines
Diff to previous 1.71.2.3 (colored) to branchpoint 1.71 (colored) to selected 1.71.2.7 (colored)

Pull up following revision(s) (requested by mrg in ticket #1009):
	usr.bin/gzip/gzip.c: revision 1.79
due to popular demand, don't warn about >4GB files not having their
size correctly stored.  PR#32105 among other requests.

Revision 1.71.2.3 / (download) - annotate - [select for diffs], Sun Nov 27 23:05:41 2005 UTC (18 years, 4 months ago) by riz
Branch: netbsd-3
Changes since 1.71.2.2: +7 -12 lines
Diff to previous 1.71.2.2 (colored) to branchpoint 1.71 (colored) to selected 1.71.2.7 (colored)

Pull up following revision(s) (requested by mrg in ticket #1009):
	usr.bin/gzip/unbzip2.c: revision 1.9
	usr.bin/gzip/gzip.c: revision 1.78
	usr.bin/gzip/zuncompress.c: revision 1.6
apply a patch from onno van der linden in PR#32070 that fixes
these problems:
	1) gzip -vt just prints the contents of a .Z file
	2) gzip -vt will print OK even if the .gz file is corrupt
	3) gzip -vt prints nothing with a .bz2 file
	4) gzip can loop endlessly with a corrupt .bz2 file

Revision 1.80 / (download) - annotate - [select for diffs], Wed Nov 23 18:34:51 2005 UTC (18 years, 4 months ago) by he
Branch: MAIN
Changes since 1.79: +4 -2 lines
Diff to previous 1.79 (colored) to selected 1.71.2.7 (colored)

Use of ``vflag'' should be protected by #ifndef SMALL.

Revision 1.79 / (download) - annotate - [select for diffs], Tue Nov 22 09:07:03 2005 UTC (18 years, 4 months ago) by mrg
Branch: MAIN
Changes since 1.78: +4 -2 lines
Diff to previous 1.78 (colored) to selected 1.71.2.7 (colored)

due to popular demand, don't warn about >4GB files not having their
size correctly stored.  PR#32105 among other requests.

Revision 1.78 / (download) - annotate - [select for diffs], Tue Nov 22 09:05:29 2005 UTC (18 years, 4 months ago) by mrg
Branch: MAIN
Changes since 1.77: +7 -12 lines
Diff to previous 1.77 (colored) to selected 1.71.2.7 (colored)

apply a patch from onno van der linden in PR#32070 that fixes
these problems:
	1) gzip -vt just prints the contents of a .Z file
	2) gzip -vt will print OK even if the .gz file is corrupt
	3) gzip -vt prints nothing with a .bz2 file
	4) gzip can loop endlessly with a corrupt .bz2 file

Revision 1.77 / (download) - annotate - [select for diffs], Tue Sep 20 05:12:15 2005 UTC (18 years, 6 months ago) by mrg
Branch: MAIN
Changes since 1.76: +66 -50 lines
Diff to previous 1.76 (colored) to selected 1.71.2.7 (colored)

apply a patch from christian biere:
- if we have an open fd, use it instead and, eg, fstat(2), of the file name
and stat(2).
- signed/unsigned variable fixes
- misc. cleanup

Revision 1.76 / (download) - annotate - [select for diffs], Thu Sep 15 18:51:33 2005 UTC (18 years, 6 months ago) by mrg
Branch: MAIN
Changes since 1.75: +4 -2 lines
Diff to previous 1.75 (colored) to selected 1.71.2.7 (colored)

oops. fix previous by keeping the stat() inside #ifndef SMALL.  pointed
out by dsl.

Revision 1.75 / (download) - annotate - [select for diffs], Thu Sep 15 09:30:21 2005 UTC (18 years, 6 months ago) by mrg
Branch: MAIN
Changes since 1.74: +11 -10 lines
Diff to previous 1.74 (colored) to selected 1.71.2.7 (colored)

in file_compress() always stat() the input file.  this patch avoids
reading from uninitialised space as provided by John Hein in PR#28995.

Revision 1.74 / (download) - annotate - [select for diffs], Thu Sep 15 09:11:30 2005 UTC (18 years, 6 months ago) by mrg
Branch: MAIN
Changes since 1.73: +8 -7 lines
Diff to previous 1.73 (colored) to selected 1.71.2.7 (colored)

fix signed/unsigned mismatch reported by Christian Biere in PR#31180
using his provided patch.

Revision 1.29.2.29.2.4 / (download) - annotate - [select for diffs], Tue Sep 6 16:00:22 2005 UTC (18 years, 6 months ago) by riz
Branch: netbsd-2
CVS Tags: netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1
Changes since 1.29.2.29.2.3: +43 -30 lines
Diff to previous 1.29.2.29.2.3 (colored) to branchpoint 1.29.2.29 (colored) to selected 1.71.2.7 (colored)

Pull up following revision(s) (requested by mrg in ticket #5626):
	usr.bin/gzip/gzip.c: revision 1.73
avoid an infinite loop while decompressing invalid gzip files.
some minor CSE.  compare stat return value consistently.
thanks to tron for testing the first change.

Revision 1.71.2.2 / (download) - annotate - [select for diffs], Wed Aug 31 10:34:39 2005 UTC (18 years, 7 months ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1
Changes since 1.71.2.1: +43 -30 lines
Diff to previous 1.71.2.1 (colored) to branchpoint 1.71 (colored) to selected 1.71.2.7 (colored)

Pull up following revision(s) (requested by mrg in ticket #721):
	usr.bin/gzip/gzip.c: revision 1.73
avoid an infinite loop while decompressing invalid gzip files.
some minor CSE.  compare stat return value consistently.
thanks to tron for testing the first change.

Revision 1.73 / (download) - annotate - [select for diffs], Sun Aug 28 10:17:50 2005 UTC (18 years, 7 months ago) by mrg
Branch: MAIN
Changes since 1.72: +43 -30 lines
Diff to previous 1.72 (colored) to selected 1.71.2.7 (colored)

avoid an infinite loop while decompressing invalid gzip files.
some minor CSE.  compare stat return value consistently.

thanks to tron for testing the first change.

Revision 1.29.2.29.2.3 / (download) - annotate - [select for diffs], Sun Jul 24 21:21:17 2005 UTC (18 years, 8 months ago) by tron
Branch: netbsd-2
CVS Tags: netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1
Changes since 1.29.2.29.2.2: +467 -419 lines
Diff to previous 1.29.2.29.2.2 (colored) to branchpoint 1.29.2.29 (colored) to selected 1.71.2.7 (colored)

Apply patch (requested by riz in ticket #1111):
Synchronize gzip(1) with NetBSD-current.

Revision 1.71.2.1 / (download) - annotate - [select for diffs], Wed Jun 15 06:06:03 2005 UTC (18 years, 9 months ago) by snj
Branch: netbsd-3
Changes since 1.71: +8 -8 lines
Diff to previous 1.71 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.72 (requested by lukem in ticket #421):
Fix numerous uninitalized variables.
Detected with gcc -Wuninitialized.

Revision 1.72 / (download) - annotate - [select for diffs], Thu Jun 2 01:51:58 2005 UTC (18 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.71: +8 -8 lines
Diff to previous 1.71 (colored) to selected 1.71.2.7 (colored)

Fix numerous uninitalized variables.
Detected with gcc -Wuninitialized.

Revision 1.29.2.29.2.2 / (download) - annotate - [select for diffs], Fri May 13 17:21:22 2005 UTC (18 years, 10 months ago) by riz
Branch: netbsd-2
Changes since 1.29.2.29.2.1: +6 -5 lines
Diff to previous 1.29.2.29.2.1 (colored) to branchpoint 1.29.2.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.67 (requested by wiz in ticket #1447):
Count the output file size modulo 2^32 so that the check against the size
in the compressed file works for files greater than 4GB.
Fixes the fixable part of bin/26907

Revision 1.29.2.29.2.1 / (download) - annotate - [select for diffs], Fri Apr 8 21:34:49 2005 UTC (18 years, 11 months ago) by tron
Branch: netbsd-2
Changes since 1.29.2.29: +30 -3 lines
Diff to previous 1.29.2.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.69 via patch (requested by jmc in ticket #1031):
Fixed for PR#28581. If stdin is the input stream, fstat it and check if it's
file. If so, use it's mtime for the mtime in the header. Otherwise use
time(2)'s result instead. Lines up with GNU gzip and RFC 1952 now as well.

Revision 1.71 / (download) - annotate - [select for diffs], Tue Feb 22 21:45:44 2005 UTC (19 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: netbsd-3-base
Branch point for: netbsd-3
Changes since 1.70: +53 -15 lines
Diff to previous 1.70 (colored) to selected 1.71.2.7 (colored)

handle partial reads.  PR/29484.

Revision 1.70 / (download) - annotate - [select for diffs], Mon Jan 31 09:11:49 2005 UTC (19 years, 2 months ago) by enami
Branch: MAIN
Changes since 1.69: +25 -18 lines
Diff to previous 1.69 (colored) to selected 1.71.2.7 (colored)

Fix parsing of $GZIP so that not to overrun the end of string.
Addesses PR#28779.  Fix is slightly different that suggested in the PR
since it fails if $GZIP contains whitespace.

Revision 1.69 / (download) - annotate - [select for diffs], Wed Dec 8 06:38:40 2004 UTC (19 years, 3 months ago) by jmc
Branch: MAIN
Changes since 1.68: +30 -3 lines
Diff to previous 1.68 (colored) to selected 1.71.2.7 (colored)

Fixed for PR#28581. If stdin is the input stream, fstat it and check if it's
file. If so, use it's mtime for the mtime in the header. Otherwise use
time(2)'s result instead. Lines up with GNU gzip and RFC 1952 now as well.

Revision 1.68 / (download) - annotate - [select for diffs], Fri Oct 8 12:46:24 2004 UTC (19 years, 5 months ago) by dsl
Branch: MAIN
Changes since 1.67: +16 -16 lines
Diff to previous 1.67 (colored) to selected 1.71.2.7 (colored)

Don't abort decompression if there are no bytes in the output buffer
when the end of compressed block (ie the crc) is reached.
(ie when decompressing concatenated zipped files).
Fixes PR bin/27153

Revision 1.67 / (download) - annotate - [select for diffs], Sat Sep 11 11:07:44 2004 UTC (19 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.66: +6 -5 lines
Diff to previous 1.66 (colored) to selected 1.71.2.7 (colored)

Count the output file size modulo 2^32 so that the check against the size
in the compressed file works for files greater than 4GB.
Fixes the fixable part of bin/26907

Revision 1.66 / (download) - annotate - [select for diffs], Sun Sep 5 21:32:30 2004 UTC (19 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.65: +50 -44 lines
Diff to previous 1.65 (colored) to selected 1.71.2.7 (colored)

The last commit slightly increased the size of gzip - I had thought that
    all the install media used the 'SMALL' variant, but this is not the case.
Redo the percentage print code to reduce the size to less than the old version.
Fix another fd leakage (didn't call fclose() if ferror() returned non-zero.
Change some maybe_warn() to maybe_warnx() in places I'm sure errno is undefined.
Call mayber_warn() earlier in other paths so that errno might still be valid.
Make the SMALL and NO_BZIP/COMPRESS_SUPPORT options all compile with WARNS=3.

Revision 1.65 / (download) - annotate - [select for diffs], Sat Sep 4 10:48:57 2004 UTC (19 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.64: +8 -3 lines
Diff to previous 1.64 (colored) to selected 1.71.2.7 (colored)

Set the XFL field of the gzip header to indicate maximum compression or
fast compression.  Fixes PR bin/26812
Add references the the 3 relevant RFCs

Revision 1.64 / (download) - annotate - [select for diffs], Tue Aug 31 10:14:30 2004 UTC (19 years, 7 months ago) by he
Branch: MAIN
Changes since 1.63: +4 -3 lines
Diff to previous 1.63 (colored) to selected 1.71.2.7 (colored)

Cast field width computed from pointer diff and ssize_t to int.
Fixes build for amd64 and presumably for our other lp64 ports.

Revision 1.63 / (download) - annotate - [select for diffs], Mon Aug 30 14:36:51 2004 UTC (19 years, 7 months ago) by dsl
Branch: MAIN
Changes since 1.62: +331 -340 lines
Diff to previous 1.62 (colored) to selected 1.71.2.7 (colored)

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.

Revision 1.29.2.29 / (download) - annotate - [select for diffs], Mon Jul 19 09:57:24 2004 UTC (19 years, 8 months ago) by tron
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2
Changes since 1.29.2.28: +50 -24 lines
Diff to previous 1.29.2.28 (colored) to branchpoint 1.29 (colored) next main 1.30 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.62 (requested by mrg in ticket #678):
Instead of placing largish buffers on the stack, use malloc/free.
Fixes compile problem for sun2.

Revision 1.29.2.28 / (download) - annotate - [select for diffs], Mon Jul 19 09:56:25 2004 UTC (19 years, 8 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.27: +3 -3 lines
Diff to previous 1.29.2.27 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.61 (requested by mrg in ticket #678):
fix "gzip -lv a.gz" after gzip.c 1.46.

Revision 1.29.2.27 / (download) - annotate - [select for diffs], Mon Jul 19 09:55:29 2004 UTC (19 years, 8 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.26: +3 -3 lines
Diff to previous 1.29.2.26 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.60 (requested by mrg in ticket #678):
another warn -> warnx.

Revision 1.29.2.26 / (download) - annotate - [select for diffs], Mon Jul 19 09:54:19 2004 UTC (19 years, 8 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.25: +6 -4 lines
Diff to previous 1.29.2.25 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.59 (requested by mrg in ticket #678):
in check_outfile() if the outfile exists and -f was given just delete it.
fixes PR#26251.

Revision 1.29.2.25 / (download) - annotate - [select for diffs], Mon Jul 19 09:51:13 2004 UTC (19 years, 8 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.24: +4 -4 lines
Diff to previous 1.29.2.24 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.58 (requested by mrg in ticket #678):
fix descriptor leaks on error.

Revision 1.29.2.24 / (download) - annotate - [select for diffs], Mon Jul 19 09:49:16 2004 UTC (19 years, 8 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.23: +37 -22 lines
Diff to previous 1.29.2.23 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.57 (requested by mrg in ticket #678):
- in gz_uncompress() be sure to do the crc/len recalculation insigned.
  fixes PR#26246.
- if crc/len are wrong, be sure to noticed it failed
- in check_suffixes(), be sure not to underrun an array (from yamt)
- don't fail so badly on short header, from and fixes R#26242 (also
  from yamt)
- more underrun avoidance in file_uncompress().  fixes PR#26241.

Revision 1.29.2.23 / (download) - annotate - [select for diffs], Mon Jul 19 09:48:19 2004 UTC (19 years, 8 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.22: +43 -4 lines
Diff to previous 1.29.2.22 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.56 (requested by mrg in ticket #678):
check the suffix of the input file ala GNU gzip, and error about it
unless -f is given.  fixes PR#26240

Revision 1.29.2.22 / (download) - annotate - [select for diffs], Mon Jul 19 09:46:10 2004 UTC (19 years, 8 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.21: +65 -39 lines
Diff to previous 1.29.2.21 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.55 (requested by mrg in ticket #678):
move the crc/len code into their own state's to properly allow the buffer
to be refreshed.  re-fixes regress/usr.bin/gzip/concatenated.

Revision 1.29.2.21 / (download) - annotate - [select for diffs], Mon Jul 19 09:45:09 2004 UTC (19 years, 8 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.20: +42 -5 lines
Diff to previous 1.29.2.20 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.54 (requested by mrg in ticket #678):
- check for trunated input.
- check each gzip-part's length against the original and warn if it's
  wrong.  fixes part of PR#26233.
- check the input crc32.  fixes the rest of PR#26233.

Revision 1.29.2.20 / (download) - annotate - [select for diffs], Mon Jul 19 09:43:45 2004 UTC (19 years, 8 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.19: +12 -5 lines
Diff to previous 1.29.2.19 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.53 (requested by mrg in ticket #678):
don't assume Z_STREAM_END means end-of-file.  fixes PR#26234.

Revision 1.29.2.19 / (download) - annotate - [select for diffs], Mon Jul 19 09:42:23 2004 UTC (19 years, 8 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.18: +1 -2 lines
Diff to previous 1.29.2.18 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.52 (requested by mrg in ticket #678):
tailing \n is not needed for vwarn().

Revision 1.62 / (download) - annotate - [select for diffs], Fri Jul 16 22:44:01 2004 UTC (19 years, 8 months ago) by he
Branch: MAIN
Changes since 1.61: +50 -24 lines
Diff to previous 1.61 (colored) to selected 1.71.2.7 (colored)

Instead of placing largish buffers on the stack, use malloc/free.
Fixes compile problem for sun2.

Revision 1.61 / (download) - annotate - [select for diffs], Mon Jul 12 10:21:11 2004 UTC (19 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.60: +3 -3 lines
Diff to previous 1.60 (colored) to selected 1.71.2.7 (colored)

fix "gzip -lv a.gz" after gzip.c 1.46.

Revision 1.60 / (download) - annotate - [select for diffs], Mon Jul 12 09:58:10 2004 UTC (19 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.59: +3 -3 lines
Diff to previous 1.59 (colored) to selected 1.71.2.7 (colored)

another warn -> warnx.

Revision 1.59 / (download) - annotate - [select for diffs], Mon Jul 12 02:50:38 2004 UTC (19 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.58: +6 -4 lines
Diff to previous 1.58 (colored) to selected 1.71.2.7 (colored)

in check_outfile() if the outfile exists and -f was given just delete it.
fixes PR#26251.

Revision 1.58 / (download) - annotate - [select for diffs], Sun Jul 11 22:49:42 2004 UTC (19 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.57: +4 -4 lines
Diff to previous 1.57 (colored) to selected 1.71.2.7 (colored)

fix descriptor leaks on error.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Jul 11 14:39:39 2004 UTC (19 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.56: +37 -22 lines
Diff to previous 1.56 (colored) to selected 1.71.2.7 (colored)

- in gz_uncompress() be sure to do the crc/len recalculation insigned.
  fixes PR#26246.
- if crc/len are wrong, be sure to noticed it failed
- in check_suffixes(), be sure not to underrun an array (from yamt)
- don't fail so badly on short header, from and fixes R#26242 (also
  from yamt)
- more underrun avoidance in file_uncompress().  fixes PR#26241.

Revision 1.56 / (download) - annotate - [select for diffs], Sun Jul 11 09:40:51 2004 UTC (19 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.55: +43 -4 lines
Diff to previous 1.55 (colored) to selected 1.71.2.7 (colored)

check the suffix of the input file ala GNU gzip, and error about it
unless -f is given.  fixes PR#26240

Revision 1.55 / (download) - annotate - [select for diffs], Sun Jul 11 07:01:03 2004 UTC (19 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.54: +65 -39 lines
Diff to previous 1.54 (colored) to selected 1.71.2.7 (colored)

move the crc/len code into their own state's to properly allow the buffer
to be refreshed.  re-fixes regress/usr.bin/gzip/concatenated.

Revision 1.54 / (download) - annotate - [select for diffs], Sun Jul 11 06:20:29 2004 UTC (19 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.53: +42 -5 lines
Diff to previous 1.53 (colored) to selected 1.71.2.7 (colored)

- check for trunated input.
- check each gzip-part's length against the original and warn if it's
  wrong.  fixes part of PR#26233.
- check the input crc32.  fixes the rest of PR#26233.

Revision 1.53 / (download) - annotate - [select for diffs], Sun Jul 11 05:40:51 2004 UTC (19 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.52: +12 -5 lines
Diff to previous 1.52 (colored) to selected 1.71.2.7 (colored)

don't assume Z_STREAM_END means end-of-file.  fixes PR#26234.

Revision 1.52 / (download) - annotate - [select for diffs], Sat Jul 10 17:35:59 2004 UTC (19 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.51: +3 -4 lines
Diff to previous 1.51 (colored) to selected 1.71.2.7 (colored)

tailing \n is not needed for vwarn().

Revision 1.29.2.18 / (download) - annotate - [select for diffs], Thu Jul 8 07:15:36 2004 UTC (19 years, 8 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.17: +32 -12 lines
Diff to previous 1.29.2.17 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.51 (requested by mrg in ticket #625):
fix "zcat -f" on normal files. fixes PR#26145

Revision 1.51 / (download) - annotate - [select for diffs], Sat Jul 3 09:39:30 2004 UTC (19 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.50: +32 -12 lines
Diff to previous 1.50 (colored) to selected 1.71.2.7 (colored)

fix "zcat -f" on normal files. fixes PR#26145

Revision 1.29.2.17 / (download) - annotate - [select for diffs], Thu Jun 24 17:24:48 2004 UTC (19 years, 9 months ago) by jmc
Branch: netbsd-2-0
Changes since 1.29.2.16: +6 -9 lines
Diff to previous 1.29.2.16 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pullup rev 1.50 (requested by mrg in ticket #547)

If there are zero bytes to output, this isn't an error. It's probably
a zero length file. Don't return an error. PR#25994

Revision 1.50 / (download) - annotate - [select for diffs], Tue Jun 22 12:01:29 2004 UTC (19 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.49: +6 -9 lines
Diff to previous 1.49 (colored) to selected 1.71.2.7 (colored)

if there are zero bytes to output, this isn't an error.  it's probably
a zero length file.  don't return an error.  this should fix PR#25994.

Revision 1.29.2.16 / (download) - annotate - [select for diffs], Fri Jun 18 10:01:29 2004 UTC (19 years, 9 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.15: +3 -2 lines
Diff to previous 1.29.2.15 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.49 (requested by mrg in ticket #508):
handle_pathname: if it's stdin, return after handling it, rather than
trying to then process "-" as a file afterwards.  fixes PR#25843.

Revision 1.29.2.15 / (download) - annotate - [select for diffs], Fri Jun 18 09:56:35 2004 UTC (19 years, 9 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.14: +29 -4 lines
Diff to previous 1.29.2.14 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.48 (requested by mrg in ticket #508):
- maybe restore the timestamp
- don't create the output file with "-l"
both from geoff wing with a few mods by me.

Revision 1.29.2.14 / (download) - annotate - [select for diffs], Fri Jun 18 09:53:50 2004 UTC (19 years, 9 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.13: +9 -2 lines
Diff to previous 1.29.2.13 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.47 (requested by mrg in ticket #508):
explicitly lseek() to offset 10 to read the original name.  fixes a
latent bug awoken by rev 1.37 (prior versions always left the fd at
this offset purely by chance.)  fixes PR#25824.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Jun 7 03:24:01 2004 UTC (19 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.48: +3 -2 lines
Diff to previous 1.48 (colored) to selected 1.71.2.7 (colored)

handle_pathname: if it's stdin, return after handling it, rather than
trying to then process "-" as a file afterwards.  fixes PR#25843.

Revision 1.48 / (download) - annotate - [select for diffs], Sun Jun 6 12:28:52 2004 UTC (19 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.47: +29 -4 lines
Diff to previous 1.47 (colored) to selected 1.71.2.7 (colored)

- maybe restore the timestamp
- don't create the output file with "-l"

both from geoff wing with a few mods by me.

Revision 1.47 / (download) - annotate - [select for diffs], Sat Jun 5 15:47:10 2004 UTC (19 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.46: +9 -2 lines
Diff to previous 1.46 (colored) to selected 1.71.2.7 (colored)

explicitly lseek() to offset 10 to read the original name.  fixes a
latent bug awoken by rev 1.37 (prior versions always left the fd at
this offset purely by chance.)  fixes PR#25824.

Revision 1.29.2.13 / (download) - annotate - [select for diffs], Sun May 30 14:56:40 2004 UTC (19 years, 10 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.12: +234 -140 lines
Diff to previous 1.29.2.12 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.46 (requested by mrg in ticket #420):
- fix "gzip -t" to not output anything by default.  PR#25507
- fix any decompression on corrupted gzip files.  PR#25508
- ask to overwrite files if we have a tty, rather than failing the
  operation.  PR#25509.
- clean up maybe_err()/maybe_warn(): use maybe_err() only for fatal
  errors.  maybe_warn() is for processing errors.  this allows
  "gzip -d file1.gz file2.gz" to decompress file2.gz even if file1.gz
  is corrupted, etc.
- change the internal compressor/decompressor API to return "-1" on
  failure, not 0.  this allows for 0-sized files to be decompressed
  correctly.

Revision 1.29.2.12 / (download) - annotate - [select for diffs], Sun May 30 14:55:57 2004 UTC (19 years, 10 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.11: +41 -44 lines
Diff to previous 1.29.2.11 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.45 (requested by mrg in ticket #420):
WARNS=3: add some const poisoning, and sort out local variable
definitions shadowing other variables.
Pass storage for file names into the file_compress and file_uncompress
functions, so that we don't run the risk of leaking memory. Remove a global
variable that's no longer needed.

Revision 1.29.2.11 / (download) - annotate - [select for diffs], Sun May 30 14:54:53 2004 UTC (19 years, 10 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.10: +169 -260 lines
Diff to previous 1.29.2.10 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Backout last change, two revision got pulled up together by accident.

Revision 1.29.2.10 / (download) - annotate - [select for diffs], Sun May 30 14:48:21 2004 UTC (19 years, 10 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.9: +262 -171 lines
Diff to previous 1.29.2.9 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.46 (requested by mrg in ticket #420):
- fix "gzip -t" to not output anything by default.  PR#25507
- fix any decompression on corrupted gzip files.  PR#25508
- ask to overwrite files if we have a tty, rather than failing the
  operation.  PR#25509.
- clean up maybe_err()/maybe_warn(): use maybe_err() only for fatal
  errors.  maybe_warn() is for processing errors.  this allows
  "gzip -d file1.gz file2.gz" to decompress file2.gz even if file1.gz
  is corrupted, etc.
- change the internal compressor/decompressor API to return "-1" on
  failure, not 0.  this allows for 0-sized files to be decompressed
  correctly.

Revision 1.29.2.9 / (download) - annotate - [select for diffs], Sun May 30 14:45:06 2004 UTC (19 years, 10 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.8: +8 -7 lines
Diff to previous 1.29.2.8 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.44 (requested by mrg in ticket #420):
Fix a reference to stale storage on the stack - malloc the new file
name when gunzip'ing via strdup(3).  Fixes a bug whereby the new
filename would appear as gibberish when verbosely gunzipping.
Fix an off-by-one error when allocating the filename with added suffix,
and properly NUL-terminate the new filename.
It's NULL, not 0, in char * assignments - there are some still to do here.

Revision 1.46 / (download) - annotate - [select for diffs], Tue May 25 04:34:40 2004 UTC (19 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.45: +234 -140 lines
Diff to previous 1.45 (colored) to selected 1.71.2.7 (colored)

- fix "gzip -t" to not output anything by default.  PR#25507
- fix any decompression on corrupted gzip files.  PR#25508
- ask to overwrite files if we have a tty, rather than failing the
  operation.  PR#25509.
- clean up maybe_err()/maybe_warn(): use maybe_err() only for fatal
  errors.  maybe_warn() is for processing errors.  this allows
  "gzip -d file1.gz file2.gz" to decompress file2.gz even if file1.gz
  is corrupted, etc.
- change the internal compressor/decompressor API to return "-1" on
  failure, not 0.  this allows for 0-sized files to be decompressed
  correctly.

Revision 1.45 / (download) - annotate - [select for diffs], Fri May 21 12:16:10 2004 UTC (19 years, 10 months ago) by agc
Branch: MAIN
Changes since 1.44: +41 -44 lines
Diff to previous 1.44 (colored) to selected 1.71.2.7 (colored)

WARNS=3: add some const poisoning, and sort out local variable
definitions shadowing other variables.

Pass storage for file names into the file_compress and file_uncompress
functions, so that we don't run the risk of leaking memory. Remove a global
variable that's no longer needed.

Revision 1.44 / (download) - annotate - [select for diffs], Mon May 17 18:10:33 2004 UTC (19 years, 10 months ago) by agc
Branch: MAIN
Changes since 1.43: +8 -7 lines
Diff to previous 1.43 (colored) to selected 1.71.2.7 (colored)

Fix a reference to stale storage on the stack - malloc the new file
name when gunzip'ing via strdup(3).  Fixes a bug whereby the new
filename would appear as gibberish when verbosely gunzipping.

Fix an off-by-one error when allocating the filename with added suffix,
and properly NUL-terminate the new filename.

It's NULL, not 0, in char * assignments - there are some still to do here.

Revision 1.29.2.8 / (download) - annotate - [select for diffs], Mon May 10 14:39:00 2004 UTC (19 years, 10 months ago) by tron
Branch: netbsd-2-0
Changes since 1.29.2.7: +7 -7 lines
Diff to previous 1.29.2.7 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.43 (requested by bouyer in ticket #276):
Always initialise savename. Fix gzip -c core dump on sparc (and probably
others). OK'd by mrg@.

Revision 1.43 / (download) - annotate - [select for diffs], Thu May 6 17:43:57 2004 UTC (19 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.42: +7 -7 lines
Diff to previous 1.42 (colored) to selected 1.71.2.7 (colored)

Always initialise savename. Fix gzip -c core dump on sparc (and probably
others). OK'd by mrg@.

Revision 1.29.2.7 / (download) - annotate - [select for diffs], Thu Apr 29 04:48:38 2004 UTC (19 years, 11 months ago) by jmc
Branch: netbsd-2-0
Changes since 1.29.2.6: +479 -138 lines
Diff to previous 1.29.2.6 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pullup rev 1.37-1.42 (requested by mrg in ticket #223)

Mega patch fixes several issues & bugs in gzip:
- stdin bz2/compress support
- gzip -v pipe support
- various robustness issues
- no more .Sh BUGS in gzip.1

Revision 1.42 / (download) - annotate - [select for diffs], Tue Apr 27 13:45:50 2004 UTC (19 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.41: +42 -24 lines
Diff to previous 1.41 (colored) to selected 1.71.2.7 (colored)

clean up file descriptor handling.  don't lose them...

Revision 1.41 / (download) - annotate - [select for diffs], Tue Apr 27 11:26:28 2004 UTC (19 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.40: +4 -3 lines
Diff to previous 1.40 (colored) to selected 1.71.2.7 (colored)

- 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.

Revision 1.40 / (download) - annotate - [select for diffs], Tue Apr 27 02:25:06 2004 UTC (19 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.39: +3 -3 lines
Diff to previous 1.39 (colored) to selected 1.71.2.7 (colored)

crank version.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Apr 27 01:23:35 2004 UTC (19 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.38: +14 -5 lines
Diff to previous 1.38 (colored) to selected 1.71.2.7 (colored)

- fix "gunzip file.gz"
- fix "gzip <lots of files>"

both reported by tron@.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Apr 26 03:01:55 2004 UTC (19 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.37: +8 -8 lines
Diff to previous 1.37 (colored) to selected 1.71.2.7 (colored)

- properly parse --fast/--best/-1..-9 again.  noted by taca@.
- minor clean up.

Revision 1.37 / (download) - annotate - [select for diffs], Sun Apr 25 16:20:33 2004 UTC (19 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.36: +434 -121 lines
Diff to previous 1.36 (colored) to selected 1.71.2.7 (colored)

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.

Revision 1.29.2.6 / (download) - annotate - [select for diffs], Sun Apr 18 02:14:55 2004 UTC (19 years, 11 months ago) by jmc
Branch: netbsd-2-0
Changes since 1.29.2.5: +28 -20 lines
Diff to previous 1.29.2.5 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pullup rev 1.36 (requested by mrg in ticket #146)

Don't try to remove an output file we haven't actually created. PR#25189

Revision 1.36 / (download) - annotate - [select for diffs], Mon Apr 12 14:42:14 2004 UTC (19 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.35: +28 -20 lines
Diff to previous 1.35 (colored) to selected 1.71.2.7 (colored)

be sure we don't try to remove an output file we haven't actually created.
(reported by kimmo.)

Revision 1.29.2.5 / (download) - annotate - [select for diffs], Wed Apr 7 21:42:19 2004 UTC (19 years, 11 months ago) by jmc
Branch: netbsd-2-0
Changes since 1.29.2.4: +32 -13 lines
Diff to previous 1.29.2.4 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pullup rev 1.35 (requested by mrg in ticket #83)

Completely rewrite print_ratio().
print_list() was getting the compressed/uncompressed sizes backwards.
PR#25072

Revision 1.29.2.4 / (download) - annotate - [select for diffs], Wed Apr 7 21:41:00 2004 UTC (19 years, 11 months ago) by jmc
Branch: netbsd-2-0
Changes since 1.29.2.3: +35 -24 lines
Diff to previous 1.29.2.3 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pullup rev 1.32 (requested by mrg in ticket #82)

Factor out filetype checking code

Revision 1.35 / (download) - annotate - [select for diffs], Wed Apr 7 14:25:43 2004 UTC (19 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.34: +32 -13 lines
Diff to previous 1.34 (colored) to selected 1.71.2.7 (colored)

- completely rewrite print_ratio().  fixes PR#25072 and a few other cases
- print_list() was getting the compressed/uncompressed sizes backwards.

Revision 1.29.2.3 / (download) - annotate - [select for diffs], Thu Apr 1 02:43:11 2004 UTC (20 years ago) by jmc
Branch: netbsd-2-0
Changes since 1.29.2.2: +6 -8 lines
Diff to previous 1.29.2.2 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pullup rev 1.33-1.34 (requested by tron in ticket #33)

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.

Revision 1.34 / (download) - annotate - [select for diffs], Wed Mar 31 15:46:25 2004 UTC (20 years ago) by mrg
Branch: MAIN
Changes since 1.33: +3 -5 lines
Diff to previous 1.33 (colored) to selected 1.71.2.7 (colored)

remove a chunk more code with -DSMALL and in the process fix -DSMALL
that was broken in the previous commit (by exposing "fflag".)

Revision 1.33 / (download) - annotate - [select for diffs], Wed Mar 31 15:19:14 2004 UTC (20 years ago) by tron
Branch: MAIN
Changes since 1.32: +5 -5 lines
Diff to previous 1.32 (colored) to selected 1.71.2.7 (colored)

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.

Revision 1.29.2.2 / (download) - annotate - [select for diffs], Wed Mar 31 09:19:16 2004 UTC (20 years ago) by grant
Branch: netbsd-2-0
Changes since 1.29.2.1: +18 -17 lines
Diff to previous 1.29.2.1 (colored) to branchpoint 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.31 (requested by mrg in ticket #22):

use off_t instead of ssize_t in a few places.
fix "gzip -l" in -DSMALL (it wasn't doing a stat(2)).

Revision 1.29.2.1 / (download) - annotate - [select for diffs], Wed Mar 31 09:04:26 2004 UTC (20 years ago) by grant
Branch: netbsd-2-0
Changes since 1.29: +5 -3 lines
Diff to previous 1.29 (colored) to selected 1.71.2.7 (colored)

Pull up revision 1.30 (requested by tron in ticket #21):

patch from tron@ to convert to using public bz interfaces.  simonb says
no reason not to and this fixes PR#24964.

Revision 1.32 / (download) - annotate - [select for diffs], Tue Mar 30 11:42:04 2004 UTC (20 years ago) by mrg
Branch: MAIN
Changes since 1.31: +35 -24 lines
Diff to previous 1.31 (colored) to selected 1.71.2.7 (colored)

factor out filetype checking code

Revision 1.31 / (download) - annotate - [select for diffs], Tue Mar 30 09:42:58 2004 UTC (20 years ago) by mrg
Branch: MAIN
Changes since 1.30: +18 -17 lines
Diff to previous 1.30 (colored) to selected 1.71.2.7 (colored)

use off_t instead of ssize_t in a few places.
fix "gzip -l" in -DSMALL (it wasn't doing a stat(2)).

Revision 1.30 / (download) - annotate - [select for diffs], Tue Mar 30 09:15:07 2004 UTC (20 years ago) by mrg
Branch: MAIN
Changes since 1.29: +5 -3 lines
Diff to previous 1.29 (colored) to selected 1.71.2.7 (colored)

patch from tron@ to convert to using public bz interfaces.  simonb says
no reason not to and this fixes PR#24964.

Revision 1.29 / (download) - annotate - [select for diffs], Sun Mar 28 13:54:44 2004 UTC (20 years ago) by mrg
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.28: +27 -12 lines
Diff to previous 1.28 (colored) to selected 1.71.2.7 (colored)

shave another 612 bytes off -DSMALL on x86.  now x_gzip with -l support
is actually smaller than the older x_gzip without it!

Revision 1.28 / (download) - annotate - [select for diffs], Sun Mar 28 08:18:14 2004 UTC (20 years ago) by mrg
Branch: MAIN
Changes since 1.27: +7 -8 lines
Diff to previous 1.27 (colored) to selected 1.71.2.7 (colored)

still do argv[0] processing -DSMALL, from tsutsui.
pass the smaller list of options to getopt with -DSMALL.

Revision 1.27 / (download) - annotate - [select for diffs], Sun Mar 28 04:13:40 2004 UTC (20 years ago) by mrg
Branch: MAIN
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored) to selected 1.71.2.7 (colored)

crank version

Revision 1.26 / (download) - annotate - [select for diffs], Sun Mar 28 04:07:45 2004 UTC (20 years ago) by mrg
Branch: MAIN
Changes since 1.25: +57 -26 lines
Diff to previous 1.25 (colored) to selected 1.71.2.7 (colored)

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.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Mar 28 03:47:18 2004 UTC (20 years ago) by mrg
Branch: MAIN
Changes since 1.24: +57 -8 lines
Diff to previous 1.24 (colored) to selected 1.71.2.7 (colored)

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.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Mar 27 22:33:43 2004 UTC (20 years ago) by tsutsui
Branch: MAIN
Changes since 1.23: +37 -9 lines
Diff to previous 1.23 (colored) to selected 1.71.2.7 (colored)

Allow disabling bzip2 (.bz2) and compress (.Z) support
by -DNO_BZIP2_SUPPORT and -DNO_COMPRESS_SUPPORT.
OK'ed by mrg.

Revision 1.23 / (download) - annotate - [select for diffs], Sat Mar 6 09:41:36 2004 UTC (20 years ago) by mrg
Branch: MAIN
Changes since 1.22: +2 -7 lines
Diff to previous 1.22 (colored) to selected 1.71.2.7 (colored)

minor cleanup.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Feb 18 08:19:48 2004 UTC (20 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.21: +47 -3 lines
Diff to previous 1.21 (colored) to selected 1.71.2.7 (colored)

support decompressing "compress"ed files.  from rtr@ with a few minor edits
from me.  code in zuncompress liberally borrowed from usr.bin/compress.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Jan 29 13:18:58 2004 UTC (20 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored) to selected 1.71.2.7 (colored)

use gzopenfull()

Revision 1.20 / (download) - annotate - [select for diffs], Sun Jan 25 05:19:49 2004 UTC (20 years, 2 months ago) by grant
Branch: MAIN
Changes since 1.19: +2 -3 lines
Diff to previous 1.19 (colored) to selected 1.71.2.7 (colored)

void functions need not call return

Revision 1.19 / (download) - annotate - [select for diffs], Mon Jan 5 23:23:34 2004 UTC (20 years, 2 months ago) by jmmv
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored) to selected 1.71.2.7 (colored)

Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Jan 3 02:39:18 2004 UTC (20 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.17: +4 -2 lines
Diff to previous 1.17 (colored) to selected 1.71.2.7 (colored)

prepend_gzip: avoid searching beyond this string

Revision 1.17 / (download) - annotate - [select for diffs], Fri Jan 2 10:09:42 2004 UTC (20 years, 3 months ago) by simonb
Branch: MAIN
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored) to selected 1.71.2.7 (colored)

Fix off-by-one error in the malloc of the new argv in prepend_gzip().

Revision 1.16 / (download) - annotate - [select for diffs], Fri Jan 2 03:12:21 2004 UTC (20 years, 3 months ago) by wiz
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored) to selected 1.71.2.7 (colored)

Fix typo in comment.

Revision 1.15 / (download) - annotate - [select for diffs], Fri Jan 2 02:55:26 2004 UTC (20 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.14: +65 -3 lines
Diff to previous 1.14 (colored) to selected 1.71.2.7 (colored)

implement $GZIP handling.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jan 2 01:40:59 2004 UTC (20 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.13: +3 -2 lines
Diff to previous 1.13 (colored) to selected 1.71.2.7 (colored)

note that $GZIP support is missing still

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jan 2 01:34:01 2004 UTC (20 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.12: +4 -2 lines
Diff to previous 1.12 (colored) to selected 1.71.2.7 (colored)

allow HAVE_ZLIB_GZOPENFULL to be overriden externally

Revision 1.12 / (download) - annotate - [select for diffs], Thu Jan 1 05:28:44 2004 UTC (20 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.11: +6 -6 lines
Diff to previous 1.11 (colored) to selected 1.71.2.7 (colored)

don't dump core in the face of unknown long options. from cjep@

Revision 1.11 / (download) - annotate - [select for diffs], Thu Jan 1 02:58:36 2004 UTC (20 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.10: +10 -2 lines
Diff to previous 1.10 (colored) to selected 1.71.2.7 (colored)

add some simple -DSMALL support.  reduces the size of gzip(1) itself a by
nearly 2.5KB text.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Jan 1 02:44:09 2004 UTC (20 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.9: +115 -64 lines
Diff to previous 1.9 (colored) to selected 1.71.2.7 (colored)

port simonb's bzip2 support.
misc cleanups.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Dec 28 13:42:28 2003 UTC (20 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.8: +68 -48 lines
Diff to previous 1.8 (colored) to selected 1.71.2.7 (colored)

GNU gzip compatibility: don't let "gzip -dc" (zcat) operate on non-gzip
files by default.  -f must be used.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Dec 26 15:15:49 2003 UTC (20 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored) to selected 1.71.2.7 (colored)

- document --list
- use unsigned char's that are used in unsigned calculations later.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Dec 26 15:06:16 2003 UTC (20 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.6: +29 -15 lines
Diff to previous 1.6 (colored) to selected 1.71.2.7 (colored)

support gzip -l -v.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Dec 26 14:49:37 2003 UTC (20 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.5: +56 -32 lines
Diff to previous 1.5 (colored) to selected 1.71.2.7 (colored)

- print totals for --list.
- round down percentages, like GNU gzip does
- use "stdout" not "-", like GNU gzip does
- factor percent calculation code.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Dec 26 14:11:01 2003 UTC (20 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.4: +88 -16 lines
Diff to previous 1.4 (colored) to selected 1.71.2.7 (colored)

begin to start to support --list.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Dec 23 15:02:40 2003 UTC (20 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.3: +14 -8 lines
Diff to previous 1.3 (colored) to selected 1.71.2.7 (colored)

- make this WARNS=3 happy
- add RCSID()
- document the version number

Revision 1.3 / (download) - annotate - [select for diffs], Tue Dec 23 08:11:58 2003 UTC (20 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.2: +5 -5 lines
Diff to previous 1.2 (colored) to selected 1.71.2.7 (colored)

some const-poisoing, depend on bss to set gzipflags[]

Revision 1.2 / (download) - annotate - [select for diffs], Tue Dec 23 06:23:18 2003 UTC (20 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.1: +1 -5 lines
Diff to previous 1.1 (colored) to selected 1.71.2.7 (colored)

delete unused variables

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Tue Dec 23 05:16:33 2003 UTC (20 years, 3 months ago) by mrg
Branch: mrg
CVS Tags: gzip-2-0
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored) to selected 1.71.2.7 (colored)

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

Revision 1.1 / (download) - annotate - [select for diffs], Tue Dec 23 05:16:33 2003 UTC (20 years, 3 months ago) by mrg
Branch: MAIN
Diff to selected 1.71.2.7 (colored)

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>