From cbfa4e0150e45039bfd90790eea6dca891ce4af6 Mon Sep 17 00:00:00 2001 From: dholland Date: Fri, 19 Jun 2015 06:02:31 +0000 Subject: Abolish the foul practice of including every header in existence via a single central "include.h". Use only headers that are actually needed. --- atc/extern.c | 11 ++++++--- atc/extern.h | 5 +++- atc/grammar.y | 13 +++++++---- atc/graphics.c | 15 +++++++++--- atc/include.h | 72 ---------------------------------------------------------- atc/input.c | 20 +++++++++++++--- atc/lex.l | 5 ++-- atc/list.c | 11 ++++++--- atc/log.c | 19 +++++++++++++--- atc/main.c | 17 +++++++++++--- atc/update.c | 14 +++++++++--- 11 files changed, 101 insertions(+), 101 deletions(-) delete mode 100644 atc/include.h (limited to 'atc') 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 + +#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 /* 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 #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 + +#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 +#include +#include +#include +#include + +#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 -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + #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 + +#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 +#include +#include +#include +#include +#include +#include +#include +#include + #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 +#include +#include +#include +#include +#include +#include + #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 +#include +#include +#include + +#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); -- cgit v1.2.3-56-ge451