CVS commit: src/games/sail

2014-03-28 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Mar 28 17:53:47 UTC 2014

Modified Files:
src/games/sail: dr_2.c

Log Message:
temp is a pointer, and tempmax, not sizeof(temp), is the length of
the buffer that it points to.  Adjust a strlcat() call to suit.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/games/sail/dr_2.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/sail/dr_2.c
diff -u src/games/sail/dr_2.c:1.25 src/games/sail/dr_2.c:1.26
--- src/games/sail/dr_2.c:1.25	Sat Mar 14 22:52:52 2009
+++ src/games/sail/dr_2.c	Fri Mar 28 17:53:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dr_2.c,v 1.25 2009/03/14 22:52:52 dholland Exp $	*/
+/*	$NetBSD: dr_2.c,v 1.26 2014/03/28 17:53:47 apb Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)dr_2.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: dr_2.c,v 1.25 2009/03/14 22:52:52 dholland Exp $");
+__RCSID("$NetBSD: dr_2.c,v 1.26 2014/03/28 17:53:47 apb Exp $");
 #endif
 #endif /* not lint */
 
@@ -286,7 +286,7 @@ try(struct ship *f, struct ship *t,
 	}
 	if ((ma > 0 && ta > 0 && (n = str_end(temp)) != 'l' && n != 'r') ||
 	!strlen(temp)) {
-		strlcat(temp, "l", sizeof(temp));
+		strlcat(temp, "l", tempmax);
 		new = score(f, t, temp, tempmax, rakeme);
 		if (new > *high && (!rakeme ||
 (gunsbear(f, t) && !gunsbear(t, f {



CVS commit: src/games/sail

2011-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 25 16:18:29 UTC 2011

Modified Files:
src/games/sail: pl_7.c

Log Message:
add printf attributes.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/games/sail/pl_7.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/sail/pl_7.c
diff -u src/games/sail/pl_7.c:1.40 src/games/sail/pl_7.c:1.41
--- src/games/sail/pl_7.c:1.40	Fri Aug  6 05:14:40 2010
+++ src/games/sail/pl_7.c	Thu Aug 25 12:18:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pl_7.c,v 1.40 2010/08/06 09:14:40 dholland Exp $	*/
+/*	$NetBSD: pl_7.c,v 1.41 2011/08/25 16:18:28 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)pl_7.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: pl_7.c,v 1.40 2010/08/06 09:14:40 dholland Exp $");
+__RCSID("$NetBSD: pl_7.c,v 1.41 2011/08/25 16:18:28 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -238,7 +238,7 @@
 /*
  * Likewise but a printf.
  */
-static void
+static void __attribute__((__format__(__printf__, 6, 7)))
 mvselprintw(int y, int x0, int item, int curitem,
 	size_t width, const char *fmt, ...)
 {
@@ -296,7 +296,7 @@
 /*
  * Complain briefly.
  */
-static void
+static void __attribute__((__format__(__printf__, 3, 4)))
 oops(int y, int x, const char *fmt, ...)
 {
 	int oy, ox;



CVS commit: src/games/sail

2011-08-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Aug 25 15:50:45 UTC 2011

Modified Files:
src/games/sail: Makefile

Log Message:
Uses non-literal format strings


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/games/sail/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/sail/Makefile
diff -u src/games/sail/Makefile:1.17 src/games/sail/Makefile:1.18
--- src/games/sail/Makefile:1.17	Sat Feb  6 23:45:26 2010
+++ src/games/sail/Makefile	Thu Aug 25 15:50:45 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.17 2010/02/06 23:45:26 he Exp $
+#	$NetBSD: Makefile,v 1.18 2011/08/25 15:50:45 joerg Exp $
 #	@(#)Makefile	8.1 (Berkeley) 5/31/93
 
 PROG=	sail
@@ -11,4 +11,7 @@
 HIDEGAME=hidegame
 SETGIDGAME=yes
 
+COPTS.pl_7.c+=	-Wno-format-nonliteral
+COPTS.sync.c+=	-Wno-format-nonliteral
+
 .include 



CVS commit: src/games/sail

2011-08-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 16 11:26:16 UTC 2011

Modified Files:
src/games/sail: assorted.c

Log Message:
avoid non-literal format string


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/games/sail/assorted.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/sail/assorted.c
diff -u src/games/sail/assorted.c:1.18 src/games/sail/assorted.c:1.19
--- src/games/sail/assorted.c:1.18	Mon May 23 19:02:07 2011
+++ src/games/sail/assorted.c	Tue Aug 16 07:26:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: assorted.c,v 1.18 2011/05/23 23:02:07 joerg Exp $	*/
+/*	$NetBSD: assorted.c,v 1.19 2011/08/16 11:26:16 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)assorted.c	8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: assorted.c,v 1.18 2011/05/23 23:02:07 joerg Exp $");
+__RCSID("$NetBSD: assorted.c,v 1.19 2011/08/16 11:26:16 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -152,25 +152,25 @@
 		send_rigg(on, rigg[0], rigg[1], rigg[2], rigg[3]);
 	switch (shot) {
 	case L_ROUND:
-		message = "firing round shot on $$";
+		message = "firing round";
 		break;
 	case L_GRAPE:
-		message = "firing grape shot on $$";
+		message = "firing grape";
 		break;
 	case L_CHAIN:
-		message = "firing chain shot on $$";
+		message = "firing chain";
 		break;
 	case L_DOUBLE:
-		message = "firing double shot on $$";
+		message = "firing double";
 		break;
 	case L_EXPLODE:
-		message = "exploding shot on $$";
+		message = "exploding";
 		break;
 	default:
 		errx(1, "Unknown shot type %d", shot);
 
 	}
-	makesignal(from, message, on);
+	makesignal(from, "%s shot on $$", on, message);
 	if (roll == 6 && rig) {
 		switch(Rhit) {
 		case 0:



CVS commit: src/games/sail

2011-05-23 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon May 23 23:02:07 UTC 2011

Modified Files:
src/games/sail: assorted.c

Log Message:
Don't use variables as format string.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/games/sail/assorted.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/sail/assorted.c
diff -u src/games/sail/assorted.c:1.17 src/games/sail/assorted.c:1.18
--- src/games/sail/assorted.c:1.17	Sat Mar 14 22:52:52 2009
+++ src/games/sail/assorted.c	Mon May 23 23:02:07 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: assorted.c,v 1.17 2009/03/14 22:52:52 dholland Exp $	*/
+/*	$NetBSD: assorted.c,v 1.18 2011/05/23 23:02:07 joerg Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)assorted.c	8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: assorted.c,v 1.17 2009/03/14 22:52:52 dholland Exp $");
+__RCSID("$NetBSD: assorted.c,v 1.18 2011/05/23 23:02:07 joerg Exp $");
 #endif
 #endif /* not lint */
 
@@ -197,7 +197,7 @@
 		default:
 			errx(1, "Bad Rhit = %d", Rhit);
 		}
-		makemsg(on, message);
+		makemsg(on, "%s", message);
 	} else if (roll == 6) {
 		switch (Hhit) {
 		case 0:
@@ -225,7 +225,7 @@
 		default:
 			errx(1, "Bad Hhit = %d", Hhit);
 		}
-		makemsg(on, message);
+		makemsg(on, "%s", message);
 	}
 	/*
 	if (Chit > 1 && on->file->readyL & R_INITIAL &&



CVS commit: src/games/sail

2010-12-08 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Dec  8 17:06:35 UTC 2010

Modified Files:
src/games/sail: array.h
Removed Files:
src/games/sail: inlinedefs.h

Log Message:
Use __c99inline from sys/cdefs.h


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/games/sail/array.h
cvs rdiff -u -r1.1 -r0 src/games/sail/inlinedefs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/sail/array.h
diff -u src/games/sail/array.h:1.1 src/games/sail/array.h:1.2
--- src/games/sail/array.h:1.1	Sun Mar 15 03:33:56 2009
+++ src/games/sail/array.h	Wed Dec  8 17:06:35 2010
@@ -30,8 +30,6 @@
 #ifndef ARRAY_H
 #define ARRAY_H
 
-#include "inlinedefs.h"
-
 #define ARRAYS_CHECKED
 
 #ifdef ARRAYS_CHECKED
@@ -65,7 +63,7 @@
 // inlining for base operations
 
 #ifndef ARRAYINLINE
-#define ARRAYINLINE INLINE
+#define ARRAYINLINE __c99inline
 #endif
 
 ARRAYINLINE unsigned



CVS commit: src/games/sail

2010-08-06 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Aug  6 09:14:40 UTC 2010

Modified Files:
src/games/sail: dr_main.c extern.h globals.c lo_main.c main.c pl_7.c
pl_main.c

Log Message:
Rework the game startup so it uses curses nicely. There are now menus
and stuff for picking scenarios and ships and all that.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/games/sail/dr_main.c
cvs rdiff -u -r1.35 -r1.36 src/games/sail/extern.h
cvs rdiff -u -r1.15 -r1.16 src/games/sail/globals.c
cvs rdiff -u -r1.18 -r1.19 src/games/sail/lo_main.c
cvs rdiff -u -r1.25 -r1.26 src/games/sail/main.c
cvs rdiff -u -r1.39 -r1.40 src/games/sail/pl_7.c
cvs rdiff -u -r1.26 -r1.27 src/games/sail/pl_main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/sail/dr_main.c
diff -u src/games/sail/dr_main.c:1.14 src/games/sail/dr_main.c:1.15
--- src/games/sail/dr_main.c:1.14	Sat Mar 14 19:36:42 2009
+++ src/games/sail/dr_main.c	Fri Aug  6 09:14:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: dr_main.c,v 1.14 2009/03/14 19:36:42 dholland Exp $	*/
+/*	$NetBSD: dr_main.c,v 1.15 2010/08/06 09:14:40 dholland Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,17 +34,22 @@
 #if 0
 static char sccsid[] = "@(#)dr_main.c	8.2 (Berkeley) 4/16/94";
 #else
-__RCSID("$NetBSD: dr_main.c,v 1.14 2009/03/14 19:36:42 dholland Exp $");
+__RCSID("$NetBSD: dr_main.c,v 1.15 2010/08/06 09:14:40 dholland Exp $");
 #endif
 #endif /* not lint */
 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include "extern.h"
 #include "driver.h"
+#include "player.h" /* XXX for LEAVE_FORK */
+#include "restart.h"
+
+static int driver_wait_fd = -1;
 
 int
 dr_main(void)
@@ -54,23 +59,28 @@
 	int nat[NNATION];
 	int value = 0;
 
+	/*
+	 * XXX need a way to print diagnostics back to the player
+	 * process instead of stomping on the curses screen.
+	 */
+
 	signal(SIGINT, SIG_IGN);
 	signal(SIGQUIT, SIG_IGN);
 	signal(SIGTSTP, SIG_IGN);
 	if (game < 0 || game >= NSCENE) {
-		errx(1, "driver: Bad game number %d", game);
+		errx(1, "\ndriver: Bad game number %d", game);
 	}
 	cc = &scene[game];
 	ls = SHIP(cc->vessels);
 	if (sync_open() < 0) {
-		err(1, "driver: syncfile");
+		err(1, "\ndriver: syncfile");
 	}
 	for (n = 0; n < NNATION; n++)
 		nat[n] = 0;
 	foreachship(sp) {
 		if (sp->file == NULL &&
 		(sp->file = calloc(1, sizeof (struct File))) == NULL) {
-			fprintf(stderr, "DRIVER: Out of memory.\n");
+			fprintf(stderr, "\nDRIVER: Out of memory.\n");
 			exit(1);
 		}
 		sp->file->index = sp - SHIP(0);
@@ -86,6 +96,12 @@
 	windspeed = cc->windspeed;
 	winddir = cc->winddir;
 	people = 0;
+
+	/* report back to the player process that we've started */
+	if (driver_wait_fd >= 0) {
+		close(driver_wait_fd);
+	}
+
 	for (;;) {
 		sleep(7);
 		if (Sync() < 0) {
@@ -112,3 +128,35 @@
 	sync_close(1);
 	return value;
 }
+
+void
+startdriver(void)
+{
+	int fds[2];
+	char c;
+
+	if (pipe(fds)) {
+		warn("pipe");
+		leave(LEAVE_FORK);
+		return;
+	}
+
+	switch (fork()) {
+	case 0:
+		close(fds[0]);
+		driver_wait_fd = fds[1];
+		longjmp(restart, MODE_DRIVER);
+		/*NOTREACHED*/
+	case -1:
+		warn("fork");
+		close(fds[0]);
+		close(fds[1]);
+		leave(LEAVE_FORK);
+		break;
+	default:
+		hasdriver++;
+		close(fds[1]);
+		read(fds[0], &c, 1);
+		close(fds[0]);
+	}
+}

Index: src/games/sail/extern.h
diff -u src/games/sail/extern.h:1.35 src/games/sail/extern.h:1.36
--- src/games/sail/extern.h:1.35	Wed Aug 12 09:05:08 2009
+++ src/games/sail/extern.h	Fri Aug  6 09:14:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: extern.h,v 1.35 2009/08/12 09:05:08 dholland Exp $ */
+/*	$NetBSD: extern.h,v 1.36 2010/08/06 09:14:40 dholland Exp $ */
 
 /*
  * Copyright (c) 1983, 1993
@@ -43,13 +43,15 @@
 #define MODE_LOGGER	3
 
 	/* command line flags */
-extern int randomize;			/* -x, give first available ship */
-extern int longfmt;			/* -l, print score in long format */
-extern int nobells;			/* -b, don't ring bell before Signal */
+extern bool randomize;			/* -x, give first available ship */
+extern bool longfmt;			/* -l, print score in long format */
+extern bool nobells;			/* -b, don't ring bell before Signal */
 
-	/* other initial modes */
+	/* other initial data */
 extern gid_t gid;
 extern gid_t egid;
+#define MAXNAMESIZE	20
+extern char myname[MAXNAMESIZE];
 
 #define dieroll()		((random()) % 6 + 1)
 #define sqr(a)		((a) * (a))
@@ -103,7 +105,7 @@
 
 #define NLOG 10
 struct logs {
-	char l_name[20];
+	char l_name[MAXNAMESIZE];
 	int l_uid;
 	int l_shipnum;
 	int l_gamenum;
@@ -121,7 +123,7 @@
 	short sn_turn;
 };
 
-#define NSCENE	nscene
+#define NSCENE	/*nscene*/ 32
 #define NSHIP	10
 #define NBP	3
 
@@ -137,7 +139,7 @@
 
 struct File {
 	int index;
-	char captain[20];		/* 0 */
+	char captain[MAXNAMESIZE];	/* 0 */
 	short points;			/* 20 */
 	unsigned char loadL;		/* 22 */
 	unsigned char loadR;		/* 24 */
@@ -185,7 +187,7 @@
 	const char

CVS commit: src/games/sail

2010-08-05 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Aug  6 03:10:27 UTC 2010

Modified Files:
src/games/sail: pl_7.c

Log Message:
Don't define esc-[ as a custom key sequence because it steps on vt
function keys.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/games/sail/pl_7.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/sail/pl_7.c
diff -u src/games/sail/pl_7.c:1.38 src/games/sail/pl_7.c:1.39
--- src/games/sail/pl_7.c:1.38	Wed Aug 12 09:05:08 2009
+++ src/games/sail/pl_7.c	Fri Aug  6 03:10:26 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pl_7.c,v 1.38 2009/08/12 09:05:08 dholland Exp $	*/
+/*	$NetBSD: pl_7.c,v 1.39 2010/08/06 03:10:26 dholland Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)pl_7.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: pl_7.c,v 1.38 2009/08/12 09:05:08 dholland Exp $");
+__RCSID("$NetBSD: pl_7.c,v 1.39 2010/08/06 03:10:26 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -152,7 +152,9 @@
 	 * Define esc-x keys
 	 */
 	for (ch = 0; ch < 127; ch++) {
-		define_esc_key(ch);
+		if (ch != '[') {
+			define_esc_key(ch);
+		}
 	}
 
 	done_curses++;



CVS commit: src/games/sail

2010-01-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Jan 17 22:56:32 UTC 2010

Modified Files:
src/games/sail: lo_main.c

Log Message:
Close file when finished with it. Found by cppcheck.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/games/sail/lo_main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/sail/lo_main.c
diff -u src/games/sail/lo_main.c:1.17 src/games/sail/lo_main.c:1.18
--- src/games/sail/lo_main.c:1.17	Wed Aug 12 09:05:08 2009
+++ src/games/sail/lo_main.c	Sun Jan 17 22:56:32 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: lo_main.c,v 1.17 2009/08/12 09:05:08 dholland Exp $	*/
+/*	$NetBSD: lo_main.c,v 1.18 2010/01/17 22:56:32 wiz Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)lo_main.c	8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: lo_main.c,v 1.17 2009/08/12 09:05:08 dholland Exp $");
+__RCSID("$NetBSD: lo_main.c,v 1.18 2010/01/17 22:56:32 wiz Exp $");
 #endif
 #endif /* not lint */
 
@@ -92,6 +92,7 @@
 			title[n++], sbuf, ship->shipname, log.l_netpoints,
 			(float) log.l_netpoints / ship->specs->pts);
 	}
+	fclose(fp);
 	printf("\n%d people have played.\n", npeople);
 	return 0;
 }



CVS commit: src/games/sail

2009-08-12 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Aug 12 09:05:08 UTC 2009

Modified Files:
src/games/sail: extern.h globals.c lo_main.c pl_7.c player.h

Log Message:
sprinkle static


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/games/sail/extern.h
cvs rdiff -u -r1.14 -r1.15 src/games/sail/globals.c
cvs rdiff -u -r1.16 -r1.17 src/games/sail/lo_main.c
cvs rdiff -u -r1.37 -r1.38 src/games/sail/pl_7.c
cvs rdiff -u -r1.12 -r1.13 src/games/sail/player.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/sail/extern.h
diff -u src/games/sail/extern.h:1.34 src/games/sail/extern.h:1.35
--- src/games/sail/extern.h:1.34	Sun Mar 15 03:33:56 2009
+++ src/games/sail/extern.h	Wed Aug 12 09:05:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: extern.h,v 1.34 2009/03/15 03:33:56 dholland Exp $ */
+/*	$NetBSD: extern.h,v 1.35 2009/08/12 09:05:08 dholland Exp $ */
 
 /*
  * Copyright (c) 1983, 1993
@@ -209,7 +209,6 @@
 	int rig4;
 	short pts;
 };
-extern struct shipspecs specs[];
 
 extern struct scenario *cc;		/* the current scenario */
 extern struct ship *ls;		/* &cc->ship[cc->vessels] */
@@ -343,7 +342,6 @@
 	 __attribute__((__format__(__printf__,1,3)));
 void Msg(const char *, ...)
 	 __attribute__((__format__(__printf__,1,2)));
-void prompt(const char *, struct ship *);
 int sgetch(const char *, struct ship *, int);
 void sgetstr(const char *, char *, int);
 void centerview(void);

Index: src/games/sail/globals.c
diff -u src/games/sail/globals.c:1.14 src/games/sail/globals.c:1.15
--- src/games/sail/globals.c:1.14	Sat Mar 14 19:35:13 2009
+++ src/games/sail/globals.c	Wed Aug 12 09:05:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: globals.c,v 1.14 2009/03/14 19:35:13 dholland Exp $	*/
+/*	$NetBSD: globals.c,v 1.15 2009/08/12 09:05:08 dholland Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)globals.c	8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: globals.c,v 1.14 2009/03/14 19:35:13 dholland Exp $");
+__RCSID("$NetBSD: globals.c,v 1.15 2009/08/12 09:05:08 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -42,6 +42,8 @@
 #include 
 #include "extern.h"
 
+static struct shipspecs specs[];
+
 struct scenario scene[] = {
 	/*
 	 * int winddir;
@@ -313,7 +315,7 @@
 };
 int nscene = sizeof scene / sizeof (struct scenario);
 
-struct shipspecs specs[] = {
+static struct shipspecs specs[] = {
 /*  bs fs ta guns   hull  crew1   crew3gunR  carR   rig2  rig4 pts */
 /* class   qual   crew2gunL   carL   rig1  rig3*/
 /*00*/{	4, 7, 3,  19, 5,  5, 4,  2,  2,  2,  2,  2, 0, 0,  4, 4, 4,  4,  7 },

Index: src/games/sail/lo_main.c
diff -u src/games/sail/lo_main.c:1.16 src/games/sail/lo_main.c:1.17
--- src/games/sail/lo_main.c:1.16	Sat Mar 14 20:14:56 2009
+++ src/games/sail/lo_main.c	Wed Aug 12 09:05:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: lo_main.c,v 1.16 2009/03/14 20:14:56 dholland Exp $	*/
+/*	$NetBSD: lo_main.c,v 1.17 2009/08/12 09:05:08 dholland Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)lo_main.c	8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: lo_main.c,v 1.16 2009/03/14 20:14:56 dholland Exp $");
+__RCSID("$NetBSD: lo_main.c,v 1.17 2009/08/12 09:05:08 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -51,7 +51,7 @@
 #include "extern.h"
 #include "pathnames.h"
 
-const char *const title[] = {
+static const char *const title[] = {
 	"Admiral", "Commodore", "Captain", "Captain",
 	"Captain", "Captain", "Captain", "Commander",
 	"Commander", "Lieutenant"

Index: src/games/sail/pl_7.c
diff -u src/games/sail/pl_7.c:1.37 src/games/sail/pl_7.c:1.38
--- src/games/sail/pl_7.c:1.37	Sun Mar 15 22:19:23 2009
+++ src/games/sail/pl_7.c	Wed Aug 12 09:05:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pl_7.c,v 1.37 2009/03/15 22:19:23 dholland Exp $	*/
+/*	$NetBSD: pl_7.c,v 1.38 2009/08/12 09:05:08 dholland Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)pl_7.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: pl_7.c,v 1.37 2009/03/15 22:19:23 dholland Exp $");
+__RCSID("$NetBSD: pl_7.c,v 1.38 2009/08/12 09:05:08 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -86,7 +86,7 @@
 int done_curses;
 int loaded, fired, changed, repaired;
 int dont_adjust;
-int viewrow, viewcol;
+static int viewrow, viewcol;
 char movebuf[sizeof SHIP(0)->file->movebuf];
 int player;
 struct ship *ms;		/* memorial structure, &cc->ship[player] */
@@ -291,7 +291,7 @@
 	scrollarea_add(buf);
 }
 
-void
+static void
 prompt(const char *p, struct ship *ship)
 {
 	static char buf[BUFSIZ];

Index: src/games/sail/player.h
diff -u src/games/sail/player.h:1.12 src/games/sail/player.h:1.13
--- src/games/sail/player.h:1.12	Sat Mar 14 20:10:43 2009
+++ src/games/sail/player.h	Wed Aug 12 09:05:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: player.h,v 1.12 2009/03/14 20:10:43 dholland Exp