1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-13 07:34:50 +00:00
freebsd-ports/net/dgd-lpmud/files/patch-sys-driver.c
Greg Lewis 1cc01e3044 . 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.
2011-08-03 06:30:01 +00:00

52 lines
1.4 KiB
C

$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 ..];
}