From 0f4a9f53cbb30716248d418a66224f0440651ea8 Mon Sep 17 00:00:00 2001 From: lukem Date: Sat, 11 Oct 1997 01:55:27 +0000 Subject: KNFify again --- adventure/extern.h | 3 +-- adventure/setup.c | 20 +++++--------------- 2 files changed, 6 insertions(+), 17 deletions(-) (limited to 'adventure') diff --git a/adventure/extern.h b/adventure/extern.h index 5e240d26..cc5e75aa 100644 --- a/adventure/extern.h +++ b/adventure/extern.h @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.2 1997/10/11 01:53:25 lukem Exp $ */ +/* $NetBSD: extern.h,v 1.3 1997/10/11 01:55:27 lukem Exp $ */ /* * Copyright (c) 1997 Christos Zoulas. All rights reserved. @@ -76,7 +76,6 @@ int restore __P((char *)); /* setup.c */ int main __P((int, char *[])); -void fatal __P((char *, int)); /* subr.c */ int toting __P((int)); diff --git a/adventure/setup.c b/adventure/setup.c index 150c275a..d949debf 100644 --- a/adventure/setup.c +++ b/adventure/setup.c @@ -1,4 +1,4 @@ -/* $NetBSD: setup.c,v 1.3 1997/10/11 01:53:35 lukem Exp $ */ +/* $NetBSD: setup.c,v 1.4 1997/10/11 01:55:30 lukem Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -46,7 +46,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)setup.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$NetBSD: setup.c,v 1.3 1997/10/11 01:53:35 lukem Exp $"; +static char rcsid[] = "$NetBSD: setup.c,v 1.4 1997/10/11 01:55:30 lukem Exp $"; #endif #endif /* not lint */ @@ -71,10 +71,9 @@ static char rcsid[] = "$NetBSD: setup.c,v 1.3 1997/10/11 01:53:35 lukem Exp $"; #define YES 1 #define NO 0 -void fatal(); - #define LINE 10 /* How many values do we get on a line? */ +int main(argc, argv) int argc; char *argv[]; @@ -83,10 +82,10 @@ main(argc, argv) int c, count, linestart; if (argc != 2) - fatal(USAGE); + errx(1, USAGE); if ((infile = fopen(argv[1], "r")) == NULL) - fatal("Can't read file %s.\n", argv[1]); + err(1, "Can't read file %s.\n", argv[1]); puts("/*\n * data.c: created by setup from the ascii data file."); puts(SIG1); puts(SIG2); @@ -120,12 +119,3 @@ main(argc, argv) fclose(infile); exit(0); } - - -void -fatal(format, arg) - char *format; -{ - fprintf(stderr, format, arg); - exit(1); -} -- cgit v1.2.3-56-ge451