diff options
author | mestre <mestre@cvs.openbsd.org> | 2015-12-31 16:44:23 +0000 |
---|---|---|
committer | mestre <mestre@cvs.openbsd.org> | 2015-12-31 16:44:23 +0000 |
commit | de98887a74032de8157f9b7657eead6ec6abc119 (patch) | |
tree | a1e2299c24c6eb874c782f86162a8aa300f3704d /games/sail | |
parent | 05e19e1e240782fddb68d37b30817dcfbef87e72 (diff) |
Include only needed header files per each source file
OK tb@
Diffstat (limited to 'games/sail')
-rw-r--r-- | games/sail/dr_1.c | 9 | ||||
-rw-r--r-- | games/sail/dr_2.c | 8 | ||||
-rw-r--r-- | games/sail/dr_3.c | 8 | ||||
-rw-r--r-- | games/sail/dr_main.c | 10 | ||||
-rw-r--r-- | games/sail/driver.h | 4 | ||||
-rw-r--r-- | games/sail/extern.h | 10 | ||||
-rw-r--r-- | games/sail/lo_main.c | 5 | ||||
-rw-r--r-- | games/sail/misc.c | 7 | ||||
-rw-r--r-- | games/sail/pl_1.c | 11 | ||||
-rw-r--r-- | games/sail/pl_2.c | 6 | ||||
-rw-r--r-- | games/sail/pl_3.c | 8 | ||||
-rw-r--r-- | games/sail/pl_4.c | 5 | ||||
-rw-r--r-- | games/sail/pl_5.c | 8 | ||||
-rw-r--r-- | games/sail/pl_6.c | 6 | ||||
-rw-r--r-- | games/sail/pl_7.c | 11 | ||||
-rw-r--r-- | games/sail/pl_main.c | 13 | ||||
-rw-r--r-- | games/sail/player.h | 3 | ||||
-rw-r--r-- | games/sail/sync.c | 11 |
18 files changed, 94 insertions, 49 deletions
diff --git a/games/sail/dr_1.c b/games/sail/dr_1.c index 6b8505a67b6..7c7946e647c 100644 --- a/games/sail/dr_1.c +++ b/games/sail/dr_1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dr_1.c,v 1.7 2015/10/24 18:16:40 mmcc Exp $ */ +/* $OpenBSD: dr_1.c,v 1.8 2015/12/31 16:44:21 mestre Exp $ */ /* $NetBSD: dr_1.c,v 1.4 1995/04/24 12:25:10 cgd Exp $ */ /* @@ -30,8 +30,13 @@ * SUCH DAMAGE. */ -#include "driver.h" +#include <ctype.h> #include <stdlib.h> +#include <string.h> + +#include "driver.h" +#include "extern.h" +#include "player.h" void unfoul() diff --git a/games/sail/dr_2.c b/games/sail/dr_2.c index d16faab1076..327cee71bed 100644 --- a/games/sail/dr_2.c +++ b/games/sail/dr_2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dr_2.c,v 1.5 2009/10/27 23:59:27 deraadt Exp $ */ +/* $OpenBSD: dr_2.c,v 1.6 2015/12/31 16:44:21 mestre Exp $ */ /* $NetBSD: dr_2.c,v 1.4 1995/04/24 12:25:12 cgd Exp $ */ /* @@ -30,8 +30,12 @@ * SUCH DAMAGE. */ -#include "driver.h" #include <stdlib.h> +#include <string.h> + +#include "driver.h" +#include "extern.h" +#include "player.h" #define couldwin(f,t) (f->specs->crew2 > t->specs->crew2 * 1.5) diff --git a/games/sail/dr_3.c b/games/sail/dr_3.c index 5b3500b2854..0404d5f66bd 100644 --- a/games/sail/dr_3.c +++ b/games/sail/dr_3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dr_3.c,v 1.5 2009/10/27 23:59:27 deraadt Exp $ */ +/* $OpenBSD: dr_3.c,v 1.6 2015/12/31 16:44:22 mestre Exp $ */ /* $NetBSD: dr_3.c,v 1.3 1995/04/22 10:36:49 cgd Exp $ */ /* @@ -30,8 +30,12 @@ * SUCH DAMAGE. */ -#include "driver.h" #include <stdlib.h> +#include <string.h> + +#include "driver.h" +#include "extern.h" +#include "player.h" void moveall() /* move all comp ships */ diff --git a/games/sail/dr_main.c b/games/sail/dr_main.c index fd016d75174..859847c210d 100644 --- a/games/sail/dr_main.c +++ b/games/sail/dr_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dr_main.c,v 1.6 2015/08/22 14:47:41 deraadt Exp $ */ +/* $OpenBSD: dr_main.c,v 1.7 2015/12/31 16:44:22 mestre Exp $ */ /* $NetBSD: dr_main.c,v 1.4 1995/04/22 10:36:52 cgd Exp $ */ /* @@ -30,10 +30,14 @@ * SUCH DAMAGE. */ -#include "driver.h" +#include <err.h> +#include <signal.h> #include <stdlib.h> #include <unistd.h> -#include <err.h> + +#include "driver.h" +#include "extern.h" +#include "player.h" int dr_main() diff --git a/games/sail/driver.h b/games/sail/driver.h index 7300c4af462..1870a7dc987 100644 --- a/games/sail/driver.h +++ b/games/sail/driver.h @@ -1,4 +1,4 @@ -/* $OpenBSD: driver.h,v 1.4 2003/06/03 03:01:41 millert Exp $ */ +/* $OpenBSD: driver.h,v 1.5 2015/12/31 16:44:22 mestre Exp $ */ /* $NetBSD: driver.h,v 1.3 1995/04/22 10:36:54 cgd Exp $ */ /* @@ -32,6 +32,4 @@ * @(#)driver.h 8.2 (Berkeley) 5/3/95 */ -#include "extern.h" - extern const int dtab[]; diff --git a/games/sail/extern.h b/games/sail/extern.h index 90414e63b11..d025070e00c 100644 --- a/games/sail/extern.h +++ b/games/sail/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.11 2015/12/26 00:26:40 mestre Exp $ */ +/* $OpenBSD: extern.h,v 1.12 2015/12/31 16:44:22 mestre Exp $ */ /* $NetBSD: extern.h,v 1.8 1998/09/13 15:27:30 hubertf Exp $ */ /* @@ -32,13 +32,9 @@ * @(#)externs.h 8.1 (Berkeley) 5/31/93 */ -#include <stdio.h> -#include <signal.h> -#include <string.h> -#include <ctype.h> -#include <setjmp.h> #include <sys/types.h> -#include "machdep.h" + +#include <setjmp.h> #ifndef __GNUC__ #define __attribute__(x) diff --git a/games/sail/lo_main.c b/games/sail/lo_main.c index ecf03242dea..2e379521df4 100644 --- a/games/sail/lo_main.c +++ b/games/sail/lo_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lo_main.c,v 1.8 2014/11/16 04:49:48 guenther Exp $ */ +/* $OpenBSD: lo_main.c,v 1.9 2015/12/31 16:44:22 mestre Exp $ */ /* $NetBSD: lo_main.c,v 1.3 1995/04/22 10:36:59 cgd Exp $ */ /* @@ -35,10 +35,11 @@ * * -l force a long listing (print out real usernames) */ -#include <sys/types.h> #include <limits.h> #include <pwd.h> +#include <stdio.h> #include <stdlib.h> + #include "extern.h" #include "pathnames.h" diff --git a/games/sail/misc.c b/games/sail/misc.c index 6812498ecf4..01eee264a89 100644 --- a/games/sail/misc.c +++ b/games/sail/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.7 2015/10/24 18:16:40 mmcc Exp $ */ +/* $OpenBSD: misc.c,v 1.8 2015/12/31 16:44:22 mestre Exp $ */ /* $NetBSD: misc.c,v 1.3 1995/04/22 10:37:03 cgd Exp $ */ /* @@ -30,9 +30,12 @@ * SUCH DAMAGE. */ -#include <fcntl.h> +#include <ctype.h> +#include <stdio.h> #include <stdlib.h> +#include <string.h> #include <unistd.h> + #include "extern.h" #include "pathnames.h" diff --git a/games/sail/pl_1.c b/games/sail/pl_1.c index f9a463744b4..63a90860c2c 100644 --- a/games/sail/pl_1.c +++ b/games/sail/pl_1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pl_1.c,v 1.10 2011/11/06 01:43:50 guenther Exp $ */ +/* $OpenBSD: pl_1.c,v 1.11 2015/12/31 16:44:22 mestre Exp $ */ /* $NetBSD: pl_1.c,v 1.3 1995/04/22 10:37:07 cgd Exp $ */ /* @@ -30,13 +30,16 @@ * SUCH DAMAGE. */ -#include "player.h" -#include <sys/types.h> -#include <errno.h> #include <sys/wait.h> + +#include <errno.h> +#include <signal.h> #include <stdlib.h> #include <unistd.h> +#include "extern.h" +#include "player.h" + #ifndef __GNUC__ #define __attribute__(x) #endif diff --git a/games/sail/pl_2.c b/games/sail/pl_2.c index b38cb413bdc..55b769e0809 100644 --- a/games/sail/pl_2.c +++ b/games/sail/pl_2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pl_2.c,v 1.4 2009/10/27 23:59:27 deraadt Exp $ */ +/* $OpenBSD: pl_2.c,v 1.5 2015/12/31 16:44:22 mestre Exp $ */ /* $NetBSD: pl_2.c,v 1.3 1995/04/22 10:37:08 cgd Exp $ */ /* @@ -30,6 +30,10 @@ * SUCH DAMAGE. */ +#include <signal.h> + +#include "extern.h" +#include "machdep.h" #include "player.h" void diff --git a/games/sail/pl_3.c b/games/sail/pl_3.c index 2e833232983..2f512624680 100644 --- a/games/sail/pl_3.c +++ b/games/sail/pl_3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pl_3.c,v 1.4 2009/10/27 23:59:27 deraadt Exp $ */ +/* $OpenBSD: pl_3.c,v 1.5 2015/12/31 16:44:22 mestre Exp $ */ /* $NetBSD: pl_3.c,v 1.3 1995/04/22 10:37:09 cgd Exp $ */ /* @@ -30,9 +30,13 @@ * SUCH DAMAGE. */ -#include "player.h" +#include <signal.h> #include <stdlib.h> +#include "extern.h" +#include "machdep.h" +#include "player.h" + void acceptcombat() { diff --git a/games/sail/pl_4.c b/games/sail/pl_4.c index 908bf3f3501..4997448f3b4 100644 --- a/games/sail/pl_4.c +++ b/games/sail/pl_4.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pl_4.c,v 1.5 2015/10/24 18:14:09 mmcc Exp $ */ +/* $OpenBSD: pl_4.c,v 1.6 2015/12/31 16:44:22 mestre Exp $ */ /* $NetBSD: pl_4.c,v 1.4 1995/04/24 12:25:17 cgd Exp $ */ /* @@ -30,6 +30,9 @@ * SUCH DAMAGE. */ +#include <ctype.h> + +#include "extern.h" #include "player.h" void diff --git a/games/sail/pl_5.c b/games/sail/pl_5.c index 2b804a50b10..f7e620c0d57 100644 --- a/games/sail/pl_5.c +++ b/games/sail/pl_5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pl_5.c,v 1.7 2015/10/24 18:14:09 mmcc Exp $ */ +/* $OpenBSD: pl_5.c,v 1.8 2015/12/31 16:44:22 mestre Exp $ */ /* $NetBSD: pl_5.c,v 1.4 1995/04/24 12:25:21 cgd Exp $ */ /* @@ -30,6 +30,12 @@ * SUCH DAMAGE. */ +#include <ctype.h> +#include <signal.h> +#include <string.h> + +#include "extern.h" +#include "machdep.h" #include "player.h" #define turnfirst(x) (*x == 'r' || *x == 'l') diff --git a/games/sail/pl_6.c b/games/sail/pl_6.c index 1cec97d981c..318efbb95ec 100644 --- a/games/sail/pl_6.c +++ b/games/sail/pl_6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pl_6.c,v 1.4 2009/10/27 23:59:27 deraadt Exp $ */ +/* $OpenBSD: pl_6.c,v 1.5 2015/12/31 16:44:22 mestre Exp $ */ /* $NetBSD: pl_6.c,v 1.3 1995/04/22 10:37:15 cgd Exp $ */ /* @@ -30,6 +30,10 @@ * SUCH DAMAGE. */ +#include <signal.h> + +#include "extern.h" +#include "machdep.h" #include "player.h" void diff --git a/games/sail/pl_7.c b/games/sail/pl_7.c index aa8276955a8..789d3ec433d 100644 --- a/games/sail/pl_7.c +++ b/games/sail/pl_7.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pl_7.c,v 1.11 2015/09/27 05:09:01 guenther Exp $ */ +/* $OpenBSD: pl_7.c,v 1.12 2015/12/31 16:44:22 mestre Exp $ */ /* $NetBSD: pl_7.c,v 1.6 1995/04/22 10:37:17 cgd Exp $ */ /* @@ -30,11 +30,14 @@ * SUCH DAMAGE. */ -#include "player.h" -#include <stdarg.h> -#include <unistd.h> #include <err.h> +#include <signal.h> +#include <string.h> +#include <unistd.h> +#include "extern.h" +#include "machdep.h" +#include "player.h" /* * Display interface diff --git a/games/sail/pl_main.c b/games/sail/pl_main.c index c276ff4b5ad..ba67c1adf6e 100644 --- a/games/sail/pl_main.c +++ b/games/sail/pl_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pl_main.c,v 1.14 2015/08/22 14:47:41 deraadt Exp $ */ +/* $OpenBSD: pl_main.c,v 1.15 2015/12/31 16:44:22 mestre Exp $ */ /* $NetBSD: pl_main.c,v 1.5 1995/04/24 12:25:25 cgd Exp $ */ /* @@ -30,12 +30,15 @@ * SUCH DAMAGE. */ -#include "player.h" -#include <sys/types.h> -#include <sys/wait.h> +#include <err.h> +#include <signal.h> +#include <stdio.h> #include <stdlib.h> +#include <string.h> #include <unistd.h> -#include <err.h> + +#include "extern.h" +#include "player.h" /*ARGSUSED*/ void diff --git a/games/sail/player.h b/games/sail/player.h index cb2247a859b..29ce467ee5e 100644 --- a/games/sail/player.h +++ b/games/sail/player.h @@ -1,4 +1,4 @@ -/* $OpenBSD: player.h,v 1.7 2003/06/03 03:01:41 millert Exp $ */ +/* $OpenBSD: player.h,v 1.8 2015/12/31 16:44:22 mestre Exp $ */ /* $NetBSD: player.h,v 1.4 1995/04/22 10:37:22 cgd Exp $ */ /* @@ -33,7 +33,6 @@ */ #include <curses.h> -#include "extern.h" /* sizes and coordinates for the screen */ diff --git a/games/sail/sync.c b/games/sail/sync.c index 3ea91e4f5ab..7107bdd0698 100644 --- a/games/sail/sync.c +++ b/games/sail/sync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sync.c,v 1.12 2015/09/27 05:09:01 guenther Exp $ */ +/* $OpenBSD: sync.c,v 1.13 2015/12/31 16:44:22 mestre Exp $ */ /* $NetBSD: sync.c,v 1.9 1998/08/30 09:19:40 veego Exp $ */ /* @@ -30,17 +30,18 @@ * SUCH DAMAGE. */ -#include <sys/types.h> #include <sys/stat.h> -#include <fcntl.h> #include <errno.h> -#include <stdarg.h> +#include <signal.h> #include <stdlib.h> +#include <string.h> #include <unistd.h> -#include <time.h> + #include "extern.h" +#include "machdep.h" #include "pathnames.h" +#include "player.h" #define BUFSIZE 4096 |