Date:2011-02-15 11:41:45 (9 years 4 months ago)
Author:kyak
Commit:7495f45494eb3a29b48de429b51236e353ef59c7
Message:backgammon won't fail miserably on small terminals

Still need to launch via backgammon.sh, because at least 57x24 term is
needed for correct playing. At least it won't segfault on smaller
terminals.
Files: bsd-games/patches/004-backgammon.patch (20 diffs)

Change Details

bsd-games/patches/004-backgammon.patch
11diff -ur bsd-games-2.17/backgammon/backgammon/extra.c bsd-games-2.17-p/backgammon/backgammon/extra.c
22--- bsd-games-2.17/backgammon/backgammon/extra.c 2003-12-17 05:47:37.000000000 +0300
3+++ bsd-games-2.17-p/backgammon/backgammon/extra.c 2010-07-31 22:10:07.910053909 +0400
43@@ -30,13 +30,13 @@
54  */
65
...... 
1919 #include "backlocal.h"
2020diff -ur bsd-games-2.17/backgammon/backgammon/main.c bsd-games-2.17-p/backgammon/backgammon/main.c
2121--- bsd-games-2.17/backgammon/backgammon/main.c 2005-02-16 09:24:50.000000000 +0300
22+++ bsd-games-2.17-p/backgammon/backgammon/main.c 2010-08-01 11:08:39.969952583 +0400
2322@@ -30,18 +30,18 @@
2423  */
2524
...... 
6262     args[acnt] = '\0';
6363diff -ur bsd-games-2.17/backgammon/backgammon/move.c bsd-games-2.17-p/backgammon/backgammon/move.c
6464--- bsd-games-2.17/backgammon/backgammon/move.c 2004-01-27 23:52:07.000000000 +0300
65+++ bsd-games-2.17-p/backgammon/backgammon/move.c 2010-07-31 22:10:41.854259314 +0400
6665@@ -30,13 +30,13 @@
6766  */
6867
...... 
8181 #include "backlocal.h"
8282diff -ur bsd-games-2.17/backgammon/backgammon/text.c bsd-games-2.17-p/backgammon/backgammon/text.c
8383--- bsd-games-2.17/backgammon/backgammon/text.c 2003-12-17 05:47:37.000000000 +0300
84+++ bsd-games-2.17-p/backgammon/backgammon/text.c 2010-07-31 22:10:52.377805941 +0400
8584@@ -30,13 +30,13 @@
8685  */
8786
...... 
100100
101101diff -ur bsd-games-2.17/backgammon/backgammon/version.c bsd-games-2.17-p/backgammon/backgammon/version.c
102102--- bsd-games-2.17/backgammon/backgammon/version.c 2003-12-17 05:47:37.000000000 +0300
103+++ bsd-games-2.17-p/backgammon/backgammon/version.c 2010-07-31 22:11:05.756426999 +0400
104103@@ -30,13 +30,13 @@
105104  */
106105
...... 
119119     "Last updated on Friday, October 10, 1997.",
120120diff -ur bsd-games-2.17/backgammon/common_source/allow.c bsd-games-2.17-p/backgammon/common_source/allow.c
121121--- bsd-games-2.17/backgammon/common_source/allow.c 2003-12-17 05:47:37.000000000 +0300
122+++ bsd-games-2.17-p/backgammon/common_source/allow.c 2010-07-31 22:07:44.982982743 +0400
123122@@ -30,13 +30,13 @@
124123  */
125124
...... 
138138
139139diff -ur bsd-games-2.17/backgammon/common_source/board.c bsd-games-2.17-p/backgammon/common_source/board.c
140140--- bsd-games-2.17/backgammon/common_source/board.c 2003-12-17 05:47:37.000000000 +0300
141+++ bsd-games-2.17-p/backgammon/common_source/board.c 2010-07-31 22:08:08.852355705 +0400
142141@@ -30,13 +30,13 @@
143142  */
144143
...... 
157157
158158diff -ur bsd-games-2.17/backgammon/common_source/check.c bsd-games-2.17-p/backgammon/common_source/check.c
159159--- bsd-games-2.17/backgammon/common_source/check.c 2003-12-17 05:47:37.000000000 +0300
160+++ bsd-games-2.17-p/backgammon/common_source/check.c 2010-07-31 22:08:22.639630328 +0400
161160@@ -30,13 +30,13 @@
162161  */
163162
...... 
176176
177177diff -ur bsd-games-2.17/backgammon/common_source/fancy.c bsd-games-2.17-p/backgammon/common_source/fancy.c
178178--- bsd-games-2.17/backgammon/common_source/fancy.c 2004-04-24 20:13:09.000000000 +0400
179+++ bsd-games-2.17-p/backgammon/common_source/fancy.c 2010-07-31 22:08:35.011397017 +0400
180179@@ -30,13 +30,13 @@
181180  */
182181
...... 
193193
194194 #include "back.h"
195195
196@@ -726,7 +726,7 @@
197         lUP = strlen(UP);
198     if (ND)
199         lND = strlen(ND);
200- if (LI < 24 || CO < 72 || !(CL && UP && ND))
201+ if (LI < 20 || CO < 52 || !(CL && UP && ND))
202         return (0);
203     linect = (int *) calloc(LI + 1, sizeof(int));
204     if (linect == NULL) {
196205diff -ur bsd-games-2.17/backgammon/common_source/init.c bsd-games-2.17-p/backgammon/common_source/init.c
197206--- bsd-games-2.17/backgammon/common_source/init.c 2003-12-17 05:47:37.000000000 +0300
198+++ bsd-games-2.17-p/backgammon/common_source/init.c 2010-07-31 22:08:46.900301922 +0400
199207@@ -30,13 +30,13 @@
200208  */
201209
...... 
214223
215224diff -ur bsd-games-2.17/backgammon/common_source/odds.c bsd-games-2.17-p/backgammon/common_source/odds.c
216225--- bsd-games-2.17/backgammon/common_source/odds.c 2003-12-17 05:47:37.000000000 +0300
217+++ bsd-games-2.17-p/backgammon/common_source/odds.c 2010-07-31 22:09:03.219958336 +0400
218226@@ -30,13 +30,13 @@
219227  */
220228
...... 
233242
234243diff -ur bsd-games-2.17/backgammon/common_source/one.c bsd-games-2.17-p/backgammon/common_source/one.c
235244--- bsd-games-2.17/backgammon/common_source/one.c 2003-12-17 05:47:37.000000000 +0300
236+++ bsd-games-2.17-p/backgammon/common_source/one.c 2010-07-31 22:09:15.025538516 +0400
237245@@ -30,13 +30,13 @@
238246  */
239247
...... 
252261
253262diff -ur bsd-games-2.17/backgammon/common_source/save.c bsd-games-2.17-p/backgammon/common_source/save.c
254263--- bsd-games-2.17/backgammon/common_source/save.c 2003-12-17 05:47:37.000000000 +0300
255+++ bsd-games-2.17-p/backgammon/common_source/save.c 2010-08-01 00:38:38.876427096 +0400
256264@@ -30,13 +30,13 @@
257265  */
258266
...... 
271280
272281diff -ur bsd-games-2.17/backgammon/common_source/subs.c bsd-games-2.17-p/backgammon/common_source/subs.c
273282--- bsd-games-2.17/backgammon/common_source/subs.c 2003-12-17 05:47:37.000000000 +0300
274+++ bsd-games-2.17-p/backgammon/common_source/subs.c 2010-08-01 11:10:44.780266356 +0400
275283@@ -30,13 +30,13 @@
276284  */
277285
...... 
290299
291300diff -ur bsd-games-2.17/backgammon/common_source/table.c bsd-games-2.17-p/backgammon/common_source/table.c
292301--- bsd-games-2.17/backgammon/common_source/table.c 2003-12-17 05:47:37.000000000 +0300
293+++ bsd-games-2.17-p/backgammon/common_source/table.c 2010-07-31 22:09:54.655414207 +0400
294302@@ -30,13 +30,13 @@
295303  */
296304
...... 
309318
310319diff -ur bsd-games-2.17/backgammon/teachgammon/data.c bsd-games-2.17-p/backgammon/teachgammon/data.c
311320--- bsd-games-2.17/backgammon/teachgammon/data.c 2004-01-02 21:04:51.000000000 +0300
312+++ bsd-games-2.17-p/backgammon/teachgammon/data.c 2010-08-01 11:18:14.579882098 +0400
313321@@ -30,13 +30,13 @@
314322  */
315323
...... 
328337
329338diff -ur bsd-games-2.17/backgammon/teachgammon/teach.c bsd-games-2.17-p/backgammon/teachgammon/teach.c
330339--- bsd-games-2.17/backgammon/teachgammon/teach.c 2005-02-16 09:24:50.000000000 +0300
331+++ bsd-games-2.17-p/backgammon/teachgammon/teach.c 2010-08-01 11:39:32.956134539 +0400
332340@@ -30,18 +30,18 @@
333341  */
334342
...... 
372381     if (tflag) {
373382diff -ur bsd-games-2.17/backgammon/teachgammon/ttext1.c bsd-games-2.17-p/backgammon/teachgammon/ttext1.c
374383--- bsd-games-2.17/backgammon/teachgammon/ttext1.c 2003-12-17 05:47:37.000000000 +0300
375+++ bsd-games-2.17-p/backgammon/teachgammon/ttext1.c 2010-08-01 11:18:57.935091377 +0400
376384@@ -30,13 +30,13 @@
377385  */
378386
...... 
391400 #include "tutor.h"
392401diff -ur bsd-games-2.17/backgammon/teachgammon/ttext2.c bsd-games-2.17-p/backgammon/teachgammon/ttext2.c
393402--- bsd-games-2.17/backgammon/teachgammon/ttext2.c 2003-12-17 05:47:37.000000000 +0300
394+++ bsd-games-2.17-p/backgammon/teachgammon/ttext2.c 2010-08-01 11:19:09.174691288 +0400
395403@@ -30,13 +30,13 @@
396404  */
397405
...... 
410419 #include "tutor.h"
411420diff -ur bsd-games-2.17/backgammon/teachgammon/tutor.c bsd-games-2.17-p/backgammon/teachgammon/tutor.c
412421--- bsd-games-2.17/backgammon/teachgammon/tutor.c 2003-12-17 05:47:37.000000000 +0300
413+++ bsd-games-2.17-p/backgammon/teachgammon/tutor.c 2010-08-01 11:37:12.464301896 +0400
414422@@ -30,13 +30,13 @@
415423  */
416424

Archive Download the corresponding diff file



interactive