summaryrefslogtreecommitdiff
path: root/games/robots
diff options
context:
space:
mode:
authormestre <mestre@cvs.openbsd.org>2016-01-04 17:33:25 +0000
committermestre <mestre@cvs.openbsd.org>2016-01-04 17:33:25 +0000
commit96c0ba3936c91323465ddc1086d94655a49726b0 (patch)
tree4a05f8414046a356458034ec2a525718b567fad3 /games/robots
parenta2eb8154d629d90444f3800ce2cdb939e4f1f2d3 (diff)
More cleanup and sorting on header section
OK tb@ and he also pointed out that for consistency with rest of the tree we should include termios.h instead of sys/ttydefaults.h, where applicable
Diffstat (limited to 'games/robots')
-rw-r--r--games/robots/extern.c4
-rw-r--r--games/robots/init_field.c4
-rw-r--r--games/robots/main.c12
-rw-r--r--games/robots/make_level.c6
-rw-r--r--games/robots/move.c7
-rw-r--r--games/robots/move_robs.c4
-rw-r--r--games/robots/play_level.c4
-rw-r--r--games/robots/query.c4
-rw-r--r--games/robots/rnd_pos.c6
-rw-r--r--games/robots/robots.h18
-rw-r--r--games/robots/score.c9
11 files changed, 44 insertions, 34 deletions
diff --git a/games/robots/extern.c b/games/robots/extern.c
index 04bc42a3362..d849f866d6e 100644
--- a/games/robots/extern.c
+++ b/games/robots/extern.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.c,v 1.7 2015/08/26 00:29:24 rzalamena Exp $ */
+/* $OpenBSD: extern.c,v 1.8 2016/01/04 17:33:24 mestre Exp $ */
/* $NetBSD: extern.c,v 1.3 1995/04/22 10:08:49 cgd Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-#include "robots.h"
+#include "robots.h"
bool Dead; /* Player is now dead */
bool Full_clear = TRUE; /* Lots of junk for init_field to clear */
diff --git a/games/robots/init_field.c b/games/robots/init_field.c
index 52bde5dd8e0..d2b8cff04f7 100644
--- a/games/robots/init_field.c
+++ b/games/robots/init_field.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_field.c,v 1.7 2009/10/27 23:59:26 deraadt Exp $ */
+/* $OpenBSD: init_field.c,v 1.8 2016/01/04 17:33:24 mestre Exp $ */
/* $NetBSD: init_field.c,v 1.3 1995/04/22 10:08:52 cgd Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-#include "robots.h"
+#include "robots.h"
/*
* init_field:
diff --git a/games/robots/main.c b/games/robots/main.c
index 3093deb4a6d..0d903f43690 100644
--- a/games/robots/main.c
+++ b/games/robots/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.22 2015/12/04 16:40:09 tb Exp $ */
+/* $OpenBSD: main.c,v 1.23 2016/01/04 17:33:24 mestre Exp $ */
/* $NetBSD: main.c,v 1.5 1995/04/22 10:08:54 cgd Exp $ */
/*
@@ -30,7 +30,15 @@
* SUCH DAMAGE.
*/
-#include "robots.h"
+#include <err.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "robots.h"
void
usage(void)
diff --git a/games/robots/make_level.c b/games/robots/make_level.c
index 03f34e2d331..fa7befcebd1 100644
--- a/games/robots/make_level.c
+++ b/games/robots/make_level.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: make_level.c,v 1.7 2009/10/27 23:59:26 deraadt Exp $ */
+/* $OpenBSD: make_level.c,v 1.8 2016/01/04 17:33:24 mestre Exp $ */
/* $NetBSD: make_level.c,v 1.3 1995/04/22 10:08:56 cgd Exp $ */
/*
@@ -30,7 +30,9 @@
* SUCH DAMAGE.
*/
-#include "robots.h"
+#include <string.h>
+
+#include "robots.h"
/*
* make_level:
diff --git a/games/robots/move.c b/games/robots/move.c
index fa46520d478..61be0037127 100644
--- a/games/robots/move.c
+++ b/games/robots/move.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: move.c,v 1.11 2015/08/26 00:29:24 rzalamena Exp $ */
+/* $OpenBSD: move.c,v 1.12 2016/01/04 17:33:24 mestre Exp $ */
/* $NetBSD: move.c,v 1.4 1995/04/22 10:08:58 cgd Exp $ */
/*
@@ -30,6 +30,11 @@
* SUCH DAMAGE.
*/
+#include <ctype.h>
+#include <poll.h>
+#include <termios.h>
+#include <unistd.h>
+
#include "robots.h"
#define ESC '\033'
diff --git a/games/robots/move_robs.c b/games/robots/move_robs.c
index 3939218019d..666743dfcf9 100644
--- a/games/robots/move_robs.c
+++ b/games/robots/move_robs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: move_robs.c,v 1.8 2009/10/27 23:59:26 deraadt Exp $ */
+/* $OpenBSD: move_robs.c,v 1.9 2016/01/04 17:33:24 mestre Exp $ */
/* $NetBSD: move_robs.c,v 1.3 1995/04/22 10:08:59 cgd Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-#include "robots.h"
+#include "robots.h"
/*
* move_robots:
diff --git a/games/robots/play_level.c b/games/robots/play_level.c
index 48e9476a1ab..3c65c8cfdb3 100644
--- a/games/robots/play_level.c
+++ b/games/robots/play_level.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: play_level.c,v 1.9 2009/10/27 23:59:26 deraadt Exp $ */
+/* $OpenBSD: play_level.c,v 1.10 2016/01/04 17:33:24 mestre Exp $ */
/* $NetBSD: play_level.c,v 1.3 1995/04/22 10:09:03 cgd Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-# include "robots.h"
+#include "robots.h"
/*
* play_level:
diff --git a/games/robots/query.c b/games/robots/query.c
index 6f98081b549..44f180ba5c2 100644
--- a/games/robots/query.c
+++ b/games/robots/query.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: query.c,v 1.6 2009/10/27 23:59:26 deraadt Exp $ */
+/* $OpenBSD: query.c,v 1.7 2016/01/04 17:33:24 mestre Exp $ */
/* $NetBSD: query.c,v 1.3 1995/04/22 10:09:05 cgd Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-#include "robots.h"
+#include "robots.h"
/*
* query:
diff --git a/games/robots/rnd_pos.c b/games/robots/rnd_pos.c
index 9ca16206fc4..f2feadc149d 100644
--- a/games/robots/rnd_pos.c
+++ b/games/robots/rnd_pos.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rnd_pos.c,v 1.6 2013/08/29 20:22:19 naddy Exp $ */
+/* $OpenBSD: rnd_pos.c,v 1.7 2016/01/04 17:33:24 mestre Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -29,7 +29,9 @@
* SUCH DAMAGE.
*/
-#include "robots.h"
+#include <stdlib.h>
+
+#include "robots.h"
#define IS_SAME(p,y,x) ((p).y != -1 && (p).y == y && (p).x == x)
diff --git a/games/robots/robots.h b/games/robots/robots.h
index 8f2ff8264de..8db91cd4a22 100644
--- a/games/robots/robots.h
+++ b/games/robots/robots.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: robots.h,v 1.13 2015/12/26 00:26:39 mestre Exp $ */
+/* $OpenBSD: robots.h,v 1.14 2016/01/04 17:33:24 mestre Exp $ */
/* $NetBSD: robots.h,v 1.5 1995/04/24 12:24:54 cgd Exp $ */
/*
@@ -32,20 +32,8 @@
* @(#)robots.h 8.1 (Berkeley) 5/31/93
*/
-#include <sys/types.h>
-#include <sys/time.h>
-#include <ctype.h>
-#include <curses.h>
-#include <err.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <signal.h>
-#include <string.h>
-#include <stdlib.h>
-#include <termios.h>
-#include <unistd.h>
-#include <poll.h>
+#include <curses.h>
+#include <limits.h>
/*
* miscellaneous constants
diff --git a/games/robots/score.c b/games/robots/score.c
index 8eeeb06d943..3903a5ab0cd 100644
--- a/games/robots/score.c
+++ b/games/robots/score.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: score.c,v 1.13 2015/12/04 16:40:09 tb Exp $ */
+/* $OpenBSD: score.c,v 1.14 2016/01/04 17:33:24 mestre Exp $ */
/* $NetBSD: score.c,v 1.3 1995/04/22 10:09:12 cgd Exp $ */
/*
@@ -30,7 +30,12 @@
* SUCH DAMAGE.
*/
-#include "robots.h"
+#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "robots.h"
char Scorefile[PATH_MAX];