aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/compress
Commit message (Collapse)AuthorAgeFilesLines
* uncompress: Avoid reading an extra byteDavid Jones2024-10-111-1/+2
| | | | | | | | | | | | | | When reading the next code in a stream, avoid reading an extra byte if we're going to throw it away. When there's no more bits to extract from the stream, bits will be 0 and we'll mask the read byte with 0 anyway. At worst, this will avoid reading one past the end of gbuf array (which is not possible in well formed streams). PR: 127912 Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D47041 (cherry picked from commit 818c7b769a4f7d3c8fecc4cf491f4e22ef816eba)
* Remove $FreeBSD$: one-line bare tagWarner Losh2023-08-232-3/+0
| | | | | | | Remove /^\s*\$FreeBSD\$$\n/ Similar commit in main: (cherry picked from commit 05248206f720)
* Remove $FreeBSD$: one-line nroff patternWarner Losh2023-08-232-2/+0
| | | | | | | Remove /^\.\\"\s*\$FreeBSD\$$\n/ Similar commit in main: (cherry picked from commit b2c76c41be32)
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-235-5/+0
| | | | | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/ Similar commit in main: (cherry picked from commit d0b2dbfa0ecf)
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-232-4/+0
| | | | | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/ Similar commit in main: (cherry picked from commit 1d386b48a555)
* Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-231-1/+0
| | | | | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/ Similar commit in main: (cherry picked from commit 2a63c3be1582)
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-231-2/+0
| | | | | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/ Similar commit in main: (cherry picked from commit b3e7694832e8)
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-07-251-1/+1
| | | | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix (cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
* compress(1): Add EXAMPLES sectionFernando Apesteguía2020-10-201-1/+35
| | | | | | | | | | Add 5 examples showing basic usage. Approved by: manpages (gbe@) Differential Revision: https://reviews.freebsd.org/D26865 Notes: svn path=/head/; revision=366895
* Fix descriptor/memory leak in compress(1) codeOleksandr Tymoshenko2019-01-181-0/+2
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=343127
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-1/+3
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326276
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-202-0/+4
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* DIRDEPS_BUILD: Connect new directories.Bryan Drewery2017-10-311-0/+11
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325187
* Add HAS_TESTS to all Makefiles that are currently using theEnji Cooper2017-08-021-0/+1
| | | | | | | | | `SUBDIR.${MK_TESTS}+= tests` idiom. This is a follow up to r321912. Notes: svn path=/projects/make-check-sandbox/; revision=321914
* Convert traditional ${MK_TESTS} conditional idiom for including testEnji Cooper2017-08-021-3/+1
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=321912
* compress: Allow uncompress -c with multiple pathnames, as required by POSIX.Jilles Tjoelker2017-05-212-1/+23
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=318592
* compress: Add basic tests.Jilles Tjoelker2017-05-213-0/+187
| | | | Notes: svn path=/head/; revision=318591
* Renumber copyright clause 4Warner Losh2017-02-284-4/+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 Notes: svn path=/head/; revision=314436
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-271-5/+6
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+19
| | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | compress,gzip,xz: Preserve timestamps with nanosecond precision.Jilles Tjoelker2015-02-171-5/+6
|/ | | | Notes: svn path=/head/; revision=278896
* Replace index() and rindex() calls with strchr() and strrchr().Ed Schouten2012-01-031-3/+3
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=229403
* - add a missing "be" and "in"Eitan Adler2011-11-111-1/+1
| | | | | | | | | | | | | | - 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 Notes: svn path=/head/; revision=227458
* Mark global functions and/or variables in compress(1) static where possible.Ed Schouten2011-11-061-15/+15
| | | | | | | This allows compilers and static analyzers to more thorough analysis. Notes: svn path=/head/; revision=227236
* - change "is is" to "is" or "it is"Eitan Adler2011-10-161-1/+1
| | | | | | | | | | | - change "the the" to "the" Approved by: lstewart Approved by: sahil (mentor) MFC after: 3 days Notes: svn path=/head/; revision=226436
* Fix handling of corrupt compress(1)ed data. [11:04]Bjoern A. Zeeb2011-09-281-6/+17
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=225827
* Remove $Log$ keyword, which can cause annoyance in diffs in some cases.Ed Maste2011-03-311-1/+1
| | | | | | | Revision control tools have a history command to obtain this information. Notes: svn path=/head/; revision=220201
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-12-114-16/+0
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=216370
* Correct some typos in comments, no functional changes.Benedict Reuschling2010-10-161-1/+1
| | | | Notes: svn path=/head/; revision=213927
* Change all our own code to use st_*tim instead of st_*timespec.Ed Schouten2010-03-281-2/+2
| | | | | | | Also remove some local patches to diff(1) which are now unneeded. Notes: svn path=/head/; revision=205793
* Build usr.bin/ with WARNS=6 by default.Ed Schouten2010-01-021-1/+0
| | | | | | | Also add some missing $FreeBSD$ to keep svn happy. Notes: svn path=/head/; revision=201386
* Revert most part of 200420 as requested, as more review and polish isXin LI2009-12-131-0/+2
| | | | | | | needed. Notes: svn path=/head/; revision=200462
* Remove unneeded header includes from usr.bin/ except contributed code.Xin LI2009-12-111-2/+0
| | | | | | | Tested with: make universe Notes: svn path=/head/; revision=200420
* -mdoc sweep.Ruslan Ermilov2005-11-181-11/+10
| | | | Notes: svn path=/head/; revision=152568
* Several changes: Added a BUGS section with several bugs. AndGary W. Swearingen2005-09-071-26/+94
| | | | | | | | | | | | | | | -- 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 Notes: svn path=/head/; revision=149865
* Unbreak r1.11 by delhij. Blind change from unsigned to signed charAlexander Kabaev2005-05-181-2/+2
| | | | | | | | pointer causes problems with sign extension and leads to compress(1) dumping core on any non-trivial incoming data. Notes: svn path=/head/; revision=146336
* Consistently use signed char so gcc4 won't complainXin LI2005-05-021-1/+1
| | | | Notes: svn path=/head/; revision=145798
* Added the EXIT STATUS section where appropriate.Ruslan Ermilov2005-01-171-1/+1
| | | | Notes: svn path=/head/; revision=140368
* Bump WARNS level to 6.Tom Rhodes2004-09-101-0/+1
| | | | | | | | Submitted by: keramida Tested on: i386, sparc64 (panther) Notes: svn path=/head/; revision=135052
* Fix the NAME section making whatis(1) happy in particular.Ruslan Ermilov2004-07-051-1/+1
| | | | Notes: svn path=/head/; revision=131635
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-1/+2
| | | | Notes: svn path=/head/; revision=131491
* Don't truncate the output file before making sure that we canTom Rhodes2003-06-141-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=116336
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/Jens Schweikhardt2002-12-301-1/+1
| | | | | | | Add FreeBSD Id tag where missing. Notes: svn path=/head/; revision=108470