mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-20 00:21:35 +00:00
. 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.
This commit is contained in:
parent
545e0a9299
commit
1cc01e3044
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=278846
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= dgd-kernel
|
||||
PORTVERSION= 1.3.4
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= net games
|
||||
MASTER_SITES= http://ftp.dworkin.nl/kernellib/ \
|
||||
http://ftp.dworkin.nl/kernellib/patches/
|
||||
|
108
net/dgd-kernel/files/patch-auto.c
Normal file
108
net/dgd-kernel/files/patch-auto.c
Normal file
@ -0,0 +1,108 @@
|
||||
$FreeBSD$
|
||||
|
||||
--- kernellib/kernel/lib/auto.c.orig 2011-07-30 14:18:12.000000000 -0700
|
||||
+++ kernellib/kernel/lib/auto.c 2011-07-30 14:19:44.000000000 -0700
|
||||
@@ -765,11 +765,11 @@
|
||||
{
|
||||
object rsrcd;
|
||||
int stack, ticks;
|
||||
- string function;
|
||||
+ string funcname;
|
||||
mixed tls, *limits, result;
|
||||
|
||||
rsrcd = ::find_object(RSRCD);
|
||||
- function = arg1;
|
||||
+ funcname = arg1;
|
||||
stack = ::status()[ST_STACKDEPTH];
|
||||
ticks = ::status()[ST_TICKS];
|
||||
rlimits (-1; -1) {
|
||||
@@ -781,7 +781,7 @@
|
||||
}
|
||||
|
||||
rlimits (limits[LIM_MAXSTACK]; limits[LIM_MAXTICKS]) {
|
||||
- result = call_other(this_object(), function, args...);
|
||||
+ result = call_other(this_object(), funcname, args...);
|
||||
|
||||
ticks = ::status()[ST_TICKS];
|
||||
rlimits (-1; -1) {
|
||||
@@ -797,36 +797,36 @@
|
||||
* NAME: call_limited()
|
||||
* DESCRIPTION: call a function with the current object owner's resource limits
|
||||
*/
|
||||
-static mixed call_limited(string function, mixed args...)
|
||||
+static mixed call_limited(string funcname, mixed args...)
|
||||
{
|
||||
- CHECKARG(function, 1, "call_limited");
|
||||
+ CHECKARG(funcname, 1, "call_limited");
|
||||
if (!this_object()) {
|
||||
return nil;
|
||||
}
|
||||
- CHECKARG(function_object(function, this_object()) != AUTO ||
|
||||
- function == "create",
|
||||
+ CHECKARG(function_object(funcname, this_object()) != AUTO ||
|
||||
+ funcname == "create",
|
||||
1, "call_limited");
|
||||
|
||||
- return _F_call_limited(function, args);
|
||||
+ return _F_call_limited(funcname, args);
|
||||
}
|
||||
|
||||
/*
|
||||
* NAME: call_out()
|
||||
* DESCRIPTION: start a callout
|
||||
*/
|
||||
-static int call_out(string function, mixed delay, mixed args...)
|
||||
+static int call_out(string funcname, mixed delay, mixed args...)
|
||||
{
|
||||
int type;
|
||||
string oname;
|
||||
|
||||
- CHECKARG(function, 1, "call_out");
|
||||
+ CHECKARG(funcname, 1, "call_out");
|
||||
type = typeof(delay);
|
||||
CHECKARG(type == T_INT || type == T_FLOAT, 2, "call_out");
|
||||
if (!this_object()) {
|
||||
return 0;
|
||||
}
|
||||
- CHECKARG(function_object(function, this_object()) != AUTO ||
|
||||
- function == "create",
|
||||
+ CHECKARG(function_object(funcname, this_object()) != AUTO ||
|
||||
+ funcname == "create",
|
||||
1, "call_out");
|
||||
oname = object_name(this_object());
|
||||
if (sscanf(oname, "%*s#-1") != 0) {
|
||||
@@ -838,9 +838,9 @@
|
||||
*/
|
||||
if (sscanf(oname, "/kernel/%*s") != 0) {
|
||||
/* direct callouts for kernel objects */
|
||||
- return ::call_out(function, delay, args...);
|
||||
+ return ::call_out(funcname, delay, args...);
|
||||
}
|
||||
- return ::call_out("_F_callout", delay, function, 0, args);
|
||||
+ return ::call_out("_F_callout", delay, funcname, 0, args);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -867,11 +867,11 @@
|
||||
* NAME: _F_callout()
|
||||
* DESCRIPTION: callout gate
|
||||
*/
|
||||
-nomask void _F_callout(string function, int handle, mixed *args)
|
||||
+nomask void _F_callout(string funcname, int handle, mixed *args)
|
||||
{
|
||||
if (!previous_program()) {
|
||||
if (handle == 0 && !::find_object(RSRCD)->suspended(this_object())) {
|
||||
- _F_call_limited(function, args);
|
||||
+ _F_call_limited(funcname, args);
|
||||
} else {
|
||||
mixed *tls;
|
||||
mixed **callouts;
|
||||
@@ -882,7 +882,7 @@
|
||||
::find_object(RSRCD)->remove_callout(tls, this_object(),
|
||||
handle);
|
||||
}
|
||||
- handle = ::call_out("_F_callout", LONG_TIME, function, 0, args);
|
||||
+ handle = ::call_out("_F_callout", LONG_TIME, funcname, 0, args);
|
||||
callouts = ::status(this_object())[O_CALLOUTS];
|
||||
for (i = sizeof(callouts); callouts[--i][CO_HANDLE] != handle; ) ;
|
||||
callouts[i][CO_FIRSTXARG + 1] = handle;
|
132
net/dgd-kernel/files/patch-driver.c
Normal file
132
net/dgd-kernel/files/patch-driver.c
Normal file
@ -0,0 +1,132 @@
|
||||
$FreeBSD$
|
||||
|
||||
--- kernellib/kernel/sys/driver.c.orig 2011-07-30 14:15:13.000000000 -0700
|
||||
+++ kernellib/kernel/sys/driver.c 2011-07-30 14:16:23.000000000 -0700
|
||||
@@ -596,16 +596,16 @@
|
||||
* NAME: _touch()
|
||||
* DESCRIPTION: touch an object that has been flagged with call_touch()
|
||||
*/
|
||||
-private int _touch(mixed *tls, object obj, string function)
|
||||
+private int _touch(mixed *tls, object obj, string funcname)
|
||||
{
|
||||
- return objectd->touch(obj, function);
|
||||
+ return objectd->touch(obj, funcname);
|
||||
}
|
||||
|
||||
/*
|
||||
* NAME: touch()
|
||||
* DESCRIPTION: wrapper for _touch()
|
||||
*/
|
||||
-static int touch(object obj, string function)
|
||||
+static int touch(object obj, string funcname)
|
||||
{
|
||||
mixed *tls;
|
||||
string prog;
|
||||
@@ -614,7 +614,7 @@
|
||||
if (!previous_object()) {
|
||||
tls = allocate(tls_size);
|
||||
} else if (KERNEL()) {
|
||||
- prog = function_object(function, obj);
|
||||
+ prog = function_object(funcname, obj);
|
||||
if (prog && sscanf(prog, "/kernel/%*s") != 0 &&
|
||||
status()[ST_STACKDEPTH] < 0) {
|
||||
/*
|
||||
@@ -625,7 +625,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- return _touch(tls, obj, function);
|
||||
+ return _touch(tls, obj, funcname);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
@@ -795,7 +795,7 @@
|
||||
private void _runtime_error(mixed tls, string str, int caught, int ticks,
|
||||
mixed **trace)
|
||||
{
|
||||
- string line, function, progname, objname;
|
||||
+ string line, funcname, progname, objname;
|
||||
int i, sz, len;
|
||||
object user;
|
||||
|
||||
@@ -836,10 +836,10 @@
|
||||
line = line[strlen(line) - 4 ..];
|
||||
}
|
||||
|
||||
- function = trace[i][TRACE_FUNCTION];
|
||||
- len = strlen(function);
|
||||
+ funcname = trace[i][TRACE_FUNCTION];
|
||||
+ len = strlen(funcname);
|
||||
if (progname == AUTO && i != sz - 1 && len > 3) {
|
||||
- switch (function[.. 2]) {
|
||||
+ switch (funcname[.. 2]) {
|
||||
case "bad":
|
||||
case "_F_":
|
||||
case "_Q_":
|
||||
@@ -847,7 +847,7 @@
|
||||
}
|
||||
}
|
||||
if (len < 17) {
|
||||
- function += " "[len ..];
|
||||
+ funcname += " "[len ..];
|
||||
}
|
||||
|
||||
objname = trace[i][TRACE_OBJNAME];
|
||||
@@ -857,10 +857,10 @@
|
||||
objname[len] == '#') {
|
||||
objname = objname[len ..];
|
||||
}
|
||||
- str += line + " " + function + " " + progname + " (" + objname +
|
||||
+ str += line + " " + funcname + " " + progname + " (" + objname +
|
||||
")\n";
|
||||
} else {
|
||||
- str += line + " " + function + " " + progname + "\n";
|
||||
+ str += line + " " + funcname + " " + progname + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -914,7 +914,7 @@
|
||||
static void atomic_error(string str, int atom, int ticks)
|
||||
{
|
||||
mixed **trace;
|
||||
- string line, function, progname, objname;
|
||||
+ string line, funcname, progname, objname;
|
||||
int i, sz, len;
|
||||
object obj;
|
||||
|
||||
@@ -936,10 +936,10 @@
|
||||
line = line[strlen(line) - 4 ..];
|
||||
}
|
||||
|
||||
- function = trace[i][TRACE_FUNCTION];
|
||||
- len = strlen(function);
|
||||
+ funcname = trace[i][TRACE_FUNCTION];
|
||||
+ len = strlen(funcname);
|
||||
if (progname == AUTO && i != sz - 1 && len > 3) {
|
||||
- switch (function[.. 2]) {
|
||||
+ switch (funcname[.. 2]) {
|
||||
case "bad":
|
||||
case "_F_":
|
||||
case "_Q_":
|
||||
@@ -947,7 +947,7 @@
|
||||
}
|
||||
}
|
||||
if (len < 17) {
|
||||
- function += " "[len ..];
|
||||
+ funcname += " "[len ..];
|
||||
}
|
||||
|
||||
objname = trace[i][TRACE_OBJNAME];
|
||||
@@ -957,10 +957,10 @@
|
||||
objname[len] == '#') {
|
||||
objname = objname[len ..];
|
||||
}
|
||||
- str += line + " " + function + " " + progname + " (" + objname +
|
||||
+ str += line + " " + funcname + " " + progname + " (" + objname +
|
||||
")\n";
|
||||
} else {
|
||||
- str += line + " " + function + " " + progname + "\n";
|
||||
+ str += line + " " + funcname + " " + progname + "\n";
|
||||
}
|
||||
}
|
||||
|
@ -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/
|
||||
|
37
net/dgd-lpmud/files/patch-room-pub2.c
Normal file
37
net/dgd-lpmud/files/patch-room-pub2.c
Normal file
@ -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";
|
@ -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");
|
||||
|
32
net/dgd-lpmud/files/patch-room-yard.c
Normal file
32
net/dgd-lpmud/files/patch-room-yard.c
Normal file
@ -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] =
|
51
net/dgd-lpmud/files/patch-sys-driver.c
Normal file
51
net/dgd-lpmud/files/patch-sys-driver.c
Normal file
@ -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 ..];
|
||||
}
|
Loading…
Reference in New Issue
Block a user