summaryrefslogtreecommitdiffstats
path: root/atc
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2015-06-19 06:02:31 +0000
committerdholland <dholland@NetBSD.org>2015-06-19 06:02:31 +0000
commitcbfa4e0150e45039bfd90790eea6dca891ce4af6 (patch)
treec8a1a0deb0dd9a08bac07eb2b7d7b5bfafd94618 /atc
parent413d3917bba156144bdab0cbc8763bf8d4fcedb3 (diff)
downloadbsdgames-darwin-cbfa4e0150e45039bfd90790eea6dca891ce4af6.tar.gz
bsdgames-darwin-cbfa4e0150e45039bfd90790eea6dca891ce4af6.tar.zst
bsdgames-darwin-cbfa4e0150e45039bfd90790eea6dca891ce4af6.zip
Abolish the foul practice of including every header in existence via a
single central "include.h". Use only headers that are actually needed.
Diffstat (limited to 'atc')
-rw-r--r--atc/extern.c11
-rw-r--r--atc/extern.h5
-rw-r--r--atc/grammar.y13
-rw-r--r--atc/graphics.c15
-rw-r--r--atc/include.h72
-rw-r--r--atc/input.c20
-rw-r--r--atc/lex.l5
-rw-r--r--atc/list.c11
-rw-r--r--atc/log.c19
-rw-r--r--atc/main.c17
-rw-r--r--atc/update.c14
11 files changed, 101 insertions, 101 deletions
diff --git a/atc/extern.c b/atc/extern.c
index 345d4cc8..6d3a30f4 100644
--- a/atc/extern.c
+++ b/atc/extern.c
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.c,v 1.11 2009/08/12 04:48:03 dholland Exp $ */
+/* $NetBSD: extern.c,v 1.12 2015/06/19 06:02:31 dholland Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -46,11 +46,16 @@
#if 0
static char sccsid[] = "@(#)extern.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: extern.c,v 1.11 2009/08/12 04:48:03 dholland Exp $");
+__RCSID("$NetBSD: extern.c,v 1.12 2015/06/19 06:02:31 dholland Exp $");
#endif
#endif /* not lint */
-#include "include.h"
+#include <termios.h>
+
+#include "def.h"
+#include "struct.h"
+#include "extern.h"
+#include "tunable.h"
char GAMES[] = "Game_List";
diff --git a/atc/extern.h b/atc/extern.h
index 7131a6a3..89764df2 100644
--- a/atc/extern.h
+++ b/atc/extern.h
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.17 2014/03/22 22:58:56 dholland Exp $ */
+/* $NetBSD: extern.h,v 1.18 2015/06/19 06:02:31 dholland Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -43,6 +43,9 @@
* For more info on this and all of my stuff, mail edjames@berkeley.edu.
*/
+#include <time.h> /* for time_t */
+
+
extern char GAMES[];
extern const char *filename;
diff --git a/atc/grammar.y b/atc/grammar.y
index d3c7f9c2..33845913 100644
--- a/atc/grammar.y
+++ b/atc/grammar.y
@@ -1,4 +1,4 @@
-/* $NetBSD: grammar.y,v 1.11 2014/03/22 22:09:14 dholland Exp $ */
+/* $NetBSD: grammar.y,v 1.12 2015/06/19 06:02:31 dholland Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -57,17 +57,22 @@
}
%{
-#include "include.h"
-
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)grammar.y 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: grammar.y,v 1.11 2014/03/22 22:09:14 dholland Exp $");
+__RCSID("$NetBSD: grammar.y,v 1.12 2015/06/19 06:02:31 dholland Exp $");
#endif
#endif /* not lint */
+#include <stdio.h>
+
+#include "def.h"
+#include "struct.h"
+#include "extern.h"
+#include "tunable.h"
+
int line = 1;
static int errors = 0;
diff --git a/atc/graphics.c b/atc/graphics.c
index 66a4bddc..f1132c8c 100644
--- a/atc/graphics.c
+++ b/atc/graphics.c
@@ -1,4 +1,4 @@
-/* $NetBSD: graphics.c,v 1.18 2014/03/22 22:33:35 dholland Exp $ */
+/* $NetBSD: graphics.c,v 1.19 2015/06/19 06:02:31 dholland Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -46,11 +46,20 @@
#if 0
static char sccsid[] = "@(#)graphics.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: graphics.c,v 1.18 2014/03/22 22:33:35 dholland Exp $");
+__RCSID("$NetBSD: graphics.c,v 1.19 2015/06/19 06:02:31 dholland Exp $");
#endif
#endif /* not lint */
-#include "include.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <curses.h>
+#include <errno.h>
+#include <err.h>
+
+#include "def.h"
+#include "struct.h"
+#include "extern.h"
+#include "tunable.h"
#define C_TOPBOTTOM '-'
#define C_LEFTRIGHT '|'
diff --git a/atc/include.h b/atc/include.h
deleted file mode 100644
index 11819951..00000000
--- a/atc/include.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* $NetBSD: include.h,v 1.9 2006/06/07 09:24:26 jnemeth Exp $ */
-
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Ed James.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)include.h 8.1 (Berkeley) 5/31/93
- */
-
-/*
- * Copyright (c) 1987 by Ed James, UC Berkeley. All rights reserved.
- *
- * Copy permission is hereby granted provided that this notice is
- * retained on all partial or complete copies.
- *
- * For more info on this and all of my stuff, mail edjames@berkeley.edu.
- */
-
-#include <sys/types.h>
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/utsname.h>
-#include <sys/wait.h>
-
-#include <assert.h>
-#include <ctype.h>
-#include <curses.h>
-#include <err.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <math.h>
-#include <pwd.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <termios.h>
-#include <time.h>
-#include <unistd.h>
-
-#include "def.h"
-#include "struct.h"
-#include "extern.h"
-#include "tunable.h"
diff --git a/atc/input.c b/atc/input.c
index 500af29b..3b44be09 100644
--- a/atc/input.c
+++ b/atc/input.c
@@ -1,4 +1,4 @@
-/* $NetBSD: input.c,v 1.28 2014/03/22 22:58:56 dholland Exp $ */
+/* $NetBSD: input.c,v 1.29 2015/06/19 06:02:31 dholland Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -46,12 +46,26 @@
#if 0
static char sccsid[] = "@(#)input.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: input.c,v 1.28 2014/03/22 22:58:56 dholland Exp $");
+__RCSID("$NetBSD: input.c,v 1.29 2015/06/19 06:02:31 dholland Exp $");
#endif
#endif /* not lint */
-#include "include.h"
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <termios.h>
+#include <ctype.h>
+#include <assert.h>
+#include <math.h>
+
#include "pathnames.h"
+#include "def.h"
+#include "struct.h"
+#include "extern.h"
+#include "tunable.h"
static void rezero(void);
static void noise(void);
diff --git a/atc/lex.l b/atc/lex.l
index 7037293a..01e38278 100644
--- a/atc/lex.l
+++ b/atc/lex.l
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: lex.l,v 1.8 2009/10/29 14:27:26 christos Exp $ */
+/* $NetBSD: lex.l,v 1.9 2015/06/19 06:02:31 dholland Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -47,11 +47,10 @@
#if 0
static char sccsid[] = "@(#)lex.l 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: lex.l,v 1.8 2009/10/29 14:27:26 christos Exp $");
+__RCSID("$NetBSD: lex.l,v 1.9 2015/06/19 06:02:31 dholland Exp $");
#endif
#endif /* not lint */
-#include "include.h"
#undef ECHO /* XXX: work around lex(1) vs termios lameness */
#include "grammar.h"
diff --git a/atc/list.c b/atc/list.c
index 4fd52d7c..af43b485 100644
--- a/atc/list.c
+++ b/atc/list.c
@@ -1,4 +1,4 @@
-/* $NetBSD: list.c,v 1.8 2014/03/22 22:09:14 dholland Exp $ */
+/* $NetBSD: list.c,v 1.9 2015/06/19 06:02:31 dholland Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -46,11 +46,16 @@
#if 0
static char sccsid[] = "@(#)list.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: list.c,v 1.8 2014/03/22 22:09:14 dholland Exp $");
+__RCSID("$NetBSD: list.c,v 1.9 2015/06/19 06:02:31 dholland Exp $");
#endif
#endif /* not lint */
-#include "include.h"
+#include <stdlib.h>
+
+#include "def.h"
+#include "struct.h"
+#include "extern.h"
+#include "tunable.h"
PLANE *
newplane(void)
diff --git a/atc/log.c b/atc/log.c
index 99c0a43e..cbfc8ecb 100644
--- a/atc/log.c
+++ b/atc/log.c
@@ -1,4 +1,4 @@
-/* $NetBSD: log.c,v 1.21 2009/08/12 04:48:03 dholland Exp $ */
+/* $NetBSD: log.c,v 1.22 2015/06/19 06:02:31 dholland Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -46,12 +46,25 @@
#if 0
static char sccsid[] = "@(#)log.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: log.c,v 1.21 2009/08/12 04:48:03 dholland Exp $");
+__RCSID("$NetBSD: log.c,v 1.22 2015/06/19 06:02:31 dholland Exp $");
#endif
#endif /* not lint */
-#include "include.h"
+#include <sys/types.h>
+#include <sys/utsname.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <pwd.h>
+#include <err.h>
+
#include "pathnames.h"
+#include "def.h"
+#include "struct.h"
+#include "extern.h"
+#include "tunable.h"
static FILE *score_fp;
diff --git a/atc/main.c b/atc/main.c
index 7f4444fb..07316615 100644
--- a/atc/main.c
+++ b/atc/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.22 2014/03/22 22:58:56 dholland Exp $ */
+/* $NetBSD: main.c,v 1.23 2015/06/19 06:02:31 dholland Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -51,12 +51,23 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993\
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: main.c,v 1.22 2014/03/22 22:58:56 dholland Exp $");
+__RCSID("$NetBSD: main.c,v 1.23 2015/06/19 06:02:31 dholland Exp $");
#endif
#endif /* not lint */
-#include "include.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <signal.h>
+#include <termios.h>
+#include <getopt.h>
+#include <err.h>
+
#include "pathnames.h"
+#include "def.h"
+#include "struct.h"
+#include "extern.h"
+#include "tunable.h"
extern FILE *yyin;
diff --git a/atc/update.c b/atc/update.c
index 4396aaba..052b1bf5 100644
--- a/atc/update.c
+++ b/atc/update.c
@@ -1,4 +1,4 @@
-/* $NetBSD: update.c,v 1.25 2014/03/22 22:58:56 dholland Exp $ */
+/* $NetBSD: update.c,v 1.26 2015/06/19 06:02:31 dholland Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -46,11 +46,19 @@
#if 0
static char sccsid[] = "@(#)update.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: update.c,v 1.25 2014/03/22 22:58:56 dholland Exp $");
+__RCSID("$NetBSD: update.c,v 1.26 2015/06/19 06:02:31 dholland Exp $");
#endif
#endif /* not lint */
-#include "include.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+#include "def.h"
+#include "struct.h"
+#include "extern.h"
+#include "tunable.h"
static int next_plane(void);
static int too_close(const PLANE *p1, const PLANE *p2, int);