summaryrefslogtreecommitdiff
path: root/games/velena/patches
diff options
context:
space:
mode:
authorrillig <rillig>2007-07-25 00:11:10 +0000
committerrillig <rillig>2007-07-25 00:11:10 +0000
commit3a96786840f41733a03e3fda4555be56791dfcf0 (patch)
tree04abcc5c3d146a7be62df04d7fe3a599b5580f53 /games/velena/patches
parenta966858f91733c4d1df93d76a99a373397c19ba9 (diff)
downloadpkgsrc-3a96786840f41733a03e3fda4555be56791dfcf0.tar.gz
Imported velena.
Velena is a program playing connect-four based on the work of Victor Allis, who proved in 1986 that the first player can always win.
Diffstat (limited to 'games/velena/patches')
-rw-r--r--games/velena/patches/patch-aa34
-rw-r--r--games/velena/patches/patch-ab14
-rw-r--r--games/velena/patches/patch-ac22
-rw-r--r--games/velena/patches/patch-ad14
-rw-r--r--games/velena/patches/patch-ae14
5 files changed, 98 insertions, 0 deletions
diff --git a/games/velena/patches/patch-aa b/games/velena/patches/patch-aa
new file mode 100644
index 00000000000..aec0b6abe62
--- /dev/null
+++ b/games/velena/patches/patch-aa
@@ -0,0 +1,34 @@
+$NetBSD: patch-aa,v 1.1.1.1 2007/07/25 00:11:10 rillig Exp $
+
+Make the program work on OpenBSD. ;)
+
+--- pnsearch.c.orig 1997-07-27 17:44:30.000000000 +0200
++++ pnsearch.c 2007-07-25 01:57:10.000000000 +0200
+@@ -113,7 +113,7 @@ void show_pinfo()
+ if(parameters.pr>0 && parameters.ds>0)
+ {
+ sprintf(st," Nodes: %5ld/%-5ld P=%-3d D=%-3d Time: %2d:%02d:%02d SEQ=%s %s",
+- parameters.nodes,parameters.maxnodes,parameters.pr,parameters.ds,hh,mm,ss,
++ parameters.nodes,parameters.maxnodes,(int)parameters.pr,(int)parameters.ds,hh,mm,ss,
+ seqs,adv[a]);
+ }
+ else if(parameters.pr==0)
+@@ -157,7 +157,7 @@ void change_max_nodes_numb(void)
+
+ void change_sequence()
+ {
+- short seq[BOARDX],done[BOARDX],x,valid=YES;
++ int seq[BOARDX],done[BOARDX],x,valid=YES;
+
+ for(x=0;x<BOARDX;x++)
+ done[x]=NO;
+@@ -999,7 +999,8 @@ void build_associated_file()
+ unsigned short key;
+
+ printf("Input file to parse : ");
+- gets(filein);
++ if (fgets(filein, sizeof(filein), stdin) == NULL)
++ exit(0);
+
+ printf("Start from sequence #1 ? (Y/N)\n");
+ do
diff --git a/games/velena/patches/patch-ab b/games/velena/patches/patch-ab
new file mode 100644
index 00000000000..95149215da5
--- /dev/null
+++ b/games/velena/patches/patch-ab
@@ -0,0 +1,14 @@
+$NetBSD: patch-ab,v 1.1.1.1 2007/07/25 00:11:10 rillig Exp $
+
+--- cmdline.c.orig 2007-07-25 01:53:41.000000000 +0200
++++ cmdline.c 2007-07-25 01:54:04.000000000 +0200
+@@ -51,7 +51,8 @@ void command_line_input(struct board *bo
+
+ do {
+ printf(">"); // Waiting for the user to enter the string
+- gets(st);
++ if (fgets(st, sizeof(st), stdin) == NULL)
++ break;
+
+ if(st[0]=='q') flag = 0; // if the string begins with 'q' we quit.
+ else {
diff --git a/games/velena/patches/patch-ac b/games/velena/patches/patch-ac
new file mode 100644
index 00000000000..73b809a7e5c
--- /dev/null
+++ b/games/velena/patches/patch-ac
@@ -0,0 +1,22 @@
+$NetBSD: patch-ac,v 1.1.1.1 2007/07/25 00:11:10 rillig Exp $
+
+--- connect4.c.orig 1997-07-27 17:29:38.000000000 +0200
++++ connect4.c 2007-07-25 01:52:05.000000000 +0200
+@@ -276,7 +276,7 @@ void initTitle()
+ printf("All rights reserved.\n\n");
+ }
+
+-void main(short ac,char **av)
++int main(void)
+ {
+ short x;
+ struct board *board;
+@@ -324,7 +324,7 @@ void main(short ac,char **av)
+
+ free(board->solvable_groups);
+ free(board);
+- exit(0);
++ return 0;
+ }
+
+
diff --git a/games/velena/patches/patch-ad b/games/velena/patches/patch-ad
new file mode 100644
index 00000000000..c07e133c234
--- /dev/null
+++ b/games/velena/patches/patch-ad
@@ -0,0 +1,14 @@
+$NetBSD: patch-ad,v 1.1.1.1 2007/07/25 00:11:10 rillig Exp $
+
+--- database.c.orig 1997-07-27 17:44:50.000000000 +0200
++++ database.c 2007-07-25 01:52:55.000000000 +0200
+@@ -698,7 +698,8 @@ void merge()
+ char filename[255];
+
+ printf("Enter name of file to merge: ");
+- gets(filename);
++ if (fgets(filename, sizeof(filename), stdin) == NULL)
++ exit(0);
+
+ printf("\n");
+ printf("Sure you want to merge '%s' ? (Y/N)\n\n",filename);
diff --git a/games/velena/patches/patch-ae b/games/velena/patches/patch-ae
new file mode 100644
index 00000000000..3acc62c7474
--- /dev/null
+++ b/games/velena/patches/patch-ae
@@ -0,0 +1,14 @@
+$NetBSD: patch-ae,v 1.1.1.1 2007/07/25 00:11:10 rillig Exp $
+
+--- evaluate.c.orig 1997-07-27 17:15:12.000000000 +0200
++++ evaluate.c 2007-07-25 02:01:38.000000000 +0200
+@@ -73,7 +73,8 @@ void show_square_used(struct board *boar
+
+ void test_conditions(char **matrix,struct board *board)
+ {
+- short x,y,z,n1,n2,x1,y1;
++ int x,y;
++ short z,n1,n2,x1,y1;
+
+ printf("Enter rule 1 number : ");
+ scanf("%d %d",&x,&y);