Skip to content

Commit aac077f

Browse files
jwisejwise
jwise
authored and
jwise
committed
Rationalize inclusion of header files: cut down on `include everything
everywhere' a little (more to go), and as per KNF, local includes after system includes.
1 parent 62f0a92 commit aac077f

File tree

16 files changed

+61
-67
lines changed

16 files changed

+61
-67
lines changed

games/sail/assorted.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: assorted.c,v 1.11 2001/01/04 01:53:24 jwise Exp $ */
1+
/* $NetBSD: assorted.c,v 1.12 2001/01/04 03:21:16 jwise Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -38,14 +38,13 @@
3838
#if 0
3939
static char sccsid[] = "@(#)assorted.c 8.2 (Berkeley) 4/28/95";
4040
#else
41-
__RCSID("$NetBSD: assorted.c,v 1.11 2001/01/04 01:53:24 jwise Exp $");
41+
__RCSID("$NetBSD: assorted.c,v 1.12 2001/01/04 03:21:16 jwise Exp $");
4242
#endif
4343
#endif /* not lint */
4444

45-
#include "extern.h"
4645
#include <stdlib.h>
47-
#include <unistd.h>
4846
#include <err.h>
47+
#include "extern.h"
4948

5049
void table(int, int, int, struct ship *, struct ship *, int);
5150
void Cleansnag(struct ship *, struct ship *, int, int);

games/sail/dr_1.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: dr_1.c,v 1.13 2001/01/04 01:53:24 jwise Exp $ */
1+
/* $NetBSD: dr_1.c,v 1.14 2001/01/04 03:21:16 jwise Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -38,12 +38,14 @@
3838
#if 0
3939
static char sccsid[] = "@(#)dr_1.c 8.1 (Berkeley) 5/31/93";
4040
#else
41-
__RCSID("$NetBSD: dr_1.c,v 1.13 2001/01/04 01:53:24 jwise Exp $");
41+
__RCSID("$NetBSD: dr_1.c,v 1.14 2001/01/04 03:21:16 jwise Exp $");
4242
#endif
4343
#endif /* not lint */
4444

45-
#include "driver.h"
45+
#include <stdio.h>
4646
#include <stdlib.h>
47+
#include "extern.h"
48+
#include "driver.h"
4749

4850
void unfoul(void);
4951
void boardcomp(void);

games/sail/dr_2.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: dr_2.c,v 1.14 2001/01/04 01:53:24 jwise Exp $ */
1+
/* $NetBSD: dr_2.c,v 1.15 2001/01/04 03:21:17 jwise Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -38,12 +38,13 @@
3838
#if 0
3939
static char sccsid[] = "@(#)dr_2.c 8.1 (Berkeley) 5/31/93";
4040
#else
41-
__RCSID("$NetBSD: dr_2.c,v 1.14 2001/01/04 01:53:24 jwise Exp $");
41+
__RCSID("$NetBSD: dr_2.c,v 1.15 2001/01/04 03:21:17 jwise Exp $");
4242
#endif
4343
#endif /* not lint */
4444

45-
#include "driver.h"
4645
#include <stdlib.h>
46+
#include "extern.h"
47+
#include "driver.h"
4748

4849
#define couldwin(f,t) (f->specs->crew2 > t->specs->crew2 * 1.5)
4950

games/sail/dr_3.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: dr_3.c,v 1.10 2001/01/04 01:53:24 jwise Exp $ */
1+
/* $NetBSD: dr_3.c,v 1.11 2001/01/04 03:21:17 jwise Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -38,12 +38,13 @@
3838
#if 0
3939
static char sccsid[] = "@(#)dr_3.c 8.1 (Berkeley) 5/31/93";
4040
#else
41-
__RCSID("$NetBSD: dr_3.c,v 1.10 2001/01/04 01:53:24 jwise Exp $");
41+
__RCSID("$NetBSD: dr_3.c,v 1.11 2001/01/04 03:21:17 jwise Exp $");
4242
#endif
4343
#endif /* not lint */
4444

45-
#include "driver.h"
4645
#include <stdlib.h>
46+
#include "extern.h"
47+
#include "driver.h"
4748

4849
void moveall(void);
4950
static int stillmoving(int);

games/sail/dr_4.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: dr_4.c,v 1.10 2001/01/04 01:53:24 jwise Exp $ */
1+
/* $NetBSD: dr_4.c,v 1.11 2001/01/04 03:21:17 jwise Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -38,12 +38,12 @@
3838
#if 0
3939
static char sccsid[] = "@(#)dr_4.c 8.2 (Berkeley) 4/28/95";
4040
#else
41-
__RCSID("$NetBSD: dr_4.c,v 1.10 2001/01/04 01:53:24 jwise Exp $");
41+
__RCSID("$NetBSD: dr_4.c,v 1.11 2001/01/04 03:21:17 jwise Exp $");
4242
#endif
4343
#endif /* not lint */
4444

45-
#include "extern.h"
4645
#include <stdlib.h>
46+
#include "extern.h"
4747

4848
void ungrap(struct ship *, struct ship *);
4949
void grap(struct ship *, struct ship *);

games/sail/dr_main.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: dr_main.c,v 1.8 2001/01/04 01:53:24 jwise Exp $ */
1+
/* $NetBSD: dr_main.c,v 1.9 2001/01/04 03:21:17 jwise Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -38,13 +38,15 @@
3838
#if 0
3939
static char sccsid[] = "@(#)dr_main.c 8.2 (Berkeley) 4/16/94";
4040
#else
41-
__RCSID("$NetBSD: dr_main.c,v 1.8 2001/01/04 01:53:24 jwise Exp $");
41+
__RCSID("$NetBSD: dr_main.c,v 1.9 2001/01/04 03:21:17 jwise Exp $");
4242
#endif
4343
#endif /* not lint */
4444

45-
#include "driver.h"
45+
#include <stdio.h>
4646
#include <stdlib.h>
4747
#include <unistd.h>
48+
#include "extern.h"
49+
#include "driver.h"
4850

4951
int dr_main(void);
5052

games/sail/driver.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: driver.h,v 1.6 1999/09/08 21:17:58 jsm Exp $ */
1+
/* $NetBSD: driver.h,v 1.7 2001/01/04 03:21:17 jwise Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -35,6 +35,4 @@
3535
* @(#)driver.h 8.2 (Berkeley) 5/3/95
3636
*/
3737

38-
#include "extern.h"
39-
4038
extern const int dtab[];

games/sail/lo_main.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: lo_main.c,v 1.8 2001/01/01 21:57:38 jwise Exp $ */
1+
/* $NetBSD: lo_main.c,v 1.9 2001/01/04 03:21:17 jwise Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
3838
#if 0
3939
static char sccsid[] = "@(#)lo_main.c 8.2 (Berkeley) 4/28/95";
4040
#else
41-
__RCSID("$NetBSD: lo_main.c,v 1.8 2001/01/01 21:57:38 jwise Exp $");
41+
__RCSID("$NetBSD: lo_main.c,v 1.9 2001/01/04 03:21:17 jwise Exp $");
4242
#endif
4343
#endif /* not lint */
4444

@@ -47,12 +47,14 @@ __RCSID("$NetBSD: lo_main.c,v 1.8 2001/01/01 21:57:38 jwise Exp $");
4747
*
4848
* -l force a long listing (print out real usernames)
4949
*/
50-
#include <sys/types.h>
51-
#include <stdlib.h>
50+
51+
#include <stdio.h>
5252
#include <pwd.h>
5353
#include "extern.h"
5454
#include "pathnames.h"
5555

56+
int lo_main(void);
57+
5658
const char *const title[] = {
5759
"Admiral", "Commodore", "Captain", "Captain",
5860
"Captain", "Captain", "Captain", "Commander",

games/sail/main.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: main.c,v 1.17 2001/01/04 01:56:28 jwise Exp $ */
1+
/* $NetBSD: main.c,v 1.18 2001/01/04 03:21:17 jwise Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -43,15 +43,15 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
4343
#if 0
4444
static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 4/28/95";
4545
#else
46-
__RCSID("$NetBSD: main.c,v 1.17 2001/01/04 01:56:28 jwise Exp $");
46+
__RCSID("$NetBSD: main.c,v 1.18 2001/01/04 03:21:17 jwise Exp $");
4747
#endif
4848
#endif /* not lint */
4949

50-
#include "extern.h"
5150
#include <fcntl.h>
52-
#include <unistd.h>
51+
#include <stdio.h>
5352
#include <stdlib.h>
54-
#include <string.h>
53+
#include <unistd.h>
54+
#include "extern.h"
5555

5656
int
5757
main(int argc, char **argv)

games/sail/misc.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: misc.c,v 1.8 2001/01/04 02:43:32 jwise Exp $ */
1+
/* $NetBSD: misc.c,v 1.9 2001/01/04 03:21:17 jwise Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -38,12 +38,11 @@
3838
#if 0
3939
static char sccsid[] = "@(#)misc.c 8.2 (Berkeley) 4/28/95";
4040
#else
41-
__RCSID("$NetBSD: misc.c,v 1.8 2001/01/04 02:43:32 jwise Exp $");
41+
__RCSID("$NetBSD: misc.c,v 1.9 2001/01/04 03:21:17 jwise Exp $");
4242
#endif
4343
#endif /* not lint */
4444

45-
#include <fcntl.h>
46-
#include <stdlib.h>
45+
#include <stdio.h>
4746
#include <unistd.h>
4847
#include "extern.h"
4948
#include "pathnames.h"

games/sail/pl_1.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: pl_1.c,v 1.10 2001/01/04 02:43:32 jwise Exp $ */
1+
/* $NetBSD: pl_1.c,v 1.11 2001/01/04 03:21:17 jwise Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -38,15 +38,15 @@
3838
#if 0
3939
static char sccsid[] = "@(#)pl_1.c 8.1 (Berkeley) 5/31/93";
4040
#else
41-
__RCSID("$NetBSD: pl_1.c,v 1.10 2001/01/04 02:43:32 jwise Exp $");
41+
__RCSID("$NetBSD: pl_1.c,v 1.11 2001/01/04 03:21:17 jwise Exp $");
4242
#endif
4343
#endif /* not lint */
4444

45-
#include "player.h"
4645
#include <sys/types.h>
4746
#include <sys/wait.h>
48-
#include <stdlib.h>
47+
#include <stdio.h>
4948
#include <unistd.h>
49+
#include "player.h"
5050

5151
void leave(int);
5252
void choke(int);

games/sail/pl_3.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: pl_3.c,v 1.11 2001/01/04 02:43:32 jwise Exp $ */
1+
/* $NetBSD: pl_3.c,v 1.12 2001/01/04 03:21:17 jwise Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -38,12 +38,12 @@
3838
#if 0
3939
static char sccsid[] = "@(#)pl_3.c 8.1 (Berkeley) 5/31/93";
4040
#else
41-
__RCSID("$NetBSD: pl_3.c,v 1.11 2001/01/04 02:43:32 jwise Exp $");
41+
__RCSID("$NetBSD: pl_3.c,v 1.12 2001/01/04 03:21:17 jwise Exp $");
4242
#endif
4343
#endif /* not lint */
4444

45-
#include "player.h"
4645
#include <stdlib.h>
46+
#include "player.h"
4747

4848
void acceptcombat(void);
4949
void grapungrap(void);

games/sail/pl_5.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: pl_5.c,v 1.9 2001/01/04 02:43:32 jwise Exp $ */
1+
/* $NetBSD: pl_5.c,v 1.10 2001/01/04 03:21:17 jwise Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -38,10 +38,11 @@
3838
#if 0
3939
static char sccsid[] = "@(#)pl_5.c 8.1 (Berkeley) 5/31/93";
4040
#else
41-
__RCSID("$NetBSD: pl_5.c,v 1.9 2001/01/04 02:43:32 jwise Exp $");
41+
__RCSID("$NetBSD: pl_5.c,v 1.10 2001/01/04 03:21:17 jwise Exp $");
4242
#endif
4343
#endif /* not lint */
4444

45+
#include <stdio.h>
4546
#include "player.h"
4647

4748
#define turnfirst(x) (*x == 'r' || *x == 'l')

games/sail/pl_7.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: pl_7.c,v 1.17 2001/01/04 02:43:33 jwise Exp $ */
1+
/* $NetBSD: pl_7.c,v 1.18 2001/01/04 03:21:17 jwise Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -38,19 +38,14 @@
3838
#if 0
3939
static char sccsid[] = "@(#)pl_7.c 8.1 (Berkeley) 5/31/93";
4040
#else
41-
__RCSID("$NetBSD: pl_7.c,v 1.17 2001/01/04 02:43:33 jwise Exp $");
41+
__RCSID("$NetBSD: pl_7.c,v 1.18 2001/01/04 03:21:17 jwise Exp $");
4242
#endif
4343
#endif /* not lint */
4444

45-
#include <sys/ttydefaults.h>
46-
#include "player.h"
47-
#ifdef __STDC__
4845
#include <stdarg.h>
49-
#else
50-
#include <varargs.h>
51-
#endif
52-
#include <stdlib.h>
46+
#include <stdio.h>
5347
#include <unistd.h>
48+
#include "player.h"
5449

5550
void initscreen(void);
5651
void cleanupscreen(void);

games/sail/pl_main.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: pl_main.c,v 1.11 2001/01/04 02:43:33 jwise Exp $ */
1+
/* $NetBSD: pl_main.c,v 1.12 2001/01/04 03:21:17 jwise Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -38,15 +38,14 @@
3838
#if 0
3939
static char sccsid[] = "@(#)pl_main.c 8.1 (Berkeley) 5/31/93";
4040
#else
41-
__RCSID("$NetBSD: pl_main.c,v 1.11 2001/01/04 02:43:33 jwise Exp $");
41+
__RCSID("$NetBSD: pl_main.c,v 1.12 2001/01/04 03:21:17 jwise Exp $");
4242
#endif
4343
#endif /* not lint */
4444

45-
#include "player.h"
46-
#include <sys/types.h>
47-
#include <sys/wait.h>
45+
#include <stdio.h>
4846
#include <stdlib.h>
4947
#include <unistd.h>
48+
#include "player.h"
5049

5150
int pl_main(void);
5251
static void initialize(void);

games/sail/sync.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: sync.c,v 1.16 2001/01/04 02:43:33 jwise Exp $ */
1+
/* $NetBSD: sync.c,v 1.17 2001/01/04 03:21:17 jwise Exp $ */
22

33
/*
44
* Copyright (c) 1983, 1993
@@ -38,22 +38,17 @@
3838
#if 0
3939
static char sccsid[] = "@(#)sync.c 8.2 (Berkeley) 4/28/95";
4040
#else
41-
__RCSID("$NetBSD: sync.c,v 1.16 2001/01/04 02:43:33 jwise Exp $");
41+
__RCSID("$NetBSD: sync.c,v 1.17 2001/01/04 03:21:17 jwise Exp $");
4242
#endif
4343
#endif /* not lint */
4444

4545
#include <fcntl.h>
4646
#include <errno.h>
47-
#ifdef __STDC__
4847
#include <stdarg.h>
49-
#else
50-
#include <varargs.h>
51-
#endif
48+
#include <stdio.h>
5249
#include <stdlib.h>
53-
#include <unistd.h>
54-
#include <sys/types.h>
55-
#include <sys/stat.h>
5650
#include <time.h>
51+
#include <unistd.h>
5752
#include "extern.h"
5853
#include "pathnames.h"
5954

0 commit comments

Comments
 (0)