summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/hangman/endgame.c7
-rw-r--r--games/hangman/extern.c5
-rw-r--r--games/hangman/getguess.c7
-rw-r--r--games/hangman/getword.c7
-rw-r--r--games/hangman/hangman.h16
-rw-r--r--games/hangman/ksyms.c11
-rw-r--r--games/hangman/main.c10
-rw-r--r--games/hangman/playgame.c7
-rw-r--r--games/hangman/prdata.c6
-rw-r--r--games/hangman/prman.c6
-rw-r--r--games/hangman/prword.c6
-rw-r--r--games/hangman/setup.c10
12 files changed, 62 insertions, 36 deletions
diff --git a/games/hangman/endgame.c b/games/hangman/endgame.c
index 1248076d985..365c67e44c2 100644
--- a/games/hangman/endgame.c
+++ b/games/hangman/endgame.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: endgame.c,v 1.7 2015/02/07 03:32:05 tedu Exp $ */
+/* $OpenBSD: endgame.c,v 1.8 2015/12/31 15:20:36 mestre Exp $ */
/* $NetBSD: endgame.c,v 1.3 1995/03/23 08:32:40 cgd Exp $ */
/*
@@ -31,7 +31,10 @@
*/
#include <sys/ttydefaults.h>
-#include "hangman.h"
+
+#include <curses.h>
+
+#include "hangman.h"
/*
* endgame:
diff --git a/games/hangman/extern.c b/games/hangman/extern.c
index 3b9a3db6ee4..35864c95b02 100644
--- a/games/hangman/extern.c
+++ b/games/hangman/extern.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.c,v 1.8 2015/02/07 03:26:20 tedu Exp $ */
+/* $OpenBSD: extern.c,v 1.9 2015/12/31 15:20:36 mestre Exp $ */
/* $NetBSD: extern.c,v 1.3 1995/03/23 08:32:41 cgd Exp $ */
/*
@@ -30,7 +30,8 @@
* SUCH DAMAGE.
*/
-#include "hangman.h"
+#include "hangman.h"
+#include "pathnames.h"
bool Guessed[26 + 10];
diff --git a/games/hangman/getguess.c b/games/hangman/getguess.c
index 97295eeb338..5627538f000 100644
--- a/games/hangman/getguess.c
+++ b/games/hangman/getguess.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getguess.c,v 1.13 2015/02/07 03:30:08 tedu Exp $ */
+/* $OpenBSD: getguess.c,v 1.14 2015/12/31 15:20:36 mestre Exp $ */
/* $NetBSD: getguess.c,v 1.5 1995/03/23 08:32:43 cgd Exp $ */
/*
@@ -31,6 +31,11 @@
*/
#include <sys/ttydefaults.h>
+
+#include <ctype.h>
+#include <curses.h>
+#include <unistd.h>
+
#include "hangman.h"
/*
diff --git a/games/hangman/getword.c b/games/hangman/getword.c
index 8b437e9d6b1..b9c1d4db771 100644
--- a/games/hangman/getword.c
+++ b/games/hangman/getword.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getword.c,v 1.9 2015/10/24 17:55:02 mmcc Exp $ */
+/* $OpenBSD: getword.c,v 1.10 2015/12/31 15:20:36 mestre Exp $ */
/* $NetBSD: getword.c,v 1.4 1995/03/23 08:32:45 cgd Exp $ */
/*
@@ -30,7 +30,12 @@
* SUCH DAMAGE.
*/
+#include <ctype.h>
+#include <curses.h>
+#include <err.h>
#include <stdlib.h>
+#include <string.h>
+
#include "hangman.h"
#include "pathnames.h"
diff --git a/games/hangman/hangman.h b/games/hangman/hangman.h
index aa35d4dce55..473b2af5872 100644
--- a/games/hangman/hangman.h
+++ b/games/hangman/hangman.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: hangman.h,v 1.10 2015/12/26 00:26:39 mestre Exp $ */
+/* $OpenBSD: hangman.h,v 1.11 2015/12/31 15:20:36 mestre Exp $ */
/* $NetBSD: hangman.h,v 1.5 1995/04/24 12:23:44 cgd Exp $ */
/*
@@ -32,17 +32,9 @@
* @(#)hangman.h 8.1 (Berkeley) 5/31/93
*/
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <ctype.h>
-#include <curses.h>
-#include <err.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include "pathnames.h"
-
+#include <stdbool.h>
+#include <stdio.h>
+
#define MAXBADWORDS 100
#define MINLEN 6
diff --git a/games/hangman/ksyms.c b/games/hangman/ksyms.c
index cdda4b484f3..2dc6043c83e 100644
--- a/games/hangman/ksyms.c
+++ b/games/hangman/ksyms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ksyms.c,v 1.8 2015/02/07 03:26:20 tedu Exp $ */
+/* $OpenBSD: ksyms.c,v 1.9 2015/12/31 15:20:36 mestre Exp $ */
/*
* Copyright (c) 2008 Miodrag Vallat.
@@ -16,14 +16,15 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <unistd.h>
#include <ctype.h>
+#include <curses.h>
+#include <elf_abi.h>
+#include <err.h>
#include <errno.h>
#include <fcntl.h>
+#include <stdlib.h>
#include <string.h>
-
-#include <sys/exec.h>
-#include <elf_abi.h>
+#include <unistd.h>
#include "hangman.h"
diff --git a/games/hangman/main.c b/games/hangman/main.c
index 423c65d4857..db183316469 100644
--- a/games/hangman/main.c
+++ b/games/hangman/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.14 2015/12/25 20:59:09 mestre Exp $ */
+/* $OpenBSD: main.c,v 1.15 2015/12/31 15:20:36 mestre Exp $ */
/* $NetBSD: main.c,v 1.3 1995/03/23 08:32:50 cgd Exp $ */
/*
@@ -30,8 +30,14 @@
* SUCH DAMAGE.
*/
-# include "hangman.h"
+#include <curses.h>
+#include <err.h>
#include <paths.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "hangman.h"
__dead void usage(void);
diff --git a/games/hangman/playgame.c b/games/hangman/playgame.c
index 4706e069ade..dee386da9ef 100644
--- a/games/hangman/playgame.c
+++ b/games/hangman/playgame.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: playgame.c,v 1.10 2015/02/07 03:26:20 tedu Exp $ */
+/* $OpenBSD: playgame.c,v 1.11 2015/12/31 15:20:36 mestre Exp $ */
/* $NetBSD: playgame.c,v 1.3 1995/03/23 08:32:53 cgd Exp $ */
/*-
@@ -30,7 +30,10 @@
* SUCH DAMAGE.
*/
-#include "hangman.h"
+#include <curses.h>
+#include <string.h>
+
+#include "hangman.h"
/*
* playgame:
diff --git a/games/hangman/prdata.c b/games/hangman/prdata.c
index a7b231688d6..1e838bf8e46 100644
--- a/games/hangman/prdata.c
+++ b/games/hangman/prdata.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: prdata.c,v 1.7 2015/02/07 03:26:20 tedu Exp $ */
+/* $OpenBSD: prdata.c,v 1.8 2015/12/31 15:20:36 mestre Exp $ */
/* $NetBSD: prdata.c,v 1.3 1995/03/23 08:32:54 cgd Exp $ */
/*-
@@ -30,7 +30,9 @@
* SUCH DAMAGE.
*/
-#include "hangman.h"
+#include <curses.h>
+
+#include "hangman.h"
/*
* prdata:
diff --git a/games/hangman/prman.c b/games/hangman/prman.c
index b43265ef811..002f3a13f96 100644
--- a/games/hangman/prman.c
+++ b/games/hangman/prman.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: prman.c,v 1.6 2009/10/27 23:59:25 deraadt Exp $ */
+/* $OpenBSD: prman.c,v 1.7 2015/12/31 15:20:36 mestre Exp $ */
/* $NetBSD: prman.c,v 1.3 1995/03/23 08:32:56 cgd Exp $ */
/*-
@@ -30,7 +30,9 @@
* SUCH DAMAGE.
*/
-#include "hangman.h"
+#include <curses.h>
+
+#include "hangman.h"
/*
* prman:
diff --git a/games/hangman/prword.c b/games/hangman/prword.c
index 309d0501a4c..b8d8b04f57f 100644
--- a/games/hangman/prword.c
+++ b/games/hangman/prword.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: prword.c,v 1.5 2009/10/27 23:59:25 deraadt Exp $ */
+/* $OpenBSD: prword.c,v 1.6 2015/12/31 15:20:36 mestre Exp $ */
/* $NetBSD: prword.c,v 1.3 1995/03/23 08:32:58 cgd Exp $ */
/*-
@@ -30,7 +30,9 @@
* SUCH DAMAGE.
*/
-#include "hangman.h"
+#include <curses.h>
+
+#include "hangman.h"
/*
* prword:
diff --git a/games/hangman/setup.c b/games/hangman/setup.c
index bb9b1d78001..07cb51c3011 100644
--- a/games/hangman/setup.c
+++ b/games/hangman/setup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: setup.c,v 1.12 2015/02/07 01:37:30 miod Exp $ */
+/* $OpenBSD: setup.c,v 1.13 2015/12/31 15:20:36 mestre Exp $ */
/* $NetBSD: setup.c,v 1.3 1995/03/23 08:32:59 cgd Exp $ */
/*-
@@ -30,8 +30,12 @@
* SUCH DAMAGE.
*/
-#include <time.h>
-#include "hangman.h"
+#include <sys/stat.h>
+
+#include <curses.h>
+#include <err.h>
+
+#include "hangman.h"
/*
* setup: