debian/0000755000000000000000000000000011734036145007172 5ustar debian/source/0000755000000000000000000000000011722213251010462 5ustar debian/source/format0000644000000000000000000000001411722213251011670 0ustar 3.0 (quilt) debian/docs0000644000000000000000000000010311722213251010027 0ustar NEWS ChangeLog.0 TODO README SECURITY THANKS AUTHORS BUGS YEAR2000 debian/postrm0000644000000000000000000000201611722532630010435 0ustar #!/bin/sh set -e SCOREFILES=" /var/games/bsdgames/atc_score /var/games/bsdgames/battlestar.log /var/games/bsdgames/cfscores /var/games/bsdgames/criblog /var/games/bsdgames/robots_roll /var/games/bsdgames/saillog /var/games/bsdgames/snake.log /var/games/bsdgames/snakerawscores /var/games/bsdgames/tetris-bsd.scores /var/games/bsdgames/phantasia/characs /var/games/bsdgames/phantasia/gold /var/games/bsdgames/phantasia/lastdead /var/games/bsdgames/phantasia/mess /var/games/bsdgames/phantasia/motd /var/games/bsdgames/phantasia/scoreboard /var/games/bsdgames/phantasia/void /var/games/bsdgames/phantasia/monsters /var/games/bsdgames/hack/perm /var/games/bsdgames/hack/record" # Remove high score files on purge. if [ "$1" = "purge" ]; then rm -f $SCOREFILES rmdir /var/games/bsdgames/phantasia /var/games/bsdgames/sail \ /var/games/bsdgames /var/games 2>/dev/null || true rm -f /var/games/bsdgames/hack/save/* 2>/dev/null || true rmdir -p /var/games/bsdgames/hack/save 2>/dev/null || true fi #DEBHELPER# debian/watch0000644000000000000000000000011411722213251010207 0ustar version=2 ftp://sunsite.unc.edu/pub/Linux/games/bsd-games-([0-9]+.*).tar.gz debian/rules0000755000000000000000000000510511733371232010251 0ustar #!/usr/bin/make -f # Use all hardening features export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ override_dh_auto_build: # Set up wordlist cat /usr/share/dict/american-english /usr/share/dict/british-english | \ sort | uniq > temp-dictionary dh_auto_build override_dh_installdocs: dh_installdocs cp atc/BUGS debian/bsdgames/usr/share/doc/bsdgames/BUGS.atc cp hunt/README debian/bsdgames/usr/share/doc/bsdgames/README.hunt cp phantasia/README debian/bsdgames/usr/share/doc/bsdgames/README.phantasia cp boggle/README debian/bsdgames/usr/share/doc/bsdgames/README.boggle cp hack/Original_READ_ME debian/bsdgames/usr/share/doc/bsdgames/Original_READ_ME.hack cp hack/READ_ME debian/bsdgames/usr/share/doc/bsdgames/READ_ME.hack # Move phantasia's binary state files into /usr, they are copied # back to /var in the postinst. mv debian/bsdgames/var/games/bsdgames/phantasia/monsters \ debian/bsdgames/var/games/bsdgames/phantasia/void \ debian/bsdgames/usr/share/games/bsdgames/phantasia/ cat COPYING >> debian/bsdgames/usr/share/doc/bsdgames/copyright override_dh_fixperms: dh_fixperms chmod -R u+rw debian/bsdgames/usr/ # Games with score files need to be set up sgid games. chown root:games debian/bsdgames/usr/games/atc \ debian/bsdgames/usr/games/battlestar \ debian/bsdgames/usr/games/canfield \ debian/bsdgames/usr/games/cribbage \ debian/bsdgames/usr/games/robots \ debian/bsdgames/usr/games/snake \ debian/bsdgames/usr/games/tetris-bsd \ debian/bsdgames/usr/games/phantasia \ debian/bsdgames/usr/games/sail \ debian/bsdgames/usr/games/hack chmod g+s debian/bsdgames/usr/games/atc \ debian/bsdgames/usr/games/battlestar \ debian/bsdgames/usr/games/canfield \ debian/bsdgames/usr/games/cribbage \ debian/bsdgames/usr/games/robots \ debian/bsdgames/usr/games/snake \ debian/bsdgames/usr/games/tetris-bsd \ debian/bsdgames/usr/games/phantasia \ debian/bsdgames/usr/games/sail \ debian/bsdgames/usr/games/hack # The game directories need to be sgid too, and let's # remove all the zero byte score files in them. chown root:games debian/bsdgames/var/games/bsdgames/ \ debian/bsdgames/var/games/bsdgames/sail \ debian/bsdgames/var/games/bsdgames/phantasia \ debian/bsdgames/var/games/bsdgames/hack \ debian/bsdgames/var/games/bsdgames/hack/save chmod g+rws debian/bsdgames/var/games/bsdgames/ \ debian/bsdgames/var/games/bsdgames/sail \ debian/bsdgames/var/games/bsdgames/phantasia \ debian/bsdgames/var/games/bsdgames/hack \ debian/bsdgames/var/games/bsdgames/hack/save find debian/bsdgames/var/games/bsdgames -size 0 -exec rm {} \; debian/compat0000644000000000000000000000000211733371106010366 0ustar 9 debian/postinst0000644000000000000000000000370311722532630011000 0ustar #!/bin/sh set -e SCOREFILES=" /var/games/bsdgames/atc_score /var/games/bsdgames/battlestar.log /var/games/bsdgames/cfscores /var/games/bsdgames/criblog /var/games/bsdgames/robots_roll /var/games/bsdgames/saillog /var/games/bsdgames/snake.log /var/games/bsdgames/snakerawscores /var/games/bsdgames/tetris-bsd.scores /var/games/bsdgames/phantasia/characs /var/games/bsdgames/phantasia/gold /var/games/bsdgames/phantasia/lastdead /var/games/bsdgames/phantasia/mess /var/games/bsdgames/phantasia/motd /var/games/bsdgames/phantasia/scoreboard /var/games/bsdgames/phantasia/void /var/games/bsdgames/phantasia/monsters /var/games/bsdgames/hack/perm /var/games/bsdgames/hack/record" # Hack moved over from bsdgames-nonfree. if [ -d /var/games/bsdgames-nonfree ]; then for file in perm record; do if [ -e /var/games/bsdgames-nonfree/hack/$file ]; then mv -f /var/games/bsdgames-nonfree/hack/$file \ /var/games/bsdgames/hack/$file fi done cp -a -f /var/games/bsdgames-nonfree/hack/save/* \ /var/games/bsdgames/hack/save/ 2>/dev/null || true rm -f /var/games/bsdgames-nonfree/hack/save/* 2>/dev/null || true rmdir -p /var/games/bsdgames-nonfree/hack/save 2>/dev/null || true fi # These files cannot just be zero-byte files: if [ ! -e /var/games/bsdgames/phantasia/void ]; then cp /usr/share/games/bsdgames/phantasia/void \ /var/games/bsdgames/phantasia/void fi if [ ! -e /var/games/bsdgames/phantasia/monsters ] ; then cp /usr/share/games/bsdgames/phantasia/monsters \ /var/games/bsdgames/phantasia/monsters fi touch $SCOREFILES chown root:games $SCOREFILES chmod 664 $SCOREFILES # These files may not be world-readable as they have passwords # in them. chmod 660 /var/games/bsdgames/phantasia/characs # I have to make this directory here, because older version of this package # always deleted it in their postrm. Oops. mkdir -p /var/games/bsdgames/sail chown root:games /var/games/bsdgames/sail chmod g+rws /var/games/bsdgames/sail #DEBHELPER# debian/patches/0000755000000000000000000000000011734036104010614 5ustar debian/patches/Fix-typos-spotted-by-Lintian.patch0000644000000000000000000000171611734035054017233 0ustar From: Tobias Quathamer Date: Fri, 24 Feb 2012 14:29:11 +0100 Subject: Fix typos spotted by Lintian --- atc/update.c | 2 +- hack/hack.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/atc/update.c b/atc/update.c index 3a145e5..39bbf2a 100644 --- a/atc/update.c +++ b/atc/update.c @@ -153,7 +153,7 @@ update(dummy) } if (pp->altitude > 9) /* "this is impossible" */ - loser(pp, "exceded flight ceiling."); + loser(pp, "exceeded flight ceiling."); if (pp->altitude <= 0) { for (i = 0; i < sp->num_airports; i++) if (pp->xpos == sp->airport[i].x && diff --git a/hack/hack.c b/hack/hack.c index 05141af..6e5028e 100644 --- a/hack/hack.c +++ b/hack/hack.c @@ -527,7 +527,7 @@ pickup(int all) } lift_some: if (inv_cnt() >= 52) { - pline("Your knapsack cannot accomodate anymore items."); + pline("Your knapsack cannot accommodate anymore items."); break; } if (wt > -5) -- debian/patches/Unsorted-Debian-patches.patch0000644000000000000000000004033111734035054016251 0ustar From: Tobias Quathamer Date: Mon, 26 Mar 2012 10:07:17 +0200 Subject: Unsorted Debian patches --- adventure/crc.c | 4 ++- arithmetic/arithmetic.6 | 2 +- backgammon/backgammon/move.c | 3 ++ backgammon/common_source/allow.c | 4 ++- backgammon/teachgammon/ttext1.c | 2 +- backgammon/teachgammon/ttext2.c | 2 +- dab/gamescreen.h | 6 ++-- dm/dm.c | 6 ++-- fish/Makefrag | 8 ++++-- fish/fish.6 | 4 +- gomoku/gomoku.6 | 2 +- hack/Makefrag | 3 +- hack/config.h | 15 ++++++++---- hunt/hunt/hunt.6.in | 2 +- hunt/hunt/hunt.c | 6 +++- hunt/hunt/playit.c | 4 +- number/number.c | 47 +++++++++++++++++++++++++------------- sail/pl_main.c | 2 +- tests/number.-0.1 | 2 +- tetris/scores.c | 17 ++++++++----- trek/setup.c | 5 +++- 21 files changed, 92 insertions(+), 54 deletions(-) diff --git a/adventure/crc.c b/adventure/crc.c index 66504f1..c6ee5f1 100644 --- a/adventure/crc.c +++ b/adventure/crc.c @@ -42,6 +42,8 @@ __RCSID("$NetBSD: crc.c,v 1.8 2003/08/07 09:36:50 agc Exp $"); #endif #endif /* not lint */ +#include + #include "extern.h" const unsigned long crctab[] = { @@ -125,7 +127,7 @@ crc(ptr, nr) /* Process nr bytes at a time; ptr points to them */ while (nr > 0) for (p = ptr; nr--; ++p) { - if (!(i = crcval >> 24 ^ *p)) { + if (!(i = crcval >> (sizeof(crcval) * CHAR_BIT - 8) ^ *p)) { i = step++; if (step >= sizeof(crctab) / sizeof(crctab[0])) step = 0; diff --git a/arithmetic/arithmetic.6 b/arithmetic/arithmetic.6 index b8d4d8f..bc41bca 100644 --- a/arithmetic/arithmetic.6 +++ b/arithmetic/arithmetic.6 @@ -79,7 +79,7 @@ divide by or subtract will be between 0 and .Nm will not ask you to divide by 0.) The default -.I range +.It range is 10. .El .Pp diff --git a/backgammon/backgammon/move.c b/backgammon/backgammon/move.c index 9fd81f1..027cab5 100644 --- a/backgammon/backgammon/move.c +++ b/backgammon/backgammon/move.c @@ -152,6 +152,9 @@ move(okay) trymove(0, 0); pickmove(); + if (d0) + swap; + /* print move */ writel(" and moves "); for (i = 0; i < mvlim; i++) { diff --git a/backgammon/common_source/allow.c b/backgammon/common_source/allow.c index f6bae78..8189f07 100644 --- a/backgammon/common_source/allow.c +++ b/backgammon/common_source/allow.c @@ -83,8 +83,10 @@ movallow() p[i--] = bar; if (p[i] != bar) continue; - else + else if (d0) break; + swap; + continue; } if (d0 || m == 4) break; diff --git a/backgammon/teachgammon/ttext1.c b/backgammon/teachgammon/ttext1.c index 82db223..73ea6ee 100644 --- a/backgammon/teachgammon/ttext1.c +++ b/backgammon/teachgammon/ttext1.c @@ -94,7 +94,7 @@ const char *const intro2[] = { "\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-", diff --git a/backgammon/teachgammon/ttext2.c b/backgammon/teachgammon/ttext2.c index 5e827d7..eb9a083 100644 --- a/backgammon/teachgammon/ttext2.c +++ b/backgammon/teachgammon/ttext2.c @@ -65,7 +65,7 @@ const char *const stragy[] = { "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.", diff --git a/dab/gamescreen.h b/dab/gamescreen.h index ca90cb3..b3db2ea 100644 --- a/dab/gamescreen.h +++ b/dab/gamescreen.h @@ -70,9 +70,9 @@ class GAMESCREEN { virtual void redraw(void) = 0; // Refresh virtual int getinput(void) = 0; // Get user input virtual void bell(void) = 0; // Beep - virtual void score(size_t p, const PLAYER& p) = 0; // Post current score - virtual void games(size_t p, const PLAYER& p) = 0; // Post games won - virtual void total(size_t p, const PLAYER& p) = 0; // Post total score + virtual void score(size_t s, const PLAYER& p) = 0; // Post current score + virtual void games(size_t s, const PLAYER& p) = 0; // Post games won + virtual void total(size_t s, const PLAYER& p) = 0; // Post total score virtual void ties(const PLAYER& p) = 0; // Post tie games }; diff --git a/dm/dm.c b/dm/dm.c index c131904..16129d8 100644 --- a/dm/dm.c +++ b/dm/dm.c @@ -134,19 +134,19 @@ read_config() 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); diff --git a/fish/Makefrag b/fish/Makefrag index 1039af5..1fec493 100644 --- a/fish/Makefrag +++ b/fish/Makefrag @@ -31,7 +31,9 @@ fish_DIRS := $(GAMESDIR) $(MAN6DIR) $(shell dirname $(FISH_INSTRFILE)) 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 diff --git a/fish/fish.6 b/fish/fish.6 index 398c55f..46eef2b 100644 --- a/fish/fish.6 +++ b/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 diff --git a/gomoku/gomoku.6 b/gomoku/gomoku.6 index f78eb0e..024da85 100644 --- a/gomoku/gomoku.6 +++ b/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, diff --git a/hack/Makefrag b/hack/Makefrag index eabbd2a..5807ef0 100644 --- a/hack/Makefrag +++ b/hack/Makefrag @@ -56,7 +56,8 @@ hack_install: hack_all $(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 diff --git a/hack/config.h b/hack/config.h index ad3bbcf..03a8b02 100644 --- a/hack/config.h +++ b/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 */ diff --git a/hunt/hunt/hunt.6.in b/hunt/hunt/hunt.6.in index 406296e..22e45ec 100644 --- a/hunt/hunt/hunt.6.in +++ b/hunt/hunt/hunt.6.in @@ -387,7 +387,7 @@ how many of player's shots were ducked how many slime kills player had .It enemy how many enemies were killed -.tI friend +.It friend how many friends were killed (self and same team) .It deaths how many times player died diff --git a/hunt/hunt/hunt.c b/hunt/hunt/hunt.c index 11f4c44..28321bc 100644 --- a/hunt/hunt/hunt.c +++ b/hunt/hunt/hunt.c @@ -394,7 +394,8 @@ broadcast_vec(s, vector) 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 @@ broadcast_vec(s, vector) 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)); diff --git a/hunt/hunt/playit.c b/hunt/hunt/playit.c index 9acf86e..881a4e7 100644 --- a/hunt/hunt/playit.c +++ b/hunt/hunt/playit.c @@ -114,7 +114,7 @@ playit() bad_con(); /* NOTREACHED */ } - if (ntohl(version) != (unsigned long)HUNT_VERSION) { + if (ntohl(version) != (uint32_t)HUNT_VERSION) { bad_ver(); /* NOTREACHED */ } @@ -649,7 +649,7 @@ do_message() bad_con(); /* NOTREACHED */ } - if (ntohl(version) != (unsigned long)HUNT_VERSION) { + if (ntohl(version) != (uint32_t)HUNT_VERSION) { bad_ver(); /* NOTREACHED */ } diff --git a/number/number.c b/number/number.c index c7559e1..3086a86 100644 --- a/number/number.c +++ b/number/number.c @@ -78,9 +78,9 @@ static const char *const name1[] = { void convert(char *); int main(int, char *[]); -int number(const char *, int); -void pfract(int); -int unit(int, const char *); +int number(const char *, int, int *); +void pfract(int, int); +int unit(int, const char *, int *); void usage(void) __attribute__((__noreturn__)); int lflag; @@ -131,7 +131,7 @@ void convert(line) char *line; { - int flen, len, rval; + int flen, len, rval, singular; char *p, *fraction; flen = 0; @@ -174,7 +174,7 @@ badnum: errx(1, "illegal number: %s", line); --len; } - rval = len > 0 ? unit(len, line) : 0; + rval = len > 0 ? unit(len, line, &singular) : 0; if (fraction != NULL && flen != 0) for (p = fraction; *p != '\0'; ++p) if (*p != '0') { @@ -182,10 +182,10 @@ badnum: errx(1, "illegal number: %s", line); (void)printf("%sand%s", lflag ? " " : "", lflag ? " " : "\n"); - if (unit(flen, fraction)) { + if (unit(flen, fraction, &singular)) { if (lflag) (void)printf(" "); - pfract(flen); + pfract(flen, singular); rval = 1; } break; @@ -197,9 +197,10 @@ badnum: errx(1, "illegal number: %s", line); } int -unit(len, p) +unit(len, p, singular) int len; const char *p; + int *singular; { int off, rval; @@ -208,7 +209,7 @@ unit(len, p) if (len % 3) { off = len % 3; len -= off; - if (number(p, off)) { + if (number(p, off, singular)) { rval = 1; (void)printf(" %s%s", name3[len / 3], lflag ? " " : ".\n"); @@ -217,14 +218,16 @@ unit(len, p) } for (; len > 3; p += 3) { len -= 3; - if (number(p, 3)) { + if (number(p, 3, singular)) { rval = 1; (void)printf(" %s%s", name3[len / 3], lflag ? " " : ".\n"); } } } - if (number(p, len)) { + if (number(p, len, singular)) { + if (rval) + *singular = 0; if (!lflag) (void)printf(".\n"); rval = 1; @@ -233,17 +236,20 @@ unit(len, p) } int -number(p, len) +number(p, len, singular) const char *p; int len; + int *singular; { int val, rval; rval = 0; + *singular = 1; switch (len) { case 3: if (*p != '0') { rval = 1; + *singular = 0; (void)printf("%s hundred", name1[*p - '0']); } ++p; @@ -262,33 +268,42 @@ number(p, len) } rval = 1; } + if (val != 1) + *singular = 0; break; case 1: if (*p != '0') { rval = 1; (void)printf("%s", name1[*p - '0']); } + if (*p != '1') + *singular = 0; } return (rval); } void -pfract(len) +pfract(len, singular) int len; + int singular; { static const char *const pref[] = { "", "ten-", "hundred-" }; switch(len) { case 1: - (void)printf("tenths.\n"); + (void)printf("tenth"); break; case 2: - (void)printf("hundredths.\n"); + (void)printf("hundredth"); break; default: - (void)printf("%s%sths.\n", pref[len % 3], name3[len / 3]); + (void)printf("%s%sth", pref[len % 3], name3[len / 3]); break; } + if (!singular) { + printf("s"); + } + printf(".\n"); } void diff --git a/sail/pl_main.c b/sail/pl_main.c index 6183420..b8b26b1 100644 --- a/sail/pl_main.c +++ b/sail/pl_main.c @@ -219,7 +219,7 @@ reprint: 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; diff --git a/tests/number.-0.1 b/tests/number.-0.1 index fea1e89..69c365b 100644 --- a/tests/number.-0.1 +++ b/tests/number.-0.1 @@ -1,3 +1,3 @@ minus one. -tenths. +tenth. diff --git a/tetris/scores.c b/tetris/scores.c index d731e25..c2d36c9 100644 --- a/tetris/scores.c +++ b/tetris/scores.c @@ -335,7 +335,8 @@ checkscores(hs, num) 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,11 +375,13 @@ showscores(level) 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 @@ printem(level, offset, hs, n, me) 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, diff --git a/trek/setup.c b/trek/setup.c index 1f14f27..fab5136 100644 --- a/trek/setup.c +++ b/trek/setup.c @@ -234,11 +234,14 @@ setup() for (i = 0; i < NQUADS; i++) for (j = 0; j < NQUADS; j++) { + signed char tmp; q = &Quad[i][j]; q->klings = q->bases = 0; q->scanned = -1; q->stars = ranf(9) + 1; - q->holes = ranf(3) - q->stars / 5; + tmp = ranf(3) - q->stars / 5; + tmp = tmp < 0 ? 0 : tmp; + q->holes = tmp; q->qsystemname = 0; } -- debian/patches/hangman-Error-out-on-1000-unsuitable-words.-Closes-6.patch0000644000000000000000000000203111734035054023105 0ustar From: Peter Pentchev Date: Thu, 16 Feb 2012 22:37:50 +0100 Subject: hangman: Error out on 1000 unsuitable words. Closes: #610270 --- hangman/getword.c | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/hangman/getword.c b/hangman/getword.c index 1b5396a..dc42a53 100644 --- a/hangman/getword.c +++ b/hangman/getword.c @@ -50,8 +50,10 @@ getword() FILE *inf; char *wp, *gp; long pos; + int tries; inf = Dict; + tries = 0; for (;;) { pos = (double) rand() / (RAND_MAX + 1.0) * (double) Dict_size; fseek(inf, pos, SEEK_SET); @@ -66,7 +68,21 @@ getword() if (!islower((unsigned char)*wp)) goto cont; break; -cont: ; +cont: + if (++tries >= 1000) { + move(MESGY, MESGX); + deleteln(); + deleteln(); + deleteln(); + move(MESGY, MESGX); + printw("No suitable word found, try using " + "another dictionary!"); + leaveok(stdscr, FALSE); + refresh(); + readch(); + leaveok(stdscr, TRUE); + die(0); + } } gp = Known; wp = Word; -- debian/patches/Fix-format-security-compiling-errors.patch0000644000000000000000000002016711734036104021015 0ustar From: Tobias Quathamer Date: Mon, 26 Mar 2012 10:51:46 +0200 Subject: Fix format-security compiling errors --- battlestar/room.c | 2 +- cribbage/io.c | 10 +++++----- hack/hack.apply.c | 2 +- hack/hack.eat.c | 2 +- hack/hack.end.c | 4 ++-- hack/hack.invent.c | 4 ++-- hack/hack.main.c | 2 +- hack/hack.options.c | 2 +- hack/hack.pager.c | 4 ++-- hack/hack.potion.c | 2 +- hack/hack.rumors.c | 2 +- hack/hack.timeout.c | 2 +- hunt/hunt/hunt.c | 4 ++-- monop/misc.c | 2 +- sail/assorted.c | 6 +++--- 15 files changed, 25 insertions(+), 25 deletions(-) diff --git a/battlestar/room.c b/battlestar/room.c index 5cbaf85..f99d5de 100644 --- a/battlestar/room.c +++ b/battlestar/room.c @@ -58,7 +58,7 @@ writedes() putchar(c); } else { if (c != '*') - printf(truedirec(compass, c)); + printf("%s", truedirec(compass, c)); compass++; } } diff --git a/cribbage/io.c b/cribbage/io.c index 8100ddd..17853b2 100644 --- a/cribbage/io.c +++ b/cribbage/io.c @@ -103,13 +103,13 @@ msgcrd(c, brfrank, mid, brfsuit) if (brfrank) addmsg("%1.1s", rankchar[c.rank]); else - addmsg(rankname[c.rank]); + addmsg("%s", rankname[c.rank]); if (mid != NULL) - addmsg(mid); + addmsg("%s", mid); if (brfsuit) addmsg("%1.1s", suitchar[c.suit]); else - addmsg(suitname[c.suit]); + addmsg("%s", suitname[c.suit]); return (TRUE); } @@ -192,7 +192,7 @@ infrom(hand, n, prompt) exit(74); } for (;;) { - msg(prompt); + msg("%s", prompt); if (incard(&crd)) { /* if card is full card */ if (!is_one(crd, hand, n)) msg("That's not in your hand"); @@ -345,7 +345,7 @@ number(lo, hi, prompt) int sum; for (sum = 0;;) { - msg(prompt); + msg("%s", prompt); if (!(p = get_line()) || *p == '\0') { msg(quiet ? "Not a number" : "That doesn't look like a number"); diff --git a/hack/hack.apply.c b/hack/hack.apply.c index 391cbf4..fa91c88 100644 --- a/hack/hack.apply.c +++ b/hack/hack.apply.c @@ -392,7 +392,7 @@ dig() digtxt = "Now what exactly was it that you were digging in?"; mnewsym(dpx, dpy); prl(dpx, dpy); - pline(digtxt); /* after mnewsym & prl */ + pline("%s", digtxt); /* after mnewsym & prl */ return (0); } else { if (IS_WALL(levl[dpx][dpy].typ)) { diff --git a/hack/hack.eat.c b/hack/hack.eat.c index e533ca5..4093f96 100644 --- a/hack/hack.eat.c +++ b/hack/hack.eat.c @@ -132,7 +132,7 @@ opentin() useup(tin.tin); r = rn2(2 * TTSZ); if (r < TTSZ) { - pline(tintxts[r].txt); + pline("%s", tintxts[r].txt); lesshungry(tintxts[r].nut); if (r == 1) { /* SALMON */ Glib = rnd(15); diff --git a/hack/hack.end.c b/hack/hack.end.c index 2ffa5cf..3145fd7 100644 --- a/hack/hack.end.c +++ b/hack/hack.end.c @@ -535,7 +535,7 @@ outentry(int rank, struct toptenentry *t1, int so) if (t1->maxlvl != t1->level) Sprintf(eos(linebuf), " [max %d]", t1->maxlvl); if (quit && t1->death[4]) - Sprintf(eos(linebuf), t1->death + 4); + Sprintf(eos(linebuf), "%s", t1->death + 4); } if (killed) Sprintf(eos(linebuf), " by %s%s", @@ -548,7 +548,7 @@ outentry(int rank, struct toptenentry *t1, int so) char *bp = eos(linebuf); char hpbuf[10]; int hppos; - Sprintf(hpbuf, (t1->hp > 0) ? itoa(t1->hp) : "-"); + Sprintf(hpbuf, "%s", (t1->hp > 0) ? itoa(t1->hp) : "-"); hppos = COLNO - 7 - strlen(hpbuf); if (bp <= linebuf + hppos) { while (bp < linebuf + hppos) diff --git a/hack/hack.invent.c b/hack/hack.invent.c index c33d502..2c8ed6e 100644 --- a/hack/hack.invent.c +++ b/hack/hack.invent.c @@ -671,7 +671,7 @@ askchain(objchn, olets, allflag, fn, ckfn, max) if (ckfn && !(*ckfn) (otmp)) continue; if (!allflag) { - pline(xprname(otmp, ilet)); + pline("%s", xprname(otmp, ilet)); addtopl(" [nyaq]? "); sym = readchar(); } else @@ -717,7 +717,7 @@ void prinv(obj) struct obj *obj; { - pline(xprname(obj, obj_to_let(obj))); + pline("%s", xprname(obj, obj_to_let(obj))); } static char * diff --git a/hack/hack.main.c b/hack/hack.main.c index ce4715c..88402f3 100644 --- a/hack/hack.main.c +++ b/hack/hack.main.c @@ -418,7 +418,7 @@ not_recovered: } if (multi < 0) { if (!++multi) { - pline(nomovemsg ? nomovemsg : + pline("%s", nomovemsg ? nomovemsg : "You can move again."); nomovemsg = 0; if (afternmv) diff --git a/hack/hack.options.c b/hack/hack.options.c index ea55cb8..ef7012e 100644 --- a/hack/hack.options.c +++ b/hack/hack.options.c @@ -268,7 +268,7 @@ doset() if (*--eop == ',') *eop = 0; } - pline(buf); + pline("%s", buf); } else parseoptions(buf, FALSE); diff --git a/hack/hack.pager.c b/hack/hack.pager.c index d72d800..03c0847 100644 --- a/hack/hack.pager.c +++ b/hack/hack.pager.c @@ -104,7 +104,7 @@ dowhatis() buf[0] = q; (void) strncpy(buf + 1, " ", 7); } - pline(buf); + pline("%s", buf); if (ep[-1] == ';') { pline("More info? "); if (readchar() == 'y') { @@ -298,7 +298,7 @@ cornline(mode, text) } /* --- now we really do it --- */ if (mode == 2 && linect == 1) /* topline only */ - pline(texthead->line_text); + pline("%s", texthead->line_text); else if (mode == 2) { int curline, lth; diff --git a/hack/hack.potion.c b/hack/hack.potion.c index 9d210d4..a906cb3 100644 --- a/hack/hack.potion.c +++ b/hack/hack.potion.c @@ -286,7 +286,7 @@ strange_feeling(obj, txt) if (flags.beginner) pline("You have a strange feeling for a moment, then it passes."); else - pline(txt); + pline("%s", txt); if (!objects[obj->otyp].oc_name_known && !objects[obj->otyp].oc_uname) docall(obj); useup(obj); diff --git a/hack/hack.rumors.c b/hack/hack.rumors.c index 383bba9..513d395 100644 --- a/hack/hack.rumors.c +++ b/hack/hack.rumors.c @@ -112,7 +112,7 @@ outline(rumf) if ((ep = strchr(line, '\n')) != 0) *ep = 0; pline("This cookie has a scrap of paper inside! It reads: "); - pline(line); + pline("%s", line); } void diff --git a/hack/hack.timeout.c b/hack/hack.timeout.c index ef239e4..2a8ee54 100644 --- a/hack/hack.timeout.c +++ b/hack/hack.timeout.c @@ -126,7 +126,7 @@ stoned_dialogue() long i = (Stoned & TIMEOUT); if (i > 0 && i <= SIZE(stoned_texts)) - pline(stoned_texts[SIZE(stoned_texts) - i]); + pline("%s", stoned_texts[SIZE(stoned_texts) - i]); if (i == 5) Fast = 0; if (i == 3) diff --git a/hunt/hunt/hunt.c b/hunt/hunt/hunt.c index 28321bc..58d112d 100644 --- a/hunt/hunt/hunt.c +++ b/hunt/hunt/hunt.c @@ -910,7 +910,7 @@ leave(eval, mesg) int serrno = errno; fincurs(); errno = serrno; - err(eval, mesg ? mesg : ""); + err(eval, "%s", mesg ? mesg : ""); } /* @@ -924,7 +924,7 @@ leavex(eval, mesg) const char *mesg; { fincurs(); - errx(eval, mesg ? mesg : ""); + errx(eval, "%s", mesg ? mesg : ""); } #if !defined(USE_CURSES) && defined(SIGTSTP) diff --git a/monop/misc.c b/monop/misc.c index 1d3a566..c363ca2 100644 --- a/monop/misc.c +++ b/monop/misc.c @@ -101,7 +101,7 @@ get_int(prompt) for (;;) { inter: - printf(prompt); + printf("%s", prompt); num = 0; for (sp = buf; (c=getchar()) != '\n'; *sp++ = c) if (c == -1) /* check for interrupted system call */ diff --git a/sail/assorted.c b/sail/assorted.c index cfc7d2a..ecb8406 100644 --- a/sail/assorted.c +++ b/sail/assorted.c @@ -163,7 +163,7 @@ table(struct ship *from, struct ship *on, int rig, int shot, int hittable, int r 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: @@ -190,7 +190,7 @@ table(struct ship *from, struct ship *on, int rig, int shot, int hittable, int r default: errx(1, "Bad Rhit = %d", Rhit); } - makemsg(on, message); + makemsg(on, "%s", message); } else if (roll == 6) { switch (Hhit) { case 0: @@ -218,7 +218,7 @@ table(struct ship *from, struct ship *on, int rig, int shot, int hittable, int r default: errx(1, "Bad Hhit = %d", Hhit); } - makemsg(on, message); + makemsg(on, "%s", message); } /* if (Chit > 1 && on->file->readyL&R_INITIAL && on->file->readyR&R_INITIAL) { -- debian/patches/quiz-Add-answers-to-adults-babies.-Closes-659528.patch0000644000000000000000000000111511734035054022215 0ustar From: Tobias Quathamer Date: Thu, 16 Feb 2012 12:53:51 +0100 Subject: quiz: Add answers to adults/babies. Closes: #659528 --- quiz/datfiles/babies | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/quiz/datfiles/babies b/quiz/datfiles/babies index 5305c0c..45c4bb3 100644 --- a/quiz/datfiles/babies +++ b/quiz/datfiles/babies @@ -3,7 +3,7 @@ kitten:cat|fox|skunk|rabbit|bobcat|panther gosling:goose colt|foal:horse|donkey|zebra puppy:dog -pup:seal|fox|beaver +pup:seal|fox|beaver|dog|shark|rat duckling:duck fawn:deer piglet|shoat:pig -- debian/patches/primes-Document-maximum-number-in-manpage.-Closes-63.patch0000644000000000000000000000205511734035054023422 0ustar From: Tobias Quathamer Date: Thu, 16 Feb 2012 13:17:13 +0100 Subject: primes: Document maximum number in manpage. Closes: #636569 --- primes/primes.6 | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/primes/primes.6 b/primes/primes.6 index 9499398..ac100c6 100644 --- a/primes/primes.6 +++ b/primes/primes.6 @@ -61,10 +61,13 @@ value must be at least 0 and not greater than .Ar stop . The .Ar stop -value must not be greater than 4294967295. +value must not be greater than +the maximum possible value of unsigned integer types on your system +(4294967295 for 32-bit systems and +18446744073709551615 for 64-bit systems). The default value of .Ar stop -is 4294967295. +is 4294967295 on 32-bit and 18446744073709551615 on 64-bit. .Pp When the .Nm @@ -72,7 +75,7 @@ utility is invoked with no arguments, .Ar start is read from standard input. .Ar stop -is taken to be 4294967295. +is taken to be 4294967295 on 32-bit and 18446744073709551615 on 64-bit. The .Ar start value may be preceded by a single -- debian/patches/wtf-Add-acronyms-and-sort-them-alphabetically.patch0000644000000000000000000001562211734035054022421 0ustar From: Tobias Quathamer Date: Thu, 16 Feb 2012 11:26:48 +0100 Subject: wtf: Add acronyms and sort them alphabetically --- wtf/acronyms | 8 ++++++++ wtf/acronyms.comp | 28 +++++++++++++++++++++------- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/wtf/acronyms b/wtf/acronyms index 5baeef2..202bf15 100644 --- a/wtf/acronyms +++ b/wtf/acronyms @@ -87,6 +87,7 @@ HHIS hanging head in shame HICA here it comes again HTH hope this helps IAC in any case +IANADD I am not a Debian developer IANAL I am not a lawyer IC I see ICBW I could be wrong @@ -139,6 +140,8 @@ NFC no fucking clue NFI no fucking idea NFW no fucking way NIH not invented here +NIMB not in my backyard +NIMBY not in my backyard NMF not my fault NMP not my problem NOYB none of your business @@ -146,6 +149,7 @@ NOYFB none of your fucking business NP no problem NRFPT not ready for prime time NRN no reply necessary +NSFW not safe for work OIC oh, I see OMG oh, my god OT off topic @@ -187,6 +191,7 @@ SEP someone else's problem SFA sweet fuck all SHID slaps head in disgust SIMCA sitting in my chair amused +SIYH sooner if you help SMLSFB so many losers, so few bullets SMOP simple matter of programming SNAFU situation normal, all fucked up @@ -212,7 +217,9 @@ TBOMK the best of my knowledge THNX thanks THX thanks TIA thanks in advance +TINASOTODP this is not a statement of the official Debian position TINC there is no cabal +TINLA this is not legal advice TLA three letter acronym TLB translation lookaside buffer TMA too many abbreviations @@ -237,6 +244,7 @@ WB welcome back WFM works for me WIBNI wouldn't it be nice if WIP work in progress +WIR when it's ready WOFTAM waste of fucking time and money WOMBAT waste of money, brain, and time WRT with respect to diff --git a/wtf/acronyms.comp b/wtf/acronyms.comp index 6f2b66f..c5283c4 100644 --- a/wtf/acronyms.comp +++ b/wtf/acronyms.comp @@ -17,8 +17,8 @@ APIC advanced programmable interrupt controller ARP address resolution protocol ARQ automatic repeat request AS autonomous system -ASN autonomous system number ASCII american standard code for information interchange +ASN autonomous system number AT advanced technology ATA advanced technology attachment ATAPI advanced technology attachment packet interface @@ -62,7 +62,9 @@ DAC digital [to] analog converter DCE data control equipment DCE distributed computing environment DCT discrete cosine transform +DD Debian developer DDC display data channel +DDPO Debian developer's package overview (http://qa.debian.org/developer.php) DDR double data rate DDWG digital display working group DER distinguished encoding rules @@ -83,6 +85,7 @@ DTE data terminal equipment DTE dumb terminal emulator DVD digital versatile disc DVI digital visual interface +E-XER extended XML encoding rules ECP enhanced capability port EDID extended display identification data EDO extended data out @@ -96,7 +99,6 @@ EPP enhanced parallel port EPRML extended partial response, maximum likelihood EPROM erasable programmable read only memory ESDRAM enhanced synchronous dynamic random access memory -E-XER extended XML encoding rules FAT file allocation table FBRAM frame buffer random access memory FCS frame check sequence @@ -108,12 +110,14 @@ FLOPS floating [point] operations per second FM frequency modulation FPM fast page mode FQDN fully qualified domain name +FTBFS fails to build from source FTP file transfer protocol GC garbage collector GCR group-coded recording GIF graphics interchange format -GNU gnu's not unix -GPL gnu/general public license +GIYF google is your friend +GNU GNU's not unix +GPL GNU general public license GPU graphics processing unit GRE generic routing encapsulation GUI graphics user interface @@ -135,10 +139,10 @@ IGP interior gateway protocol IKE internet key exchange IMAP internet mail access protocol INCITS international committee on information technology standards -IPC interprocess communication IO input/output IOCTL input/output control IP internet protocol +IPC interprocess communication IPNG internet protocol, next generation IPSEC internet protocol security IRC internet relay chat @@ -152,6 +156,7 @@ ISN initial serial number ISO international standards organization ISOC internet society ISP internet service provider +JFGI just fucking google it JPEG joint photographic experts group KVA kernel virtual address LAN local area network @@ -160,6 +165,7 @@ LCD liquid crystal display LCP link control protocol LDAP lightweight directory access protocol LED light emitting diode +LGPL GNU lesser general public license LIR local internet registry LLC logical link control LRC longitudinal redundancy check @@ -174,7 +180,9 @@ MIDI musical instrument digital interface MIME multipurpose internet mail extensions MIPS million instructions per second MMU memory management unit +MOTU masters of the universe (Ubuntu developer) MPEG moving picture experts group +MPL Mozilla public license MSB most significant bit [or: byte] MSF minutes seconds frames MSS maximum segment size @@ -205,8 +213,8 @@ PC personal computer PCI peripheral component interconnect PCM pulse code modulation PCMCIA personal computer memory card international association -PDU protocol data unit PDP page descriptor page +PDU protocol data unit PER packed encoding rules PERL practical extraction [and] report language PGP pretty good privacy @@ -226,16 +234,17 @@ PPPOA point-to-point protocol over ATM PPPOE point-to-point protocol over ethernet PRML partial response, maximum likelihood PROM programmable read only memory +PSTN public switched telephone network PTE page table entry PTLA pseudo top level aggregator PTP page table page -PSTN public switched telephone network PWM pulse width modulation QOS quality of service RAID redundant array of inexpensive disks RAM random access memory RCS revision control system RFC request for comments +RFS request for sponsorship RGB red green blue RIP routing information protocol RIR regional internet registry @@ -246,6 +255,9 @@ ROM read only memory RPM revolutions per minute RTF rich text format RTS request to send +RTSL read the source, Luke (open source programming) +RTSL real-time shading language (Stanford University) +RTSL real-time systems laboratory RTT round time trip S/PDIF sony/phillips digital interface SACD super audio compact disc @@ -265,6 +277,7 @@ SMTP simple mail transfer protocol SNMP simple network management protocol SPD serial presence detect SRAM static random access memory +SRU stable release update SSFDC solid state floppy disc card SSH secure shell SSL secure sockets layer @@ -296,6 +309,7 @@ USART universal synchronous/asynchronous receiver/transmitter USB universal serial bus USWC uncacheable speculative write combining UTP unshielded twisted pair +UTSL use the source, Luke (open source programming) UUCP unix-to-unix copy protocol VAX virtual address extension VCM virtual channel memory -- debian/patches/robots-Refresh-screen.patch0000644000000000000000000000070611734035054016024 0ustar From: Tobias Quathamer Date: Thu, 16 Feb 2012 11:26:49 +0100 Subject: robots: Refresh screen --- robots/move.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/robots/move.c b/robots/move.c index 7edaae3..b2703c5 100644 --- a/robots/move.c +++ b/robots/move.c @@ -185,6 +185,7 @@ teleport: flush_in(); goto ret; case CTRL('L'): + redrawwin(curscr); refresh(); break; case EOF: -- debian/patches/quiz-Update-presidents-capitals-fix-typos-in-murders.patch0000644000000000000000000002220311734035054024046 0ustar From: Tobias Quathamer Date: Thu, 16 Feb 2012 11:26:50 +0100 Subject: quiz: Update presidents, capitals, fix typos in murders, poetry --- quiz/datfiles/africa | 51 ++++++++++++++++++++++++++++++------------------ quiz/datfiles/america | 45 ++++++++++++++++++++++++++++++++++-------- quiz/datfiles/asia | 40 ++++++++++++++++++++++++-------------- quiz/datfiles/europe | 44 ++++++++++++++++++++++++++++------------- quiz/datfiles/murders | 2 +- quiz/datfiles/poetry | 2 +- quiz/datfiles/pres | 6 +++- 7 files changed, 129 insertions(+), 61 deletions(-) diff --git a/quiz/datfiles/africa b/quiz/datfiles/africa index 6e74550..a2eeeaf 100644 --- a/quiz/datfiles/africa +++ b/quiz/datfiles/africa @@ -1,43 +1,56 @@ -Algeria:Alg[iers|er] -Botswana:Gaberones +Algeria:Algiers +Angola:Luanda +Benin:Porto-Novo +Botswana:Gaborone +Burkina Faso:Ouagadougou Burundi:Bujumbura -Cameroun:Yaound['e|e'|e] +C[^o|o^|o]te d'Ivoire:Yamoussoukro +Cameroon:Yaound['e|e'|e] +Cape Verde:Praia Central Africa{n Rep{ublic}}:Bangui -Chad:Ndjamena -Congo:Brazzaville -Dahomey:Porto Novo +Chad:N'Djamena|Ndjamena +Comoros:Moroni +Djibouti:Djibouti +Egypt:Cairo +Equatorial Guinea:Malabo +Eritrea:Asmara Ethiopia:Addis Ababa Gabon:Libreville Ghana:Accra Guinea-Bissau:Bissau Guinea:Conakry -Ivory Coast:Abidjan Kenya:Nairobi Lesotho:Maseru Liberia:Monrovia -Libya:Al Bayda{'} -Malagasy{ Rep{ublic}}|Madagascar:Tananarive -Malawi:Zomba +Libya:Tripoli +Malagasy{ Rep{ublic}}|Madagascar:Antananarivo +Malawi:Lilongwe Mali:Bamako Mauritania:Nouakchott +Mauritius:Port Louis +Mayotte:Mamoudzou +Mo[z|,c|c,|c]ambique:Maputo Morocco:Rabat -Mo[z|,c|c,|c]ambique:Louren[,c|c,|c]o Marques +Namibia:Windhoek Niger:Niamey -Nigeria:Lagos -Rhodesia:Salisbury +Nigeria:Abuja +R['e|e'|e]union:Saint-Denis +Rep. Congo:Brazzaville Rwanda:Kigali +S[~a|a~|a]o Tom['e|e'|e] and Pr['i|i'|i]ncipe:S[~a|a~|a]o Tom['e|e'|e] +Saint Helena:Jamestown Senegal:Dakar +Seychelles:Victoria Sierra Leone:Freetown -Somali{ Rep{ublic}}:Mogadis[cio|hu] +Somalia:Mogadishu Sudan:Khartoum Swaziland:Mbabane -Tanzania:Dar es Salaam +Tanzania:Dodoma Togo:Lom['e|e'|e] Tunisia:Tunis Uganda:Kampala -United Arab Rep{ublic}|Egypt:Cairo -Upper Volta:Ouagadougou Zambia:Lusaka -Za["i|i"|i]re:Kinshasha +Zimbabwe:Harare +{DR |Democratic Republic of the }Congo:Kinshasa {Rep{ublic} of }South Africa:Pretoria -{The }Gambia:Bathurst +{The }Gambia:Banjul|Bathurst diff --git a/quiz/datfiles/america b/quiz/datfiles/america index 7f8fee1..5c9e321 100644 --- a/quiz/datfiles/america +++ b/quiz/datfiles/america @@ -1,27 +1,54 @@ +Anguilla:The Valley +Antigua and Barbuda:St. John's Argentina:Buenos Aires -Bahamas:Nassau +Aruba:Oranjestad Barbados:Bridgetown +Belize:Belmopan +Bermuda:Hamilton Bolivia:La Paz|Sucre -Bra[z|s]il:Brasilia +Bra[z|s]il:Bras['i|i'|i]lia +British Virgin Islands:Road Town Canada:Ottawa +Cayman Islands:George Town Chile:Santiago Colombia:Bogot['a|a'|a] -Costa Rica:San Jose +Costa Rica:San Jos['e|e'|e] Cuba:Ha[v|b]ana +Dominica:Roseau Dominican Republic:Santo Domingo Ecuador:Quito El Salvador:San Salvador -Guatemala:Guatemala +Falkland Islands:Stanley +French Guiana:Cayenne +Greenland:Nuuk +Grenada:St. George's +Guadeloupe:Basse-Terre +Guatemala:Guatemala City Guyana:Georgetown -Haiti:Port au Prince +Haiti:Port[-| ]au[-| ]Prince Honduras:Tegucigalpa Jamaica:Kingston -Mexico:Mexico +Martinique:Fort-de-France +Mexico:Mexico City +Montserrat:Plymouth|Brades +Netherlands Antilles:Willemstad Nicaragua:Managua -Panama:Panama +Panama:Panama City Paraguay:Asunci['o|o'|o]n Peru:Lima -Trinidad[ and Tobago|]:Port of Spain -United States|US{A}:Washington +Puerto Rico:San Juan +SGSSI|South Georgia and the South Sandwich Islands:Grytviken|King Edward Point +Saint Barth['e|e'|e]lemy:Gustavia +Saint Kitts and Nevis:Basseterre +Saint Lucia:Castries +Saint Martin:Marigot +Saint Pierre and Miquelon:Saint-Pierre +Saint Vincent and the Grenadines:Kingstown +Suriname:Paramaribo +Trinidad{ and Tobago}:Port of Spain +Turks and Caicos Islands:Cockburn Town +United States Virgin Islands:Charlotte Amalie +United States|US{A}:Washington{ DC} Uruguay:Montevideo Venezuela:Caracas +{The }Bahamas:Nassau diff --git a/quiz/datfiles/asia b/quiz/datfiles/asia index b9449f4..8c8ee55 100644 --- a/quiz/datfiles/asia +++ b/quiz/datfiles/asia @@ -1,12 +1,16 @@ Afghanistan:Kabul +Armenia:Yerevan Australia:Canberra -Bahrein:Manama -Bangladesh:Dacca -Bhutan:Thimbu -Burma:Rangoon -Cambodia|Khmer:P{h}nom Penh -China:Peking +Azerbaijan:Baku +Bahr[a|e]in:Manama +Bangladesh:Dhaka +Bhutan:Thimphu +Burma:Naypyidaw +Cambodia:Phnom Penh Cyprus:Nicosia +East Timor:Dili +Egypt:Cairo +Georgia:Tbilisi India:New Delhi Indonesia:Jakarta|Djakarta Iran:Tehran @@ -14,28 +18,34 @@ Iraq:Baghdad Israel:Jerusalem Japan:Tokyo Jordan:Amman -Kuwait:Al-kuwait +Kazakhstan:Astana +Kuwait:Kuwait City +Kyrgyzstan:Bishkek Laos:Vientiane Lebanon:Beirut Malaysia:Kuala Lumpur -Maldive Islands:Male +Maldives:Mal['e|e'|e] Mongolia:Ulan Bator -Nepal:Katmandu +Nepal:Kathmandu North Korea:P{'}yongyang -North Yemen:San{'}a Oman:Muscat Pakistan:Islamabad -Papua[-| ]New Guinea:Port Moresby +Papua New Guinea:Port Moresby Philippines:Manila Qatar:Doha -Saudi Arabia:Riyadh|J{ei}ddah +Russia:Moscow +Saudi Arabia:Riyadh Singapore:Singapore South Korea:Seoul -South Yemen:Aden -Sri Lanka:Colombo +Sri Lanka:Kotte Syria:Damascus Taiwan:Taipei +Tajikistan:Dushanbe Thailand:Bangkok Turkey:Ankara -United Arab Emirates:Abu Dhabi +Turkmenistan:Ashgabat +United Arab Emirates|UAE:Abu Dhabi +Uzbekistan:Tashkent Vietnam:Hanoi +{Republic of }Yemen:Sana'a +{{People's }Republic of }China:Beijing|Peking diff --git a/quiz/datfiles/europe b/quiz/datfiles/europe index 91176e5..d089f41 100644 --- a/quiz/datfiles/europe +++ b/quiz/datfiles/europe @@ -1,44 +1,60 @@ -Albania:Tirana|Tirane" +Abkhazia:Sukhumi +Albania:Tirana Andorra:Andorra la V[ell|iej]a +Armenia:Yerevan Austria:Vienna|Wien -Belarus|Byelorussia:M[i|e]nsk -Belgium:Brussel[s|]|Bruxelles -Bosnia[-Herzegovina|]:Sarajevo -Bulgaria:Sofi[a|ya] +Azerbaijan:Baku +Belarus:Minsk +Belgium:Brussel{s}|Bruxelles +Bosnia and Herzegovina:Sarajevo +Bulgaria:Sofia Croatia:Zagreb +Cyprus:Nicosia Czech Republic:Prague|Praha -Denmark:Copenhagen|K[o|o/]benhavn -United Kingdom|England|Great Britain|UK:London +Denmark:Copenhagen|K[o|o/|/o]benhavn Estonia:Tallinn +Faroe Islands:T['o|o'|o]rshavn Finland:Helsinki France:Paris Georgia:Tbilisi Germany:Berlin +Gibraltar:Gibraltar Greece:Athens +Guernsey:Saint Peter Port Hungary:Budapest -Iceland:Reykjavik +Iceland:Reykjav['i|i'|i]k Ireland|Eire:Dublin +Isle of Man:Douglas Italy:Rom[e|a] +Jersey:Saint Helier +Kazakhstan:Astana +Kosovo:Pristina Latvia:Riga Liechtenstein:Vaduz Lithuania:Vilnius Luxembourg:Luxembourg -[|Former Yugoslav Republic Of ]Macedonia:Skop[|l]je +Macedonia:Skopje Malta:Valletta -Moldova:Chisinau|Kishinev +Moldova:Chi[,s|s,|s]inau|Kishinev Monaco:Monaco -Netherlands|Holland:Amsterdam +Montenegro:Podgorica +Netherlands:Amsterdam Norway:Oslo Poland:Wars[aw|zawa] Portugal:Lisbo[n|a] -R[u|o]mania:Bucharest|Bucuresti +Romania:Bucharest Russia:Mos[cow|kva] San Marino:San Marino -Serbia and Montenegro:Belgrade|Beograd -Slovakia|Slovak Republic:Bratislava +Serbia:Belgrade +Slovakia:Bratislava Slovenia:Ljubljana +South Ossetia:Tskhinvali Spain:Madrid +Svalbard:Longyearbyen Sweden:Stockholm Switzerland:Bern{e} Turkey:Ankara Ukraine:Kiev|Kyiv +United Kingdom|England|Great Britain|UK:London +Vatican City:Vatican City +[°A|A°|A]land Islands:Mariehamn diff --git a/quiz/datfiles/murders b/quiz/datfiles/murders index 30cf324..b1070ce 100644 --- a/quiz/datfiles/murders +++ b/quiz/datfiles/murders @@ -19,7 +19,7 @@ Pompeii:Vesuvius {Yukio }Mishima:{Yukio }Mishima {Alexander }Hamilton:{Aaron }Burr Cleopatra:{the |an }asp -[Ann Boleyn|Catharine Howard]:Henry{ VIII} +[Anne Boleyn|Catharine Howard]:Henry{ VIII} vaudeville:{the }movies|film {the }movies|film:TV|television {the }VA patients:{the }nurses diff --git a/quiz/datfiles/poetry b/quiz/datfiles/poetry index f4c07d6..78d117a 100644 --- a/quiz/datfiles/poetry +++ b/quiz/datfiles/poetry @@ -64,7 +64,7 @@ Drink deep{,} or taste not the Pierian spring{.}:\ {Alexander }Pope The curfew tolls the knell of parting day{,}:\ The lowing herd wind slowly o'er the lea:\ -Elegy{ Written in a Country Church{-| }Yard:\ +Elegy{ Written in a Country Church{-| }Yard}:\ {Thomas }Gray The best laid schemes o' mice an' men gang aft a-gley{,}:\ An{'|d} lea{'|v}e us nought but grief an{'|d} pain for promised joy{.}:\ diff --git a/quiz/datfiles/pres b/quiz/datfiles/pres index 6f81228..4ce5862 100644 --- a/quiz/datfiles/pres +++ b/quiz/datfiles/pres @@ -79,5 +79,7 @@ {J{ames} }{D{anforth|an} }Quayle:{W{illiam|m} }{J{efferson} }Clinton {W{illiam|m} }{J{efferson} }Clinton:1993-2001:\ {A{lbert} }{A{rnold} }Gore{{,} J{unio}r}:{G{eorge} }{W{alker} }Bush{{,} J{unio}r} -{G{eorge} }{W{alker} }Bush{{,} J{unio}r}:2001-:\ -{R{ichard} }{B{ruce} }Cheney: +{G{eorge} }{W{alker} }Bush{{,} J{unio}r}:2001-{{20}0}9:\ +{R{ichard} }{B{ruce} }Cheney:{B{arack} }{H{ussein} }Obama{ II} +{B{arack} }{H{ussein} }Obama{ II}:2009-:\ +{J{oe{seph}} }{R{obinette} }{Biden}{{,} J{unio}r}: -- debian/patches/Custom-configuration-of-Debian-package-build.patch0000644000000000000000000000445411734035054022236 0ustar From: Tobias Quathamer Date: Mon, 26 Mar 2012 10:06:45 +0200 Subject: Custom configuration of Debian package build --- config.params | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 49 insertions(+), 0 deletions(-) create mode 100644 config.params diff --git a/config.params b/config.params new file mode 100644 index 0000000..97d45fb --- /dev/null +++ b/config.params @@ -0,0 +1,49 @@ +# This file is read by configure and is used during the build of the +# Debian package. + +# Don't run configure interactively. +bsd_games_cfg_non_interactive=y + +# Install into here for building the package. +bsd_games_cfg_install_prefix=`pwd`/debian/bsdgames + +# Do not build or install these games: +bsd_games_cfg_no_build_dirs="dm banner fortune factor" + +# Keep huntd in /usr/sbin as it was in the past. I may +# change this later. +bsd_games_cfg_sbindir=/usr/sbin + +# Debian doesn't like cluttering up the /usr/*/games/ dirs too much, +# use a subdir. /var too. +bsd_games_cfg_usrlibdir=/usr/lib/games/bsdgames +bsd_games_cfg_sharedir=/usr/share/games/bsdgames +bsd_games_cfg_varlibdir=/var/games/bsdgames + +# Do not do chown now, we arn't running as root. +bsd_games_cfg_do_chown=n + +# Debian perfers symlinks for manpages. +bsd_games_cfg_use_dot_so=symlinks + +# I'll handle manpage compressing. +bsd_games_cfg_gzip_manpages=n + +# Policy says to use /usr/bin/pager by default. +bsd_games_cfg_pager=/usr/bin/pager + +# Always use the same wordlist for boggle, and don't use web2, it's too +# big. Instead, use the union of the wenglish and wbritish wordlists. +bsd_games_cfg_dictionary_src=`pwd`/temp-dictionary + +# Put it in /usr/share/games with the rest of the games data. +bsd_games_cfg_wtf_acronymfile=/usr/share/games/bsdgames/acronyms + +bsd_games_cfg_docdir=/usr/share/doc/bsdgames + +# Enable the use of hardening (and other) build flags +bsd_games_cfg_other_cflags="$(dpkg-buildflags --get CFLAGS) $(dpkg-buildflags --get CPPFLAGS)" +bsd_games_cfg_other_ldflags="$(dpkg-buildflags --get LDFLAGS)" +# This is for dab, the corresponding variable other_cxxflags does not +# exist, so append it to the "warning" flags +bsd_games_cfg_cxx_warning_flags="-Wall -W -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings $(dpkg-buildflags --get CXXFLAGS) $(dpkg-buildflags --get CPPFLAGS)" -- debian/patches/wtf-Add-NMU.-Closes-574036.patch0000644000000000000000000000111211734035054015630 0ustar From: Tobias Quathamer Date: Thu, 16 Feb 2012 13:26:25 +0100 Subject: wtf: Add NMU. Closes: #574036 --- wtf/acronyms.comp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/wtf/acronyms.comp b/wtf/acronyms.comp index c5283c4..e365d72 100644 --- a/wtf/acronyms.comp +++ b/wtf/acronyms.comp @@ -196,6 +196,7 @@ NCP network control protocol NFS network file system NIC network interface card NIS network information service +NMU Non-maintainer upload NRZ non-return to zero NUMA non uniform memory access OCL object constraint language -- debian/patches/series0000644000000000000000000000123011734036104012025 0ustar Replace-getline-with-get_line.patch wtf-Add-acronyms-and-sort-them-alphabetically.patch robots-Refresh-screen.patch quiz-Update-presidents-capitals-fix-typos-in-murders.patch Define-__dead-for-GNU-GCC.patch rain-Update-default-delay.-Closes-579062.patch Custom-configuration-of-Debian-package-build.patch Unsorted-Debian-patches.patch quiz-Add-answers-to-adults-babies.-Closes-659528.patch primes-Update-to-NetBSD-CVS-2012-02-16.patch primes-Document-maximum-number-in-manpage.-Closes-63.patch wtf-Add-NMU.-Closes-574036.patch hangman-Error-out-on-1000-unsuitable-words.-Closes-6.patch Fix-typos-spotted-by-Lintian.patch Fix-format-security-compiling-errors.patch debian/patches/rain-Update-default-delay.-Closes-579062.patch0000644000000000000000000000152711734035054020612 0ustar From: Tobias Quathamer Date: Thu, 16 Feb 2012 11:26:53 +0100 Subject: rain: Update default delay. Closes: #579062 --- rain/rain.6 | 2 +- rain/rain.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rain/rain.6 b/rain/rain.6 index 9fb0f0e..c6515e9 100644 --- a/rain/rain.6 +++ b/rain/rain.6 @@ -49,6 +49,6 @@ baud or the .Fl d option must be used to specify a delay, in milliseconds, between each update. -A reasonable delay is 120; the default is 0. +The default delay is 120. .Sh AUTHOR .An Eric P. Scott diff --git a/rain/rain.c b/rain/rain.c index e388f46..63e6276 100644 --- a/rain/rain.c +++ b/rain/rain.c @@ -70,7 +70,7 @@ main(int argc, char **argv) { int x, y, j; long cols, lines; - unsigned int delay = 0; + unsigned int delay = 120; unsigned long val = 0; int ch; char *ep; -- debian/patches/Define-__dead-for-GNU-GCC.patch0000644000000000000000000000105211734035054016026 0ustar From: Tobias Quathamer Date: Thu, 16 Feb 2012 11:26:51 +0100 Subject: Define __dead for GNU GCC --- include/sys/cdefs.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h index 138eaa8..f6e87c2 100644 --- a/include/sys/cdefs.h +++ b/include/sys/cdefs.h @@ -40,3 +40,7 @@ #ifndef __COPYRIGHT #define __COPYRIGHT(arg) static const char copyright[] __attribute__((__unused__)) = arg #endif + +#ifndef __dead +#define __dead __attribute__((__noreturn__)) +#endif -- debian/patches/primes-Update-to-NetBSD-CVS-2012-02-16.patch0000644000000000000000000001440111734035054017532 0ustar From: Tobias Quathamer Date: Thu, 16 Feb 2012 13:05:28 +0100 Subject: primes: Update to NetBSD CVS, 2012-02-16 --- primes/primes.6 | 10 ++++++- primes/primes.c | 67 +++++++++++++++++++++++++++++++++--------------------- 2 files changed, 49 insertions(+), 28 deletions(-) diff --git a/primes/primes.6 b/primes/primes.6 index 14d5101..9499398 100644 --- a/primes/primes.6 +++ b/primes/primes.6 @@ -1,4 +1,4 @@ -.\" $NetBSD: primes.6,v 1.2 2004/02/09 23:25:47 wiz Exp $ +.\" $NetBSD: primes.6,v 1.3 2008/02/03 03:29:17 wiz Exp $ .\" .\" Copyright (c) 1989, 1993 .\" The Regents of the University of California. All rights reserved. @@ -37,7 +37,7 @@ .\" .\" chongo /\oo/\ .\" -.Dd February 8, 2004 +.Dd February 3, 2008 .Dt PRIMES 6 .Os .Sh NAME @@ -45,6 +45,7 @@ .Nd generate primes .Sh SYNOPSIS .Nm primes +.Op Fl d .Op Ar start Op Ar stop .Sh DESCRIPTION The @@ -80,6 +81,11 @@ The .Ar start value is terminated by a non-digit character (such as a newline). The input line must not be longer than 255 characters. +When given the +.Fl d +argument, +.Nm +prints the difference between the current and the previous prime. .Sh DIAGNOSTICS Out of range or invalid input results in an appropriate error message diff --git a/primes/primes.c b/primes/primes.c index 2d93594..4693968 100644 --- a/primes/primes.c +++ b/primes/primes.c @@ -1,4 +1,4 @@ -/* $NetBSD: primes.c,v 1.12 2004/01/27 20:30:30 jsm Exp $ */ +/* $NetBSD: primes.c,v 1.19 2011/08/30 02:58:04 jakllsch Exp $ */ /* * Copyright (c) 1989, 1993 @@ -34,15 +34,15 @@ #include #ifndef lint -__COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\ - The Regents of the University of California. All rights reserved.\n"); +__COPYRIGHT("@(#) Copyright (c) 1989, 1993\ + The Regents of the University of California. All rights reserved."); #endif /* not lint */ #ifndef lint #if 0 static char sccsid[] = "@(#)primes.c 8.5 (Berkeley) 5/10/95"; #else -__RCSID("$NetBSD: primes.c,v 1.12 2004/01/27 20:30:30 jsm Exp $"); +__RCSID("$NetBSD: primes.c,v 1.19 2011/08/30 02:58:04 jakllsch Exp $"); #endif #endif /* not lint */ @@ -84,7 +84,7 @@ __RCSID("$NetBSD: primes.c,v 1.12 2004/01/27 20:30:30 jsm Exp $"); * * We make TABSIZE large to reduce the overhead of inner loop setup. */ -char table[TABSIZE]; /* Eratosthenes sieve of odd numbers */ +static char table[TABSIZE]; /* Eratosthenes sieve of odd numbers */ /* * prime[i] is the (i-1)th prime. @@ -103,15 +103,14 @@ extern const ubig *pr_limit; /* largest prime in the prime array */ extern const char pattern[]; extern const int pattern_size; /* length of pattern array */ -int main(int, char *[]); -void primes(ubig, ubig); -ubig read_num_buf(void); -void usage(void) __attribute__((__noreturn__)); +static int dflag; + +static void primes(ubig, ubig); +static ubig read_num_buf(void); +static void usage(void) __dead; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { ubig start; /* where to start generating */ ubig stop; /* don't generate at or above this value */ @@ -121,8 +120,11 @@ main(argc, argv) /* Revoke setgid privileges */ setregid(getgid(), getgid()); - while ((ch = getopt(argc, argv, "")) != -1) + while ((ch = getopt(argc, argv, "d")) != -1) switch (ch) { + case 'd': + dflag++; + break; case '?': default: usage(); @@ -189,7 +191,7 @@ main(argc, argv) * This routine returns a number n, where 0 <= n && n <= BIG. */ ubig -read_num_buf() +read_num_buf(void) { ubig val; char *p, buf[100]; /* > max number of digits. */ @@ -200,7 +202,7 @@ read_num_buf() err(1, "stdin"); exit(0); } - for (p = buf; isblank(*p); ++p); + for (p = buf; isblank((unsigned char)*p); ++p); if (*p == '\n' || *p == '\0') continue; if (*p == '-') @@ -217,11 +219,12 @@ read_num_buf() /* * primes - sieve and print primes from start up to and but not including stop + * + * start where to start generating + * stop don't generate at or above this value */ void -primes(start, stop) - ubig start; /* where to start generating */ - ubig stop; /* don't generate at or above this value */ +primes(ubig start, ubig stop) { char *q; /* sieve spot */ ubig factor; /* index and factor */ @@ -229,6 +232,7 @@ primes(start, stop) const ubig *p; /* prime table pointer */ ubig fact_lim; /* highest prime for current block */ ubig mod; /* temp storage for mod */ + ubig prev = 0; /* * A number of systems can not convert double values into unsigned @@ -263,8 +267,14 @@ primes(start, stop) for (p = &prime[0], factor = prime[0]; factor < stop && p <= pr_limit; factor = *(++p)) { if (factor >= start) { - printf("%lu\n", (unsigned long) factor); + printf("%lu", (unsigned long) factor); + if (dflag) { + printf(" (%lu)", + (unsigned long) factor - prev); + } + putchar('\n'); } + prev = factor; } /* return early if we are done */ if (p <= pr_limit) { @@ -298,11 +308,10 @@ primes(start, stop) /* note highest useful factor and sieve spot */ if (stop-start > TABSIZE+TABSIZE) { tab_lim = &table[TABSIZE]; /* sieve it all */ - fact_lim = (int)sqrt( - (double)(start)+TABSIZE+TABSIZE+1.0); + fact_lim = sqrt((double)(start)+TABSIZE+TABSIZE+1.0); } else { tab_lim = &table[(stop-start)/2]; /* partial sieve */ - fact_lim = (int)sqrt((double)(stop)+1.0); + fact_lim = sqrt((double)(stop)+1.0); } /* sieve for factors >= 17 */ factor = 17; /* 17 is first prime to use */ @@ -315,7 +324,7 @@ primes(start, stop) } else { q = &table[mod ? factor-(mod/2) : 0]; } - /* sive for our current factor */ + /* sieve for our current factor */ for ( ; q < tab_lim; q += factor) { *q = '\0'; /* sieve out a spot */ } @@ -326,15 +335,21 @@ primes(start, stop) */ for (q = table; q < tab_lim; ++q, start+=2) { if (*q) { - printf("%lu\n", (unsigned long) start); + printf("%lu", (unsigned long) start); + if (dflag) { + printf(" (%lu)", + (unsigned long) start - prev); + prev = start; + } + putchar('\n'); } } } } void -usage() +usage(void) { - (void)fprintf(stderr, "usage: primes [start [stop]]\n"); + (void)fprintf(stderr, "usage: primes [-d] [start [stop]]\n"); exit(1); } -- debian/patches/Replace-getline-with-get_line.patch0000644000000000000000000001310011734035054017370 0ustar From: Tobias Quathamer Date: Thu, 16 Feb 2012 11:26:00 +0100 Subject: Replace getline() with get_line() --- boggle/boggle/bog.c | 2 +- boggle/boggle/extern.h | 2 +- boggle/boggle/mach.c | 2 +- cribbage/crib.c | 4 ++-- cribbage/cribbage.h | 2 +- cribbage/io.c | 8 ++++---- gomoku/bdisp.c | 2 +- gomoku/gomoku.h | 2 +- gomoku/main.c | 14 +++++++------- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/boggle/boggle/bog.c b/boggle/boggle/bog.c index 276969b..0aaa086 100644 --- a/boggle/boggle/bog.c +++ b/boggle/boggle/bog.c @@ -336,7 +336,7 @@ playgame() } while (1) { - if (getline(buf) == NULL) { + if (get_line(buf) == NULL) { if (feof(stdin)) clearerr(stdin); break; diff --git a/boggle/boggle/extern.h b/boggle/boggle/extern.h index ba36561..734a4b9 100644 --- a/boggle/boggle/extern.h +++ b/boggle/boggle/extern.h @@ -43,7 +43,7 @@ void delay(int); long dictseek(FILE *, long, int); void findword(void); void flushin(FILE *); -char *getline(char *); +char *get_line(char *); void getword(char *); int help(void); int inputch(void); diff --git a/boggle/boggle/mach.c b/boggle/boggle/mach.c index b511296..dd89578 100644 --- a/boggle/boggle/mach.c +++ b/boggle/boggle/mach.c @@ -168,7 +168,7 @@ prwidth(base, indx) * - doesn't accept words longer than MAXWORDLEN or containing caps */ char * -getline(q) +get_line(q) char *q; { int ch, done; diff --git a/cribbage/crib.c b/cribbage/crib.c index 5fc53b3..9340126 100644 --- a/cribbage/crib.c +++ b/cribbage/crib.c @@ -221,7 +221,7 @@ game() if (!rflag) { /* player cuts deck */ msg(quiet ? "Cut for crib? " : "Cut to see whose crib it is -- low card wins? "); - getline(); + get_line(); } i = (rand() >> 4) % CARDS; /* random cut */ do { /* comp cuts deck */ @@ -397,7 +397,7 @@ cut(mycrib, pos) if (!rflag) { /* random cut */ msg(quiet ? "Cut the deck? " : "How many cards down do you wish to cut the deck? "); - getline(); + get_line(); } i = (rand() >> 4) % (CARDS - pos); turnover = deck[i + pos]; diff --git a/cribbage/cribbage.h b/cribbage/cribbage.h index ce2eecb..3187457 100644 --- a/cribbage/cribbage.h +++ b/cribbage/cribbage.h @@ -77,7 +77,7 @@ int eq(CARD, CARD); int fifteens(const CARD [], int); void game(void); void gamescore(void); -char *getline(void); +char *get_line(void); int getuchar(void); int incard(CARD *); int infrom(const CARD [], int, const char *); diff --git a/cribbage/io.c b/cribbage/io.c index 3d69257..8100ddd 100644 --- a/cribbage/io.c +++ b/cribbage/io.c @@ -245,7 +245,7 @@ incard(crd) retval = FALSE; rnk = sut = EMPTY; - if (!(line = getline())) + if (!(line = get_line())) goto gotit; p = p1 = line; while (*p1 != ' ' && *p1 != '\0') @@ -346,7 +346,7 @@ number(lo, hi, prompt) for (sum = 0;;) { msg(prompt); - if (!(p = getline()) || *p == '\0') { + if (!(p = get_line()) || *p == '\0') { msg(quiet ? "Not a number" : "That doesn't look like a number"); continue; @@ -528,12 +528,12 @@ over: } /* - * getline: + * get_line: * Reads the next line up to '\n' or EOF. Multiple spaces are * compressed to one space; a space is inserted before a ',' */ char * -getline() +get_line() { char *sp; int c, oy, ox; diff --git a/gomoku/bdisp.c b/gomoku/bdisp.c index 522d92f..d2de746 100644 --- a/gomoku/bdisp.c +++ b/gomoku/bdisp.c @@ -241,7 +241,7 @@ ask(str) } int -getline(buf, size) +get_line(buf, size) char *buf; int size; { diff --git a/gomoku/gomoku.h b/gomoku/gomoku.h index 0d9ff6e..3ebb42e 100644 --- a/gomoku/gomoku.h +++ b/gomoku/gomoku.h @@ -263,7 +263,7 @@ extern int debug; void bdinit(struct spotstr *); void init_overlap(void); -int getline(char *, int); +int get_line(char *, int); void ask(const char *); void dislog(const char *); void bdump(FILE *); diff --git a/gomoku/main.c b/gomoku/main.c index 299dee1..3ff4750 100644 --- a/gomoku/main.c +++ b/gomoku/main.c @@ -155,7 +155,7 @@ again: if (inputfp == NULL && test == 0) { for (;;) { ask("black or white? "); - getline(buf, sizeof(buf)); + get_line(buf, sizeof(buf)); if (buf[0] == 'b' || buf[0] == 'B') { color = BLACK; break; @@ -172,7 +172,7 @@ again: } } else { setbuf(stdout, 0); - getline(buf, sizeof(buf)); + get_line(buf, sizeof(buf)); if (strcmp(buf, "black") == 0) color = BLACK; else if (strcmp(buf, "white") == 0) @@ -244,7 +244,7 @@ again: getinput: if (interactive) ask("move? "); - if (!getline(buf, sizeof(buf))) { + if (!get_line(buf, sizeof(buf))) { curmove = RESIGN; break; } @@ -256,7 +256,7 @@ again: FILE *fp; ask("save file name? "); - (void)getline(buf, sizeof(buf)); + (void)get_line(buf, sizeof(buf)); if ((fp = fopen(buf, "w")) == NULL) { glog("cannot create save file"); goto getinput; @@ -309,14 +309,14 @@ again: if (i != RESIGN) { replay: ask("replay? "); - if (getline(buf, sizeof(buf)) && + if (get_line(buf, sizeof(buf)) && (buf[0] == 'y' || buf[0] == 'Y')) goto again; if (strcmp(buf, "save") == 0) { FILE *fp; ask("save file name? "); - (void)getline(buf, sizeof(buf)); + (void)get_line(buf, sizeof(buf)); if ((fp = fopen(buf, "w")) == NULL) { glog("cannot create save file"); goto replay; @@ -367,7 +367,7 @@ whatsup(signum) quit(); top: ask("cmd? "); - if (!getline(fmtbuf, sizeof(fmtbuf))) + if (!get_line(fmtbuf, sizeof(fmtbuf))) quit(); switch (*fmtbuf) { case '\0': -- debian/gbp.conf0000644000000000000000000000007611722532630010611 0ustar [DEFAULT] pristine-tar=True pbuilder=True export-dir=../build debian/copyright0000644000000000000000000000035111722213251011114 0ustar This is a Debian prepackaged version of the BSD games package. This package was put together by Joey Hess , using sources from: ftp://sunsite.unc.edu/pub/Linux/games/ Here is the full text of the COPYING file: debian/control0000644000000000000000000000177111733371103010576 0ustar Source: bsdgames Section: games Priority: optional Build-Depends: debhelper (>= 9), libncurses5-dev, flex, bison, wamerican, wbritish Maintainer: Debian Games Team Uploaders: Tobias Quathamer Standards-Version: 3.9.3 Vcs-Git: git://git.debian.org/git/pkg-games/bsdgames.git Vcs-Browser: http://git.debian.org/?p=pkg-games/bsdgames.git Package: bsdgames Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, wamerican | wordlist Description: collection of classic textual unix games This is a collection of some of the text-based games and amusements that have been enjoyed for decades on unix systems. . It includes these programs: adventure, arithmetic, atc, backgammon, battlestar, bcd, boggle, caesar, canfield, countmail, cribbage, dab, go-fish, gomoku, hack, hangman, hunt, mille, monop, morse, number, pig, phantasia, pom, ppt, primes, quiz, random, rain, robots, rot13, sail, snake, tetris, trek, wargames, worm, worms, wump, wtf debian/preinst0000644000000000000000000000307411722532630010602 0ustar #!/bin/sh set -e SCOREFILES=" /var/games/bsdgames/atc_score /var/games/bsdgames/battlestar.log /var/games/bsdgames/cfscores /var/games/bsdgames/criblog /var/games/bsdgames/saillog /var/games/bsdgames/snake.log /var/games/bsdgames/snakerawscores /var/games/bsdgames/tetris-bsd.scores /var/games/bsdgames/phantasia/characs /var/games/bsdgames/phantasia/gold /var/games/bsdgames/phantasia/lastdead /var/games/bsdgames/phantasia/mess /var/games/bsdgames/phantasia/motd /var/games/bsdgames/phantasia/scoreboard /var/games/bsdgames/phantasia/void /var/games/bsdgames/phantasia/monsters" # We used to keep score files in /var/lib/games, and if files are there, # move them into the new location. if [ -d /var/lib/games ]; then # Have to set up directory hierarchy, since this is running as a # preinst. mkdir -p /var/games/bsdgames/phantasia chown root:games /var/games/bsdgames \ /var/games/bsdgames/phantasia chmod g+rws /var/games/bsdgames \ /var/games/bsdgames/phantasia for file in $SCOREFILES; do oldfile=`echo $file | sed s:/var/games/:/var/lib/games/:` if [ -e $oldfile ]; then if [ ! -e $file ]; then mv -f $oldfile $file else rm -f $oldfile fi fi done # Delete the old directory hierarchy. rm -rf /var/lib/games/bsdgames fi # I didn't move robots_roll above, because the version used by old bsdgames has # a different file format. Make sure that if I'm ugrading from pre 2.8 days, # the old file is deleted. if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt 2.8; then rm -rf /var/games/bsdgames/robots_roll fi #DEBHELPER# debian/dirs0000644000000000000000000000012711722213251010046 0ustar usr/share/doc/bsdgames usr/share/games/bsdgames/phantasia var/games/bsdgames/hack/save debian/clean0000644000000000000000000000002011722213251010157 0ustar temp-dictionary debian/menu0000644000000000000000000000477411722213251010065 0ustar ?package(bsdgames):needs="text" section="Applications/Education" \ title="Arithmetic Quiz" command="sh -c 'arithmetic;echo PRESS ENTER;read line'" ?package(bsdgames):needs="text" section="Games/Strategy" \ title="Air Traffic Controller" \ command="sh -c 'atc ; echo;echo PRESS ENTER;read line'" ?package(bsdgames):needs="text" section="Games/Adventure" \ title="Battlestar" command="sh -c 'battlestar;echo PRESS ENTER;read line'" ?package(bsdgames):needs="text" section="Games/Adventure" \ title="Hack" command="hack" ?package(bsdgames):needs="text" section="Games/Card" \ title="Canfield" command="canfield" ?package(bsdgames):needs="text" section="Games/Card" \ title="Cribbage" command="cribbage" ?package(bsdgames):needs="text" section="Games/Card" \ title="Go Fish" \ command="sh -c 'go-fish;echo;echo PRESS ENTER;read line'" ?package(bsdgames):needs="text" section="Games/Card" \ title="Mille Bornes" command="mille" ?package(bsdgames):needs="text" section="Games/Board" \ title="Monopoly" command="monop" ?package(bsdgames):needs="text" section="Games/Board" hints="Backgammon" \ title="Backgammon" command="backgammon -pb" ?package(bsdgames):needs="text" section="Games/Toys" \ title="Rain" command="rain" ?package(bsdgames):needs="text" section="Games/Action" \ title="Robots" command="robots" ?package(bsdgames):needs="text" section="Games/Strategy" \ title="Sail" command="sail" ?package(bsdgames):needs="text" section="Games/Action" \ title="Snake" command="sh -c 'snake;echo PRESS ENTER;read line'" ?package(bsdgames):needs="text" section="Games/Action" \ title="Star Trek" command="trek" ?package(bsdgames):needs="text" section="Games/Action" \ title="Worm" command="sh -c 'worm;echo PRESS ENTER;read line'" ?package(bsdgames):needs="text" section="Games/Toys" \ title="Worms" command="worms" ?package(bsdgames):needs="text" section="Games/Adventure" \ title="Hunt the Wumpus" command="wump" ?package(bsdgames):needs="text" section="Games/Blocks" \ title="Bsd Tetris" \ command="sh -c 'tetris-bsd;echo;echo PRESS ENTER;read line'" ?package(bsdgames):needs="text" section="Games/Board" hints="Go" \ title="Gomoku" command="gomoku" ?package(bsdgames):needs="text" section="Games/Adventure" \ title="Phantasia" command="phantasia" ?package(bsdgames):needs="text" section="Games/Adventure" \ title="Adventure" command="adventure" ?package(bsdgames):needs="text" section="Games/Puzzles" \ title="Hangman" command="hangman" ?package(bsdgames):needs="text" section="Games/Puzzles" \ title="Boggle" command="boggle" debian/changelog0000644000000000000000000007100711734036145011051 0ustar bsdgames (2.17-21) unstable; urgency=low * Switch to debhelper v9 * Use all hardening features in DEB_BUILD_MAINT_OPTIONS -- Tobias Quathamer Mon, 26 Mar 2012 11:52:07 +0200 bsdgames (2.17-20) unstable; urgency=low * Set maintainer to Debian Games Team, add myself as uploader * Add git repository to debian/control * rain: Update default delay. Closes: #579062 * quiz: Add answers to adults/babies. Closes: #659528 * primes: Document maximum number in manpage. Closes: #636569 * primes: Updated to NetBSD CVS as of 2012-02-16 * wtf: Add NMU. Closes: #574036 * hangman: Error out on 1000 unsuitable words. Closes: #610270 * Rename files in debian/patches, managed now with gbp-pq * Remove Conflicts/Replaces on bsdgames-nonfree (<< 2.14) from debian/control, that version is long gone now * Remove Build-Depends on dpkg-dev (>= 1.9.0) * Use set -e in postinst, postrm, and preinst * Fix some typos spotted by Lintian * Update to Standards-Version 3.9.3 -- Tobias Quathamer Sat, 25 Feb 2012 17:11:48 +0100 bsdgames (2.17-19) unstable; urgency=low * debian/patches/define-dead.diff: - Define __dead in include/sys/cdefs.h * debian/patches/wump-update.diff: - Update wump sources to NetBSD CVS as of 2010-01-14. This fixes several bugs, including the over-crowded cave. Thanks to Jörg Neulist for the bug report and patch. Closes: #564891 -- Tobias Quathamer Fri, 15 Jan 2010 23:31:41 +0100 bsdgames (2.17-18) unstable; urgency=low * debian/patches/sort-acronyms.comp.diff: - Sort acronyms.comp with LC_ALL=C. Thanks to Jonas Kölker for the patch. Closes: #367689 - Add JFGI to acronyms.comp. Thanks to Muthu for the suggestion. Closes: #475044 * debian/patches/refresh-robots-screen.diff: - Properly refresh screen of robots game with CTRL-L. Thanks to tdenniston and Jonathan Davies for the patch and bug report. Closes: #562523, LP: #465530 * debian/patches/anne-boleyn.diff: - Fix spelling error of Anne Boleyn in murders quizfile. Thanks to Dean Menezes for the bug report. Closes: #562231 * debian/patches/capitals.diff: - Update african capitals and countries in quiz game. Thanks to Ulf Schaper for the bug report. Closes: #296027 - Update american capitals and countries in quiz game. - Update asian capitals and countries in quiz game. - Update european capitals and countries in quiz game. -- Tobias Quathamer Sat, 02 Jan 2010 21:59:41 +0100 bsdgames (2.17-17) unstable; urgency=low * New maintainer. Closes: #487466 * Switch to dpkg source format 3.0 (quilt) * debian/control: - Little changes to the description - Bump Standards-Version to 3.8.3 - Remove Git-Vcs line as it isn't up to date * debian/patches/replace-getline.diff: - Fix FTBFS by renaming the function getline() to get_line(). Closes: #552840, LP: #439394 * debian/patches/quiz-presidents.diff: - Add Barack Obama to the list of US presidents, thanks to Dean Bob and Joseph Smidt. Closes: #522352, LP: #319415 * debian/patches/add-acronyms.diff: - Add DD, DDPO, FTBFS, GIYF, LGPL, MOTU, MPL, RFS, RTSL, SRU and UTSL to acronyms.comp. Closes: #271786, #363945, #367688. - Add IANADD, NIMB/NIMBY, NTFS, SIYH, TINASOTODP, TINLA, WIR to acronyms. Closes: #440168, #474629, #523442. - Change all occurencies of "gnu" to uppercase, as it's a name (to match "XML" and "SCSI"). -- Tobias Quathamer Mon, 16 Nov 2009 22:03:56 +0100 bsdgames (2.17-16) unstable; urgency=low * trek: Fix spin on powerpc due to char signdness issue. Thanks, Wouter Verhelst. Closes: #234448 * Orphan the package, guess I forgot to earlier. -- Joey Hess Thu, 13 Nov 2008 13:46:27 -0500 bsdgames (2.17-15) unstable; urgency=low * Include rot13 in package description. Closes: #477141 * adventure: Fix crc code to not segfault on 64 bit architectures. Closes: #477768 * Use debhelper v7, rules file minimisation. -- Joey Hess Fri, 25 Apr 2008 16:03:59 -0400 bsdgames (2.17-14) unstable; urgency=low * Fix missing bracket in quiz poetry data file. Closes: #474594 * Update menu file to current policy. * Fixed some man page markup. -- Joey Hess Sun, 06 Apr 2008 13:33:55 -0400 bsdgames (2.17-13) unstable; urgency=low * Patch from Aaron Denney, fixing pluralization of singular fractions. Closes: #471762 -- Joey Hess Thu, 20 Mar 2008 21:47:24 -0400 bsdgames (2.17-12) unstable; urgency=low * Fix a bad cast in hunt that caused it to refuse to run on amd64 and likely also other 64 bit architectures. Closes: #342025 -- Joey Hess Sat, 22 Dec 2007 22:47:26 -0500 bsdgames (2.17-11) unstable; urgency=low * gcc 4.3 duplicate function parameter name fixes. Closes: #455662 -- Joey Hess Tue, 11 Dec 2007 00:26:57 -0500 bsdgames (2.17-10) unstable; urgency=low * Fix menu entry for worms. -- Joey Hess Thu, 02 Aug 2007 13:03:11 -0400 bsdgames (2.17-9) unstable; urgency=low * De-hardcode paths to /usr/games in menu file. * Menu section transition. * Current policy version. -- Joey Hess Sun, 08 Jul 2007 16:17:43 -0400 bsdgames (2.17-8) unstable; urgency=low * Patch from Alan Curry to backgammon to fix a bug that caused the computer player to skip a turn near the end of the game. Closes: #368771 * Also some tutorial grammar fixes. * Patch from Alan Curry to backgammon to make movallow() try again with dice swapped when it finds that there is no possible move with the second die after the first die was used to move a man off the bar. Closes: #185100 -- Joey Hess Wed, 24 May 2006 20:23:25 -0400 bsdgames (2.17-7) unstable; urgency=medium * sail: Fix a scanf buffer overrun in initial broadside prompt code, possibly exploitable. Closes: #360989 * dm: Fix some other, non exploitable scanf buffer overruns. -- Joey Hess Thu, 6 Apr 2006 19:59:35 -0400 bsdgames (2.17-6) unstable; urgency=medium * tetris-bsd: Apply patch from gentoo to fix input validation in score reading code to avoid stack overflow, and . Closes: # (CVE-2006-1539) -- Joey Hess Thu, 6 Apr 2006 18:58:10 -0400 bsdgames (2.17-5) unstable; urgency=low * Deal with removal of wenglish package. Closes: #345975 -- Joey Hess Wed, 4 Jan 2006 12:41:16 -0500 bsdgames (2.17-4) unstable; urgency=low * Manu file quoting improvmenets. * Current standards version. -- Joey Hess Sun, 18 Dec 2005 17:35:38 -0500 bsdgames (2.17-3) unstable; urgency=low * Rebuilt for g++ transition. -- Joey Hess Wed, 12 Oct 2005 16:09:58 -0400 bsdgames (2.17-2) unstable; urgency=low * Rename fish to go-fish, since fish is also the command name of the fish shell. Closes: #314460 -- Joey Hess Fri, 17 Jun 2005 13:51:14 -0400 bsdgames (2.17-1) unstable; urgency=low * New upstream release. -- Joey Hess Fri, 18 Feb 2005 13:12:51 -0500 bsdgames (2.16-5) unstable; urgency=low * Apply hack patch from Andreas Jochens to support building under gcc 4.0 which does stricter checking for static variables. Closes: #284750 -- Joey Hess Wed, 8 Dec 2004 14:39:12 -0500 bsdgames (2.16-4) unstable; urgency=low * Fixed a null pointer de-reference in hunt if run on a system with an interface with no link level address. Closes: #279903 -- Joey Hess Thu, 25 Nov 2004 11:23:09 -0500 bsdgames (2.16-3) unstable; urgency=low * Add docdir to config.params and don't unstall trek.me manually. -- Joey Hess Sun, 7 Mar 2004 15:50:16 -0900 bsdgames (2.16-2) unstable; urgency=low * FIx primes(6). Closes: #234515 -- Joey Hess Tue, 24 Feb 2004 11:26:42 -0500 bsdgames (2.16-1) unstable; urgency=low * New upstream release. -- Joey Hess Sat, 14 Feb 2004 16:34:08 -0500 bsdgames (2.15-1) unstable; urgency=low * New upstream release. - Fix backgammon scoring bug related to peices on the bar and gammons. Closes: #185101 - Fix backgammon tutorial text. Closes: #212478 - Advertising clause is gone from most, but not all licenses. - Apparently better fix for boggle man page. - Incorporates nearly all changes in Debian diff. -- Joey Hess Fri, 19 Dec 2003 18:04:24 -0500 bsdgames (2.14-8) unstable; urgency=low * Update for POSIX chown. Closes: #214043 * atc: Note in man page that pressing return will do an immediate update. Closes: #216980 -- Joey Hess Sat, 25 Oct 2003 18:16:33 -0400 bsdgames (2.14-7) unstable; urgency=low * Fix left/right confusion on worm man page. Closes: #209034 -- Joey Hess Sat, 6 Sep 2003 23:01:13 -0400 bsdgames (2.14-6) unstable; urgency=low * Move menu item to new policy-compliant Apps/Education. Closes: #194782 -- Joey Hess Sun, 13 Jul 2003 22:02:55 +0200 bsdgames (2.14-5) unstable; urgency=low * Fix rounding error in caesar due to too small data type. Caused it to sometimes make incorrect guesses. Thanks to Jan Vornberger for analysis and patch. Also forwarded upstream. Closes: #197816 -- Joey Hess Tue, 17 Jun 2003 19:36:44 -0400 bsdgames (2.14-4) unstable; urgency=low * Move atc and sail to Games/Strategy in menu, cf #194782 * Move rain and worms to Games/Toys, calling them screen savers is too much of a long shot. -- Joey Hess Wed, 28 May 2003 12:46:48 -0400 bsdgames (2.14-3) unstable; urgency=low * Corrected Bornes typo in menu entry. It's all the bash shell's fault. :-) Closes: #193126 -- Joey Hess Tue, 13 May 2003 10:19:41 -0400 bsdgames (2.14-2) unstable; urgency=low * My patch to bcd.6 is no longer necessary. * hack: Consistently refer to O as options key, not o. Closes: #191452 -- Joey Hess Thu, 1 May 2003 11:31:52 -0400 bsdgames (2.14-1) unstable; urgency=low * New upstream release, whivh includes hack, back fron bsdgames-nonfree. * Conflict and replace with old versions of bsdgames-nonfree that include hack. * Add hack to package description and menu file. * Add in hack's two READ_ME files to binay package. * Patched hack config.h as it is patched in bsdgames-nonfree. * Unlike bsdgames-nonfree, put the help, hh, rumors, and data files in /usr/share/games/bsdgames/hack, as the patched config.h makes it look there. * postinst moves over hack state files to new directory * Patched phantasia to use strerror and not segfault if it cannot open the var files. Closes: #187251 (patch sent upstream) -- Joey Hess Wed, 2 Apr 2003 20:44:19 -0500 bsdgames (2.13-11) unstable; urgency=low * Fixed silly typo in wargames man page. Closes: #169307 -- Joey Hess Sat, 16 Nov 2002 18:58:22 -0500 bsdgames (2.13-10) unstable; urgency=low * Updated to debhelper v4. -- Joey Hess Sat, 1 Jun 2002 22:26:40 -0400 bsdgames (2.13-9) unstable; urgency=low * Moved wtf acronym list into /usr/share/games. Closes: #144804 -- Joey Hess Wed, 22 May 2002 13:17:37 -0400 bsdgames (2.13-8) unstable; urgency=low * COrrected primes (really factor) man page. Closes: #144738 -- Joey Hess Sat, 27 Apr 2002 11:00:25 -0400 bsdgames (2.13-7) unstable; urgency=low * Make sure boggle is always built with the same wordlist, and use the union of wenglish and wbristish for that list. Building with web2 resulted in too many scrabble-words.. -- Joey Hess Sun, 7 Apr 2002 20:27:57 -0400 bsdgames (2.13-6) unstable; urgency=low * Fixed man page warnings, Closes: #139414 -- Joey Hess Thu, 21 Mar 2002 22:24:53 -0500 bsdgames (2.13-4) unstable; urgency=low * Corrected hint => hints, Closes: #134120 -- Joey Hess Fri, 15 Feb 2002 16:36:20 -0500 bsdgames (2.13-3) unstable; urgency=low * Added -m option to hangman to set MINLEN. Closes: #129998 -- Joey Hess Sat, 19 Jan 2002 18:04:06 -0500 bsdgames (2.13-2) unstable; urgency=low * Fixed bad merge (that's why sail was broken). -- Joey Hess Sat, 29 Dec 2001 13:37:00 -0500 bsdgames (2.13-1) unstable; urgency=low * New upstream release. * Patched sail/sync.c to build (lots of missing includes and other trivial mistakes). -- Joey Hess Fri, 28 Dec 2001 18:15:41 -0500 bsdgames (2.12-11) unstable; urgency=low * Added menu hints for backgammon and gomoku, Closes: #121012, #121012 NB: holding off on changing menu titles until I see evidence it's really necessary. -- Joey Hess Sun, 25 Nov 2001 21:48:03 -0500 bsdgames (2.12-10) unstable; urgency=low * Fixed tetris on sun systems to not lag 3 keystrokes behind, patch from upstream. Closes: #97033 -- Joey Hess Sun, 18 Nov 2001 17:19:18 -0500 bsdgames (2.12-9) unstable; urgency=low * Corrected cost of slime. Closes: #110782 * Added '-' to character class, so wargames can launch moon-buggy. This is clearly a vital fix, but I hesitate to increase the severity of this upload. Closes: #93638 -- Joey Hess Mon, 17 Sep 2001 00:51:07 -0400 bsdgames (2.12-8) unstable; urgency=low * Applied a patch from Igor Khavkine to make the package build on the Hurd. Closes: #98562 -- Joey Hess Wed, 23 May 2001 22:49:26 -0400 bsdgames (2.12-7) unstable; urgency=low * Modified all the rest of the menu items that need a pause after running. Also fixed bashisms in the pause code.. -- Joey Hess Fri, 11 May 2001 16:19:13 -0400 bsdgames (2.12-6) unstable; urgency=low * Pause after tetris-bsd exits when run from the menu, to give a chance for the high scores to be seen. Closes: #96999 -- Joey Hess Thu, 10 May 2001 21:49:37 -0400 bsdgames (2.12-5) unstable; urgency=low * Added AIUI, Closes: #90973 -- Joey Hess Sat, 24 Mar 2001 14:27:16 -0800 bsdgames (2.12-4) unstable; urgency=low * Added real dependancy alternate (lintian). * Debhelper v3. -- Joey Hess Sat, 10 Feb 2001 00:24:27 -0800 bsdgames (2.12-3) unstable; urgency=low * Corrected snake's usage message, Closes: #84852 * Patch from Malcolm Parsons to fix snake scoring problem, Closes: #80549 * Statoverride transition. -- Joey Hess Sun, 4 Feb 2001 14:06:28 -0800 bsdgames (2.12-2) unstable; urgency=low * Depends on wordlist, Closes: #76331 -- Joey Hess Sun, 5 Nov 2000 15:25:06 -0800 bsdgames (2.12-1) unstable; urgency=low * New upstream release, fixing problems in battlestar. Closes: #70465 -- Joey Hess Tue, 26 Sep 2000 09:21:22 -0700 bsdgames (2.11-4) unstable; urgency=low * Updated to debhelper v2. -- Joey Hess Mon, 25 Sep 2000 14:14:51 -0700 bsdgames (2.11-3) unstable; urgency=low * Fixed a typo in bcd's man page. -- Joey Hess Thu, 31 Aug 2000 21:33:33 -0700 bsdgames (2.11-2) unstable; urgency=low * Patch from pmaydell@chiark.greenend.org.uk to fix a segfault in battlestar if you say "wear knfo" or similar nonsensical things. (Patch also sent upstream.) Closes: #70465 -- Joey Hess Mon, 28 Aug 2000 17:16:27 -0700 bsdgames (2.11-1) unstable; urgency=low * New upstream. -- Joey Hess Wed, 19 Apr 2000 14:30:22 -0700 bsdgames (2.10-3) unstable; urgency=low * Modified asian capitals quiz with some corrections. Closes: #62078 -- Joey Hess Sun, 9 Apr 2000 15:16:40 -0700 bsdgames (2.10-2) unstable; urgency=low * Fixed countmail man page, Closes: #61846 -- Joey Hess Wed, 5 Apr 2000 13:42:58 -0700 bsdgames (2.10-1) unstable; urgency=low * New upstream release. -- Joey Hess Sat, 12 Feb 2000 16:35:11 -0800 bsdgames (2.9-4) unstable; urgency=low * Built with ncurses5, Closes: #55448 -- Joey Hess Fri, 21 Jan 2000 15:26:56 -0800 bsdgames (2.9-3) unstable; urgency=low * Download directory update. -- Joey Hess Tue, 11 Jan 2000 15:53:35 -0800 bsdgames (2.9-2) unstable; urgency=low * Build deps. Boggle is now forced to always build with wgenlish as it's word list, for consitency. Unfortunatly, it cannot use the currnetly install word list because it hashes it at install time. -- Joey Hess Sat, 4 Dec 1999 00:13:01 -0800 bsdgames (2.9-1) unstable; urgency=low * New upstream version. * Patch from Malcolm to fix tetris-bsd score formatting if there are more than 10 scores. (Closes: #50031) * Include /var/games/bsdgames/sail, (Closes: #50074) * Fixed robots spelling mistake, (Closes: #50075) * tetris-bsd now uses its name, (Closes: #50077) * Fixed phantasia/characs permissions so it's not world-readable (passwords) (Closes: #50076) -- Joey Hess Sat, 13 Nov 1999 14:14:34 -0800 bsdgames (2.8-5) unstable; urgency=low * Patch from Malcolm Parsons to fix robots -A score problem. (Closes: #49894) * Patch from Malcolm to fix robots so it asks if you want a new game after each game. (Closes: #49897) -- Joey Hess Thu, 11 Nov 1999 11:28:52 -0800 bsdgames (2.8-4) unstable; urgency=low * Fixed rot13 test suite to work before the package is installed. Closes: #48559 -- Joey Hess Thu, 28 Oct 1999 11:35:49 -0700 bsdgames (2.8-3) unstable; urgency=low * Patch from William Brioschi to make random work on alpha. Closes: #47903 (forwared upstream) -- Joey Hess Sun, 24 Oct 1999 16:27:54 -0700 bsdgames (2.8-2) unstable; urgency=low * Corrected the capital of Monaco. (Closes: #46119) -- Joey Hess Mon, 27 Sep 1999 12:53:20 -0700 bsdgames (2.8-1) unstable; urgency=low * New upstream release. * Updated copyright based on the updated COPYING file * RUn the regression tests at build time. -- Joey Hess Sun, 26 Sep 1999 14:30:06 -0700 bsdgames (2.7-3) unstable; urgency=low * FHS. This involves moving to /var/games for all game data. Score files are moved to there in the postinst now. * Removed bashisms in debian/rules -- Joey Hess Wed, 8 Sep 1999 17:02:12 -0700 bsdgames (2.7-2) unstable; urgency=low * Removed 2 patches I made that are no longer necessary. -- Joey Hess Wed, 7 Apr 1999 14:53:52 -0700 bsdgames (2.7-1) unstable; urgency=low * New upstream release. -- Joey Hess Tue, 6 Apr 1999 23:50:51 -0700 bsdgames (2.6-2) unstable; urgency=low * Fixed backgammon to correctly calculate the game value, patch from sjl@debian.lib.monash.edu.au (Stuart Lamble) (#35038) -- Joey Hess Thu, 25 Mar 1999 13:33:07 -0800 bsdgames (2.6-1) unstable; urgency=low * New upstream release. -- Joey Hess Sun, 20 Dec 1998 00:24:18 -0500 bsdgames (2.5-4) frozen unstable; urgency=low * Commented out a bogus sprintf prototype in sail/sync.c, makes sail not segfault on startup. (#30246). -- Joey Hess Tue, 1 Dec 1998 12:52:14 -0800 bsdgames (2.5-3) unstable; urgency=low * Built with newest debhelper to change how sgid binaries are registered. -- Joey Hess Tue, 27 Oct 1998 20:59:48 -0800 bsdgames (2.5-2) unstable; urgency=low * Removed bougs wordlist | wenglish dependancy. -- Joey Hess Thu, 1 Oct 1998 12:59:53 -0700 bsdgames (2.5-1) unstable; urgency=low * New upstream release - boggle is now free. -- Joey Hess Thu, 24 Sep 1998 17:17:32 -0700 bsdgames (2.4-1) unstable; urgency=low * New upstream release. -- Joey Hess Sat, 5 Sep 1998 15:49:53 -0700 bsdgames (2.3-2) unstable; urgency=low * Make NEWS be a symlink to the upstream changelog, so the file name is preserved. -- Joey Hess Thu, 20 Aug 1998 15:57:14 -0700 bsdgames (2.3-1) unstable; urgency=low * New upstream release, that fixes a file in /tmp security hole in sail and also integrates many security fixes from OpenBSD intended to let the games run sgid games. * Given those fixes, I've re-enabled the sgid games bit on the games that need it, and removed the README.Debian about this. * Reworked how configure script is run, following the author's new docs in PACKAGING. * Applied patch from upstream to fix #25933, segfault in number if given a negative value. * Re-enabled bell in robots, it seems to work ok in an xterm now. -- Joey Hess Wed, 19 Aug 1998 14:54:48 -0700 bsdgames (2.1-8) unstable; urgency=low * Use single = in postrm (#25512). -- Joey Hess Fri, 7 Aug 1998 12:14:35 -0700 bsdgames (2.1-7) unstable; urgency=low * Fixed menu file so adventure will show up. -- Joey Hess Wed, 5 Aug 1998 14:21:20 -0700 bsdgames (2.1-6) unstable; urgency=low * Once more rebuilt with newer ncurses lib to fix worm and mille segfaults. Why is ncusrses doing this to me? -- Joey Hess Wed, 22 Jul 1998 20:22:01 -0700 bsdgames (2.1-5) unstable; urgency=low * Rebuilt with fakeroot to fix libtricks breakage. -- Joey Hess Thu, 16 Jul 1998 11:03:20 -0700 bsdgames (2.1-4) unstable; urgency=low * Fixed minor spelling error in quiz/europe (#24586), reported by Branden Robinson. -- Joey Hess Tue, 14 Jul 1998 23:02:23 -0700 bsdgames (2.1-3) frozen unstable; urgency=medium * Reluctantly removed all sgid bits from all games in the package. I have found at least 2 easy exploits of a sgid bit that get you sgid games shells, and there are probably many more. See the TODO, which has a security audit as it's first priority, but explains the difficulties of one. * Added a README.Debian exaplaining this in greater detail. -- Joey Hess Thu, 18 Jun 1998 10:06:54 -0700 bsdgames (2.1-2) frozen unstable; urgency=low * Just rebuilt with newer ncurses lib to fix worm and mille segfaults. -- Joey Hess Sun, 7 Jun 1998 09:17:11 -0400 bsdgames (2.1-1) frozen unstable; urgency=low * New upstream bugfix release: - adds man page for wargames to upstream source. - uses .Bstar for battlestar save game file (a change I made long ago to the debian version) - changes to build process that don't affect us. - bugfixes. -- Joey Hess Mon, 30 Mar 1998 12:03:30 -0800 bsdgames (2.0-4) unstable; urgency=low * No high score files are conffiles now. * For phantasia's "monsters" and "void" files, which cannot be simply touched in the postinst, I now copy them over from /usr/share/games/bsdgames/phantasia in the postinst, if they don't already exist. -- Joey Hess Tue, 10 Mar 1998 18:08:51 -0800 bsdgames (2.0-3) unstable; urgency=low * Added a man page for wargames. (Wow, never thought my movie guide book would be useful in debian development!) -- Joey Hess Sun, 22 Feb 1998 18:42:17 -0800 bsdgames (2.0-2) unstable; urgency=low * Updated standards-version. -- Joey Hess Mon, 9 Feb 1998 15:09:56 -0800 bsdgames (2.0-1) unstable; urgency=low * New upstream release. * Sail works again now, added back to package. Now all games are properly working with libc6, at last. * Removed hunt from the debian menu - for now, you need to manually run huntd, and then hunt. -- Joey Hess Fri, 26 Dec 1997 13:34:34 -0500 bsdgames (1.5-4) unstable; urgency=low * Sparc fixes: - Removed strcpy(), strncpy() prototypes. - Modified snake/snake/move.c to not redefine raw(). - Modified worms.c to not redefine random. -- Joey Hess Thu, 11 Dec 1997 12:10:17 -0500 bsdgames (1.5-3) unstable; urgency=low * Fixed adventure to work again, and added it back into the package. Thanks, Culus! * Moved screen savers into Screen/Save/Text menu. -- Joey Hess Fri, 21 Nov 1997 16:22:14 -0500 bsdgames (1.5-2) unstable; urgency=low * Removed the factor program, which is also in shellutils (#14676). * Modified primes.6 man page, so it only documents the primes program (used to document factor and primes). * Install factor.6 as primes.6, instead of making a symlink. * Use debhelper. -- Joey Hess Sun, 9 Nov 1997 14:13:05 -0500 bsdgames (1.5-1) unstable; urgency=low * New upstream release. - new games: adventure, phantasia, pig, quiz, random. - updated other games to new versions. * Libc6 at last. - however, adventure and sail are currently broken under libc6, and not included in the binary package. * Changed how the configure script is run during building, new method is more robust. * Fixed menu file entry for go fish to pause after end of game so the user can see who won. * Make tetris-bsd score file a conffile. * Use pristine upstream source. -- Joey Hess Sat, 19 Jul 1997 12:25:03 -0400 bsdgames (1.4-1) unstable; urgency=low * New upstream release, incorporates many of the changes I made for debian. * No longer have to delete bog and paranioa out of the upstream source, they have been split out into a bsdgames-nonfree package. * Tetris is now part of the upstream source, no need for tetris.shar. * /usr/games/tetris renamed to /usr/games/tetris-bsd * /usr/share used for arch-independant data. * Reccommends: wordlist | wenglish; closes #8487 -- Joey Hess Thu, 1 May 1997 23:07:46 -0400 bsdgames (1.3-8) unstable; urgency=low * Removed fortune from descrition, as fortune is not included in this package (#9168). * Converted menufile to menu-1 format. -- Joey Hess Mon, 28 Apr 1997 13:25:24 -0400 bsdgames (1.3-7) frozen unstable; urgency=low * Fixed problem with including tetris in the source package. Tetris is now included as a shar archive. -- Joey Hess Wed, 16 Apr 1997 18:39:31 -0400 bsdgames (1.3-6) frozen unstable; urgency=low * Fixed segfault in backgammon if any command line options were given. * Use backgammon -pb in the debian menu file. -- Joey Hess Tue, 15 Apr 1997 14:27:04 -0400 bsdgames (1.3-5) frozen unstable; urgency=low * Hacked around in mille to fix bug #8556. -- Joey Hess Tue, 8 Apr 1997 20:03:23 -0400 bsdgames (1.3-4) unstable; urgency=low * Fixed sparse files problem (#8488) -- the package should install in much less space now. * Routine update of debian/rules: Run dpkg-gencontrol after debstd, and delete substvars during clean. -- Joey Hess Fri, 4 Apr 1997 19:48:12 -0500 bsdgames (1.3-3) unstable; urgency=low * Fixed problems in source package: * Removed binaries in hangman directory. * dpkg-source -x would not work with version 1.3-2. Fixed this. * Corrected typo in hangman's man page. -- Joey Hess Wed, 26 Mar 1997 14:02:24 -0500 bsdgames (1.3-2) unstable; urgency=low * robots: if player cannot move, don't print junk characters in xterm when trying to beep. * Routine update of debian/rules: Run dpkg-gencontrol after debstd, and delete substvars during clean. * Added tetris, thanks to David Frey . -- Joey Hess Sun, 23 Mar 1997 18:05:41 -0500 bsdgames (1.3-1) unstable; urgency=low * First release. * Link with -ncurses instead of -termcap. * "rm -r bog paranioa" to remove them from the source package. Their copyright doesn't let them be in debian. * Many changes to get it all to compile. * More changes for debian packaging; moved score files into /var, made some programs sgid games so they could write to score files, etc. * Fixed up man pages. * battlestar: renamed save file to ~/.Bstar * cribbage: display help properly even if PAGER is not set to an absolute pathname of the pager. * snscore: don't segfault if the score file is empty. * snscore: don't give "too many players" error. -- Joey Hess Thu, 20 Mar 1997 23:31:16 -0500