Sync to 4.4BSD-Lite2

This commit is contained in:
tls 1997-01-07 11:40:24 +00:00
parent c71a371532
commit 15b816a728
2 changed files with 19 additions and 20 deletions

View File

@ -1,6 +1,6 @@
.\" $NetBSD: banner.6,v 1.6 1995/04/22 11:55:13 cgd Exp $
.\" $NetBSD: banner.6,v 1.7 1997/01/07 11:40:24 tls Exp $
.\"
.\" Copyright (c) 1980, 1993
.\" Copyright (c) 1980, 1993, 1995
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)banner.6 8.1 (Berkeley) 6/6/93
.\" @(#)banner.6 8.2 (Berkeley) 4/29/95
.\"
.Dd June 6, 1993
.Dd "April 29, 1995"
.Dt BANNER 6
.Os
.Sh NAME
@ -47,17 +47,15 @@
.Nm Banner
prints a large, high quality banner on the standard output.
If the message is omitted, it prompts for and
reads one line of its standard input. If
reads one line of its standard input.
If
.Fl w
is given, the output is scrunched down from a width of 132 to
.Ar width ,
suitable for a narrow terminal.
.Pp
The output should be printed on a hard-copy device, up to 132 columns wide,
with no breaks between the pages. The volume is great enough that you
may want
a printer or a fast hardcopy terminal, but if you are patient, a
decwriter or other 300 baud terminal will do.
The output should be printed on paper of the appropriate width,
with no breaks between the pages.
.Sh BUGS
Several ASCII characters are not defined, notably <, >, [, ], \\,
^, _, {, }, |, and ~. Also, the characters ", ', and & are funny

View File

@ -1,4 +1,4 @@
/* $NetBSD: banner.c,v 1.4 1995/04/22 11:55:15 cgd Exp $ */
/* $NetBSD: banner.c,v 1.5 1997/01/07 11:40:25 tls Exp $ */
/*
* Copyright (c) 1980, 1993, 1994
@ -43,8 +43,9 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)banner.c 8.3 (Berkeley) 4/2/94";
#else
static char rcsid[] = "$NetBSD: banner.c,v 1.4 1995/04/22 11:55:15 cgd Exp $";
static char rcsid[] = "$NetBSD: banner.c,v 1.5 1997/01/07 11:40:25 tls Exp $";
#endif
static char sccsid[] = "@(#)banner.c 8.4 (Berkeley) 4/29/95";
#endif /* not lint */
/*
@ -1032,26 +1033,26 @@ int width = DWIDTH; /* -w option: scrunch letters to 80 columns */
int
main(argc, argv)
int argc;
char **argv;
char *argv[];
{
int ch;
while ((ch = getopt(argc, argv, "w:td")) != EOF)
switch(ch) {
case 'w':
width = atoi(optarg);
if (width <= 0)
width = 80;
break;
switch (ch) {
case 'd':
debug = 1;
break;
case 't':
trace = 1;
break;
case 'w':
width = atoi(optarg);
if (width <= 0)
errx(1, "illegal argument for -w option");
break;
case '?':
default:
fprintf(stderr, "usage: banner [-w width]\n");
(void)fprintf(stderr, "usage: banner [-w width]\n");
exit(1);
}
argc -= optind;