--- bsdgames-2.17.orig/backgammon/backgammon/move.c +++ bsdgames-2.17/backgammon/backgammon/move.c @@ -152,6 +152,9 @@ trymove(0, 0); pickmove(); + if (d0) + swap; + /* print move */ writel(" and moves "); for (i = 0; i < mvlim; i++) { --- bsdgames-2.17.orig/backgammon/common_source/allow.c +++ bsdgames-2.17/backgammon/common_source/allow.c @@ -83,8 +83,10 @@ p[i--] = bar; if (p[i] != bar) continue; - else + else if (d0) break; + swap; + continue; } if (d0 || m == 4) break; --- bsdgames-2.17.orig/backgammon/teachgammon/ttext1.c +++ bsdgames-2.17/backgammon/teachgammon/ttext1.c @@ -94,7 +94,7 @@ "\n Although not indicated on the board, the players' homes are", "located just to the right of the board. A player's men are placed", "there when they are removed from the board. The board you just", - "saw was in it's initial position. All games start with the board", + "saw was in its initial position. All games start with the board", "looking like this. Notice that red's pieces are represented by the", "letter 'r' and white's pieces are represented by the letter 'w'.", "Also, a position may have zero or more pieces on it, e.g. posi-", --- bsdgames-2.17.orig/backgammon/teachgammon/ttext2.c +++ bsdgames-2.17/backgammon/teachgammon/ttext2.c @@ -65,7 +65,7 @@ "points in a row) are difficult to form, many points nestled close-", "ly together produce a formidable barrier. Also, while it is good", "to move back men forward, doing so lessens the opportunity for you", - "to hit men. Finally, remember that once the two player's have", + "to hit men. Finally, remember that once the two players have", "passed each other on the board, there is no chance of either team", "being hit, so the game reduces to a race off the board. Addi-", "tional hints on strategy are presented in the practice game.", --- bsdgames-2.17.orig/dm/dm.c +++ bsdgames-2.17/dm/dm.c @@ -134,19 +134,19 @@ while (fgets(lbuf, sizeof(lbuf), cfp)) switch (*lbuf) { case 'b': /* badtty */ - if (sscanf(lbuf, "%s%s", f1, f2) != 2 || + if (sscanf(lbuf, "%39s%39s", f1, f2) != 2 || strcasecmp(f1, "badtty")) break; c_tty(f2); break; case 'g': /* game */ - if (sscanf(lbuf, "%s%s%s%s%s", + if (sscanf(lbuf, "%39s%39s%39s%39s%39s", f1, f2, f3, f4, f5) != 5 || strcasecmp(f1, "game")) break; c_game(f2, f3, f4, f5); break; case 't': /* time */ - if (sscanf(lbuf, "%s%s%s%s", f1, f2, f3, f4) != 4 || + if (sscanf(lbuf, "%39s%39s%39s%39s", f1, f2, f3, f4) != 4 || strcasecmp(f1, "time")) break; c_day(f2, f3, f4); --- 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/games/bsdgames/hack + set -e; for f in data help hh rumors; do $(INSTALL_DATA) hack/$$f $(INSTALL_PREFIX)/usr/share/games/bsdgames/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 nor 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/games/bsdgames/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;