i'm really surprised that this saved 20s in build time. i guess its
worthwhile.
Index: backgammon/extra.c
===================================================================
RCS file: /cvs/src/games/backgammon/backgammon/extra.c,v
retrieving revision 1.8
diff -u -p -u -r1.8 extra.c
--- backgammon/extra.c 30 Nov 2015 08:19:25 -0000 1.8
+++ backgammon/extra.c 13 Mar 2016 03:31:03 -0000
@@ -29,6 +29,9 @@
* SUCH DAMAGE.
*/
+#include <curses.h>
+#include <stdlib.h>
+
#include "back.h"
#include "backlocal.h"
Index: backgammon/main.c
===================================================================
RCS file: /cvs/src/games/backgammon/backgammon/main.c,v
retrieving revision 1.23
diff -u -p -u -r1.23 main.c
--- backgammon/main.c 3 Jan 2016 14:38:16 -0000 1.23
+++ backgammon/main.c 13 Mar 2016 03:37:21 -0000
@@ -29,7 +29,10 @@
* SUCH DAMAGE.
*/
+#include <curses.h>
#include <err.h>
+#include <signal.h>
+#include <unistd.h>
#include "back.h"
#include "backlocal.h"
Index: backgammon/move.c
===================================================================
RCS file: /cvs/src/games/backgammon/backgammon/move.c,v
retrieving revision 1.13
diff -u -p -u -r1.13 move.c
--- backgammon/move.c 30 Nov 2015 08:19:25 -0000 1.13
+++ backgammon/move.c 13 Mar 2016 03:40:02 -0000
@@ -29,6 +29,10 @@
* SUCH DAMAGE.
*/
+#include <curses.h>
+#include <unistd.h>
+#include <stdlib.h>
+
#include "back.h"
#include "backlocal.h"
Index: backgammon/pubeval.c
===================================================================
RCS file: /cvs/src/games/backgammon/backgammon/pubeval.c,v
retrieving revision 1.3
diff -u -p -u -r1.3 pubeval.c
--- backgammon/pubeval.c 30 Nov 2015 08:19:25 -0000 1.3
+++ backgammon/pubeval.c 13 Mar 2016 03:41:28 -0000
@@ -33,6 +33,8 @@
* (negative integer).
*/
+#include <sys/types.h>
+
#include "back.h"
#include "backlocal.h"
Index: backgammon/text.c
===================================================================
RCS file: /cvs/src/games/backgammon/backgammon/text.c,v
retrieving revision 1.9
diff -u -p -u -r1.9 text.c
--- backgammon/text.c 30 Nov 2015 08:19:25 -0000 1.9
+++ backgammon/text.c 13 Mar 2016 15:25:14 -0000
@@ -29,6 +29,8 @@
* SUCH DAMAGE.
*/
+#include <curses.h>
+
#include "back.h"
const char *const instruct[] = {
Index: common_source/allow.c
===================================================================
RCS file: /cvs/src/games/backgammon/common_source/allow.c,v
retrieving revision 1.6
diff -u -p -u -r1.6 allow.c
--- common_source/allow.c 30 Nov 2015 08:19:25 -0000 1.6
+++ common_source/allow.c 13 Mar 2016 15:47:47 -0000
@@ -29,6 +29,8 @@
* SUCH DAMAGE.
*/
+#include <sys/types.h>
+
#include "back.h"
int
Index: common_source/back.h
===================================================================
RCS file: /cvs/src/games/backgammon/common_source/back.h,v
retrieving revision 1.15
diff -u -p -u -r1.15 back.h
--- common_source/back.h 26 Dec 2015 00:26:39 -0000 1.15
+++ common_source/back.h 13 Mar 2016 03:18:33 -0000
@@ -31,18 +31,6 @@
* @(#)back.h 8.1 (Berkeley) 5/31/93
*/
-#include <sys/types.h>
-#include <sys/uio.h>
-
-#include <curses.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <term.h>
-#include <unistd.h>
-
#define rnum(r) arc4random_uniform(r)
#define D0 dice[0]
#define D1 dice[1]
Index: common_source/board.c
===================================================================
RCS file: /cvs/src/games/backgammon/common_source/board.c,v
retrieving revision 1.10
diff -u -p -u -r1.10 board.c
--- common_source/board.c 30 Nov 2015 08:19:25 -0000 1.10
+++ common_source/board.c 13 Mar 2016 15:48:23 -0000
@@ -29,6 +29,10 @@
* SUCH DAMAGE.
*/
+#include <sys/types.h>
+
+#include <curses.h>
+
#include "back.h"
void
Index: common_source/check.c
===================================================================
RCS file: /cvs/src/games/backgammon/common_source/check.c,v
retrieving revision 1.7
diff -u -p -u -r1.7 check.c
--- common_source/check.c 30 Nov 2015 08:19:25 -0000 1.7
+++ common_source/check.c 13 Mar 2016 15:46:27 -0000
@@ -29,6 +29,11 @@
* SUCH DAMAGE.
*/
+#include <sys/types.h>
+
+#include <curses.h>
+#include <stdlib.h>
+
#include "back.h"
void
Index: common_source/fancy.c
===================================================================
RCS file: /cvs/src/games/backgammon/common_source/fancy.c,v
retrieving revision 1.13
diff -u -p -u -r1.13 fancy.c
--- common_source/fancy.c 30 Nov 2015 08:19:25 -0000 1.13
+++ common_source/fancy.c 13 Mar 2016 03:32:43 -0000
@@ -29,7 +29,10 @@
* SUCH DAMAGE.
*/
+#include <curses.h>
#include <err.h>
+#include <stdlib.h>
+
#include "back.h"
int oldb[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
Index: common_source/init.c
===================================================================
RCS file: /cvs/src/games/backgammon/common_source/init.c,v
retrieving revision 1.11
diff -u -p -u -r1.11 init.c
--- common_source/init.c 2 Dec 2015 20:05:01 -0000 1.11
+++ common_source/init.c 13 Mar 2016 15:43:48 -0000
@@ -33,11 +33,13 @@
* variable initialization.
*/
+#include <sys/types.h>
+
#ifdef DEBUG
#include <stdio.h>
FILE *ftrace;
#endif
-#include <back.h>
+#include "back.h"
/* name of executable object programs */
const char EXEC[] = "/usr/games/backgammon";
Index: common_source/odds.c
===================================================================
RCS file: /cvs/src/games/backgammon/common_source/odds.c,v
retrieving revision 1.7
diff -u -p -u -r1.7 odds.c
--- common_source/odds.c 8 Jan 2016 13:40:05 -0000 1.7
+++ common_source/odds.c 13 Mar 2016 03:40:52 -0000
@@ -29,6 +29,8 @@
* SUCH DAMAGE.
*/
+#include <stdlib.h>
+
#include "back.h"
void
Index: common_source/one.c
===================================================================
RCS file: /cvs/src/games/backgammon/common_source/one.c,v
retrieving revision 1.7
diff -u -p -u -r1.7 one.c
--- common_source/one.c 30 Nov 2015 08:19:25 -0000 1.7
+++ common_source/one.c 13 Mar 2016 03:43:52 -0000
@@ -29,6 +29,11 @@
* SUCH DAMAGE.
*/
+#include <sys/types.h>
+
+#include <curses.h>
+#include <stdlib.h>
+
#include "back.h"
int
Index: common_source/save.c
===================================================================
RCS file: /cvs/src/games/backgammon/common_source/save.c,v
retrieving revision 1.14
diff -u -p -u -r1.14 save.c
--- common_source/save.c 30 Nov 2015 08:19:25 -0000 1.14
+++ common_source/save.c 13 Mar 2016 04:00:07 -0000
@@ -30,8 +30,12 @@
*/
#include <ctype.h>
+#include <curses.h>
+#include <fcntl.h>
#include <limits.h>
#include <errno.h>
+#include <unistd.h>
+
#include "back.h"
static const char confirm[] = "Are you sure you want to leave now?";
Index: common_source/subs.c
===================================================================
RCS file: /cvs/src/games/backgammon/common_source/subs.c,v
retrieving revision 1.22
diff -u -p -u -r1.22 subs.c
--- common_source/subs.c 2 Dec 2015 20:05:01 -0000 1.22
+++ common_source/subs.c 13 Mar 2016 15:24:05 -0000
@@ -29,7 +29,16 @@
* SUCH DAMAGE.
*/
+#include <sys/types.h>
+
+#include <curses.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
#include "back.h"
+
+#define BUFSIZ 1024
__dead void usage(void);
Index: common_source/table.c
===================================================================
RCS file: /cvs/src/games/backgammon/common_source/table.c,v
retrieving revision 1.9
diff -u -p -u -r1.9 table.c
--- common_source/table.c 30 Nov 2015 08:19:25 -0000 1.9
+++ common_source/table.c 13 Mar 2016 15:24:44 -0000
@@ -30,6 +30,8 @@
*/
#include <ctype.h>
+#include <curses.h>
+
#include "back.h"
const char *const help2[] = {
Index: teachgammon/teach.c
===================================================================
RCS file: /cvs/src/games/backgammon/teachgammon/teach.c,v
retrieving revision 1.16
diff -u -p -u -r1.16 teach.c
--- teachgammon/teach.c 2 Dec 2015 20:05:01 -0000 1.16
+++ teachgammon/teach.c 13 Mar 2016 15:27:11 -0000
@@ -29,7 +29,9 @@
* SUCH DAMAGE.
*/
+#include <curses.h>
#include <err.h>
+#include <signal.h>
#include <unistd.h>
#include "back.h"
Index: teachgammon/ttext1.c
===================================================================
RCS file: /cvs/src/games/backgammon/teachgammon/ttext1.c,v
retrieving revision 1.6
diff -u -p -u -r1.6 ttext1.c
--- teachgammon/ttext1.c 27 Oct 2009 23:59:23 -0000 1.6
+++ teachgammon/ttext1.c 13 Mar 2016 15:27:52 -0000
@@ -29,6 +29,8 @@
* SUCH DAMAGE.
*/
+#include <sys/types.h>
+
#include "back.h"
#include "tutor.h"
Index: teachgammon/ttext2.c
===================================================================
RCS file: /cvs/src/games/backgammon/teachgammon/ttext2.c,v
retrieving revision 1.8
diff -u -p -u -r1.8 ttext2.c
--- teachgammon/ttext2.c 30 Nov 2015 08:19:25 -0000 1.8
+++ teachgammon/ttext2.c 13 Mar 2016 15:28:39 -0000
@@ -29,6 +29,10 @@
* SUCH DAMAGE.
*/
+#include <sys/types.h>
+
+#include <curses.h>
+
#include "back.h"
#include "tutor.h"
Index: teachgammon/tutor.c
===================================================================
RCS file: /cvs/src/games/backgammon/teachgammon/tutor.c,v
retrieving revision 1.8
diff -u -p -u -r1.8 tutor.c
--- teachgammon/tutor.c 8 Jan 2016 13:40:05 -0000 1.8
+++ teachgammon/tutor.c 13 Mar 2016 15:29:18 -0000
@@ -29,6 +29,11 @@
* SUCH DAMAGE.
*/
+#include <sys/types.h>
+
+#include <curses.h>
+#include <string.h>
+
#include "back.h"
#include "tutor.h"