Correct use of .Nm, .An and other cosmetics. Add rcsid. Remove unused #inc.

This commit is contained in:
charnier 1998-05-06 06:49:16 +00:00
parent d87cd7430c
commit 32338c8e05
2 changed files with 15 additions and 13 deletions

View File

@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)cat.1 8.3 (Berkeley) 5/2/95
.\" $Id$
.\" $Id: cat.1,v 1.6 1997/02/22 14:01:26 peter Exp $
.\"
.Dd May 2, 1995
.Dt CAT 1
@ -48,7 +48,7 @@
.Op Ar
.Sh DESCRIPTION
The
.Nm cat
.Nm
utility reads files sequentially, writing them to the standard output.
The
.Ar file
@ -58,11 +58,11 @@ A single dash represents the standard input.
The options are as follows:
.Bl -tag -width Ds
.It Fl b
Implies the
Imply the
.Fl n
option but doesn't number blank lines.
.It Fl e
Implies the
Imply the
.Fl v
option, and displays a dollar sign
.Pq Ql \&$
@ -74,7 +74,7 @@ Number the output lines, starting at 1.
Squeeze multiple adjacent empty lines, causing the output to be
single spaced.
.It Fl t
Implies the
Imply the
.Fl v
option, and displays tab characters as
.Ql ^I
@ -84,19 +84,20 @@ The
.Fl u
option guarantees that the output is unbuffered.
.It Fl v
Displays non-printing characters so they are visible.
Display non-printing characters so they are visible.
Control characters print as
.Ql ^X
for control-X; the delete
character (octal 0177) prints as
.Ql ^?
Non-ascii characters (with the high bit set) are printed as
.Pf Non- Tn ASCII
characters (with the high bit set) are printed as
.Ql M-
(for meta) followed by the character for the low 7 bits.
.El
.Pp
The
.Nm cat
.Nm
utility exits 0 on success, and >0 if an error occurs.
.Sh BUGS
Because of the shell language mechanism used to perform output
@ -119,7 +120,8 @@ will cause the original data in file1 to be destroyed!
A
.Nm
command appeared in Version 1 AT&T UNIX.
Dennis Ritchie designed and wrote the first man page.
.An Dennis Ritchie
designed and wrote the first man page.
It appears to have been
.Xr cat 1 .

View File

@ -32,8 +32,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: cat.c,v 1.8 1997/02/22 14:01:26 peter Exp $
*/
#ifndef lint
@ -43,7 +41,11 @@ static char const copyright[] =
#endif /* not lint */
#ifndef lint
#if 0
static char const sccsid[] = "@(#)cat.c 8.2 (Berkeley) 4/27/95";
#endif
static const char rcsid[] =
"$Id$";
#endif /* not lint */
#include <sys/param.h>
@ -51,12 +53,10 @@ static char const sccsid[] = "@(#)cat.c 8.2 (Berkeley) 4/27/95";
#include <ctype.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
int bflag, eflag, nflag, sflag, tflag, vflag;