Commit Graph

39 Commits

Author SHA1 Message Date
obrien
692c1c4f44 We have to hide copyright[] for gcc33. :-( 2003-04-30 17:40:28 +00:00
markm
bb23ca0fbc Be consistent about declaring a function "static", and consistent
about the type of argv.
2002-10-23 10:23:38 +00:00
markm
8090df0428 Give lint a small bit of help. 2002-07-31 16:50:21 +00:00
obrien
6ccf658737 Consistently use __FBSDID 2002-06-30 05:13:54 +00:00
tjr
8ace5d40b1 Avoid truncating the pathname to UNIX Domain Sockets with snprintf(),
giving a more sensible warning when the (relatively meagre) sun_path
limit is exceeded.
2002-06-29 04:52:33 +00:00
jmallett
2d1d31b987 Use an usage() rather than doing the fprintf inside option parsing. 2002-06-14 09:54:48 +00:00
tjr
84e8b3b25f Print the "$" symbol on blank lines when the -s and -e options are used
together.

Obtained from:	OpenBSD (millert, Denis Afonin)
2002-06-13 14:05:26 +00:00
tjr
b409b43282 Remove bogus "-" operand from usage message. There is no restriction on
where it may be placed, it is treated the same as the file arguments.
2002-06-13 13:45:14 +00:00
markm
ae5af8bf38 Fix warnings inspired by lint, a commercial lint and WARNS=4. 2002-02-22 20:51:00 +00:00
imp
7cce60ba90 Drag cat(1) kicking and screaming into the late 1980's:
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
  they already are.

Approved by: arch@, new style(9)
2002-02-02 06:10:01 +00:00
obrien
3e1e2dd6aa Default to WARNS=2. Binary builds that cannot handle this must explicitly
set WARNS=0.

Reviewed by:	mike
2001-12-04 01:57:47 +00:00
ru
731c759679 WARNSify. 2001-09-26 11:34:14 +00:00
ru
6d9fdb5f17 The "cat - -" feature was broken by the last commit.
Restore the code that avoided closing and reopening
stdin.  This is also required by POSIX.  As a bonus,
enable multiple stdin reads with the -benstv flags,
by resetting the EOF condition on stdin.
2001-09-26 11:32:23 +00:00
ru
7d18c9d1bf mdoc(7) police: fixed markup. 2001-09-25 18:10:18 +00:00
dillon
fefc24c085 Give /bin/cat the ability to connect to and read unix-domain sockets
MFC after:	1 week
2001-09-15 00:39:14 +00:00
ru
e6bcd7b5b8 mdoc(7) police: utilize the new .Ex macro. 2001-08-15 09:09:47 +00:00
dd
f5d286af56 Include missing header files which define functions for which gcc has
builtins (e.g., exit, strcmp).
2001-06-24 23:04:23 +00:00
dd
998964d334 Xref zcat(1). 2001-06-18 20:00:39 +00:00
ru
951f048dbb Prepare for mdoc(7)NG. 2000-12-15 17:37:31 +00:00
ru
c835e11eed mdoc(7) police: use the new features of the Nm macro. 2000-11-20 11:39:41 +00:00
sheldonh
4fa5c230c7 Use Dq Li (double-quoted literal) instead of Ic (internal command) to
mark up a sample invocation, since it is not a command internal to the
described utility.

Do not use Ar (argument) to mark up something which is not an argument
to the utility or one of its internal commands.
2000-06-27 18:22:13 +00:00
asmodai
4f65b6759d Sync us up to OpenBSD's cat.1 v1.18 and cat.c v1.9.
This gets rid of a bogus cast of NULL in setbuf().
Lets us know the buffer malloc failed.

Reworks the manpage a bit to make it more mdoc(7) compliant, adds
examples.
2000-04-14 21:01:35 +00:00
asmodai
1ce15de0f3 Remove unnecessary empty line.
Remove trailing whitespace.
2000-04-13 19:31:46 +00:00
peter
3b7c52fb9a $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
kris
935bd87c22 Various spelling/formatting changes.
Submitted by: Philippe Charnier <charnier@xp11.frmug.org>
1999-05-08 10:22:15 +00:00
imp
78d1eb2897 Fix minor style bugs noticed by the Bruce Filter.[tm]
Bruce-Filter-By: bde
1998-09-13 19:54:54 +00:00
imp
1b26fba303 Silence -Wall -W -Wkitchen-sink. Use ssize_t in preference to int,
make a char * const that should have been.  Use new style function
declaration for main.  Mostly a Bruce Filter[tm] test commit.
1998-09-11 05:48:06 +00:00
charnier
9ae843f2f7 Restore Lite2 sccsids by removing `const'. Improve documentation a little.
Suggested by:	Bruce
1998-05-13 07:16:37 +00:00
charnier
32cb2d10d3 Correct use of .Nm, .An and other cosmetics. Add rcsid. Remove unused #inc. 1998-05-06 06:49:16 +00:00
imp
cdc0e920d8 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-28 15:24:41 +00:00
peter
34fd560164 Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
jkh
9c0cd3f9df 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
steve
9e6e305b90 Merge Lite2 mods and -Wall cleaning. 1996-12-14 05:51:58 +00:00
ache
c4bd96877d Activate LC_CTYPE locale and additionly use !isprint() for 8bit characters 1996-09-30 15:45:36 +00:00
imp
d5205330df Merge in the NetBSD changes to cat.c. These appear to have come from
the 4.4 lite 2 tape as well.  There are now only two diffs between
NetBSD's cat and FreeBSD's cat:
	getopt return value is -1 on NetBSD and EOF on FreeBSD.
	NetBSD has added setlocale calls before anything else.
1996-09-28 21:19:27 +00:00
wosch
49b42d2ad0 [HISTORY]
cat command appeared in Version 1 AT&T UNIX, not Version 6
	Apparently the cat man page was the first written man page

	Obtained from: A Quarter Century of UNIX, Peter H. Salus
[BUGS]
	fix a typo
1996-08-22 16:54:12 +00:00
bde
9329cb6b3c Fix exit status. `cat no-such-file >/dev/null' exited with status 0.
This has been broken since cat's own err() function was sloppily
replaced by the library functions warn() and err().
1995-10-03 12:46:37 +00:00
dg
00eb2a4dc0 Added $Id$ 1994-09-24 02:59:15 +00:00
rgrimes
e3cfc8ce61 BSD 4.4 Lite bin Sources 1994-05-26 06:18:55 +00:00