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
Tom Rhodes
3e4d070b93
compress(1) has an erroneous description of zcat, fixed.
...
PR: 36453
No objections from: ru
2002-04-09 20:40:24 +00:00
Warner Losh
7ddea7b836
unifdef -D__STDC__
2002-03-23 23:19:00 +00:00
Warner Losh
f1bb2cd2aa
remove __P
2002-03-22 01:22:50 +00:00
Mark Murray
91bd71d206
Remove leaf node WARNS?=2 (that mainly I added). This should
...
help the GCC3 transition and CURRENT in general.
2002-02-08 22:31:43 +00:00
David Malone
9f5b04e925
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.
2001-12-10 21:13:08 +00:00
Mark Murray
546c7f6629
Use __FBSDID().
...
Use a better choice than size_t for vertain variables.
Fix some comment alignment.
2001-12-02 23:58:38 +00:00
Mark Murray
cb08795bb0
WARNS=2 fix and 'register' removal.
2001-12-02 13:31:22 +00:00
Ruslan Ermilov
6846c17488
mdoc(7) police: make double quotes in #include statement visible.
2001-10-01 15:01:57 +00:00
Ruslan Ermilov
6658f7a13b
mdoc(7) police: Fixed the .Ex calls in manpages that describe more
...
than one utility.
PR: docs/30437
Submitted by: SUZUKI Koichi <koich@cac.co.jp>
2001-09-11 12:27:15 +00:00
Ruslan Ermilov
d628d776c4
mdoc(7) police: utilize the new .Ex macro.
2001-08-15 09:09:47 +00:00
Ruslan Ermilov
8af1452cf8
Removed duplicate VCS ID tags, as per style(9).
2001-08-13 14:06:34 +00:00
Dima Dorfman
f247324df7
Remove whitespace at EOL.
2001-07-15 08:06:20 +00:00
Ruslan Ermilov
625003720a
mdoc(7) police: removed HISTORY info from the .Os call.
2001-07-10 14:16:33 +00:00
Kris Kennaway
6209021ebd
Mark some functions as __printflike()
...
MFC after: 1 week
2001-07-05 09:54:59 +00:00
Ruslan Ermilov
dc12be5258
MAN[1-9] -> MAN.
2001-03-27 10:52:19 +00:00
Ruslan Ermilov
8fe908ef0c
mdoc(7) police: use the new features of the Nm macro.
2000-11-20 19:21:22 +00:00
Ruslan Ermilov
726b61ab5f
Avoid use of direct troff requests in mdoc(7) manual pages.
2000-11-10 17:46:15 +00:00
Garrett Wollman
eb2fc78027
Don't depend on <sys/stat.h> bogusly including <sys/time.h> (and thereby
...
<time.h>).
2000-10-10 01:50:26 +00:00
Tim Vanderhoek
da94aa4ef2
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>)
2000-05-16 04:58:34 +00:00
Philippe Charnier
fae643c579
Add DIAGNOSTICS section name. Spelling
2000-03-26 15:10:37 +00:00
Peter Wemm
c20af5da01
Tidy up $Log$ debris
1999-09-06 07:32:15 +00:00
Peter Wemm
a1a4f1a0d8
$Header$ -> $FreeBSD$
1999-08-28 05:11:36 +00:00
Peter Wemm
c3aac50f28
$Id$ -> $FreeBSD$
1999-08-28 01:08:13 +00:00
Nik Clayton
3be5f1f5ce
Add $Id$, to make it simpler for members of the translation teams to
...
track.
The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;
.\" $Id$
.\"
If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.
Approved by: bde
1999-07-12 20:24:20 +00:00
Archie Cobbs
fa146c5335
Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]).
1998-12-06 22:58:23 +00:00
Bruce Evans
d52ae8190d
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'.
1998-10-21 11:48:39 +00:00
Mike Smith
7c0704e446
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>
1998-10-20 06:13:57 +00:00
Philippe Charnier
2553708093
Uncompress is under .Nm not .Ar.
1997-06-30 06:44:07 +00:00
Warner Losh
1c8af87873
compare return value from getopt against -1 rather than EOF, per the final
...
posix standard on the topic.
1997-03-29 04:34:07 +00:00
Peter Wemm
c115df18cd
Revert $FreeBSD$ to $Id$
1997-02-22 19:58:13 +00:00
Jordan K. Hubbard
1130b656e5
Make the long-awaited change from $Id$ to $FreeBSD$
...
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Bruce Evans
1f36dc1f9e
Finished adjustments for cleaning up declaration of zopen(). Moving the
...
declaration from <stdio.h> to "zopen.h" left it undeclared here.
1996-09-05 18:15:43 +00:00
Mike Pritchard
c0b0bcf4d3
Use the .Bx macro where appropriate.
1996-08-23 20:36:11 +00:00
Wolfram Schneider
6127186d3c
a header file for zopen.3
...
Pointed out by: Philippe Charnier <charnier@lirmm.fr>
1996-08-20 20:49:39 +00:00
Wolfram Schneider
ad7076c992
remove zopen, zopen is not part of libc.
1996-07-02 23:04:50 +00:00
Peter Wemm
6065a0be11
This commit was generated by cvs2svn to compensate for changes in r13122,
...
which included commits to RCS files with non-trunk default branches.
1995-12-30 19:02:48 +00:00
Rodney W. Grimes
7799f52a32
Remove trailing whitespace.
1995-05-30 06:41:30 +00:00
Andreas Schulz
5cf1ec501a
Correct the usage of the maxmaxcode so that compress -b 12 works again.
...
Thanks to Dave Rivers for reporting that problem.
1995-01-02 10:04:02 +00:00
Jordan K. Hubbard
556751c1e8
Add David River's patch fix to use the passed in number of bits (-b <n>)
...
properly.
Submitted by: rivers
1994-12-31 04:40:52 +00:00
Garrett Wollman
b9717ddb85
Don't use Berkeley zcat, use more powerful gzip zcat.
1994-08-05 21:05:31 +00:00