Root/bsd-games/patches/001-tetris.patch

1diff -u bsd-games-2.17/tetris/input.c bsd-games-2.17-p/tetris/input.c
2--- bsd-games-2.17/tetris/input.c 2003-12-17 05:47:37.000000000 +0300
3+++ bsd-games-2.17-p/tetris/input.c 2010-07-26 22:04:34.422302192 +0400
4@@ -85,7 +85,7 @@
5         endtv = *tvp;
6         timeout = tvp->tv_sec * 1000 + tvp->tv_usec / 1000;
7     } else
8- timeout = INFTIM;
9+ timeout = -1;
10 again:
11     set[0].fd = STDIN_FILENO;
12     set[0].events = POLLIN;
13diff -u bsd-games-2.17/tetris/pathnames.h.in bsd-games-2.17-p/tetris/pathnames.h.in
14--- bsd-games-2.17/tetris/pathnames.h.in 2003-12-17 05:47:37.000000000 +0300
15+++ bsd-games-2.17-p/tetris/pathnames.h.in 2010-07-27 11:42:20.386554141 +0400
16@@ -34,4 +34,4 @@
17  * @(#)pathnames.h 8.1 (Berkeley) 5/31/93
18  */
19 
20-#define _PATH_SCOREFILE "@tetris_scorefile@"
21+#define _PATH_SCOREFILE "/usr/share/games/tetris-bsd.scores"
22diff -u bsd-games-2.17/tetris/screen.c bsd-games-2.17-p/tetris/screen.c
23--- bsd-games-2.17/tetris/screen.c 2004-01-27 23:52:07.000000000 +0300
24+++ bsd-games-2.17-p/tetris/screen.c 2010-07-26 22:04:34.422151495 +0400
25@@ -73,7 +73,7 @@
26 extern char PC, *BC, *UP; /* tgoto requires globals: ugh! */
27 static char BCdefault[] = "\b";
28 #ifndef NCURSES_VERSION
29-short ospeed;
30+speed_t ospeed;
31 #endif
32 
33 static char
34@@ -287,6 +287,7 @@
35         stop("tcgetattr() fails");
36     newtt = oldtt;
37     newtt.c_lflag &= ~(ICANON|ECHO);
38+#define OXTABS XTABS
39     newtt.c_oflag &= ~OXTABS;
40     newtt.c_cc[VMIN] = 1;
41     newtt.c_cc[VTIME] = 0;
42diff -u bsd-games-2.17/tetris/shapes.c bsd-games-2.17-p/tetris/shapes.c
43--- bsd-games-2.17/tetris/shapes.c 2003-12-17 05:47:37.000000000 +0300
44+++ bsd-games-2.17-p/tetris/shapes.c 2010-07-27 09:30:41.267111585 +0400
45@@ -83,7 +83,7 @@
46     const struct shape *shape;
47     int pos;
48 {
49- int *o = shape->off;
50+ const int *o = shape->off;
51 
52     if (board[pos] || board[pos + *o++] || board[pos + *o++] ||
53         board[pos + *o])
54@@ -100,7 +100,7 @@
55     const struct shape *shape;
56     int pos, onoff;
57 {
58- int *o = shape->off;
59+ const int *o = shape->off;
60 
61     board[pos] = onoff;
62     board[pos + *o++] = onoff;
63diff -u bsd-games-2.17/tetris/tetris.c bsd-games-2.17-p/tetris/tetris.c
64--- bsd-games-2.17/tetris/tetris.c 2004-01-27 23:52:07.000000000 +0300
65+++ bsd-games-2.17-p/tetris/tetris.c 2010-08-12 12:21:29.685301361 +0400
66@@ -35,10 +35,10 @@
67  */
68 
69 #include <sys/cdefs.h>
70-#ifndef lint
71+/*#ifndef lint
72 __COPYRIGHT("@(#) Copyright (c) 1992, 1993\n\
73     The Regents of the University of California. All rights reserved.\n");
74-#endif /* not lint */
75+#endif*/ /* not lint */
76 
77 /*
78  * Tetris (or however it is spelled).
79@@ -145,7 +145,7 @@
80         exit(1);
81     close(fd);
82 
83- keys = "jkl pq";
84+ keys = "aks pq";
85 
86     while ((ch = getopt(argc, argv, "k:l:ps")) != -1)
87         switch(ch) {
88

Archive Download this file



interactive