+/* $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();
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;