blob: 3b0595c991a4210da716bcfa0e295402d04e1a08 [file] [log] [blame]
Zesstrad59c3892019-11-28 20:53:39 +01001SYNOPSIS
Zesstra715ec202025-07-09 22:18:31 +02002 #include <trace.h>
3
MG Mud User88f12472016-06-24 23:31:02 +02004 string traceprefix(string prefix)
5 string traceprefix(int dummy)
6
Zesstra715ec202025-07-09 22:18:31 +02007DESCRIPTION
8 If called with a string, only objects matching this prefix will
9 be traced. The string must not contain a leading "/" because
10 the object names are stored internally without it. If called
11 with a number, the traceprefix will be ignored and all objects
12 will be traced. Returns the last traceprefix or 0 if there
13 wasn't any.
MG Mud User88f12472016-06-24 23:31:02 +020014
Zesstra715ec202025-07-09 22:18:31 +020015 The master-lfun valid_trace() is called with ("traceprefix", prefix)
16 as arguments to verify the use of this efun.
Zesstrad59c3892019-11-28 20:53:39 +010017
Zesstra715ec202025-07-09 22:18:31 +020018EXAMPLES
MG Mud User88f12472016-06-24 23:31:02 +020019 object obj;
20 string prefix;
Zesstra715ec202025-07-09 22:18:31 +020021 obj = find_player("wessex");
22 prefix = object_name(obj);
23 prefix = prefix[1..]; /* cut off the leading "/" */
MG Mud User88f12472016-06-24 23:31:02 +020024 traceprefix(prefix);
Zesstra715ec202025-07-09 22:18:31 +020025 /* From here on, only code in the object "std/player#69"
26 * will be traced.
27 */
28 trace(TRACE_CALL | TRACE_CALL_OTHER | TRACE_RETURN | TRACE_ARGS);
MG Mud User88f12472016-06-24 23:31:02 +020029 ...
Zesstrad59c3892019-11-28 20:53:39 +010030 trace(TRACE_NOTHING);
31
Zesstra715ec202025-07-09 22:18:31 +020032HISTORY
33 LDMud 3.2.9 passes the <prefix> argument to the valid_trace()
34 apply as well.
Zesstrad59c3892019-11-28 20:53:39 +010035
Zesstra715ec202025-07-09 22:18:31 +020036SEE ALSO
MG Mud User88f12472016-06-24 23:31:02 +020037 trace(E)