summaryrefslogtreecommitdiffstats
path: root/banner
diff options
context:
space:
mode:
authortls <tls@NetBSD.org>1997-01-07 11:40:24 +0000
committertls <tls@NetBSD.org>1997-01-07 11:40:24 +0000
commit72d382a75e448bfd32dd2692c3eb01997be3157f (patch)
treecb62495c6b14ef72c0645c295f4f0a8fa5863c14 /banner
parent7786c61ec816eea6683fc592563be60a2ca80885 (diff)
downloadbsdgames-darwin-72d382a75e448bfd32dd2692c3eb01997be3157f.tar.gz
bsdgames-darwin-72d382a75e448bfd32dd2692c3eb01997be3157f.tar.zst
bsdgames-darwin-72d382a75e448bfd32dd2692c3eb01997be3157f.zip
Sync to 4.4BSD-Lite2
Diffstat (limited to 'banner')
-rw-r--r--banner/banner.618
-rw-r--r--banner/banner.c21
2 files changed, 19 insertions, 20 deletions
diff --git a/banner/banner.6 b/banner/banner.6
index 0e2de635..a4c4d6b7 100644
--- a/banner/banner.6
+++ b/banner/banner.6
@@ -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
diff --git a/banner/banner.c b/banner/banner.c
index b3d842a2..c4787491 100644
--- a/banner/banner.c
+++ b/banner/banner.c
@@ -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;