]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - hangman/setup.c
WARNSify
[bsdgames-darwin.git] / hangman / setup.c
index a72df8e13bf881c0510c8d6422a83b008d658f04..a0f003b2321cc9e8cabd4da6a8244313fe081556 100644 (file)
@@ -1,6 +1,8 @@
+/*     $NetBSD: setup.c,v 1.5 1997/10/11 08:01:06 lukem Exp $  */
+
 /*-
- * Copyright (c) 1983 The Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1983, 1993
+ *     The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * SUCH DAMAGE.
  */
 
+#include <sys/cdefs.h>
 #ifndef lint
-static char sccsid[] = "@(#)setup.c    5.4 (Berkeley) 4/8/91";
-#endif /* not lint */
+#if 0
+static char sccsid[] = "@(#)setup.c    8.1 (Berkeley) 5/31/93";
+#else
+__RCSID("$NetBSD: setup.c,v 1.5 1997/10/11 08:01:06 lukem Exp $");
+#endif
+#endif                         /* not lint */
 
-# include      "hangman.h"
+#include       <err.h>
+#include       "hangman.h"
 
 /*
  * setup:
  *     Set up the strings on the screen.
  */
+void
 setup()
 {
-       register char           **sp;
-       static struct stat      sbuf;
+       char **sp;
+       static struct stat sbuf;
 
        noecho();
        crmode();
@@ -63,9 +72,8 @@ setup()
 
        srand(time(NULL) + getpid());
        if ((Dict = fopen(_PATH_DICT, "r")) == NULL) {
-               perror(_PATH_DICT);
                endwin();
-               exit(1);
+               err(1, "fopen %s", _PATH_DICT);
        }
        fstat(fileno(Dict), &sbuf);
        Dict_size = sbuf.st_size;