History log of /freebsd-current/usr.bin/compress/compress.c
Revision Date Author Comments
# 0b8224d1 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

Remove copyright strings ifdef'd out

We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).

Sponsored by: Netflix


# bdcbfde3 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.bin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# b63800ac 17-Jan-2019 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

Fix descriptor/memory leak in compress(1) code

This is mostly a style fix since the code in question is not called multiple
times and doesn't have cummulative effect.

PR: 204953
Submitted by: David Binderman <dcb314@hotmail.com>
MFC after: 1 week


# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# f084f766 21-May-2017 Jilles Tjoelker <jilles@FreeBSD.org>

compress: Allow uncompress -c with multiple pathnames, as required by POSIX.

Per POSIX, allow passing multiple pathnames to uncompress -c, concatenating
the uncompressed data.

Passing multiple pathnames to compress -c remains disallowed, since the
result cannot be decompressed.

PR: 219387
Reported by: Jörg Schilling


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96


# d6b3ef63 17-Feb-2015 Jilles Tjoelker <jilles@FreeBSD.org>

compress,gzip,xz: Preserve timestamps with nanosecond precision.


# b3608ae1 03-Jan-2012 Ed Schouten <ed@FreeBSD.org>

Replace index() and rindex() calls with strchr() and strrchr().

The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.

This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.


# 305700d9 06-Nov-2011 Ed Schouten <ed@FreeBSD.org>

Mark global functions and/or variables in compress(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.


# da52b4ca 11-Dec-2010 Joel Dahl <joel@FreeBSD.org>

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 99742a23 28-Mar-2010 Ed Schouten <ed@FreeBSD.org>

Change all our own code to use st_*tim instead of st_*timespec.

Also remove some local patches to diff(1) which are now unneeded.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 33ffdd81 14-Jun-2003 Tom Rhodes <trhodes@FreeBSD.org>

Don't truncate the output file before making sure that we can
read at least 1 byte from the input file without problems. This
fixes a bug in uncompress(1) that causes the accidental removal
of files that happen to have the same name as the output file,
even when the uncompression fails and is aborted, i.e.:

$ echo hello world > hello
$ touch hello.Z
$ ls -l hello*
-rw-rw-r-- 1 giorgos giorgos 12 Jun 14 13:33 hello
-rw-rw-r-- 1 giorgos giorgos 0 Jun 14 13:33 hello.Z
$ ./uncompress -f hello
uncompress: hello.Z: Inappropriate file type or format
$ ls -l hello*
-rw-rw-r-- 1 giorgos giorgos 0 Jun 14 13:33 hello.Z
$

PR: 46787
Submitted by: keramida


# 47e9e6a1 28-Jul-2002 David Malone <dwmalone@FreeBSD.org>

ANSIify function definitions to avoid a warning.


# b4771590 16-May-2002 Tim J. Robbins <tjr@FreeBSD.org>

As required by SUSv3, a file argument of "-" causes standard input
to be compressed/decompressed to standard output.


# 783b4710 16-May-2002 Tim J. Robbins <tjr@FreeBSD.org>

Compression ratio statistics should be written to stderr instead of stdout.


# 6c1b63bb 16-May-2002 Tim J. Robbins <tjr@FreeBSD.org>

Use exit status 2 to indicate that the file was not compressed because
its size would not be reduced (SUSv3).


# 7ddea7b8 23-Mar-2002 Warner Losh <imp@FreeBSD.org>

unifdef -D__STDC__


# f1bb2cd2 21-Mar-2002 Warner Losh <imp@FreeBSD.org>

remove __P


# 9f5b04e9 10-Dec-2001 David Malone <dwmalone@FreeBSD.org>

Style improvements recommended by Bruce as a follow up to some
of the recent WARNS commits. The idea is:

1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.


# 546c7f66 02-Dec-2001 Mark Murray <markm@FreeBSD.org>

Use __FBSDID().
Use a better choice than size_t for vertain variables.
Fix some comment alignment.


# cb08795b 02-Dec-2001 Mark Murray <markm@FreeBSD.org>

WARNS=2 fix and 'register' removal.


# 6209021e 05-Jul-2001 Kris Kennaway <kris@FreeBSD.org>

Mark some functions as __printflike()

MFC after: 1 week


# eb2fc780 09-Oct-2000 Garrett Wollman <wollman@FreeBSD.org>

Don't depend on <sys/stat.h> bogusly including <sys/time.h> (and thereby
<time.h>).


# da94aa4e 15-May-2000 Tim Vanderhoek <hoek@FreeBSD.org>

From PR submitter:

compress uses setfile() to make flags, ownership and mode of the output
the same as those of the original. However, if the filesystem holding the
output file doesn't support these operations, compress prints a warning.
This bites a bit with NFS directories, which always fail the chflags()
operation. If the file system doesn't support the operation, then the
flags data wasn't valid on the original file anyway, so the warning is
spurious.

Submitted by: bin/16981 (Peter Edwards <peter.edwards@ireland.com>)


# fae643c5 26-Mar-2000 Philippe Charnier <charnier@FreeBSD.org>

Add DIAGNOSTICS section name. Spelling


# fa146c53 06-Dec-1998 Archie Cobbs <archie@FreeBSD.org>

Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]).


# d52ae819 21-Oct-1998 Bruce Evans <bde@FreeBSD.org>

Fixed previous commit to actually work. The wrong variable was initialized
earlier (with style bugs of course), so zcat was an alias for uncompress
instead of `uncompress -c'.


# 7c0704e4 20-Oct-1998 Mike Smith <msmith@FreeBSD.org>

Behave like zcat if invoked as zcat. We don't install as zcat; this just
makes us more useful in a tight environment.

Submitted by: Wilfredo Sanchez <wsanchez@apple.com>


# 1c8af878 28-Mar-1997 Warner Losh <imp@FreeBSD.org>

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


# 1f36dc1f 05-Sep-1996 Bruce Evans <bde@FreeBSD.org>

Finished adjustments for cleaning up declaration of zopen(). Moving the
declaration from <stdio.h> to "zopen.h" left it undeclared here.


# 7799f52a 30-May-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove trailing whitespace.


# 9b50d902 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Usr.bin Sources