From 80379c039e586e212d931ae2ab9e91611c6ac5e9 Mon Sep 17 00:00:00 2001 From: lukem Date: Sun, 12 Oct 1997 01:49:24 +0000 Subject: WARNSify, KNFify --- snake/snscore/snscore.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'snake/snscore/snscore.c') diff --git a/snake/snscore/snscore.c b/snake/snscore/snscore.c index a45babca..ddcb0fb9 100644 --- a/snake/snscore/snscore.c +++ b/snake/snscore/snscore.c @@ -1,4 +1,4 @@ -/* $NetBSD: snscore.c,v 1.5 1995/04/24 12:25:43 cgd Exp $ */ +/* $NetBSD: snscore.c,v 1.6 1997/10/12 01:49:33 lukem Exp $ */ /* * Copyright (c) 1980, 1993 @@ -33,21 +33,22 @@ * SUCH DAMAGE. */ +#include #ifndef lint -static char copyright[] = -"@(#) Copyright (c) 1980, 1993\n\ - The Regents of the University of California. All rights reserved.\n"; +__COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\ + The Regents of the University of California. All rights reserved.\n"); #endif /* not lint */ #ifndef lint #if 0 static char sccsid[] = "@(#)snscore.c 8.1 (Berkeley) 7/19/93"; #else -static char rcsid[] = "$NetBSD: snscore.c,v 1.5 1995/04/24 12:25:43 cgd Exp $"; +__RCSID("$NetBSD: snscore.c,v 1.6 1997/10/12 01:49:33 lukem Exp $"); #endif #endif /* not lint */ #include +#include #include #include #include @@ -63,8 +64,12 @@ struct player { char *name; } players[MAXPLAYERS], temp; +int main __P((int, char **)); + int -main() +main(argc, argv) + int argc; + char *argv[]; { short uid, score; FILE *fd; @@ -75,10 +80,8 @@ main() struct passwd *p; fd = fopen(recfile, "r"); - if (fd == NULL) { - perror(recfile); - exit(1); - } + if (fd == NULL) + err(1, "opening `%s'", recfile); printf("Snake players scores to date\n"); fread(&whoallbest, sizeof(short), 1, fd); fread(&allbest, sizeof(short), 1, fd); -- cgit v1.2.3-56-ge451