--- bsdgames-2.17.orig/fish/Makefrag
+++ bsdgames-2.17/fish/Makefrag
@@ -31,7 +31,9 @@
fish_all: fish/fish fish/fish.instr fish/fish.6
fish_install: fish_all
- $(INSTALL_BINARY) fish/fish $(INSTALL_PREFIX)$(GAMESDIR)/fish
- $(HIDE_GAME) fish
+ $(INSTALL_BINARY) fish/fish $(INSTALL_PREFIX)$(GAMESDIR)/go-fish
+ $(HIDE_GAME) go-fish
$(INSTALL_DATA) fish/fish.instr $(INSTALL_PREFIX)$(FISH_INSTRFILE)
- $(INSTALL_MANUAL) fish/fish.6
+ ln -sf fish.6 fish/go-fish.6 # hack for rename
+ $(INSTALL_MANUAL) fish/go-fish.6
+ rm -f fish/go-fish.6
--- bsdgames-2.17.orig/fish/fish.6
+++ bsdgames-2.17/fish/fish.6
@@ -30,10 +30,10 @@
.\" @(#)fish.6 8.1 (Berkeley) 5/31/93
.\"
.Dd May 31, 1993
-.Dt FISH 6
+.Dt GO-FISH 6
.Os
.Sh NAME
-.Nm fish
+.Nm go-fish
.Nd play
.Dq Go Fish
.Sh SYNOPSIS
--- bsdgames-2.17.orig/gomoku/gomoku.6
+++ bsdgames-2.17/gomoku/gomoku.6
@@ -45,7 +45,7 @@
.Op Ar inputfile
.Sh DESCRIPTION
.Nm
-is a two player game were the object is to get 5 in a row horizontally,
+is a two player game where the object is to get 5 in a row horizontally,
vertically or diagonally on a 19 by 19 grid.
By convention, black always moves first.
With no arguments,
--- bsdgames-2.17.orig/hack/Makefrag
+++ bsdgames-2.17/hack/Makefrag
@@ -56,7 +56,8 @@
$(INSTALL_SCORE_GAME) hack/hack $(INSTALL_PREFIX)$(GAMESDIR)/hack
$(HIDE_GAME) hack
$(INSTALL_HACK_DIR) $(INSTALL_PREFIX)$(HACK_DIR)
- set -e; for f in data help hh rumors; do $(INSTALL_DATA) hack/$$f $(INSTALL_PREFIX)$(HACK_DIR)/$$f; done
+ install -d $(INSTALL_PREFIX)/usr/share/bsd-games/hack
+ set -e; for f in data help hh rumors; do $(INSTALL_DATA) hack/$$f $(INSTALL_PREFIX)/usr/share/bsd-games/hack/$$f; done
$(INSTALL_SCORE_FILE) $(HACK_DIR)/perm
$(INSTALL_SCORE_FILE) $(HACK_DIR)/record
$(INSTALL_MANUAL) hack/hack.6
--- bsdgames-2.17.orig/hack/config.h
+++ bsdgames-2.17/hack/config.h
@@ -88,13 +88,18 @@
/* #define PYRAMID_BUG */ /* avoid a bug on the Pyramid */
/* #define NOWAITINCLUDE */ /* neither <wait.h> nor <sys/wait.h> exists */
-#define WIZARD "bruno" /* the person allowed to use the -D option */
+/*
+ * Debian mods: use root for WIZARD, and move files that are static to
+ * /usr/share/ -- JEH
+ */
+#define WIZARD "root" /* the person allowed to use the -D option */
+#define SHAREDIR "/usr/share/bsd-games/hack/"
#define RECORD "record"/* the file containing the list of topscorers */
#define NEWS "news" /* the file containing the latest hack news */
-#define HELP "help" /* the file containing a description of the commands */
-#define SHELP "hh" /* abbreviated form of the same */
-#define RUMORFILE "rumors" /* a file with fortune cookies */
-#define DATAFILE "data" /* a file giving the meaning of symbols used */
+#define HELP SHAREDIR "help" /* the file containing a description of the commands */
+#define SHELP SHAREDIR "hh" /* abbreviated form of the same */
+#define RUMORFILE SHAREDIR "rumors" /* a file with fortune cookies */
+#define DATAFILE SHAREDIR "data" /* a file giving the meaning of symbols used */
#define FMASK 0660 /* file creation mask */
#define HLOCK "perm" /* an empty file used for locking purposes */
#define LLOCK "safelock" /* link to previous */
--- bsdgames-2.17.orig/hunt/hunt/hunt.c
+++ bsdgames-2.17/hunt/hunt/hunt.c
@@ -394,7 +394,8 @@
vec_cnt = 0;
for (ip = ifp; ip; ip = ip->ifa_next)
- if ((ip->ifa_addr->sa_family == AF_INET) &&
+ if (ip->ifa_addr &&
+ (ip->ifa_addr->sa_family == AF_INET) &&
(ip->ifa_flags & IFF_BROADCAST))
vec_cnt++;
@@ -405,7 +406,8 @@
vec_cnt = 0;
for (ip = ifp; ip; ip = ip->ifa_next)
- if ((ip->ifa_addr->sa_family == AF_INET) &&
+ if (ip->ifa_addr &&
+ (ip->ifa_addr->sa_family == AF_INET) &&
(ip->ifa_flags & IFF_BROADCAST))
memcpy(&(*vector)[vec_cnt++], ip->ifa_broadaddr,
sizeof(struct sockaddr_in));
--- bsdgames-2.17.orig/sail/pl_main.c
+++ bsdgames-2.17/sail/pl_main.c
@@ -219,7 +219,7 @@
printf("\nInitial broadside %s (grape, chain, round, double): ",
n ? "right" : "left");
fflush(stdout);
- scanf("%s", buf);
+ scanf("%9s", buf);
switch (*buf) {
case 'g':
load = L_GRAPE;
--- bsdgames-2.17.orig/tetris/scores.c
+++ bsdgames-2.17/tetris/scores.c
@@ -335,7 +335,8 @@
continue;
}
}
- levelfound[sp->hs_level] = 1;
+ if (sp->hs_level < NLEVELS && sp->hs_level >= 0)
+ levelfound[sp->hs_level] = 1;
i++, sp++;
}
return (num > MAXHISCORES ? MAXHISCORES : num);
@@ -374,12 +375,14 @@
for (i = MINLEVEL; i < NLEVELS; i++)
levelfound[i] = 0;
for (i = 0, sp = scores; i < nscores; i++, sp++) {
- if (levelfound[sp->hs_level])
- sp->hs_time = 0;
- else {
- sp->hs_time = 1;
- levelfound[sp->hs_level] = 1;
- }
+ if (sp->hs_level < NLEVELS && sp->hs_level >= 0) {
+ if (levelfound[sp->hs_level])
+ sp->hs_time = 0;
+ else {
+ sp->hs_time = 1;
+ levelfound[sp->hs_level] = 1;
+ }
+ }
}
/*
@@ -433,7 +436,7 @@
continue;
}
sp = &hs[item];
- (void)sprintf(buf,
+ (void)snprintf(buf, sizeof(buf),
"%3d%c %6d %-11s (%6d on %d)",
item + offset, sp->hs_time ? '*' : ' ',
sp->hs_score * sp->hs_level,