summaryrefslogtreecommitdiff
path: root/games/gnuchess/patches/patch-af
diff options
context:
space:
mode:
Diffstat (limited to 'games/gnuchess/patches/patch-af')
-rw-r--r--games/gnuchess/patches/patch-af57
1 files changed, 57 insertions, 0 deletions
diff --git a/games/gnuchess/patches/patch-af b/games/gnuchess/patches/patch-af
new file mode 100644
index 00000000000..d3bf21a43c2
--- /dev/null
+++ b/games/gnuchess/patches/patch-af
@@ -0,0 +1,57 @@
+$NetBSD: patch-af,v 1.1 2000/10/15 01:53:41 jlam Exp $
+
+--- main.c.orig Sat Oct 23 11:50:27 1999
++++ main.c
+@@ -277,6 +277,9 @@
+ 0x7F, 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x03,
+ 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x01 };
+
++char *booksrc = BOOKSRC;
++char *bookbin = BOOKBIN;
++
+ int main (int argc, char *argv[])
+ {
+ int compilebook = 0;
+@@ -302,8 +305,14 @@
+ SET (flags, XBOARD);
+ } else if (strcmp(argv[i],"post") == 0) {
+ SET (flags, POST);
+- } else if (strcmp(argv[i],"compile") == 0)
++ } else if (strcmp(argv[i],"compile") == 0) {
+ compilebook++;
++ if (argc > 2) {
++ booksrc = argv[2];
++ if (argc > 3)
++ bookbin = argv[3];
++ }
++ }
+ }
+ }
+
+@@ -318,8 +327,14 @@
+ SET (flags, XBOARD);
+ } else if (strcmp(argv[i],"post") == 0) {
+ SET (flags, POST);
+- } else if (strcmp(argv[i],"compile") == 0)
++ } else if (strcmp(argv[i],"compile") == 0) {
+ compilebook++;
++ if (argc > 2) {
++ booksrc = argv[2];
++ if (argc > 3)
++ bookbin = argv[3];
++ }
++ }
+ }
+ }
+
+@@ -327,8 +342,8 @@
+ bookfirstlast = 3;
+
+ if (compilebook) {
+- unlink(BOOKBIN);
+- genbook();
++ unlink(bookbin);
++ genbook(booksrc, bookbin);
+ } else {
+ while (!(flags & QUIT))
+ {