aboutsummaryrefslogtreecommitdiffstats
path: root/net/dgd-lpmud
diff options
context:
space:
mode:
authorglewis <glewis@FreeBSD.org>2011-08-03 14:30:01 +0800
committerglewis <glewis@FreeBSD.org>2011-08-03 14:30:01 +0800
commit4eecf244ec2e19bdf4203d782d79c004bf65fad5 (patch)
tree60482f490355255fafa6bcc356603a6c4e4129ff /net/dgd-lpmud
parent4454afa876dd6f286f404dd91935854bfd08b3a8 (diff)
downloadfreebsd-ports-gnome-4eecf244ec2e19bdf4203d782d79c004bf65fad5.tar.gz
freebsd-ports-gnome-4eecf244ec2e19bdf4203d782d79c004bf65fad5.tar.zst
freebsd-ports-gnome-4eecf244ec2e19bdf4203d782d79c004bf65fad5.zip
. s/function/funcname/ where function was used as a variable name since
it's potentially a reserved word with newer versions of DGD. . Bump PORTREVISION for this change.
Diffstat (limited to 'net/dgd-lpmud')
-rw-r--r--net/dgd-lpmud/Makefile2
-rw-r--r--net/dgd-lpmud/files/patch-room-pub2.c37
-rw-r--r--net/dgd-lpmud/files/patch-room-vill_road2.c61
-rw-r--r--net/dgd-lpmud/files/patch-room-yard.c32
-rw-r--r--net/dgd-lpmud/files/patch-sys-driver.c51
5 files changed, 178 insertions, 5 deletions
diff --git a/net/dgd-lpmud/Makefile b/net/dgd-lpmud/Makefile
index 6020f9e2cab4..f7e2554cc3df 100644
--- a/net/dgd-lpmud/Makefile
+++ b/net/dgd-lpmud/Makefile
@@ -7,7 +7,7 @@
PORTNAME= dgd-lpmud
PORTVERSION= 2.4.5
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= net games
MASTER_SITES= ${MASTER_SITE_LOCAL:S|%SUBDIR%|glewis/dgd|} \
http://ftp.dworkin.nl/dgd/lib/
diff --git a/net/dgd-lpmud/files/patch-room-pub2.c b/net/dgd-lpmud/files/patch-room-pub2.c
new file mode 100644
index 000000000000..e77b2113cc97
--- /dev/null
+++ b/net/dgd-lpmud/files/patch-room-pub2.c
@@ -0,0 +1,37 @@
+$FreeBSD$
+
+--- 2.4.5/room/pub2.c.orig 2011-08-02 10:22:29.000000000 -0700
++++ 2.4.5/room/pub2.c 2011-08-02 10:23:08.000000000 -0700
+@@ -128,7 +128,7 @@
+ /*
+ * Make this global, and only initialized once.
+ */
+-string chat_str, function, type, match;
++string chat_str, funcname, type, match;
+
+ start_player() {
+ if(!player) {
+@@ -146,18 +146,18 @@
+ call_other(player, "set_hp",100);
+ call_other(player, "set_wc",12);
+ move_object(player, "room/pub2");
+- if (!function) {
+- function = allocate(2);
++ if (!funcname) {
++ funcname = allocate(2);
+ type = allocate(2);
+ match = allocate(2);
+- function[0] = "got_play";
++ funcname[0] = "got_play";
+ type[0] = "says:";
+ match[0] = " play";
+- function[1] = "make_move";
++ funcname[1] = "make_move";
+ type[1] = "PISS";
+ match[1] = " OFF";
+ }
+- call_other(player, "set_match", this_object(), function, type, match);
++ call_other(player, "set_match", this_object(), funcname, type, match);
+ if (!chat_str) {
+ chat_str = allocate(5);
+ chat_str[0] = "Go player says: Hm. This is tricky!\n";
diff --git a/net/dgd-lpmud/files/patch-room-vill_road2.c b/net/dgd-lpmud/files/patch-room-vill_road2.c
index da088c4dd359..28d0d385b6b4 100644
--- a/net/dgd-lpmud/files/patch-room-vill_road2.c
+++ b/net/dgd-lpmud/files/patch-room-vill_road2.c
@@ -1,7 +1,13 @@
---- 2.4.5/room/vill_road2.c.orig 2011-05-29 14:59:37.000000000 -0700
-+++ 2.4.5/room/vill_road2.c 2011-05-29 15:00:06.000000000 -0700
-@@ -7,7 +7,6 @@
- string function, type, match;
+$FreeBSD$
+
+--- 2.4.5/room/vill_road2.c.orig 1990-10-19 15:07:01.000000000 -0700
++++ 2.4.5/room/vill_road2.c 2011-08-02 10:25:00.000000000 -0700
+@@ -4,10 +4,9 @@
+ int count;
+ string chat_str; /* This variable is only initialized once. */
+ string a_chat_str;
+-string function, type, match;
++string funcname, type, match;
reset(arg) {
- start_harry();
@@ -16,3 +22,50 @@
}
start_harry() {
+@@ -48,37 +48,37 @@
+ a_chat_str[6] = "Harry says: Bastard\n";
+ a_chat_str[7] = "Harry says: You big brute!\n";
+
+- function = allocate(12);
++ funcname = allocate(12);
+ type = allocate(12);
+ match = allocate(12);
+
+- function[0] = "why_did";
++ funcname[0] = "why_did";
+ type[0] = "sells";
+ type[1] = "attack";
+ type[2] = "left";
+ match[2] = "the game";
+ type[3] = "takes";
+ type[4] = "drops";
+- function[5] = "how_does_it_feel";
++ funcname[5] = "how_does_it_feel";
+ type[5] = "is now level";
+- function[6] = "smiles";
++ funcname[6] = "smiles";
+ type[6] = "smiles";
+ match[6] = " happily.";
+- function[7] = "say_hello";
++ funcname[7] = "say_hello";
+ type[7] = "arrives";
+- function[8] = "test_say";
++ funcname[8] = "test_say";
+ type[8] = "says:";
+ type[9] = "tells you:";
+- function[10] = "follow";
++ funcname[10] = "follow";
+ type[10] = "leaves";
+- function[11] = "gives";
++ funcname[11] = "gives";
+ type[11] = "gives";
+ }
+ harry = clone_object("obj/monster");
+ /* Reuse the same arrays. */
+ call_other(harry, "load_chat", 2, chat_str);
+ call_other(harry, "load_a_chat", 20, a_chat_str);
+- call_other(harry, "set_match", this_object(), function, type, match);
++ call_other(harry, "set_match", this_object(), funcname, type, match);
+ call_other(harry, "set_name", "harry");
+ call_other(harry, "set_alias", "fjant");
+ call_other(harry, "set_short", "Harry the affectionate");
diff --git a/net/dgd-lpmud/files/patch-room-yard.c b/net/dgd-lpmud/files/patch-room-yard.c
new file mode 100644
index 000000000000..f4b77264435b
--- /dev/null
+++ b/net/dgd-lpmud/files/patch-room-yard.c
@@ -0,0 +1,32 @@
+$FreeBSD$
+
+--- 2.4.5/room/yard.c.orig 2011-08-02 12:15:07.000000000 -0700
++++ 2.4.5/room/yard.c 2011-08-02 12:15:19.000000000 -0700
+@@ -7,7 +7,7 @@
+ /*
+ * Make these arrays global, so they only have to be initialized once.
+ */
+-string chat_str, a_chat_str, function, type, match;
++string chat_str, a_chat_str, funcname, type, match;
+
+ extra_reset() {
+ no_castle_flag = 1;
+@@ -30,14 +30,14 @@
+ "A really filthy looking poor beggar.\n");
+ call_other(beggar, "set_hp", 30);
+ move_object(beggar, this_object());
+- if (!function) {
+- function = allocate(1);
++ if (!funcname) {
++ funcname = allocate(1);
+ type = allocate(1);
+ match = allocate(1);
+- function[0] = "give_beggar";
++ funcname[0] = "give_beggar";
+ type[0] = "gives";
+ }
+- call_other(beggar, "set_match", this_object(), function, type, match);
++ call_other(beggar, "set_match", this_object(), funcname, type, match);
+ if (!chat_str) {
+ chat_str = allocate(3);
+ chat_str[0] =
diff --git a/net/dgd-lpmud/files/patch-sys-driver.c b/net/dgd-lpmud/files/patch-sys-driver.c
new file mode 100644
index 000000000000..d84b9d22efd0
--- /dev/null
+++ b/net/dgd-lpmud/files/patch-sys-driver.c
@@ -0,0 +1,51 @@
+$FreeBSD$
+
+--- 2.4.5/dgd/sys/driver.c.orig 2011-08-02 10:20:37.000000000 -0700
++++ 2.4.5/dgd/sys/driver.c 2011-08-02 10:21:09.000000000 -0700
+@@ -153,7 +153,7 @@
+ * NAME: touch()
+ * DESCRIPTION: determine whether to preserve untouched status.
+ */
+-static int touch(object obj, string function)
++static int touch(object obj, string funcname)
+ {
+ return 0;
+ }
+@@ -273,7 +273,7 @@
+ static void runtime_error(string error, int caught, int ticks)
+ {
+ mixed **trace;
+- string progname, objname, function, str;
++ string progname, objname, funcname, str;
+ int i, sz, line, len;
+ object player;
+
+@@ -285,13 +285,13 @@
+ if ((sz=sizeof(trace) - 1) != 0) {
+ for (i = 0; i < sz; i++) {
+ progname = trace[i][1];
+- function = trace[i][2];
++ funcname = trace[i][2];
+
+- if (progname == AUTO && strlen(function) > 3) {
+- switch (function[0 .. 2]) {
++ if (progname == AUTO && strlen(funcname) > 3) {
++ switch (funcname[0 .. 2]) {
+ case "bad":
+ progname = trace[i - 1][1];
+- function = trace[i - 1][2];
++ funcname = trace[i - 1][2];
+ case "_F_":
+ case "_Q_":
+ continue;
+@@ -310,8 +310,8 @@
+ str = " " + line;
+ str = str[strlen(str) - 4 ..];
+ }
+- str += " " + function + " ";
+- len = strlen(function);
++ str += " " + funcname + " ";
++ len = strlen(funcname);
+ if (len < 17) {
+ str += " "[len ..];
+ }