summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authormestre <mestre@cvs.openbsd.org>2016-01-03 14:38:18 +0000
committermestre <mestre@cvs.openbsd.org>2016-01-03 14:38:18 +0000
commitd9acce1f8555317f19d4bc565896a366a2dc64df (patch)
treef2fd0a3dc00b9d454e9c2ec8dadcfdabe4be0783 /games
parent27270dae2fe0dbc4518b029a0bffce35ce1ea77e (diff)
About 13 years ago when the idiom srandom(time()), and sometimes
srandom(time()+getpid()), was changed by srandomdev(), but #include <time.h> lived up until this day so remove it. Additionally, earlier than that, 18 years ago, random(6) was one of the first consumers of arc4random(3) family, and was pulling it from dev/rndvar.h but these days we pull it from stdlib.h, which is already done, so while here remove dev/rndvar.h also. "seems comprehensive to me" deraadt@ and OK tb@
Diffstat (limited to 'games')
-rw-r--r--games/adventure/init.c5
-rw-r--r--games/adventure/wizard.c8
-rw-r--r--games/arithmetic/arithmetic.c3
-rw-r--r--games/atc/extern.c3
-rw-r--r--games/backgammon/backgammon/main.c4
-rw-r--r--games/boggle/boggle/bog.c3
-rw-r--r--games/boggle/boggle/mach.c3
-rw-r--r--games/bs/bs.c3
-rw-r--r--games/canfield/canfield/canfield.c5
-rw-r--r--games/fish/fish.c5
-rw-r--r--games/fortune/strfile/strfile.c4
-rw-r--r--games/grdc/grdc.c6
-rw-r--r--games/mille/save.c3
-rw-r--r--games/phantasia/include.h3
-rw-r--r--games/quiz/quiz.c11
-rw-r--r--games/random/random.c5
-rw-r--r--games/snake/snake.c3
-rw-r--r--games/tetris/scores.c9
-rw-r--r--games/worm/worm.c4
-rw-r--r--games/wump/wump.c5
20 files changed, 42 insertions, 53 deletions
diff --git a/games/adventure/init.c b/games/adventure/init.c
index 6060368fbdd..953c7b3abb0 100644
--- a/games/adventure/init.c
+++ b/games/adventure/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.13 2014/12/31 15:45:57 tedu Exp $ */
+/* $OpenBSD: init.c,v 1.14 2016/01/03 14:38:16 mestre Exp $ */
/* $NetBSD: init.c,v 1.4 1996/05/21 21:53:05 mrg Exp $ */
/*-
@@ -41,11 +41,10 @@
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
-#include <time.h>
#include <unistd.h>
-#include "hdr.h"
#include "extern.h"
+#include "hdr.h"
int blklin = TRUE;
diff --git a/games/adventure/wizard.c b/games/adventure/wizard.c
index ff70f510619..9c785de596f 100644
--- a/games/adventure/wizard.c
+++ b/games/adventure/wizard.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wizard.c,v 1.17 2014/12/31 15:45:57 tedu Exp $ */
+/* $OpenBSD: wizard.c,v 1.18 2016/01/03 14:38:16 mestre Exp $ */
/* $NetBSD: wizard.c,v 1.3 1995/04/24 12:21:41 cgd Exp $ */
/*-
@@ -39,11 +39,11 @@
#include <limits.h>
#include <stdio.h>
-#include <string.h>
#include <stdlib.h>
-#include <time.h>
-#include "hdr.h"
+#include <string.h>
+
#include "extern.h"
+#include "hdr.h"
#if 0
void
diff --git a/games/arithmetic/arithmetic.c b/games/arithmetic/arithmetic.c
index 7c5ca4c7e6e..e3058a9c2bd 100644
--- a/games/arithmetic/arithmetic.c
+++ b/games/arithmetic/arithmetic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arithmetic.c,v 1.22 2015/12/25 20:59:09 mestre Exp $ */
+/* $OpenBSD: arithmetic.c,v 1.23 2016/01/03 14:38:16 mestre Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -67,7 +67,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
#include <unistd.h>
int getrandom(int, int, int);
diff --git a/games/atc/extern.c b/games/atc/extern.c
index c6437a90ecb..219dac7c9c1 100644
--- a/games/atc/extern.c
+++ b/games/atc/extern.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.c,v 1.7 2015/12/31 16:50:29 mestre Exp $ */
+/* $OpenBSD: extern.c,v 1.8 2016/01/03 14:38:16 mestre Exp $ */
/* $NetBSD: extern.c,v 1.4 1995/04/27 21:22:19 mycroft Exp $ */
/*-
@@ -44,7 +44,6 @@
#include <stdio.h>
#include <termios.h>
-#include <time.h>
#include "def.h"
#include "extern.h"
diff --git a/games/backgammon/backgammon/main.c b/games/backgammon/backgammon/main.c
index a8e5e982993..6d576292a2e 100644
--- a/games/backgammon/backgammon/main.c
+++ b/games/backgammon/backgammon/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.22 2015/12/02 20:05:01 tb Exp $ */
+/* $OpenBSD: main.c,v 1.23 2016/01/03 14:38:16 mestre Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -30,7 +30,7 @@
*/
#include <err.h>
-#include <time.h>
+
#include "back.h"
#include "backlocal.h"
diff --git a/games/boggle/boggle/bog.c b/games/boggle/boggle/bog.c
index a49cbef3fa3..91747020024 100644
--- a/games/boggle/boggle/bog.c
+++ b/games/boggle/boggle/bog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bog.c,v 1.26 2015/11/30 08:27:46 tb Exp $ */
+/* $OpenBSD: bog.c,v 1.27 2016/01/03 14:38:16 mestre Exp $ */
/* $NetBSD: bog.c,v 1.5 1995/04/24 12:22:32 cgd Exp $ */
/*-
@@ -39,7 +39,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
#include <unistd.h>
#include "bog.h"
diff --git a/games/boggle/boggle/mach.c b/games/boggle/boggle/mach.c
index 901336206b0..aba39fca237 100644
--- a/games/boggle/boggle/mach.c
+++ b/games/boggle/boggle/mach.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mach.c,v 1.17 2015/12/27 01:28:02 chl Exp $ */
+/* $OpenBSD: mach.c,v 1.18 2016/01/03 14:38:16 mestre Exp $ */
/* $NetBSD: mach.c,v 1.5 1995/04/28 22:28:48 mycroft Exp $ */
/*-
@@ -49,7 +49,6 @@
#include <stdlib.h>
#include <string.h>
#include <termios.h>
-#include <time.h>
#include "bog.h"
#include "extern.h"
diff --git a/games/bs/bs.c b/games/bs/bs.c
index 711c33ec016..bbbb06c6298 100644
--- a/games/bs/bs.c
+++ b/games/bs/bs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bs.c,v 1.34 2015/12/26 00:26:39 mestre Exp $ */
+/* $OpenBSD: bs.c,v 1.35 2016/01/03 14:38:17 mestre Exp $ */
/*
* Copyright (c) 1986, Bruce Holloway
* All rights reserved.
@@ -47,7 +47,6 @@
#include <signal.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
#include <unistd.h>
typedef struct {
diff --git a/games/canfield/canfield/canfield.c b/games/canfield/canfield/canfield.c
index f87a1ef872b..078249dedb9 100644
--- a/games/canfield/canfield/canfield.c
+++ b/games/canfield/canfield/canfield.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: canfield.c,v 1.23 2015/12/26 00:26:39 mestre Exp $ */
+/* $OpenBSD: canfield.c,v 1.24 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: canfield.c,v 1.7 1995/05/13 07:28:35 jtc Exp $ */
/*
@@ -45,15 +45,14 @@
#include <ctype.h>
#include <curses.h>
-#include <errno.h>
#include <err.h>
+#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>
-#include <time.h>
#include <unistd.h>
#define decksize 52
diff --git a/games/fish/fish.c b/games/fish/fish.c
index 4602ce355b5..c201933cc20 100644
--- a/games/fish/fish.c
+++ b/games/fish/fish.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fish.c,v 1.19 2015/12/25 20:59:09 mestre Exp $ */
+/* $OpenBSD: fish.c,v 1.20 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: fish.c,v 1.3 1995/03/23 08:28:18 cgd Exp $ */
/*-
@@ -35,6 +35,7 @@
#include <sys/types.h>
#include <sys/wait.h>
+
#include <err.h>
#include <fcntl.h>
#include <paths.h>
@@ -42,7 +43,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
-#include <time.h>
+
#include "pathnames.h"
#define RANKS 13
diff --git a/games/fortune/strfile/strfile.c b/games/fortune/strfile/strfile.c
index 579ea18a55e..42a94c12fa2 100644
--- a/games/fortune/strfile/strfile.c
+++ b/games/fortune/strfile/strfile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strfile.c,v 1.24 2015/12/25 20:59:09 mestre Exp $ */
+/* $OpenBSD: strfile.c,v 1.25 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: strfile.c,v 1.4 1995/04/24 12:23:09 cgd Exp $ */
/*-
@@ -39,8 +39,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
#include <unistd.h>
+
#include "strfile.h"
/*
diff --git a/games/grdc/grdc.c b/games/grdc/grdc.c
index 9a06a746f55..1783f4b3c09 100644
--- a/games/grdc/grdc.c
+++ b/games/grdc/grdc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grdc.c,v 1.22 2015/12/25 20:59:09 mestre Exp $ */
+/* $OpenBSD: grdc.c,v 1.23 2016/01/03 14:38:17 mestre Exp $ */
/*
*
* Copyright 2002 Amos Shapir. Public domain.
@@ -11,14 +11,14 @@
* 10-18-89 added signal handling
*/
-#include <sys/types.h>
#include <sys/ioctl.h>
+#include <sys/types.h>
+
#include <curses.h>
#include <limits.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
-#include <time.h>
#include <unistd.h>
#include <err.h>
diff --git a/games/mille/save.c b/games/mille/save.c
index b699fe3bfb8..178fe148093 100644
--- a/games/mille/save.c
+++ b/games/mille/save.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: save.c,v 1.9 2015/11/11 01:12:10 deraadt Exp $ */
+/* $OpenBSD: save.c,v 1.10 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: save.c,v 1.4 1995/03/24 05:02:13 cgd Exp $ */
/*
@@ -30,7 +30,6 @@
* SUCH DAMAGE.
*/
-#include <time.h>
#include "mille.h"
/*
diff --git a/games/phantasia/include.h b/games/phantasia/include.h
index cc69c342410..ac369854e78 100644
--- a/games/phantasia/include.h
+++ b/games/phantasia/include.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: include.h,v 1.5 2014/11/16 04:49:48 guenther Exp $ */
+/* $OpenBSD: include.h,v 1.6 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: include.h,v 1.3 1995/04/24 12:24:31 cgd Exp $ */
/*
@@ -16,7 +16,6 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
#include <unistd.h>
#include "macros.h"
diff --git a/games/quiz/quiz.c b/games/quiz/quiz.c
index 704d3c2bdd8..ab89af26034 100644
--- a/games/quiz/quiz.c
+++ b/games/quiz/quiz.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: quiz.c,v 1.24 2015/12/25 20:59:09 mestre Exp $ */
+/* $OpenBSD: quiz.c,v 1.25 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: quiz.c,v 1.9 1995/04/22 10:16:58 cgd Exp $ */
/*-
@@ -35,16 +35,17 @@
*/
#include <sys/types.h>
+
+#include <ctype.h>
+#include <err.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <ctype.h>
-#include <err.h>
-#include <time.h>
#include <unistd.h>
-#include "quiz.h"
+
#include "pathnames.h"
+#include "quiz.h"
static QE qlist;
static int catone, cattwo, tflag;
diff --git a/games/random/random.c b/games/random/random.c
index f8fd45343ab..6b38a8ada38 100644
--- a/games/random/random.c
+++ b/games/random/random.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: random.c,v 1.15 2015/12/25 20:59:09 mestre Exp $ */
+/* $OpenBSD: random.c,v 1.16 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: random.c,v 1.3 1995/04/22 07:44:05 cgd Exp $ */
/*
@@ -35,13 +35,10 @@
#include <sys/types.h>
-#include <dev/rndvar.h>
-
#include <err.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
-#include <time.h>
#include <unistd.h>
#include <limits.h>
diff --git a/games/snake/snake.c b/games/snake/snake.c
index 5ea9636e6b3..62cfcc2ae00 100644
--- a/games/snake/snake.c
+++ b/games/snake/snake.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: snake.c,v 1.20 2015/12/02 18:52:23 tb Exp $ */
+/* $OpenBSD: snake.c,v 1.21 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: snake.c,v 1.8 1995/04/29 00:06:41 mycroft Exp $ */
/*
@@ -55,7 +55,6 @@
#include <stdlib.h>
#include <string.h>
#include <termios.h>
-#include <time.h>
#include <unistd.h>
#ifdef DEBUG
diff --git a/games/tetris/scores.c b/games/tetris/scores.c
index e6a94beac6c..aafc94a7017 100644
--- a/games/tetris/scores.c
+++ b/games/tetris/scores.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scores.c,v 1.17 2015/12/27 01:24:27 chl Exp $ */
+/* $OpenBSD: scores.c,v 1.18 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: scores.c,v 1.2 1995/04/22 07:42:38 cgd Exp $ */
/*-
@@ -42,22 +42,21 @@
*
* Major whacks since then.
*/
-#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/types.h>
-#include <errno.h>
#include <err.h>
+#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
#include <term.h>
#include <unistd.h>
-#include "screen.h"
#include "scores.h"
+#include "screen.h"
#include "tetris.h"
/*
diff --git a/games/worm/worm.c b/games/worm/worm.c
index aa8d77f0a78..731b83a94e7 100644
--- a/games/worm/worm.c
+++ b/games/worm/worm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: worm.c,v 1.35 2015/12/26 00:26:40 mestre Exp $ */
+/* $OpenBSD: worm.c,v 1.36 2016/01/03 14:38:17 mestre Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -35,13 +35,13 @@
*/
#include <sys/types.h>
+
#include <ctype.h>
#include <curses.h>
#include <err.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
#include <unistd.h>
#include <poll.h>
diff --git a/games/wump/wump.c b/games/wump/wump.c
index ca8670e1d51..0c74eeac06b 100644
--- a/games/wump/wump.c
+++ b/games/wump/wump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wump.c,v 1.28 2015/12/25 20:59:09 mestre Exp $ */
+/* $OpenBSD: wump.c,v 1.29 2016/01/03 14:38:17 mestre Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -41,14 +41,15 @@
#include <sys/types.h>
#include <sys/wait.h>
+
#include <err.h>
#include <fcntl.h>
#include <paths.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
#include <unistd.h>
+
#include "pathnames.h"
/* some defines to spec out what our wumpus cave should look like */