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

1diff -ur bsd-games-2.17-p/tetris/input.c bsd-games-2.17/tetris/input.c
2--- bsd-games-2.17-p/tetris/input.c 2010-11-14 21:46:54.909025861 +0300
3+++ bsd-games-2.17/tetris/input.c 2010-11-14 21:48:17.830025444 +0300
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 -ur bsd-games-2.17-p/tetris/pathnames.h.in bsd-games-2.17/tetris/pathnames.h.in
14--- bsd-games-2.17-p/tetris/pathnames.h.in 2010-11-14 21:46:54.908027310 +0300
15+++ bsd-games-2.17/tetris/pathnames.h.in 2010-11-14 21:48:17.830025444 +0300
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 -ur bsd-games-2.17-p/tetris/screen.c bsd-games-2.17/tetris/screen.c
23--- bsd-games-2.17-p/tetris/screen.c 2010-11-14 21:46:54.908027310 +0300
24+++ bsd-games-2.17/tetris/screen.c 2010-11-14 22:09:58.510150197 +0300
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 -ur bsd-games-2.17-p/tetris/shapes.c bsd-games-2.17/tetris/shapes.c
43--- bsd-games-2.17-p/tetris/shapes.c 2010-11-14 21:46:54.908027310 +0300
44+++ bsd-games-2.17/tetris/shapes.c 2010-11-14 21:48:17.831024977 +0300
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 -ur bsd-games-2.17-p/tetris/tetris.c bsd-games-2.17/tetris/tetris.c
64--- bsd-games-2.17-p/tetris/tetris.c 2010-11-14 21:46:54.909025861 +0300
65+++ bsd-games-2.17/tetris/tetris.c 2010-11-14 22:15:43.958150419 +0300
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@@ -194,7 +194,7 @@
89     }
90 
91     sprintf(key_msg,
92-"%s - left %s - rotate %s - right %s - drop %s - pause %s - quit",
93+"%s:<- %s:rotate %s:-> %s:drop %s:pause %s:quit",
94         key_write[0], key_write[1], key_write[2], key_write[3],
95         key_write[4], key_write[5]);
96 
97

Archive Download this file



interactive