~ubuntu-branches/ubuntu/oneiric/bsdgames/oneiric

« back to all changes in this revision

Viewing changes to debian/patches/debian-changes-2.17-18

  • Committer: Bazaar Package Importer
  • Author(s): Tobias Quathamer
  • Date: 2010-01-02 21:59:41 UTC
  • mfrom: (4.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100102215941-8sdee93xrgn25yp2
Tags: 2.17-18
* 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.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Upstream changes introduced in version 2.17-18
 
2
 This patch has been created by dpkg-source during the package build.
 
3
 Here's the last changelog entry, hopefully it gives details on why
 
4
 those changes were made:
 
5
 .
 
6
 bsdgames (2.17-18) unstable; urgency=low
 
7
 .
 
8
   * debian/patches/sort-acronyms.comp.diff:
 
9
     - Sort acronyms.comp with LC_ALL=C. Thanks to Jonas Kölker for the
 
10
       patch. Closes: #367689
 
11
     - Add JFGI to acronyms.comp. Thanks to Muthu for the suggestion.
 
12
       Closes: #475044
 
13
   * debian/patches/refresh-robots-screen.diff:
 
14
     - Properly refresh screen of robots game with CTRL-L. Thanks to
 
15
       tdenniston and Jonathan Davies for the patch and bug report.
 
16
       Closes: #562523, LP: #465530
 
17
   * debian/patches/anne-boleyn.diff:
 
18
     - Fix spelling error of Anne Boleyn in murders quizfile. Thanks
 
19
       to Dean Menezes for the bug report. Closes: #562231
 
20
   * debian/patches/capitals.diff:
 
21
     - Update african capitals and countries in quiz game. Thanks to
 
22
       Ulf Schaper for the bug report. Closes: #296027
 
23
     - Update american capitals and countries in quiz game.
 
24
     - Update asian capitals and countries in quiz game.
 
25
     - Update european capitals and countries in quiz game.
 
26
 .
 
27
 The person named in the Author field signed this changelog entry.
 
28
Author: Tobias Quathamer <toddy@debian.org>
 
29
Bug-Debian: http://bugs.debian.org/296027
 
30
Bug-Debian: http://bugs.debian.org/367689
 
31
Bug-Debian: http://bugs.debian.org/475044
 
32
Bug-Debian: http://bugs.debian.org/562231
 
33
Bug-Debian: http://bugs.debian.org/562523
 
34
Bug-Ubuntu: https://bugs.launchpad.net/bugs/465530
 
35
 
 
36
---
 
37
The information above should follow the Patch Tagging Guidelines, please
 
38
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
 
39
are templates for supplementary fields that you might want to add:
 
40
 
 
41
Origin: <vendor|upstream|other>, <url of original patch>
 
42
Bug: <url in upstream bugtracker>
 
43
Bug-Debian: http://bugs.debian.org/<bugnumber>
 
44
Forwarded: <no|not-needed|url proving that it has been forwarded>
 
45
Reviewed-By: <name and email of someone who approved the patch>
 
46
Last-Update: <YYYY-MM-DD>
 
47
 
 
48
--- /dev/null
 
49
+++ bsdgames-2.17/config.params
 
50
@@ -0,0 +1,42 @@
 
51
+# This file is read by configure and is used during the build of the
 
52
+# Debian package.
 
53
+
 
54
+# Don't run configure interactively.
 
55
+bsd_games_cfg_non_interactive=y
 
56
+
 
57
+# Install into here for building the package.
 
58
+bsd_games_cfg_install_prefix=`pwd`/debian/bsdgames
 
59
+
 
60
+# Do not build or install these games:
 
61
+bsd_games_cfg_no_build_dirs="dm banner fortune factor"
 
62
+
 
63
+# Keep huntd in /usr/sbin as it was in the past. I may 
 
64
+# change this later.
 
65
+bsd_games_cfg_sbindir=/usr/sbin
 
66
+
 
67
+# Debian doesn't like cluttering up the /usr/*/games/ dirs too much,
 
68
+# use a subdir. /var too.
 
69
+bsd_games_cfg_usrlibdir=/usr/lib/games/bsdgames
 
70
+bsd_games_cfg_sharedir=/usr/share/games/bsdgames
 
71
+bsd_games_cfg_varlibdir=/var/games/bsdgames
 
72
+
 
73
+# Do not do chown now, we arn't running as root.
 
74
+bsd_games_cfg_do_chown=n
 
75
+
 
76
+# Debian perfers symlinks for manpages.
 
77
+bsd_games_cfg_use_dot_so=symlinks
 
78
+
 
79
+# I'll handle manpage compressing.
 
80
+bsd_games_cfg_gzip_manpages=n
 
81
+
 
82
+# Policy says to use /usr/bin/pager by default.
 
83
+bsd_games_cfg_pager=/usr/bin/pager
 
84
+
 
85
+# Always use the same wordlist for boggle, and don't use web2, it's too
 
86
+# big. Instead, use the union of the wenglish and wbritish wordlists.
 
87
+bsd_games_cfg_dictionary_src=`pwd`/temp-dictionary
 
88
+
 
89
+# Put it in /usr/share/games with the rest of the games data.
 
90
+bsd_games_cfg_wtf_acronymfile=/usr/share/games/bsdgames/acronyms
 
91
+
 
92
+bsd_games_cfg_docdir=/usr/share/doc/bsdgames
 
93
--- bsdgames-2.17.orig/arithmetic/arithmetic.6
 
94
+++ bsdgames-2.17/arithmetic/arithmetic.6
 
95
@@ -79,7 +79,7 @@ divide by or subtract will be between 0 
 
96
 .Nm
 
97
 will not ask you to divide by 0.)
 
98
 The default
 
99
-.I range
 
100
+.It range
 
101
 is 10.
 
102
 .El
 
103
 .Pp
 
104
--- bsdgames-2.17.orig/dm/dm.c
 
105
+++ bsdgames-2.17/dm/dm.c
 
106
@@ -134,19 +134,19 @@ read_config()
 
107
        while (fgets(lbuf, sizeof(lbuf), cfp))
 
108
                switch (*lbuf) {
 
109
                case 'b':               /* badtty */
 
110
-                       if (sscanf(lbuf, "%s%s", f1, f2) != 2 ||
 
111
+                       if (sscanf(lbuf, "%39s%39s", f1, f2) != 2 ||
 
112
                            strcasecmp(f1, "badtty"))
 
113
                                break;
 
114
                        c_tty(f2);
 
115
                        break;
 
116
                case 'g':               /* game */
 
117
-                       if (sscanf(lbuf, "%s%s%s%s%s",
 
118
+                       if (sscanf(lbuf, "%39s%39s%39s%39s%39s",
 
119
                            f1, f2, f3, f4, f5) != 5 || strcasecmp(f1, "game"))
 
120
                                break;
 
121
                        c_game(f2, f3, f4, f5);
 
122
                        break;
 
123
                case 't':               /* time */
 
124
-                       if (sscanf(lbuf, "%s%s%s%s", f1, f2, f3, f4) != 4 ||
 
125
+                       if (sscanf(lbuf, "%39s%39s%39s%39s", f1, f2, f3, f4) != 4 ||
 
126
                            strcasecmp(f1, "time"))
 
127
                                break;
 
128
                        c_day(f2, f3, f4);
 
129
--- bsdgames-2.17.orig/dab/gamescreen.h
 
130
+++ bsdgames-2.17/dab/gamescreen.h
 
131
@@ -70,9 +70,9 @@ class GAMESCREEN {
 
132
     virtual void redraw(void) = 0;                     // Refresh
 
133
     virtual int getinput(void) = 0;                    // Get user input
 
134
     virtual void bell(void) = 0;                       // Beep
 
135
-    virtual void score(size_t p, const PLAYER& p) = 0; // Post current score
 
136
-    virtual void games(size_t p, const PLAYER& p) = 0; // Post games won
 
137
-    virtual void total(size_t p, const PLAYER& p) = 0; // Post total score
 
138
+    virtual void score(size_t s, const PLAYER& p) = 0; // Post current score
 
139
+    virtual void games(size_t s, const PLAYER& p) = 0; // Post games won
 
140
+    virtual void total(size_t s, const PLAYER& p) = 0; // Post total score
 
141
     virtual void ties(const PLAYER& p) = 0;            // Post tie games
 
142
 };
 
143
 
 
144
--- bsdgames-2.17.orig/adventure/crc.c
 
145
+++ bsdgames-2.17/adventure/crc.c
 
146
@@ -42,6 +42,8 @@ __RCSID("$NetBSD: crc.c,v 1.8 2003/08/07
 
147
 #endif
 
148
 #endif /* not lint */
 
149
 
 
150
+#include <limits.h>
 
151
+
 
152
 #include "extern.h"
 
153
 
 
154
 const unsigned long crctab[] = {
 
155
@@ -125,7 +127,7 @@ crc(ptr, nr)                /* Process nr bytes at a t
 
156
 
 
157
        while (nr > 0)
 
158
                for (p = ptr; nr--; ++p) {
 
159
-                       if (!(i = crcval >> 24 ^ *p)) {
 
160
+                       if (!(i = crcval >> (sizeof(crcval) * CHAR_BIT - 8) ^ *p)) {
 
161
                                i = step++;
 
162
                                if (step >= sizeof(crctab) / sizeof(crctab[0]))
 
163
                                        step = 0;
 
164
--- bsdgames-2.17.orig/number/number.c
 
165
+++ bsdgames-2.17/number/number.c
 
166
@@ -78,9 +78,9 @@ static const char     *const name1[] = {
 
167
 
 
168
 void   convert(char *);
 
169
 int    main(int, char *[]);
 
170
-int    number(const char *, int);
 
171
-void   pfract(int);
 
172
-int    unit(int, const char *);
 
173
+int    number(const char *, int, int *);
 
174
+void   pfract(int, int);
 
175
+int    unit(int, const char *, int *);
 
176
 void   usage(void) __attribute__((__noreturn__));
 
177
 
 
178
 int lflag;
 
179
@@ -131,7 +131,7 @@ void
 
180
 convert(line)
 
181
        char *line;
 
182
 {
 
183
-       int flen, len, rval;
 
184
+       int flen, len, rval, singular;
 
185
        char *p, *fraction;
 
186
 
 
187
        flen = 0;
 
188
@@ -174,7 +174,7 @@ badnum:                     errx(1, "illegal number: %s", 
 
189
                --len;
 
190
        }
 
191
 
 
192
-       rval = len > 0 ? unit(len, line) : 0;
 
193
+       rval = len > 0 ? unit(len, line, &singular) : 0;
 
194
        if (fraction != NULL && flen != 0)
 
195
                for (p = fraction; *p != '\0'; ++p)
 
196
                        if (*p != '0') {
 
197
@@ -182,10 +182,10 @@ badnum:                   errx(1, "illegal number: %s", 
 
198
                                        (void)printf("%sand%s",
 
199
                                            lflag ? " " : "",
 
200
                                            lflag ? " " : "\n");
 
201
-                               if (unit(flen, fraction)) {
 
202
+                               if (unit(flen, fraction, &singular)) {
 
203
                                        if (lflag)
 
204
                                                (void)printf(" ");
 
205
-                                       pfract(flen);
 
206
+                                       pfract(flen, singular);
 
207
                                        rval = 1;
 
208
                                }
 
209
                                break;
 
210
@@ -197,9 +197,10 @@ badnum:                    errx(1, "illegal number: %s", 
 
211
 }
 
212
 
 
213
 int
 
214
-unit(len, p)
 
215
+unit(len, p, singular)
 
216
        int len;
 
217
        const char *p;
 
218
+       int *singular;
 
219
 {
 
220
        int off, rval;
 
221
 
 
222
@@ -208,7 +209,7 @@ unit(len, p)
 
223
                if (len % 3) {
 
224
                        off = len % 3;
 
225
                        len -= off;
 
226
-                       if (number(p, off)) {
 
227
+                       if (number(p, off, singular)) {
 
228
                                rval = 1;
 
229
                                (void)printf(" %s%s",
 
230
                                    name3[len / 3], lflag ? " " : ".\n");
 
231
@@ -217,14 +218,16 @@ unit(len, p)
 
232
                }
 
233
                for (; len > 3; p += 3) {
 
234
                        len -= 3;
 
235
-                       if (number(p, 3)) {
 
236
+                       if (number(p, 3, singular)) {
 
237
                                rval = 1;
 
238
                                (void)printf(" %s%s",
 
239
                                    name3[len / 3], lflag ? " " : ".\n");
 
240
                        }
 
241
                }
 
242
        }
 
243
-       if (number(p, len)) {
 
244
+       if (number(p, len, singular)) {
 
245
+               if (rval)
 
246
+                       *singular = 0;
 
247
                if (!lflag)
 
248
                        (void)printf(".\n");
 
249
                rval = 1;
 
250
@@ -233,17 +236,20 @@ unit(len, p)
 
251
 }
 
252
 
 
253
 int
 
254
-number(p, len)
 
255
+number(p, len, singular)
 
256
        const char *p;
 
257
        int len;
 
258
+       int *singular;
 
259
 {
 
260
        int val, rval;
 
261
 
 
262
        rval = 0;
 
263
+       *singular = 1;
 
264
        switch (len) {
 
265
        case 3:
 
266
                if (*p != '0') {
 
267
                        rval = 1;
 
268
+                       *singular = 0;
 
269
                        (void)printf("%s hundred", name1[*p - '0']);
 
270
                }
 
271
                ++p;
 
272
@@ -262,33 +268,42 @@ number(p, len)
 
273
                        }
 
274
                        rval = 1;
 
275
                }
 
276
+               if (val != 1)
 
277
+                       *singular = 0;
 
278
                break;
 
279
        case 1:
 
280
                if (*p != '0') {
 
281
                        rval = 1;
 
282
                        (void)printf("%s", name1[*p - '0']);
 
283
                }
 
284
+               if (*p != '1')
 
285
+                       *singular = 0;
 
286
        }
 
287
        return (rval);
 
288
 }
 
289
 
 
290
 void
 
291
-pfract(len)
 
292
+pfract(len, singular)
 
293
        int len;
 
294
+       int singular;
 
295
 {
 
296
        static const char *const pref[] = { "", "ten-", "hundred-" };
 
297
 
 
298
        switch(len) {
 
299
        case 1:
 
300
-               (void)printf("tenths.\n");
 
301
+               (void)printf("tenth");
 
302
                break;
 
303
        case 2:
 
304
-               (void)printf("hundredths.\n");
 
305
+               (void)printf("hundredth");
 
306
                break;
 
307
        default:
 
308
-               (void)printf("%s%sths.\n", pref[len % 3], name3[len / 3]);
 
309
+               (void)printf("%s%sth", pref[len % 3], name3[len / 3]);
 
310
                break;
 
311
        }
 
312
+       if (!singular) {
 
313
+               printf("s");
 
314
+       }
 
315
+       printf(".\n");
 
316
 }
 
317
 
 
318
 void
 
319
--- bsdgames-2.17.orig/backgammon/teachgammon/ttext1.c
 
320
+++ bsdgames-2.17/backgammon/teachgammon/ttext1.c
 
321
@@ -94,7 +94,7 @@ const char   *const intro2[] = {
 
322
        "\n   Although not indicated on the board, the players' homes are",
 
323
        "located just to the right of the board.  A player's men are placed",
 
324
        "there when they are removed from the board.  The board you just",
 
325
-       "saw was in it's initial position.  All games start with the board",
 
326
+       "saw was in its initial position.  All games start with the board",
 
327
        "looking like this.  Notice that red's pieces are represented by the",
 
328
        "letter 'r' and white's pieces are represented by the letter 'w'.",
 
329
        "Also, a position may have zero or more pieces on it, e.g.  posi-",
 
330
--- bsdgames-2.17.orig/backgammon/teachgammon/ttext2.c
 
331
+++ bsdgames-2.17/backgammon/teachgammon/ttext2.c
 
332
@@ -65,7 +65,7 @@ const char   *const stragy[] = {
 
333
        "points in a row) are difficult to form, many points nestled close-",
 
334
        "ly together produce a formidable barrier.  Also, while it is good",
 
335
        "to move back men forward, doing so lessens the opportunity for you",
 
336
-       "to hit men.  Finally, remember that once the two player's have",
 
337
+       "to hit men.  Finally, remember that once the two players have",
 
338
        "passed each other on the board, there is no chance of either team",
 
339
        "being hit, so the game reduces to a race off the board.  Addi-",
 
340
        "tional hints on strategy are presented in the practice game.",
 
341
--- bsdgames-2.17.orig/backgammon/backgammon/move.c
 
342
+++ bsdgames-2.17/backgammon/backgammon/move.c
 
343
@@ -152,6 +152,9 @@ move(okay)
 
344
        trymove(0, 0);
 
345
        pickmove();
 
346
 
 
347
+       if (d0)
 
348
+               swap;
 
349
+
 
350
        /* print move */
 
351
        writel(" and moves ");
 
352
        for (i = 0; i < mvlim; i++) {
 
353
--- bsdgames-2.17.orig/backgammon/common_source/allow.c
 
354
+++ bsdgames-2.17/backgammon/common_source/allow.c
 
355
@@ -83,8 +83,10 @@ movallow()
 
356
                                p[i--] = bar;
 
357
                                if (p[i] != bar)
 
358
                                        continue;
 
359
-                               else
 
360
+                               else if (d0)
 
361
                                        break;
 
362
+                               swap;
 
363
+                               continue;
 
364
                        }
 
365
                        if (d0 || m == 4)
 
366
                                break;
 
367
--- bsdgames-2.17.orig/quiz/datfiles/poetry
 
368
+++ bsdgames-2.17/quiz/datfiles/poetry
 
369
@@ -64,7 +64,7 @@ Drink deep{,} or taste not the Pierian s
 
370
 {Alexander }Pope
 
371
 The curfew tolls the knell of parting day{,}:\
 
372
 The lowing herd wind slowly o'er the lea:\
 
373
-Elegy{ Written in a Country Church{-| }Yard:\
 
374
+Elegy{ Written in a Country Church{-| }Yard}:\
 
375
 {Thomas }Gray
 
376
 The best laid schemes o' mice an' men gang aft a-gley{,}:\
 
377
 An{'|d} lea{'|v}e us nought but grief an{'|d} pain for promised joy{.}:\
 
378
--- bsdgames-2.17.orig/gomoku/gomoku.6
 
379
+++ bsdgames-2.17/gomoku/gomoku.6
 
380
@@ -45,7 +45,7 @@
 
381
 .Op Ar inputfile
 
382
 .Sh DESCRIPTION
 
383
 .Nm
 
384
-is a two player game were the object is to get 5 in a row horizontally,
 
385
+is a two player game where the object is to get 5 in a row horizontally,
 
386
 vertically or diagonally on a 19 by 19 grid.
 
387
 By convention, black always moves first.
 
388
 With no arguments,
 
389
--- bsdgames-2.17.orig/trek/setup.c
 
390
+++ bsdgames-2.17/trek/setup.c
 
391
@@ -234,11 +234,14 @@ setup()
 
392
        for (i = 0; i < NQUADS; i++)
 
393
                for (j = 0; j < NQUADS; j++)
 
394
                {
 
395
+                       signed char tmp;
 
396
                        q = &Quad[i][j];
 
397
                        q->klings = q->bases = 0;
 
398
                        q->scanned = -1;
 
399
                        q->stars = ranf(9) + 1;
 
400
-                       q->holes = ranf(3) - q->stars / 5;
 
401
+                       tmp = ranf(3) - q->stars / 5;
 
402
+                       tmp = tmp < 0 ? 0 : tmp;
 
403
+                       q->holes = tmp;
 
404
                        q->qsystemname = 0;
 
405
                }
 
406
 
 
407
--- bsdgames-2.17.orig/fish/Makefrag
 
408
+++ bsdgames-2.17/fish/Makefrag
 
409
@@ -31,7 +31,9 @@ fish_DIRS := $(GAMESDIR) $(MAN6DIR) $(sh
 
410
 fish_all:      fish/fish fish/fish.instr fish/fish.6
 
411
 
 
412
 fish_install:  fish_all
 
413
-       $(INSTALL_BINARY) fish/fish $(INSTALL_PREFIX)$(GAMESDIR)/fish
 
414
-       $(HIDE_GAME) fish
 
415
+       $(INSTALL_BINARY) fish/fish $(INSTALL_PREFIX)$(GAMESDIR)/go-fish
 
416
+       $(HIDE_GAME) go-fish
 
417
        $(INSTALL_DATA) fish/fish.instr $(INSTALL_PREFIX)$(FISH_INSTRFILE)
 
418
-       $(INSTALL_MANUAL) fish/fish.6
 
419
+       ln -sf fish.6 fish/go-fish.6 # hack for rename
 
420
+       $(INSTALL_MANUAL) fish/go-fish.6
 
421
+       rm -f fish/go-fish.6
 
422
--- bsdgames-2.17.orig/fish/fish.6
 
423
+++ bsdgames-2.17/fish/fish.6
 
424
@@ -30,10 +30,10 @@
 
425
 .\"    @(#)fish.6      8.1 (Berkeley) 5/31/93
 
426
 .\"
 
427
 .Dd May 31, 1993
 
428
-.Dt FISH 6
 
429
+.Dt GO-FISH 6
 
430
 .Os
 
431
 .Sh NAME
 
432
-.Nm fish
 
433
+.Nm go-fish
 
434
 .Nd play
 
435
 .Dq Go Fish
 
436
 .Sh SYNOPSIS
 
437
--- bsdgames-2.17.orig/hunt/hunt/hunt.c
 
438
+++ bsdgames-2.17/hunt/hunt/hunt.c
 
439
@@ -394,7 +394,8 @@ broadcast_vec(s, vector)
 
440
 
 
441
        vec_cnt = 0;
 
442
        for (ip = ifp; ip; ip = ip->ifa_next)
 
443
-               if ((ip->ifa_addr->sa_family == AF_INET) &&
 
444
+               if (ip->ifa_addr &&
 
445
+                   (ip->ifa_addr->sa_family == AF_INET) &&
 
446
                    (ip->ifa_flags & IFF_BROADCAST))
 
447
                        vec_cnt++;
 
448
 
 
449
@@ -405,7 +406,8 @@ broadcast_vec(s, vector)
 
450
 
 
451
        vec_cnt = 0;
 
452
        for (ip = ifp; ip; ip = ip->ifa_next)
 
453
-               if ((ip->ifa_addr->sa_family == AF_INET) &&
 
454
+               if (ip->ifa_addr &&
 
455
+                   (ip->ifa_addr->sa_family == AF_INET) &&
 
456
                    (ip->ifa_flags & IFF_BROADCAST))
 
457
                        memcpy(&(*vector)[vec_cnt++], ip->ifa_broadaddr,
 
458
                               sizeof(struct sockaddr_in));
 
459
--- bsdgames-2.17.orig/hunt/hunt/hunt.6.in
 
460
+++ bsdgames-2.17/hunt/hunt/hunt.6.in
 
461
@@ -387,7 +387,7 @@ how many of player's shots were ducked
 
462
 how many slime kills player had
 
463
 .It enemy
 
464
 how many enemies were killed
 
465
-.tI friend
 
466
+.It friend
 
467
 how many friends were killed (self and same team)
 
468
 .It deaths
 
469
 how many times player died
 
470
--- bsdgames-2.17.orig/hunt/hunt/playit.c
 
471
+++ bsdgames-2.17/hunt/hunt/playit.c
 
472
@@ -114,7 +114,7 @@ playit()
 
473
                bad_con();
 
474
                /* NOTREACHED */
 
475
        }
 
476
-       if (ntohl(version) != (unsigned long)HUNT_VERSION) {
 
477
+       if (ntohl(version) != (uint32_t)HUNT_VERSION) {
 
478
                bad_ver();
 
479
                /* NOTREACHED */
 
480
        }
 
481
@@ -649,7 +649,7 @@ do_message()
 
482
                bad_con();
 
483
                /* NOTREACHED */
 
484
        }
 
485
-       if (ntohl(version) != (unsigned long)HUNT_VERSION) {
 
486
+       if (ntohl(version) != (uint32_t)HUNT_VERSION) {
 
487
                bad_ver();
 
488
                /* NOTREACHED */
 
489
        }
 
490
--- bsdgames-2.17.orig/tetris/scores.c
 
491
+++ bsdgames-2.17/tetris/scores.c
 
492
@@ -335,7 +335,8 @@ checkscores(hs, num)
 
493
                                continue;
 
494
                        }
 
495
                }
 
496
-               levelfound[sp->hs_level] = 1;
 
497
+        if (sp->hs_level < NLEVELS && sp->hs_level >= 0)
 
498
+               levelfound[sp->hs_level] = 1;
 
499
                i++, sp++;
 
500
        }
 
501
        return (num > MAXHISCORES ? MAXHISCORES : num);
 
502
@@ -374,12 +375,14 @@ showscores(level)
 
503
        for (i = MINLEVEL; i < NLEVELS; i++)
 
504
                levelfound[i] = 0;
 
505
        for (i = 0, sp = scores; i < nscores; i++, sp++) {
 
506
-               if (levelfound[sp->hs_level])
 
507
-                       sp->hs_time = 0;
 
508
-               else {
 
509
-                       sp->hs_time = 1;
 
510
-                       levelfound[sp->hs_level] = 1;
 
511
-               }
 
512
+        if (sp->hs_level < NLEVELS && sp->hs_level >= 0) {
 
513
+               if (levelfound[sp->hs_level])
 
514
+                       sp->hs_time = 0;
 
515
+                   else {
 
516
+                           sp->hs_time = 1;
 
517
+                       levelfound[sp->hs_level] = 1;
 
518
+                   }
 
519
+        }
 
520
        }
 
521
 
 
522
        /*
 
523
@@ -433,7 +436,7 @@ printem(level, offset, hs, n, me)
 
524
                                continue;
 
525
                        }
 
526
                        sp = &hs[item];
 
527
-                       (void)sprintf(buf,
 
528
+                       (void)snprintf(buf, sizeof(buf),
 
529
                            "%3d%c %6d  %-11s (%6d on %d)",
 
530
                            item + offset, sp->hs_time ? '*' : ' ',
 
531
                            sp->hs_score * sp->hs_level,
 
532
--- bsdgames-2.17.orig/hack/Makefrag
 
533
+++ bsdgames-2.17/hack/Makefrag
 
534
@@ -56,7 +56,8 @@ hack_install: hack_all
 
535
        $(INSTALL_SCORE_GAME) hack/hack $(INSTALL_PREFIX)$(GAMESDIR)/hack
 
536
        $(HIDE_GAME) hack
 
537
        $(INSTALL_HACK_DIR) $(INSTALL_PREFIX)$(HACK_DIR)
 
538
-       set -e; for f in data help hh rumors; do $(INSTALL_DATA) hack/$$f $(INSTALL_PREFIX)$(HACK_DIR)/$$f; done
 
539
+       install -d $(INSTALL_PREFIX)/usr/share/games/bsdgames/hack
 
540
+       set -e; for f in data help hh rumors; do $(INSTALL_DATA) hack/$$f $(INSTALL_PREFIX)/usr/share/games/bsdgames/hack/$$f; done
 
541
        $(INSTALL_SCORE_FILE) $(HACK_DIR)/perm
 
542
        $(INSTALL_SCORE_FILE) $(HACK_DIR)/record
 
543
        $(INSTALL_MANUAL) hack/hack.6
 
544
--- bsdgames-2.17.orig/hack/config.h
 
545
+++ bsdgames-2.17/hack/config.h
 
546
@@ -88,13 +88,18 @@
 
547
 /* #define PYRAMID_BUG */      /* avoid a bug on the Pyramid */
 
548
 /* #define NOWAITINCLUDE */    /* neither <wait.h> nor <sys/wait.h> exists */
 
549
 
 
550
-#define WIZARD  "bruno"        /* the person allowed to use the -D option */
 
551
+/*
 
552
+ * Debian mods: use root for WIZARD, and move files that are static to
 
553
+ * /usr/share/ -- JEH
 
554
+ */
 
555
+#define WIZARD  "root" /* the person allowed to use the -D option */
 
556
+#define SHAREDIR "/usr/share/games/bsdgames/hack/"
 
557
 #define RECORD "record"/* the file containing the list of topscorers */
 
558
 #define        NEWS    "news"  /* the file containing the latest hack news */
 
559
-#define        HELP    "help"  /* the file containing a description of the commands */
 
560
-#define        SHELP   "hh"    /* abbreviated form of the same */
 
561
-#define        RUMORFILE       "rumors"        /* a file with fortune cookies */
 
562
-#define        DATAFILE        "data"  /* a file giving the meaning of symbols used */
 
563
+#define        HELP    SHAREDIR "help" /* the file containing a description of the commands */
 
564
+#define        SHELP   SHAREDIR "hh"   /* abbreviated form of the same */
 
565
+#define        RUMORFILE       SHAREDIR "rumors"       /* a file with fortune cookies */
 
566
+#define        DATAFILE        SHAREDIR "data" /* a file giving the meaning of symbols used */
 
567
 #define        FMASK   0660    /* file creation mask */
 
568
 #define        HLOCK   "perm"  /* an empty file used for locking purposes */
 
569
 #define LLOCK  "safelock"      /* link to previous */
 
570
--- bsdgames-2.17.orig/sail/pl_main.c
 
571
+++ bsdgames-2.17/sail/pl_main.c
 
572
@@ -219,7 +219,7 @@ reprint:
 
573
                printf("\nInitial broadside %s (grape, chain, round, double): ",
 
574
                        n ? "right" : "left");
 
575
                fflush(stdout);
 
576
-               scanf("%s", buf);
 
577
+               scanf("%9s", buf);
 
578
                switch (*buf) {
 
579
                case 'g':
 
580
                        load = L_GRAPE;
 
581
--- bsdgames-2.17.orig/tests/number.-0.1
 
582
+++ bsdgames-2.17/tests/number.-0.1
 
583
@@ -1,3 +1,3 @@
 
584
 minus
 
585
 one.
 
586
-tenths.
 
587
+tenth.