summaryrefslogtreecommitdiff
path: root/games/dungeon/patches
diff options
context:
space:
mode:
authorpgoyette <pgoyette>2009-11-28 20:25:40 +0000
committerpgoyette <pgoyette>2009-11-28 20:25:40 +0000
commitbc0f8d4bdb9fc56e8a432597013991f5070d5e2f (patch)
tree7d775d1ac763c77bfbb03a71afb8abc216cb86e5 /games/dungeon/patches
parent9747f9d24ac60f92ced74872e24fa785e9d58a71 (diff)
downloadpkgsrc-bc0f8d4bdb9fc56e8a432597013991f5070d5e2f.tar.gz
Import of Andrew Plotkin's C-translation of Dungeon 3.2B, using his
"glk" API, and including the gdt (game debugger tool) from the Fortran version.
Diffstat (limited to 'games/dungeon/patches')
-rw-r--r--games/dungeon/patches/patch-aa24
-rw-r--r--games/dungeon/patches/patch-ab22
2 files changed, 46 insertions, 0 deletions
diff --git a/games/dungeon/patches/patch-aa b/games/dungeon/patches/patch-aa
new file mode 100644
index 00000000000..b074a88dad7
--- /dev/null
+++ b/games/dungeon/patches/patch-aa
@@ -0,0 +1,24 @@
+$NetBSD: patch-aa,v 1.1 2009/11/28 20:25:40 pgoyette Exp $
+
+Use an explicit 32-bit data type.
+
+--- ../glkterm/glk.h.orig 2009-11-20 14:08:17.000000000 -0800
++++ ../glkterm/glk.h 2009-11-20 13:06:19.000000000 -0800
+@@ -17,8 +17,15 @@
+ /* You may have to edit the definition of glui32 to make sure it's really a
+ 32-bit unsigned integer type, and glsi32 to make sure it's really a
+ 32-bit signed integer type. If they're not, horrible things will happen. */
+-typedef unsigned long glui32;
+-typedef signed long glsi32;
++/*
++ * typedef unsigned long glui32;
++ * typedef signed long glsi32;
++ */
++
++#include <sys/inttypes.h>
++
++typedef uint32_t glui32;
++typedef int32_t glsi32;
+
+ /* These are the compile-time conditionals that reveal various Glk optional
+ modules. */
diff --git a/games/dungeon/patches/patch-ab b/games/dungeon/patches/patch-ab
new file mode 100644
index 00000000000..fb72eca5429
--- /dev/null
+++ b/games/dungeon/patches/patch-ab
@@ -0,0 +1,22 @@
+$NetBSD: patch-ab,v 1.1 2009/11/28 20:25:40 pgoyette Exp $
+
+Remove an obsolete check that pointers fit into 32-bit data types. I
+was unable to find any code remaining that depends on this, and at
+least one program (dungeon!) works just fine without having had to do
+any hashtable coding!
+
+--- ../glkterm/main.c.orig 2009-11-20 14:08:33.000000000 -0800
++++ ../glkterm/main.c 2009-11-20 13:14:24.000000000 -0800
+@@ -52,10 +52,12 @@
+ printf("Compile-time error: glui32 is not unsigned. Please fix glk.h.\n");
+ return 1;
+ }
++/*
+ if (sizeof(window_t *) > 4) {
+ printf("Compile-time error: Pointers cannot fit in a glui32. Start writing hashtable code.\n");
+ return 1;
+ }
++*/
+
+ /* Now some argument-parsing. This is probably going to hurt. */
+ startdata.argc = 0;