diff options
author | Paul Janzen <pjanzen@cvs.openbsd.org> | 2001-09-03 16:35:20 +0000 |
---|---|---|
committer | Paul Janzen <pjanzen@cvs.openbsd.org> | 2001-09-03 16:35:20 +0000 |
commit | 000b6033843242e9e5410a522139ed8c2d21b45d (patch) | |
tree | 77eaf5d64bb03dda2e90acb57b9ab14d383dd69c /games/adventure/setup.c | |
parent | 7554456b04e9591e49a6a99e4ea96e5843043c34 (diff) |
better usage message. From jsm@netbsd.org's NetBSD changes.
Diffstat (limited to 'games/adventure/setup.c')
-rw-r--r-- | games/adventure/setup.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/games/adventure/setup.c b/games/adventure/setup.c index 558f67a68b2..27b3c43aefe 100644 --- a/games/adventure/setup.c +++ b/games/adventure/setup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: setup.c,v 1.5 1998/09/02 06:36:07 pjanzen Exp $ */ +/* $OpenBSD: setup.c,v 1.6 2001/09/03 16:35:19 pjanzen Exp $ */ /* $NetBSD: setup.c,v 1.2 1995/03/21 12:05:10 cgd Exp $ */ /*- @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)setup.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: setup.c,v 1.5 1998/09/02 06:36:07 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: setup.c,v 1.6 2001/09/03 16:35:19 pjanzen Exp $"; #endif #endif /* not lint */ @@ -69,7 +69,7 @@ static char rcsid[] = "$OpenBSD: setup.c,v 1.5 1998/09/02 06:36:07 pjanzen Exp $ #include <stdlib.h> #include "hdr.h" /* SEED lives in there; keep them coordinated. */ -#define USAGE "Usage: setup file > data.c (file is typically glorkz)" +#define USAGE "Usage: setup file > data.c (file is typically glorkz)\n" #define YES 1 #define NO 0 @@ -84,8 +84,10 @@ main(argc, argv) FILE *infile; int c, count, linestart; - if (argc != 2) - errx(1, USAGE); + if (argc != 2) { + fprintf(stderr, USAGE); + exit(1); + } if ((infile = fopen(argv[1], "r")) == NULL) err(1, "Can't read file %s", argv[1]); |