Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/atc Abolish the foul practice of including every heade...
details: https://anonhg.NetBSD.org/src/rev/fd56a2b4471a
branches: trunk
changeset: 338947:fd56a2b4471a
user: dholland <dholland%NetBSD.org@localhost>
date: Fri Jun 19 06:02:31 2015 +0000
description:
Abolish the foul practice of including every header in existence via a
single central "include.h". Use only headers that are actually needed.
diffstat:
games/atc/extern.c | 11 +++++--
games/atc/extern.h | 5 ++-
games/atc/grammar.y | 13 ++++++--
games/atc/graphics.c | 15 ++++++++--
games/atc/include.h | 72 ----------------------------------------------------
games/atc/input.c | 20 ++++++++++++--
games/atc/lex.l | 5 +--
games/atc/list.c | 11 +++++--
games/atc/log.c | 19 +++++++++++--
games/atc/main.c | 17 ++++++++++--
games/atc/update.c | 14 +++++++--
11 files changed, 101 insertions(+), 101 deletions(-)
diffs (truncated from 382 to 300 lines):
diff -r 78cacf630644 -r fd56a2b4471a games/atc/extern.c
--- a/games/atc/extern.c Fri Jun 19 02:33:00 2015 +0000
+++ b/games/atc/extern.c Fri Jun 19 06:02:31 2015 +0000
@@ -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 -r 78cacf630644 -r fd56a2b4471a games/atc/extern.h
--- a/games/atc/extern.h Fri Jun 19 02:33:00 2015 +0000
+++ b/games/atc/extern.h Fri Jun 19 06:02:31 2015 +0000
@@ -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@localhost.
*/
+#include <time.h> /* for time_t */
+
+
extern char GAMES[];
extern const char *filename;
diff -r 78cacf630644 -r fd56a2b4471a games/atc/grammar.y
--- a/games/atc/grammar.y Fri Jun 19 02:33:00 2015 +0000
+++ b/games/atc/grammar.y Fri Jun 19 06:02:31 2015 +0000
@@ -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 -r 78cacf630644 -r fd56a2b4471a games/atc/graphics.c
--- a/games/atc/graphics.c Fri Jun 19 02:33:00 2015 +0000
+++ b/games/atc/graphics.c Fri Jun 19 06:02:31 2015 +0000
@@ -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 -r 78cacf630644 -r fd56a2b4471a games/atc/include.h
--- a/games/atc/include.h Fri Jun 19 02:33:00 2015 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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@localhost.
- */
-
-#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 -r 78cacf630644 -r fd56a2b4471a games/atc/input.c
--- a/games/atc/input.c Fri Jun 19 02:33:00 2015 +0000
+++ b/games/atc/input.c Fri Jun 19 06:02:31 2015 +0000
@@ -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 -r 78cacf630644 -r fd56a2b4471a games/atc/lex.l
--- a/games/atc/lex.l Fri Jun 19 02:33:00 2015 +0000
+++ b/games/atc/lex.l Fri Jun 19 06:02:31 2015 +0000
@@ -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 -r 78cacf630644 -r fd56a2b4471a games/atc/list.c
--- a/games/atc/list.c Fri Jun 19 02:33:00 2015 +0000
+++ b/games/atc/list.c Fri Jun 19 06:02:31 2015 +0000
@@ -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 -r 78cacf630644 -r fd56a2b4471a games/atc/log.c
--- a/games/atc/log.c Fri Jun 19 02:33:00 2015 +0000
+++ b/games/atc/log.c Fri Jun 19 06:02:31 2015 +0000
@@ -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>
Home |
Main Index |
Thread Index |
Old Index