aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/banner
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1997-07-06 03:39:37 +0000
committerBruce Evans <bde@FreeBSD.org>1997-07-06 03:39:37 +0000
commitc55d6c087db678d4d84f1373f74f5a2c1eaceb2a (patch)
treef17ff882d93a21fb84ad0c4c93c732886a774f4d /usr.bin/banner
parente2457a1d7940cef7bd3ebc2aff7f2fc6f48e2d6c (diff)
downloadsrc-c55d6c087db678d4d84f1373f74f5a2c1eaceb2a.tar.gz
src-c55d6c087db678d4d84f1373f74f5a2c1eaceb2a.zip
Notes
Diffstat (limited to 'usr.bin/banner')
-rw-r--r--usr.bin/banner/banner.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/banner/banner.c b/usr.bin/banner/banner.c
index 566286f3a112..13a28497489d 100644
--- a/usr.bin/banner/banner.c
+++ b/usr.bin/banner/banner.c
@@ -38,7 +38,7 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)banner.c 8.3 (Berkeley) 4/2/94";
+static char sccsid[] = "@(#)banner.c 8.4 (Berkeley) 4/29/95";
#endif /* not lint */
/*
@@ -1026,26 +1026,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")) != -1)
- 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;