{"UCSTR", fun_ucstr, 1, -1, FN_REG},
{"UDEFAULT", fun_udefault, 2, 12, FN_NOPARSE},
{"UFUN", fun_ufun, 1, 11, FN_REG},
+ {"PFUN", fun_pfun, 1, 11, FN_REG},
{"ULAMBDA", fun_ufun, 1, 11, FN_REG},
{"ULDEFAULT", fun_udefault, 1, 12, FN_NOPARSE | FN_LOCALIZE},
{"ULOCAL", fun_ufun, 1, 11, FN_REG | FN_LOCALIZE},
return;
}
+/* ARGSUSED */
+FUNCTION(fun_pfun)
+{
+
+ char rbuff[BUFFER_LEN];
+ ATTR *a;
+ int pe_flags = PE_UDEFAULT;
+ dbref parent;
+ ufun_attrib ufun;
+
+ parent = Parent(executor);
+
+ if (!GoodObject(parent))
+ return;
+
+ /* This is a stripped down version of fetch_ufun_attrib that gets
+ the atr value directly from the parent */
+
+ a = atr_get(parent, upcasestr(args[0]));
+ if (!a)
+ return; /* no attr */
+
+ if(AF_Internal(a) || AF_Private(a))
+ return; /* attr isn't inheritable */
+
+ /* DEBUG attributes */
+ if (AF_Debug(a))
+ pe_flags |= PE_DEBUG;
+
+ ufun.thing = executor;
+ mush_strncpy(ufun.contents, atr_value(a), BUFFER_LEN);
+ ufun.pe_flags = pe_flags;
+ ufun.errmess = (char *) "";
+
+ call_ufun(&ufun, args + 1, nargs - 1, rbuff, executor, enactor, pe_info);
+
+ safe_str(rbuff, buff, bp);
+
+ return;
+}
+
/* Like fun_ufun, but takes as second argument a default message
* to use if the attribute isn't there. If called as uldefault,
* then preserve registers, too.