Commit Graph

91 Commits

Author SHA1 Message Date
Fernando Apesteguía
ea772485d1 compress(1): Add EXAMPLES section
Add 5 examples showing basic usage.

Approved by:	manpages (gbe@)
Differential Revision:		https://reviews.freebsd.org/D26865
2020-10-20 13:05:25 +00:00
Oleksandr Tymoshenko
b63800ac8f 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
2019-01-18 00:26:25 +00:00
Pedro F. Giffuni
1de7b4b805 various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

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.

No functional change intended.
2017-11-27 15:37:16 +00:00
Pedro F. Giffuni
8a16b7a18f 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.
2017-11-20 19:49:47 +00:00
Bryan Drewery
ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Bryan Drewery
3806950135 DIRDEPS_BUILD: Connect new directories.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:04:07 +00:00
Enji Cooper
d511b20a69 Add HAS_TESTS to all Makefiles that are currently using the
`SUBDIR.${MK_TESTS}+= tests` idiom.

This is a follow up to r321912.
2017-08-02 08:50:42 +00:00
Enji Cooper
4b330699f8 Convert traditional ${MK_TESTS} conditional idiom for including test
directories to SUBDIR.${MK_TESTS} idiom

This is being done to pave the way for future work (and homogenity) in
^/projects/make-check-sandbox .

No functional change intended.

MFC after:	1 weeks
2017-08-02 08:35:51 +00:00
Jilles Tjoelker
f084f76687 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
2017-05-21 14:35:16 +00:00
Jilles Tjoelker
fd1c67ef4e compress: Add basic tests. 2017-05-21 14:05:32 +00:00
Warner Losh
fbbd9655e5 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
2017-02-28 23:42:47 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Jilles Tjoelker
d6b3ef634c compress,gzip,xz: Preserve timestamps with nanosecond precision. 2015-02-17 13:12:54 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Ed Schouten
b3608ae18f 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.
2012-01-03 18:51:58 +00:00
Eitan Adler
14517324d0 - add a missing "be" and "in"
- fix other errors introduced when committing r226436
- add 'function' to a sentence where it makes sense

Submitted by:	delphij
Submitted by:	dougb
Submitted by:	jhb
Approved by:	dougb
Approved by:	jhb
2011-11-11 22:27:09 +00:00
Ed Schouten
305700d983 Mark global functions and/or variables in compress(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:16 +00:00
Eitan Adler
36daf0495a - change "is is" to "is" or "it is"
- change "the the" to "the"

Approved by:	lstewart
Approved by:	sahil (mentor)
MFC after:	3 days
2011-10-16 14:30:28 +00:00
Bjoern A. Zeeb
a06534c3c2 Fix handling of corrupt compress(1)ed data. [11:04]
Add missing length checks on unix socket addresses. [11:05]

Approved by:	so (cperciva)
Approved by:	re (kensmith)
Security:	FreeBSD-SA-11:04.compress
Security:	CVE-2011-2895 [11:04]
Security:	FreeBSD-SA-11:05.unix
2011-09-28 08:47:17 +00:00
Ed Maste
41aebe5fc9 Remove $Log$ keyword, which can cause annoyance in diffs in some cases.
Revision control tools have a history command to obtain this information.
2011-03-31 14:35:33 +00:00
Joel Dahl
da52b4caaf 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
2010-12-11 08:32:16 +00:00
Benedict Reuschling
c4fadc2b78 Correct some typos in comments, no functional changes. 2010-10-16 15:24:04 +00:00
Ed Schouten
99742a231f 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.
2010-03-28 13:16:08 +00:00
Ed Schouten
b7946da96b Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
Xin LI
821df508e8 Revert most part of 200420 as requested, as more review and polish is
needed.
2009-12-13 03:14:06 +00:00
Xin LI
6f2d322192 Remove unneeded header includes from usr.bin/ except contributed code.
Tested with:	make universe
2009-12-11 23:35:38 +00:00
Ruslan Ermilov
4e9e907d63 -mdoc sweep. 2005-11-18 10:36:29 +00:00
Gary W. Swearingen
25b20fc0b2 Several changes: Added a BUGS section with several bugs. And
--  Made the synopses more precise.
--  Added argument to flag in option description.
--  Moved -b default and limits to option description (to un-hide).
--  Noted several behaviors that were not mentioned.
--  A few more trivial changes.

PR:             docs/46787
Approved by:    keramida
MFC after:      3 days
2005-09-07 18:40:09 +00:00
Alexander Kabaev
39be1552ee Unbreak r1.11 by delhij. Blind change from unsigned to signed char
pointer causes problems with sign extension and leads to compress(1)
dumping core on any non-trivial incoming data.
2005-05-18 05:24:08 +00:00
Xin LI
05195f8d61 Consistently use signed char so gcc4 won't complain 2005-05-02 10:23:03 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Tom Rhodes
aa8cdf7765 Bump WARNS level to 6.
Submitted by:	keramida
Tested on:	i386, sparc64 (panther)
2004-09-10 21:34:46 +00:00
Ruslan Ermilov
51f98e585b Fix the NAME section making whatis(1) happy in particular. 2004-07-05 17:12:53 +00:00
Ruslan Ermilov
6a3e8b0adc Mechanically kill hard sentence breaks. 2004-07-02 22:22:35 +00:00
Tom Rhodes
33ffdd8115 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
2003-06-14 13:41:31 +00:00
Jens Schweikhardt
d64ada501a Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.
2002-12-30 21:18:15 +00:00
Philippe Charnier
6dc4364cd6 Spelling. 2002-10-16 12:42:15 +00:00
David Malone
47e9e6a168 ANSIify function definitions to avoid a warning. 2002-07-28 15:32:17 +00:00
Ruslan Ermilov
3971fc8c4b mdoc(7) police: lint. 2002-05-29 18:12:21 +00:00
Tim J. Robbins
f5ba2b905e Add a Standards section, and note that compress(1) and uncompress(1) now
conform to P1003.1-2001.
2002-05-17 01:54:17 +00:00
Tim J. Robbins
b477159065 As required by SUSv3, a file argument of "-" causes standard input
to be compressed/decompressed to standard output.
2002-05-17 01:42:43 +00:00
Tim J. Robbins
783b4710d3 Compression ratio statistics should be written to stderr instead of stdout. 2002-05-17 01:25:51 +00:00
Tim J. Robbins
6c1b63bb06 Use exit status 2 to indicate that the file was not compressed because
its size would not be reduced (SUSv3).
2002-05-17 00:58:07 +00:00
Philippe Charnier
3898680cf7 Use `The .Nm utility' 2002-04-19 23:44:58 +00:00