@lpc-lang/core 1.1.2-5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +255 -0
- package/bin/lpc +4 -0
- package/bin/lpcserver +4 -0
- package/cancellationToken/cancellationToken.d.ts +8 -0
- package/cancellationToken/cancellationToken.d.ts.map +1 -0
- package/cancellationToken/serverCancellationToken.d.ts +21 -0
- package/cancellationToken/serverCancellationToken.d.ts.map +1 -0
- package/cli/_namespaces/lpc.d.ts +2 -0
- package/cli/_namespaces/lpc.d.ts.map +1 -0
- package/cli/lpc.d.ts +2 -0
- package/cli/lpc.d.ts.map +1 -0
- package/compiler/LpcConfig.d.ts +17 -0
- package/compiler/LpcConfig.d.ts.map +1 -0
- package/compiler/_namespaces/lpc.d.ts +49 -0
- package/compiler/_namespaces/lpc.d.ts.map +1 -0
- package/compiler/_namespaces/lpc.moduleSpecifiers.d.ts +2 -0
- package/compiler/_namespaces/lpc.moduleSpecifiers.d.ts.map +1 -0
- package/compiler/_namespaces/lpc.performance.d.ts +2 -0
- package/compiler/_namespaces/lpc.performance.d.ts.map +1 -0
- package/compiler/binder.d.ts +2 -0
- package/compiler/binder.d.ts.map +1 -0
- package/compiler/builderPublic.d.ts +76 -0
- package/compiler/builderPublic.d.ts.map +1 -0
- package/compiler/checker.d.ts +2 -0
- package/compiler/checker.d.ts.map +1 -0
- package/compiler/commandLineParser.d.ts +47 -0
- package/compiler/commandLineParser.d.ts.map +1 -0
- package/compiler/core.d.ts +3 -0
- package/compiler/core.d.ts.map +1 -0
- package/compiler/corePublic.d.ts +19 -0
- package/compiler/corePublic.d.ts.map +1 -0
- package/compiler/debug.d.ts +71 -0
- package/compiler/debug.d.ts.map +1 -0
- package/compiler/diagnosticInformation.d.ts +518 -0
- package/compiler/diagnosticInformation.d.ts.map +1 -0
- package/compiler/emitter.d.ts +11 -0
- package/compiler/emitter.d.ts.map +1 -0
- package/compiler/executeCommandLine.d.ts +15 -0
- package/compiler/executeCommandLine.d.ts.map +1 -0
- package/compiler/expressionToTypeNode.d.ts +2 -0
- package/compiler/expressionToTypeNode.d.ts.map +1 -0
- package/compiler/factory/baseNodeFactory.d.ts +2 -0
- package/compiler/factory/baseNodeFactory.d.ts.map +1 -0
- package/compiler/factory/emitHelper.d.ts +2 -0
- package/compiler/factory/emitHelper.d.ts.map +1 -0
- package/compiler/factory/emitNode.d.ts +22 -0
- package/compiler/factory/emitNode.d.ts.map +1 -0
- package/compiler/factory/nodeChildren.d.ts +2 -0
- package/compiler/factory/nodeChildren.d.ts.map +1 -0
- package/compiler/factory/nodeConverters.d.ts +2 -0
- package/compiler/factory/nodeConverters.d.ts.map +1 -0
- package/compiler/factory/nodeFactory.d.ts +4 -0
- package/compiler/factory/nodeFactory.d.ts.map +1 -0
- package/compiler/factory/parenthesizerRules.d.ts +2 -0
- package/compiler/factory/parenthesizerRules.d.ts.map +1 -0
- package/compiler/factory/utilities.d.ts +2 -0
- package/compiler/factory/utilities.d.ts.map +1 -0
- package/compiler/factory/utilitiesPublic.d.ts +4 -0
- package/compiler/factory/utilitiesPublic.d.ts.map +1 -0
- package/compiler/lpcFileHandler.d.ts +10 -0
- package/compiler/lpcFileHandler.d.ts.map +1 -0
- package/compiler/lpcJsHelpers.d.ts +17 -0
- package/compiler/lpcJsHelpers.d.ts.map +1 -0
- package/compiler/lpcbuild.d.ts +2 -0
- package/compiler/lpcbuild.d.ts.map +1 -0
- package/compiler/lpcbuildPublic.d.ts +26 -0
- package/compiler/lpcbuildPublic.d.ts.map +1 -0
- package/compiler/moduleNameResolver.d.ts +55 -0
- package/compiler/moduleNameResolver.d.ts.map +1 -0
- package/compiler/moduleSpecifiers.d.ts +2 -0
- package/compiler/moduleSpecifiers.d.ts.map +1 -0
- package/compiler/nodeTests.d.ts +115 -0
- package/compiler/nodeTests.d.ts.map +1 -0
- package/compiler/parser.d.ts +65 -0
- package/compiler/parser.d.ts.map +1 -0
- package/compiler/path.d.ts +2 -0
- package/compiler/path.d.ts.map +1 -0
- package/compiler/perfLoger.d.ts +2 -0
- package/compiler/perfLoger.d.ts.map +1 -0
- package/compiler/performance.d.ts +2 -0
- package/compiler/performance.d.ts.map +1 -0
- package/compiler/performanceCore.d.ts +2 -0
- package/compiler/performanceCore.d.ts.map +1 -0
- package/compiler/program.d.ts +72 -0
- package/compiler/program.d.ts.map +1 -0
- package/compiler/resolutionCache.d.ts +6 -0
- package/compiler/resolutionCache.d.ts.map +1 -0
- package/compiler/resolver.d.ts +1 -0
- package/compiler/resolver.d.ts.map +1 -0
- package/compiler/scanner.d.ts +85 -0
- package/compiler/scanner.d.ts.map +1 -0
- package/compiler/sourcemap.d.ts +2 -0
- package/compiler/sourcemap.d.ts.map +1 -0
- package/compiler/sys.d.ts +56 -0
- package/compiler/sys.d.ts.map +1 -0
- package/compiler/tracing.d.ts +31 -0
- package/compiler/tracing.d.ts.map +1 -0
- package/compiler/transformers/declarations.d.ts +2 -0
- package/compiler/transformers/declarations.d.ts.map +1 -0
- package/compiler/transformers.d.ts +2 -0
- package/compiler/transformers.d.ts.map +1 -0
- package/compiler/types.d.ts +3284 -0
- package/compiler/types.d.ts.map +1 -0
- package/compiler/utilities.d.ts +57 -0
- package/compiler/utilities.d.ts.map +1 -0
- package/compiler/utilitiesPublic.d.ts +213 -0
- package/compiler/utilitiesPublic.d.ts.map +1 -0
- package/compiler/visitorPublic.d.ts +72 -0
- package/compiler/visitorPublic.d.ts.map +1 -0
- package/compiler/watch.d.ts +2 -0
- package/compiler/watch.d.ts.map +1 -0
- package/compiler/watchPublic.d.ts +44 -0
- package/compiler/watchPublic.d.ts.map +1 -0
- package/compiler/watchUtilities.d.ts +14 -0
- package/compiler/watchUtilities.d.ts.map +1 -0
- package/config-types.d.ts +33 -0
- package/config-types.d.ts.map +1 -0
- package/harness/harnessIO.d.ts +4 -0
- package/harness/harnessIO.d.ts.map +1 -0
- package/lpc/_namespaces/lpc.d.ts +6 -0
- package/lpc/_namespaces/lpc.d.ts.map +1 -0
- package/lpc/_namespaces/lpc.server.d.ts +2 -0
- package/lpc/_namespaces/lpc.server.d.ts.map +1 -0
- package/lpc/lpc.d.ts +2 -0
- package/lpc/lpc.d.ts.map +1 -0
- package/lpcserver/document.d.ts +1 -0
- package/lpcserver/document.d.ts.map +1 -0
- package/lpcserver/nodeServer.d.ts +25 -0
- package/lpcserver/nodeServer.d.ts.map +1 -0
- package/lpcserver/protocol.const.d.ts +46 -0
- package/lpcserver/protocol.const.d.ts.map +1 -0
- package/lpcserver/server.d.ts +3 -0
- package/lpcserver/server.d.ts.map +1 -0
- package/lpcserver/textRendering.d.ts +14 -0
- package/lpcserver/textRendering.d.ts.map +1 -0
- package/lpcserver/typeConverters.d.ts +44 -0
- package/lpcserver/typeConverters.d.ts.map +1 -0
- package/lpcserver/utils.d.ts +14 -0
- package/lpcserver/utils.d.ts.map +1 -0
- package/package.json +48 -0
- package/parse-fluff-docs.d.ts +2 -0
- package/parse-fluff-docs.d.ts.map +1 -0
- package/parse-ld-docs.d.ts +2 -0
- package/parse-ld-docs.d.ts.map +1 -0
- package/server/_namespaces/lpc.d.ts +5 -0
- package/server/_namespaces/lpc.d.ts.map +1 -0
- package/server/_namespaces/lpc.server.d.ts +11 -0
- package/server/_namespaces/lpc.server.d.ts.map +1 -0
- package/server/_namespaces/lpc.server.protocol.d.ts +2 -0
- package/server/_namespaces/lpc.server.protocol.d.ts.map +1 -0
- package/server/editorServices.d.ts +261 -0
- package/server/editorServices.d.ts.map +1 -0
- package/server/project.d.ts +143 -0
- package/server/project.d.ts.map +1 -0
- package/server/protocol.d.ts +962 -0
- package/server/protocol.d.ts.map +1 -0
- package/server/scriptInfo.d.ts +53 -0
- package/server/scriptInfo.d.ts.map +1 -0
- package/server/scriptVersionCache.d.ts +2 -0
- package/server/scriptVersionCache.d.ts.map +1 -0
- package/server/session.d.ts +150 -0
- package/server/session.d.ts.map +1 -0
- package/server/types.d.ts +24 -0
- package/server/types.d.ts.map +1 -0
- package/server/utilities.d.ts +2 -0
- package/server/utilities.d.ts.map +1 -0
- package/server/utilitiesPublic.d.ts +37 -0
- package/server/utilitiesPublic.d.ts.map +1 -0
- package/server.d.ts +2 -0
- package/server.d.ts.map +1 -0
- package/services/_namespaces/lpc.Completions.StringCompletions.d.ts +2 -0
- package/services/_namespaces/lpc.Completions.StringCompletions.d.ts.map +1 -0
- package/services/_namespaces/lpc.Completions.d.ts +4 -0
- package/services/_namespaces/lpc.Completions.d.ts.map +1 -0
- package/services/_namespaces/lpc.FindAllReferences.d.ts +3 -0
- package/services/_namespaces/lpc.FindAllReferences.d.ts.map +1 -0
- package/services/_namespaces/lpc.GoToDefinition.d.ts +2 -0
- package/services/_namespaces/lpc.GoToDefinition.d.ts.map +1 -0
- package/services/_namespaces/lpc.JsDoc.d.ts +2 -0
- package/services/_namespaces/lpc.JsDoc.d.ts.map +1 -0
- package/services/_namespaces/lpc.NavigationBar.d.ts +2 -0
- package/services/_namespaces/lpc.NavigationBar.d.ts.map +1 -0
- package/services/_namespaces/lpc.Rename.d.ts +2 -0
- package/services/_namespaces/lpc.Rename.d.ts.map +1 -0
- package/services/_namespaces/lpc.SignatureHelp.d.ts +2 -0
- package/services/_namespaces/lpc.SignatureHelp.d.ts.map +1 -0
- package/services/_namespaces/lpc.SymbolDisplay.d.ts +2 -0
- package/services/_namespaces/lpc.SymbolDisplay.d.ts.map +1 -0
- package/services/_namespaces/lpc.codefix.d.ts +3 -0
- package/services/_namespaces/lpc.codefix.d.ts.map +1 -0
- package/services/_namespaces/lpc.d.ts +30 -0
- package/services/_namespaces/lpc.d.ts.map +1 -0
- package/services/_namespaces/lpc.formatting.d.ts +7 -0
- package/services/_namespaces/lpc.formatting.d.ts.map +1 -0
- package/services/_namespaces/lpc.textChanges.d.ts +2 -0
- package/services/_namespaces/lpc.textChanges.d.ts.map +1 -0
- package/services/classifier2020.d.ts +2 -0
- package/services/classifier2020.d.ts.map +1 -0
- package/services/codefixes/helpers.d.ts +2 -0
- package/services/codefixes/helpers.d.ts.map +1 -0
- package/services/codefixes/importFixes.d.ts +2 -0
- package/services/codefixes/importFixes.d.ts.map +1 -0
- package/services/completions.d.ts +2 -0
- package/services/completions.d.ts.map +1 -0
- package/services/documentRegistry.d.ts +90 -0
- package/services/documentRegistry.d.ts.map +1 -0
- package/services/exportInfoMap.d.ts +5 -0
- package/services/exportInfoMap.d.ts.map +1 -0
- package/services/findAllReferences.d.ts +2 -0
- package/services/findAllReferences.d.ts.map +1 -0
- package/services/formatting/formatting.d.ts +2 -0
- package/services/formatting/formatting.d.ts.map +1 -0
- package/services/formatting/formattingContext.d.ts +2 -0
- package/services/formatting/formattingContext.d.ts.map +1 -0
- package/services/formatting/rule.d.ts +2 -0
- package/services/formatting/rule.d.ts.map +1 -0
- package/services/formatting/rules.d.ts +2 -0
- package/services/formatting/rules.d.ts.map +1 -0
- package/services/formatting/rulesMap.d.ts +2 -0
- package/services/formatting/rulesMap.d.ts.map +1 -0
- package/services/formatting/smartIndenter.d.ts +2 -0
- package/services/formatting/smartIndenter.d.ts.map +1 -0
- package/services/goToDefinition.d.ts +2 -0
- package/services/goToDefinition.d.ts.map +1 -0
- package/services/importTracker.d.ts +2 -0
- package/services/importTracker.d.ts.map +1 -0
- package/services/jsDoc.d.ts +2 -0
- package/services/jsDoc.d.ts.map +1 -0
- package/services/navigationBar.d.ts +2 -0
- package/services/navigationBar.d.ts.map +1 -0
- package/services/rename.d.ts +2 -0
- package/services/rename.d.ts.map +1 -0
- package/services/services.d.ts +54 -0
- package/services/services.d.ts.map +1 -0
- package/services/signatureHelp.d.ts +2 -0
- package/services/signatureHelp.d.ts.map +1 -0
- package/services/sourcemaps.d.ts +2 -0
- package/services/sourcemaps.d.ts.map +1 -0
- package/services/stringCompletions.d.ts +2 -0
- package/services/stringCompletions.d.ts.map +1 -0
- package/services/suggestionDiagnostics.d.ts +2 -0
- package/services/suggestionDiagnostics.d.ts.map +1 -0
- package/services/symbolDisplay.d.ts +2 -0
- package/services/symbolDisplay.d.ts.map +1 -0
- package/services/textChanges.d.ts +2 -0
- package/services/textChanges.d.ts.map +1 -0
- package/services/types.d.ts +901 -0
- package/services/types.d.ts.map +1 -0
- package/services/utilities.d.ts +3 -0
- package/services/utilities.d.ts.map +1 -0
- package/src/cli.js +58 -0
- package/src/cli.js.map +7 -0
- package/src/efuns/fluffos/arrays.h +205 -0
- package/src/efuns/fluffos/async.h +84 -0
- package/src/efuns/fluffos/buffers.h +80 -0
- package/src/efuns/fluffos/calls.h +275 -0
- package/src/efuns/fluffos/contrib.h +805 -0
- package/src/efuns/fluffos/db.h +125 -0
- package/src/efuns/fluffos/driver.h +107 -0
- package/src/efuns/fluffos/ed.h +48 -0
- package/src/efuns/fluffos/efuns.fluffos.h +75 -0
- package/src/efuns/fluffos/external.h +30 -0
- package/src/efuns/fluffos/filesystem.h +154 -0
- package/src/efuns/fluffos/floats.h +136 -0
- package/src/efuns/fluffos/functions.h +104 -0
- package/src/efuns/fluffos/general.h +548 -0
- package/src/efuns/fluffos/interactive.h +777 -0
- package/src/efuns/fluffos/internals.h +455 -0
- package/src/efuns/fluffos/lpc-config.json +10 -0
- package/src/efuns/fluffos/mappings.h +205 -0
- package/src/efuns/fluffos/misc.h +43 -0
- package/src/efuns/fluffos/mudlib.h +228 -0
- package/src/efuns/fluffos/numbers.h +41 -0
- package/src/efuns/fluffos/objects.h +365 -0
- package/src/efuns/fluffos/parsing.h +220 -0
- package/src/efuns/fluffos/pcre.h +75 -0
- package/src/efuns/fluffos/sockets.h +276 -0
- package/src/efuns/fluffos/strings.h +542 -0
- package/src/efuns/fluffos/system.h +408 -0
- package/src/efuns/fluffos/zh-cn/arrays.zh-cn.h +167 -0
- package/src/efuns/fluffos/zh-cn/async.zh-cn.h +81 -0
- package/src/efuns/fluffos/zh-cn/buffers.zh-cn.h +69 -0
- package/src/efuns/fluffos/zh-cn/calls.zh-cn.h +242 -0
- package/src/efuns/fluffos/zh-cn/contrib.zh-cn.h +767 -0
- package/src/efuns/fluffos/zh-cn/db.zh-cn.h +113 -0
- package/src/efuns/fluffos/zh-cn/ed.zh-cn.h +42 -0
- package/src/efuns/fluffos/zh-cn/efuns.fluffos.h +76 -0
- package/src/efuns/fluffos/zh-cn/external.zh-cn.h +25 -0
- package/src/efuns/fluffos/zh-cn/filesystem.zh-cn.h +140 -0
- package/src/efuns/fluffos/zh-cn/floats.zh-cn.h +129 -0
- package/src/efuns/fluffos/zh-cn/functions.zh-cn.h +87 -0
- package/src/efuns/fluffos/zh-cn/general.zh-cn.h +506 -0
- package/src/efuns/fluffos/zh-cn/interactive.zh-cn.h +659 -0
- package/src/efuns/fluffos/zh-cn/internals.zh-cn.h +356 -0
- package/src/efuns/fluffos/zh-cn/mappings.zh-cn.h +188 -0
- package/src/efuns/fluffos/zh-cn/misc.zh-cn.h +43 -0
- package/src/efuns/fluffos/zh-cn/mudlib.zh-cn.h +190 -0
- package/src/efuns/fluffos/zh-cn/numbers.zh-cn.h +36 -0
- package/src/efuns/fluffos/zh-cn/objects.zh-cn.h +280 -0
- package/src/efuns/fluffos/zh-cn/parsing.zh-cn.h +212 -0
- package/src/efuns/fluffos/zh-cn/pcre.zh-cn.h +67 -0
- package/src/efuns/fluffos/zh-cn/sockets.zh-cn.h +230 -0
- package/src/efuns/fluffos/zh-cn/strings.zh-cn.h +484 -0
- package/src/efuns/fluffos/zh-cn/system.zh-cn.h +366 -0
- package/src/efuns/ldmud/defines.h +69 -0
- package/src/efuns/ldmud/efun.h +10449 -0
- package/src/efuns/ldmud/efuns.ldmud.h +87 -0
- package/src/efuns/ldmud/lpc-config.json +9 -0
- package/src/efuns/ldmud/obsolete.h +2168 -0
- package/src/lpc.js +82486 -0
- package/src/lpc.js.map +6 -0
- package/src/server.js +129 -0
- package/src/server.js.map +7 -0
- package/types.d.ts +23 -0
- package/types.d.ts.map +1 -0
- package/utils.d.ts +21 -0
- package/utils.d.ts.map +1 -0
|
@@ -0,0 +1,2168 @@
|
|
|
1
|
+
// obsolete.h
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* valid_seteuid
|
|
5
|
+
*
|
|
6
|
+
* Should return 1 if ob is allowed to set its euid to newid.
|
|
7
|
+
* Objects are always allowed to set their euid to 0.
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
int valid_seteuid(object ob, string newid);
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* tail
|
|
15
|
+
*
|
|
16
|
+
* Print out the tail of a file. There is no specific amount of
|
|
17
|
+
* lines given to the output. Only a maximum of about 1000 bytes will
|
|
18
|
+
* be printed.
|
|
19
|
+
*
|
|
20
|
+
* @deprecated Deprecated in LDMud 3.3.720.
|
|
21
|
+
Removed in LDMud 3.5.0
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
void tail(string file);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* strlen
|
|
28
|
+
*
|
|
29
|
+
* Returns the length of the string str.
|
|
30
|
+
* This efun is DEPRECATED and replaced by sizeof().
|
|
31
|
+
* Please do not use it in new code and start to phase
|
|
32
|
+
* it out in old code.
|
|
33
|
+
*
|
|
34
|
+
* @deprecated Removed in LDMud 3.5.0
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
int strlen(string str);
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* start_mccp_compress
|
|
41
|
+
*
|
|
42
|
+
* This efun must be called inside an interactive player and starts
|
|
43
|
+
* the compression of the driver -> client traffic.
|
|
44
|
+
*
|
|
45
|
+
* Return non-zero on success, and 0 on failure.
|
|
46
|
+
*
|
|
47
|
+
* <telopt> denotes the MCCP version and must be either TELOPT_COMPRESS2
|
|
48
|
+
* or TELOPT_COMRESS from <telnet.h>.
|
|
49
|
+
*
|
|
50
|
+
* The only exception is when the telnet machine is disabled: then
|
|
51
|
+
* any value will do. This can be used with dedicated clients
|
|
52
|
+
* which send text uncompressed but expect to receive it compressed
|
|
53
|
+
* (Java clients using InflaterInputStream for example).
|
|
54
|
+
*
|
|
55
|
+
* Available only if the driver is compiled with MCCP enabled;
|
|
56
|
+
* __MCCP__ is defined in that case.
|
|
57
|
+
*
|
|
58
|
+
* @deprecated Added in LDMud 3.3.447, backported to LDMud 3.2.10.
|
|
59
|
+
LDMud 3.3.666 added the possibility to enable outgoing compression
|
|
60
|
+
when the telnet machine is enabled (not backported).
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
int start_mccp_compress(int telopt);
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* slice_array
|
|
67
|
+
*
|
|
68
|
+
* Returns an array that is a slice of the array <arr> from the
|
|
69
|
+
* index <from> to the index <to>.
|
|
70
|
+
*
|
|
71
|
+
* This is the old notation for arr[from..to] and supported
|
|
72
|
+
* only for hysterical raisins.
|
|
73
|
+
*
|
|
74
|
+
* DO NOT USE THIS EFUN ANYMORE.
|
|
75
|
+
*
|
|
76
|
+
* @deprecated Removed in LDMud 3.3.
|
|
77
|
+
*
|
|
78
|
+
*/
|
|
79
|
+
mixed *slice_array(mixed *array, int from, int to);
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* seteuid
|
|
83
|
+
*
|
|
84
|
+
* Set effective uid to str. The calling object must be
|
|
85
|
+
* privileged to do so by the master object. In most
|
|
86
|
+
* installations it can always be set to the current uid of the
|
|
87
|
+
* object, to the uid of the creator of the object file, or to 0.
|
|
88
|
+
*
|
|
89
|
+
* Result is 0 the euid could not be changed, and non-0 if it
|
|
90
|
+
* was changed.
|
|
91
|
+
*
|
|
92
|
+
* When this value is 0, the current object's uid can be changed
|
|
93
|
+
* by export_uid(), and only then.
|
|
94
|
+
*
|
|
95
|
+
* If strict euid usage is enforced, objects with euid 0 cannot
|
|
96
|
+
* load or clone other objects.
|
|
97
|
+
*
|
|
98
|
+
* @deprecated Since 3.2.1@47, this efun is availabe only when using euids.
|
|
99
|
+
Since 3.2.7, this efun is always available.
|
|
100
|
+
*
|
|
101
|
+
*/
|
|
102
|
+
int seteuid(string str);
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* set_prompt
|
|
106
|
+
*
|
|
107
|
+
* Set the prompt given by the first argument for the interactive
|
|
108
|
+
* object instead of the default prompt. If the second argument
|
|
109
|
+
* is omitted, this_player() is used as default. The first arg
|
|
110
|
+
* can be a string or a closure.
|
|
111
|
+
*
|
|
112
|
+
* The result returned is the old prompt.
|
|
113
|
+
*
|
|
114
|
+
* If the first arg is the number 0, the prompt is not changed,
|
|
115
|
+
* just returned.
|
|
116
|
+
*
|
|
117
|
+
*
|
|
118
|
+
*/
|
|
119
|
+
string set_prompt(mixed prompt, object ob);
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* set_modify_command
|
|
123
|
+
*
|
|
124
|
+
* All commands for the current object (that must obviously be
|
|
125
|
+
* interactive) will be passed to ob->modify_command() before
|
|
126
|
+
* actually being executed. The argument can be passed an object
|
|
127
|
+
* or an object_name.
|
|
128
|
+
*
|
|
129
|
+
* When set_modify_command() was called, the parser won't expand
|
|
130
|
+
* the standard abbreviations n,e,s,w,nw,sw,ne,se for that user
|
|
131
|
+
* anymore, nor use any hook set for this.
|
|
132
|
+
*
|
|
133
|
+
* 0 as argument will stop the command modification and reinstall
|
|
134
|
+
* the standard abbreviations.
|
|
135
|
+
* -1 as argument will just return the object previously set.
|
|
136
|
+
*
|
|
137
|
+
* The return value is the object that was previously set with
|
|
138
|
+
* set_modify_command(), if any.
|
|
139
|
+
*
|
|
140
|
+
* This mechanism is intended to expand aliases on quicktypers
|
|
141
|
+
* or the like. The name of the lfun called can be changed
|
|
142
|
+
* from modify_command() to something else using the
|
|
143
|
+
* H_MODIFY_COMMAND_FNAME hook.
|
|
144
|
+
*
|
|
145
|
+
* @deprecated Up to 3.2.1@108 the lfun called was hardcoded as
|
|
146
|
+
'modify_command'. The hook H_MODIFY_COMMAND_FNAME introduced
|
|
147
|
+
in 3.2.1@109 allows to change the name.
|
|
148
|
+
*
|
|
149
|
+
*/
|
|
150
|
+
object set_modify_command(object c);
|
|
151
|
+
object set_modify_command(string c);
|
|
152
|
+
object set_modify_command(int c);
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* set_max_commands
|
|
156
|
+
*
|
|
157
|
+
* Set the max number of commands the interactive <obj> is
|
|
158
|
+
* allowed to execute per second to <num>. A negative value means
|
|
159
|
+
* 'unlimited' and is the setting for newly created connections.
|
|
160
|
+
*
|
|
161
|
+
* If <obj> is not given, the current interactive is queried.
|
|
162
|
+
*
|
|
163
|
+
* The function raises a privilege_violation ("set_max_commands",
|
|
164
|
+
* obj, num). If the privilege is denied, the call is ignored.
|
|
165
|
+
*
|
|
166
|
+
* A 'command' in this context means every received data packet
|
|
167
|
+
* which causes a LPC call - actions and calls to input_to()
|
|
168
|
+
* alike.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* To establish a mud-wide default for the maximum command rate,
|
|
172
|
+
* write master::connect() like this:
|
|
173
|
+
*
|
|
174
|
+
* object connect() {
|
|
175
|
+
* object obj;
|
|
176
|
+
*
|
|
177
|
+
* ...
|
|
178
|
+
* set_max_commands(100);
|
|
179
|
+
* return obj;
|
|
180
|
+
* }
|
|
181
|
+
*
|
|
182
|
+
* Upon return from the the function, the connection with its
|
|
183
|
+
* modified max_commands will be rebound from the master object
|
|
184
|
+
* to the returned object.
|
|
185
|
+
*
|
|
186
|
+
* @deprecated Introduced in LDMud 3.2.10.
|
|
187
|
+
*
|
|
188
|
+
*/
|
|
189
|
+
void set_max_commands(int num);
|
|
190
|
+
|
|
191
|
+
void set_max_commands(int num, object obj);
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* set_limits
|
|
195
|
+
*
|
|
196
|
+
* Set the default runtime limits from the given arguments. The new
|
|
197
|
+
* limits will be in effect as the initial 'max limits' with the
|
|
198
|
+
* next execution thread.
|
|
199
|
+
*
|
|
200
|
+
* The arguments can be given in two ways: as an array (like the one
|
|
201
|
+
* returned from query_limits(), or as a list of tagged values.
|
|
202
|
+
* The limit settings recognize three special values:
|
|
203
|
+
*
|
|
204
|
+
* LIMIT_UNLIMITED: the limit is deactivated
|
|
205
|
+
* LIMIT_KEEP: the former setting is kept
|
|
206
|
+
* LIMIT_DEFAULT: the 'global' default setting is used.
|
|
207
|
+
*
|
|
208
|
+
* For LIMIT_COST, the special values have these meaning:
|
|
209
|
+
* LIMIT_UNLIMITED: at maximum 1 tick is accounted
|
|
210
|
+
* LIMIT_KEEP: LIMIT_COST is set to 0
|
|
211
|
+
* LIMIT_DEFAULT: LIMIT_COST is set to -100
|
|
212
|
+
*
|
|
213
|
+
* The efun causes a privilege violation ("set_limits", current_object,
|
|
214
|
+
* limits-array).
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* set_limits(({ 200000 }))
|
|
218
|
+
* set_limits(LIMIT_EVAL, 200000)
|
|
219
|
+
* --> set new default eval_cost limit to 200000
|
|
220
|
+
*
|
|
221
|
+
* set_limits(({ LIMIT_UNLIMITED, LIMIT_KEEP, 5000 }))
|
|
222
|
+
* set_limits(LIMIT_EVAL, LIMIT_UNLIMITED, LIMIT_ARRAY, LIMIT_KEEP,
|
|
223
|
+
* LIMIT_MAPPING, 5000)
|
|
224
|
+
* --> set new eval_cost limit to unlimited, keep the current
|
|
225
|
+
* array size limit, and limit mapping sizes to 5000.
|
|
226
|
+
*
|
|
227
|
+
* @deprecated Introduced in LDMud 3.2.7.
|
|
228
|
+
LDMud 3.3.563 introduced LIMIT_COST.
|
|
229
|
+
LDMud 3.3.677 introduced LIMIT_MAPPING_KEYS, LIMIT_MAPPING_SIZE.
|
|
230
|
+
LDMud 3.5.0 introduced LIMIT_MEMORY.
|
|
231
|
+
*
|
|
232
|
+
*/
|
|
233
|
+
void set_limits(int tag, varargs int value );
|
|
234
|
+
void set_limits(int *limits);
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* set_light
|
|
238
|
+
*
|
|
239
|
+
* An object is by default dark. It can be set to not dark by
|
|
240
|
+
* calling set_light(1). The environment will then also get this
|
|
241
|
+
* light. The returned value is the total number of lights in
|
|
242
|
+
* this room. So if you call set_light(0) it will return the
|
|
243
|
+
* light level of the current object.
|
|
244
|
+
*
|
|
245
|
+
* Note that the value of the argument is added to the light of
|
|
246
|
+
* the current object.
|
|
247
|
+
*
|
|
248
|
+
*
|
|
249
|
+
*/
|
|
250
|
+
int set_light(int n);
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* set_is_wizard
|
|
254
|
+
*
|
|
255
|
+
* Change object ob's wizardhood flag.
|
|
256
|
+
* If n is 0, it is cleared, if n is, it is set, if n is -1 the
|
|
257
|
+
* current status is reported. The return value is always the old
|
|
258
|
+
* value of the flag. Using this function sets a flag in the
|
|
259
|
+
* parser, that affects permissions for dumpallobj etc, which are
|
|
260
|
+
* by default free for every user.
|
|
261
|
+
*
|
|
262
|
+
* @deprecated Since 3.2.7 this efun is optional.
|
|
263
|
+
*
|
|
264
|
+
*/
|
|
265
|
+
int set_is_wizard(object ob, int n);
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* set_heart_beat
|
|
269
|
+
*
|
|
270
|
+
* Enable or disable heart beat. The driver will apply the lfun
|
|
271
|
+
* heart_beat() to the current object every __HEARTBEAT_INTERVAL__
|
|
272
|
+
* seconds, if it is enabled. A shadow over the heart_beat() lfun
|
|
273
|
+
* will be ignored.
|
|
274
|
+
*
|
|
275
|
+
* If the heart beat is not needed for the moment, then do disable it.
|
|
276
|
+
* This will reduce system overhead.
|
|
277
|
+
*
|
|
278
|
+
* Return true for success, and false for failure.
|
|
279
|
+
*
|
|
280
|
+
* Disabling an already disabled heart beat (and vice versa
|
|
281
|
+
* enabling and enabled heart beat) counts as failure.
|
|
282
|
+
*
|
|
283
|
+
* Note that heart_beat()s are called only if there are interactive
|
|
284
|
+
* players in the game.
|
|
285
|
+
*
|
|
286
|
+
*
|
|
287
|
+
*/
|
|
288
|
+
int set_heart_beat(int flag);
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* set_extra_wizinfo_size
|
|
292
|
+
*
|
|
293
|
+
* Indicate that the wizlist should contain an array of this size
|
|
294
|
+
* with extra info foreach wizard. A negative value indicates
|
|
295
|
+
* a non-array value.
|
|
296
|
+
*
|
|
297
|
+
* Causes a privilege violation.
|
|
298
|
+
*
|
|
299
|
+
* The value is only used to allocate a proper empty 'extra' value
|
|
300
|
+
* for newly created wizlist entries.
|
|
301
|
+
*
|
|
302
|
+
*
|
|
303
|
+
*/
|
|
304
|
+
void set_extra_wizinfo_size(int i);
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* set_connection_charset
|
|
308
|
+
*
|
|
309
|
+
* Set the set of characters that can be output to the
|
|
310
|
+
* interactive user (this does not apply to binary_message()).
|
|
311
|
+
* The function must be called by the interactive user object
|
|
312
|
+
* itself.
|
|
313
|
+
*
|
|
314
|
+
* The charset can be given either directly as a string, or
|
|
315
|
+
* indirectly as a bitvector. If the charset is given as the
|
|
316
|
+
* number 0, the default connection charset is re-established.
|
|
317
|
+
*
|
|
318
|
+
* The bitvector is interpreted as an array of 8-bit-values and
|
|
319
|
+
* might contain up to 32 elements. Character n is allowed to be
|
|
320
|
+
* output if sizeof(bitvector) > n/8 && bitvector[n/8] & (1 << n%8) .
|
|
321
|
+
*
|
|
322
|
+
* If quote_iac is 0 and char 255 is allowed to be output, IAC
|
|
323
|
+
* will be output unmodified.
|
|
324
|
+
* If quote_iac is 1 and char 255 is allowed to be output, char
|
|
325
|
+
* 255 will be quoted so that it is not interpreted as IAC by the
|
|
326
|
+
* telnet protocol. This is the default.
|
|
327
|
+
*
|
|
328
|
+
* @deprecated Introduced in 3.2.1@40.
|
|
329
|
+
LDMud 3.2.8 added the ability to specify the charset as a string.
|
|
330
|
+
LDMud 3.2.10 added the ability to reset the charset to the default.
|
|
331
|
+
*
|
|
332
|
+
*/
|
|
333
|
+
void set_connection_charset(int *bitvector, int quote_iac);
|
|
334
|
+
void set_connection_charset(string charset, int quote_iac);
|
|
335
|
+
void set_connection_charset(int zero, int quote_iac);
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* set_combine_charset
|
|
339
|
+
*
|
|
340
|
+
* Set the set of characters which can be combined into a single string
|
|
341
|
+
* when already received en-bloc in charmode from the current interactive
|
|
342
|
+
* user.
|
|
343
|
+
*
|
|
344
|
+
* Non-combinable characters and single received characters are returned
|
|
345
|
+
* as separate strings as usual. The function must be called with the
|
|
346
|
+
* interactive user being the command giver.
|
|
347
|
+
*
|
|
348
|
+
* The newline '\n' and the NUL character '\0' are always non-combinable.
|
|
349
|
+
*
|
|
350
|
+
* The charset can be given either directly as a string, or indirectly
|
|
351
|
+
* as a bitvector. If given as the number 0, the default combine
|
|
352
|
+
* charset is re-established.
|
|
353
|
+
*
|
|
354
|
+
* The bitvector is interpreted as an array of 8-bit-values and might
|
|
355
|
+
* contain up to 32 elements. Character n is allowed to be output
|
|
356
|
+
* if sizeof(bitvector) > n/8 && bitvector[n/8] & (1 << n%8) .
|
|
357
|
+
*
|
|
358
|
+
* @example
|
|
359
|
+
* // In a screen-oriented editor, most of the printable characters
|
|
360
|
+
* // (excluding answers to editor prompts 'j', 'n' and 'q') can be
|
|
361
|
+
* // combined into strings.
|
|
362
|
+
* set_combine_charset("abcdefghijklmoprstuvwxz0123456789"
|
|
363
|
+
* "ABCDEFGHIJKLMOPRSTUVWXZ");
|
|
364
|
+
*
|
|
365
|
+
* // Disable any previous setting.
|
|
366
|
+
* set_combine_charset("");
|
|
367
|
+
*
|
|
368
|
+
* @deprecated Introduced in LDMud 3.2.8.
|
|
369
|
+
LDMud 3.2.10 added the ability to reset the charset to the default.
|
|
370
|
+
*
|
|
371
|
+
*/
|
|
372
|
+
void set_combine_charset(int *bitvector);
|
|
373
|
+
|
|
374
|
+
void set_combine_charset(string charset);
|
|
375
|
+
|
|
376
|
+
varargs void set_combine_charset(int zero);
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* set_buffer_size
|
|
380
|
+
*
|
|
381
|
+
* Changes the socket buffer size for this_interactive() to size,
|
|
382
|
+
* up to a preconfigured maximum, result is the old buffer size
|
|
383
|
+
* (or -1 on systems which aren't able to change the socket
|
|
384
|
+
* buffer).
|
|
385
|
+
* Modifying the buffer size may result in a better IO
|
|
386
|
+
* throughput, but can also worsen it.
|
|
387
|
+
*
|
|
388
|
+
* @deprecated Introduced in 3.2.1@34
|
|
389
|
+
*
|
|
390
|
+
*/
|
|
391
|
+
int set_buffer_size(int size);
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* set_auto_include_string
|
|
395
|
+
*
|
|
396
|
+
* The arg will be automatically included into every compiled LPC
|
|
397
|
+
* object. This is useful to enforce global definitions, e.g.
|
|
398
|
+
* ``#pragma rtt_checks'' or ``#pragma strict_types''. The
|
|
399
|
+
* calling object needs to be privileged by the master object.
|
|
400
|
+
*
|
|
401
|
+
* Note that the auto-include-string is cleared when the master
|
|
402
|
+
* object is reloaded.
|
|
403
|
+
*
|
|
404
|
+
* @deprecated LDMud 3.2.9 replaced this efun with driver hook H_AUTO_INCLUDE.
|
|
405
|
+
This old version is available if the driver is compiled
|
|
406
|
+
with USE_DEPRECATED.
|
|
407
|
+
Removed in LDMud 3.3.
|
|
408
|
+
*
|
|
409
|
+
*/
|
|
410
|
+
void set_auto_include_string (string arg);
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* send_imp
|
|
414
|
+
*
|
|
415
|
+
* Sends The message in an UDP packet to the given host and port
|
|
416
|
+
* number.
|
|
417
|
+
*
|
|
418
|
+
* The message can be given either as string, or as array of
|
|
419
|
+
* bytes. The latter variant allows to send binary data as well.
|
|
420
|
+
*
|
|
421
|
+
* The efun causes a privilege violation. If USE_DEPRECATED is in effect,
|
|
422
|
+
* it first tries privilege violation ("send_imp"), and, if this one
|
|
423
|
+
* returns 0, then it tries privilege violation ("send_udp").
|
|
424
|
+
* If USE_DEPRECATED is not in effect, it just tries privilege
|
|
425
|
+
* violation ("send_udp").
|
|
426
|
+
*
|
|
427
|
+
* Returns 1 on success, 0 on failure.
|
|
428
|
+
*
|
|
429
|
+
* Note: On some machines a failed send_imp() will not be registered
|
|
430
|
+
* until the next send_imp() - the latter one might return '0' even
|
|
431
|
+
* if itself was successful.
|
|
432
|
+
*
|
|
433
|
+
* @deprecated LDMud 3.2.9 renamed this efun to send_udp(), and also changed the
|
|
434
|
+
privilege violation string and the apply names. This old version
|
|
435
|
+
is available if the driver is compiled with USE_DEPRECATED.
|
|
436
|
+
Removed in LDMud 3.3.
|
|
437
|
+
*
|
|
438
|
+
*/
|
|
439
|
+
int send_imp(string host, int port, string message);
|
|
440
|
+
|
|
441
|
+
int send_imp(string host, int port, int * message);
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* rxcache.doc
|
|
445
|
+
*
|
|
446
|
+
*
|
|
447
|
+
*
|
|
448
|
+
* @deprecated Fully integrated into the driver with the 3.2 line.
|
|
449
|
+
*
|
|
450
|
+
*/
|
|
451
|
+
/**
|
|
452
|
+
* receive_imp
|
|
453
|
+
*
|
|
454
|
+
* Handle a received IMP message.
|
|
455
|
+
*
|
|
456
|
+
* This function is called for every message received on the IMP
|
|
457
|
+
* port. Usually it is passed on to some object that handles
|
|
458
|
+
* inter mud communications.
|
|
459
|
+
*
|
|
460
|
+
* The driver first calls receive_udp(). If that method doesn't exist
|
|
461
|
+
* and if the driver is compiled with USE_DEPRECATED, it will then
|
|
462
|
+
* call receive_imp().
|
|
463
|
+
*
|
|
464
|
+
* @deprecated The 'hostport' argument was added in 3.2.1.
|
|
465
|
+
LDMud 3.2.9 renamed this method to receive_udp(); this old version
|
|
466
|
+
is supported if the driver is compiled with USE_DEPRECATED.
|
|
467
|
+
Removed in LDMud 3.3.
|
|
468
|
+
*
|
|
469
|
+
*/
|
|
470
|
+
void receive_imp(string host, string msg, int hostport);
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* query_udp_port
|
|
474
|
+
*
|
|
475
|
+
* Returns the port number of the UDP socket.
|
|
476
|
+
*
|
|
477
|
+
* @deprecated LDMud 3.2.9 renamed this efun from query_imp_port().
|
|
478
|
+
*
|
|
479
|
+
*/
|
|
480
|
+
int query_udp_port(void);
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* query_snoop
|
|
484
|
+
*
|
|
485
|
+
* Returns the user who currently snoops victim. The calling
|
|
486
|
+
* object must be privileged by the master object.
|
|
487
|
+
*
|
|
488
|
+
*
|
|
489
|
+
*/
|
|
490
|
+
object query_snoop(object victim);
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* query_shadowing
|
|
494
|
+
*
|
|
495
|
+
* The function returns the object which <obj> is currently
|
|
496
|
+
* shadowing, or 0 if <obj> is not a shadow.
|
|
497
|
+
*
|
|
498
|
+
* @deprecated Introduced in 3.2.1@73.
|
|
499
|
+
*
|
|
500
|
+
*/
|
|
501
|
+
object query_shadowing (object obj);
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* query_once_interactive
|
|
505
|
+
*
|
|
506
|
+
* True if the object is or once was interactive.
|
|
507
|
+
*
|
|
508
|
+
*
|
|
509
|
+
*/
|
|
510
|
+
int query_once_interactive(object ob);
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* query_mud_port
|
|
514
|
+
*
|
|
515
|
+
* Returns the port number the parser uses for user connections.
|
|
516
|
+
*
|
|
517
|
+
* If no argument is given, the port for this_player() is
|
|
518
|
+
* returned. If this_player() is not existing or not interactive,
|
|
519
|
+
* the first port number open for connections is returned.
|
|
520
|
+
*
|
|
521
|
+
* If an user object is given, the port used for its connection
|
|
522
|
+
* is returned.
|
|
523
|
+
* If a positive number is given, the <num>th port number the
|
|
524
|
+
* parser uses for connections is returned (given that there are
|
|
525
|
+
* that many ports).
|
|
526
|
+
* If -1 is given, the number of ports open for connections is
|
|
527
|
+
* returned.
|
|
528
|
+
*
|
|
529
|
+
*
|
|
530
|
+
*/
|
|
531
|
+
int query_mud_port(void);
|
|
532
|
+
|
|
533
|
+
int query_mud_port(object user);
|
|
534
|
+
|
|
535
|
+
int query_mud_port(int num);
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* query_mccp_stats
|
|
539
|
+
*
|
|
540
|
+
* This efun gives you statistics about current compression
|
|
541
|
+
* of the player ( default this_player() ).
|
|
542
|
+
*
|
|
543
|
+
* You get an array with ({ uncompressed bytes , compressed bytes }).
|
|
544
|
+
* If the connection is not compressed it returns 0.
|
|
545
|
+
*
|
|
546
|
+
* It raises an error on not-interactive objects.
|
|
547
|
+
*
|
|
548
|
+
* Available only if the driver is compiled with MCCP enabled;
|
|
549
|
+
* __MCCP__ is defined in that case.
|
|
550
|
+
*
|
|
551
|
+
* @deprecated Added in LDMud 3.3.447, backported to LDMud 3.2.10.
|
|
552
|
+
*
|
|
553
|
+
*/
|
|
554
|
+
int * query_mccp_stats();
|
|
555
|
+
|
|
556
|
+
int * query_mccp_stats(object player);
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* query_mccp
|
|
560
|
+
*
|
|
561
|
+
* This efun returns current whether the client uses compression
|
|
562
|
+
* or not ( default this_player() ).
|
|
563
|
+
*
|
|
564
|
+
* @deprecated Added in LDMud 3.3.447, backported to LDMud 3.2.10.
|
|
565
|
+
*
|
|
566
|
+
*/
|
|
567
|
+
int query_mccp();
|
|
568
|
+
|
|
569
|
+
int query_mccp(object player);
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* query_load_average
|
|
573
|
+
*
|
|
574
|
+
* Returns the load of the mud. Two figures are given, executed
|
|
575
|
+
* commands/second and compiled lines/second.
|
|
576
|
+
*
|
|
577
|
+
*
|
|
578
|
+
*/
|
|
579
|
+
string query_load_average(void);
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* query_limits
|
|
583
|
+
*
|
|
584
|
+
* Return an array with the current runtime limits, resp. if <defaults>
|
|
585
|
+
* is true, the default runtime limits. The entries in the returned
|
|
586
|
+
* array are:
|
|
587
|
+
*
|
|
588
|
+
* int[LIMIT_EVAL]: the max number of eval costs
|
|
589
|
+
* int[LIMIT_ARRAY]: the max number of array entries
|
|
590
|
+
* int[LIMIT_MAPPING_SIZE]: the max number of mapping values
|
|
591
|
+
* int[LIMIT_MAPPING_KEYS]: the max number of mapping entries
|
|
592
|
+
* (LIMIT_MAPPING is an alias for LIMIT_MAPPING_KEYS)
|
|
593
|
+
* int[LIMIT_BYTE]: the max number of bytes handled with
|
|
594
|
+
* one read_bytes()/write_bytes() call.
|
|
595
|
+
* int[LIMIT_FILE]: the max number of bytes handled with
|
|
596
|
+
* one read_file()/write_file() call.
|
|
597
|
+
* int[LIMIT_CALLOUTS]: the number of callouts at one time.
|
|
598
|
+
* int[LIMIT_COST]: how to account the current cost.
|
|
599
|
+
* int[LIMIT_MEMROY]: the max. number of bytes which can be
|
|
600
|
+
* _additionally_ allocated/used
|
|
601
|
+
* _per top-level execution thread_
|
|
602
|
+
*
|
|
603
|
+
* For all limits except LIMIT_COST a limit of '0' aka LIMIT_UNLIMITED
|
|
604
|
+
* means 'no limit'.
|
|
605
|
+
*
|
|
606
|
+
* The value for LIMIT_COST has these meanings:
|
|
607
|
+
*
|
|
608
|
+
* value > 0: the execution will cost minimum(<value>, actual cost) .
|
|
609
|
+
*
|
|
610
|
+
* value = 0: if the current LIMIT_EVAL is larger than the calling
|
|
611
|
+
* LIMIT_EVAL, the evaluation will cost only 10; otherwise
|
|
612
|
+
* the full cost will be accounted.
|
|
613
|
+
*
|
|
614
|
+
* value < 0: (-value)% of the current evaluation cost will be
|
|
615
|
+
* accounted; -100 obviously means 'full cost'.
|
|
616
|
+
*
|
|
617
|
+
* @example
|
|
618
|
+
* query_limits()
|
|
619
|
+
* --> returns the current runtime limits
|
|
620
|
+
*
|
|
621
|
+
* query_limits(1)
|
|
622
|
+
* --> returns the default runtime limits
|
|
623
|
+
*
|
|
624
|
+
* @deprecated Introduced in LDMud 3.2.7.
|
|
625
|
+
LIMIT_CALLOUTS introduced in LDMud 3.2.9.
|
|
626
|
+
LIMIT_COST introduced in LDMud 3.3.563.
|
|
627
|
+
LDMud 3.3.677 introduced LIMIT_MAPPING_KEYS, LIMIT_MAPPING_SIZE.
|
|
628
|
+
LDMud 3.5.0 introduced LIMIT_MEMORY.
|
|
629
|
+
*
|
|
630
|
+
*/
|
|
631
|
+
int * query_limits();
|
|
632
|
+
int * query_limits(int d);
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* query_ip_number
|
|
636
|
+
*
|
|
637
|
+
* Give the ip-number for the current user or the optional
|
|
638
|
+
* argument ob.
|
|
639
|
+
*
|
|
640
|
+
* If ob is given as reference (and it must be a valid object then),
|
|
641
|
+
* it will upon return be set to the struct sockaddr_in of the queried
|
|
642
|
+
* object, represented by an array of integers, one integer per
|
|
643
|
+
* address byte:
|
|
644
|
+
* ob[0.. 1]: sin_family
|
|
645
|
+
* ob[2.. 3]: sin_port
|
|
646
|
+
* ob[4.. 7]: sin_addr
|
|
647
|
+
* ob[8..15]: undefined.
|
|
648
|
+
*
|
|
649
|
+
* @deprecated The return of the struct sockaddr_in was introduced in 3.2.1@81.
|
|
650
|
+
*
|
|
651
|
+
*/
|
|
652
|
+
string query_ip_number(object ob);
|
|
653
|
+
|
|
654
|
+
string query_ip_number(mixed & ob);
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* query_ip_name
|
|
658
|
+
*
|
|
659
|
+
* Give the ip-name for user the current user or for the
|
|
660
|
+
* optional argument ob. An asynchronous process 'hname' is used
|
|
661
|
+
* to find out these names in parallel. If there are any failures
|
|
662
|
+
* to find the ip-name, then the ip-number is returned instead.
|
|
663
|
+
*
|
|
664
|
+
*
|
|
665
|
+
*/
|
|
666
|
+
string query_ip_name(object ob);
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* query_input_pending
|
|
670
|
+
*
|
|
671
|
+
* If ob is interactive and currently has an input_to() pending,
|
|
672
|
+
* the object that has called the input_to() is returned,
|
|
673
|
+
* else 0.
|
|
674
|
+
*
|
|
675
|
+
*
|
|
676
|
+
*/
|
|
677
|
+
object query_input_pending(object ob);
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* query_imp_port
|
|
681
|
+
*
|
|
682
|
+
* Returns the port number that is used for the inter mud
|
|
683
|
+
* protocol.
|
|
684
|
+
*
|
|
685
|
+
* @deprecated LDMud 3.2.9 renamed this efun to query_udp_port(). This version
|
|
686
|
+
is available if the driver is compiled with USE_DEPRECATED.
|
|
687
|
+
Removed in LDMud 3.3.
|
|
688
|
+
*
|
|
689
|
+
*/
|
|
690
|
+
int query_imp_port(void);
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* query_idle
|
|
694
|
+
*
|
|
695
|
+
* Query how many seconds an interactive object <ob> has been idle.
|
|
696
|
+
* If <ob> is not an interactive object an error will be thrown.
|
|
697
|
+
*
|
|
698
|
+
*
|
|
699
|
+
*/
|
|
700
|
+
int query_idle(object ob);
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* query_editing
|
|
704
|
+
*
|
|
705
|
+
* Returns 1 if the ob is interactive and currently editing
|
|
706
|
+
* with ed(). If ed() was called with a function name as
|
|
707
|
+
* second argument, the object where ed() was called is returned,
|
|
708
|
+
* else 0.
|
|
709
|
+
*
|
|
710
|
+
*
|
|
711
|
+
*/
|
|
712
|
+
mixed query_editing(object ob);
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* parse_command
|
|
716
|
+
*
|
|
717
|
+
* parse_command() is basically a spiffed up sscanf operating on
|
|
718
|
+
* word basis and targeted at recognizing object descriptions
|
|
719
|
+
* from command strings.
|
|
720
|
+
*
|
|
721
|
+
* The efun takes the command string <cmd> and the object(s)
|
|
722
|
+
* <env>/<arr> and tries to match it against the format string
|
|
723
|
+
* <fmt>. Successfully matched elements are assigned to the
|
|
724
|
+
* variables <var>.... The result from the efun is 1 if the
|
|
725
|
+
* command could be fully matched, and 0 otherwise.
|
|
726
|
+
*
|
|
727
|
+
* If the objects are given as a single object <env>, the efun
|
|
728
|
+
* matches against the given object and all objects contained
|
|
729
|
+
* therein. Otherwise, if the objects are given as an array <arr>
|
|
730
|
+
* of objects, the efun matches only against the given objects.
|
|
731
|
+
*
|
|
732
|
+
* If <env> is 0, environment(this_player()) is used as default.
|
|
733
|
+
*
|
|
734
|
+
* The format string <fmt> consists of words, syntactic markers, and
|
|
735
|
+
* %-directives for the values to parse and return in the variables.
|
|
736
|
+
* A typical example is " 'get' / 'take' %i " or
|
|
737
|
+
* " 'spray' / 'paint' [paint] %i ". The elements in detail are:
|
|
738
|
+
*
|
|
739
|
+
* 'word': obligatory text
|
|
740
|
+
* [word]: optional text
|
|
741
|
+
* / : Alternative marker
|
|
742
|
+
* %o : Single item, object
|
|
743
|
+
* %s : Any text
|
|
744
|
+
* %w : Any word
|
|
745
|
+
* %p : One of a list of prepositions.
|
|
746
|
+
* If the variable associated with %p is used to pass
|
|
747
|
+
* a list of words to the efun, the matching will take
|
|
748
|
+
* only against this list.
|
|
749
|
+
* %l : non-compat: Living objects
|
|
750
|
+
* compat: a single living object
|
|
751
|
+
* %i : Any objects
|
|
752
|
+
* %d : Number >= 0, or when given textual: 0-99.
|
|
753
|
+
*
|
|
754
|
+
* A <word> in this context is any sequence of characters not containing
|
|
755
|
+
* a space. 'living objects' are searched by calls to the (simul)efuns
|
|
756
|
+
* find_player() and find_living(): both functions have to accept a name
|
|
757
|
+
* as argument and return the object for this name, or 0 if there
|
|
758
|
+
* is none.
|
|
759
|
+
*
|
|
760
|
+
* The results assigned to the variables by the %-directives are:
|
|
761
|
+
*
|
|
762
|
+
* %o : returns an object
|
|
763
|
+
* %s : returns a string of words
|
|
764
|
+
* %w : returns a string of one word
|
|
765
|
+
* %p : if passed empty: a string
|
|
766
|
+
* if passed as array of words: var[0] is the matched word
|
|
767
|
+
* %i : returns an array with the following content:
|
|
768
|
+
* [0]: int: the count/number recognized in the object spec
|
|
769
|
+
* > 0: a count (e.g. 'three', '4')
|
|
770
|
+
* < 0: an ordinal (e.g. 'second', 'third')
|
|
771
|
+
* = 0: 'all' or a generic plural such as 'apples'
|
|
772
|
+
* [1..]: object: all(!) objects matching the item description.
|
|
773
|
+
* In the <env> form this may be the whole
|
|
774
|
+
* recursive inventory of the <env> object.
|
|
775
|
+
* It is up to the caller to interpret the recognized numeral
|
|
776
|
+
* and to apply it on the list of matched objects.
|
|
777
|
+
* %l : non-compat: as %i, except that only living objects are
|
|
778
|
+
* returned.
|
|
779
|
+
* compat: as %o, except that only a living object is returned.
|
|
780
|
+
*
|
|
781
|
+
* %i (and non-compat-%l) match descriptions like 'three red roses',
|
|
782
|
+
* 'all nasty bugs' or 'second blue sword'.
|
|
783
|
+
*
|
|
784
|
+
* Note: Patterns of type: "%s %w %i" might not work as one would expect.
|
|
785
|
+
* %w will always succeed so the arg corresponding to %s will always be
|
|
786
|
+
* empty.
|
|
787
|
+
*
|
|
788
|
+
* The implementation of parse_command() differs between compat
|
|
789
|
+
* mode and non-compat mode drivers mainly in how the efun
|
|
790
|
+
* retrieves the necessary information from the mudlib objects.
|
|
791
|
+
*
|
|
792
|
+
* @deprecated LDMud 3.3.258 removed the compat-mode parse_command().
|
|
793
|
+
*
|
|
794
|
+
*/
|
|
795
|
+
int parse_command (string cmd, object env, string fmt, varargs mixed &var );
|
|
796
|
+
int parse_command (string cmd, object* arr, string fmt, varargs mixed &var );
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* order_alist
|
|
800
|
+
*
|
|
801
|
+
* Creates an alist.
|
|
802
|
+
*
|
|
803
|
+
* Either takes an array containing keys, and others containing
|
|
804
|
+
* the associated data, where all arrays are to be of the same
|
|
805
|
+
* length, or takes a single array that contains as first member
|
|
806
|
+
* the array of keys and has an arbitrary number of other members
|
|
807
|
+
* containing data, each of wich has to be of the same length as
|
|
808
|
+
* the key array. Returns an array holding the sorted key array
|
|
809
|
+
* and the data arrays; the same permutation that is applied to
|
|
810
|
+
* the key array is applied to all data arrays.
|
|
811
|
+
*
|
|
812
|
+
* Complexity is O(n * lg(n) + n * m), where n is the number of
|
|
813
|
+
* elements in the key array and m is the number of data arrays + 1.
|
|
814
|
+
*
|
|
815
|
+
* Note that the dimensions of the arrays are used the other
|
|
816
|
+
* way than in lisp to allow for faster searching.
|
|
817
|
+
*
|
|
818
|
+
* Keys have to be of type integer, string or object. Types can
|
|
819
|
+
* be mixed.
|
|
820
|
+
*
|
|
821
|
+
* The function is available only if the driver is compiled with
|
|
822
|
+
* alist support. In that case, __ALISTS__ is defined.
|
|
823
|
+
*
|
|
824
|
+
* @deprecated LDMud 3.3 made this an optional efun.
|
|
825
|
+
*
|
|
826
|
+
*/
|
|
827
|
+
mixed * order_alist(mixed *keys,varargs mixed *|void data );
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* obsolete
|
|
831
|
+
*
|
|
832
|
+
* This directory contains descriptions for features removed from
|
|
833
|
+
* the game driver, since they can come in handy when reworking
|
|
834
|
+
* old LPC code.
|
|
835
|
+
*
|
|
836
|
+
*
|
|
837
|
+
*/
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* member_array
|
|
841
|
+
*
|
|
842
|
+
* Returns the index of the first occurence of item in array arr,
|
|
843
|
+
* or occurence of a character in a string. If not found, then -1
|
|
844
|
+
* is returned.
|
|
845
|
+
*
|
|
846
|
+
* If you want to search through an alist, use assoc() because
|
|
847
|
+
* member_array() is good for unsorted but assoc() is faster for
|
|
848
|
+
* sorted arrays.
|
|
849
|
+
*
|
|
850
|
+
* @deprecated Superseeded by member().
|
|
851
|
+
Removed in LDMud 3.3.
|
|
852
|
+
*
|
|
853
|
+
*/
|
|
854
|
+
int member_array(mixed item, mixed *arr);
|
|
855
|
+
|
|
856
|
+
int member_array(mixed item, string arr);
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* mapping_contains
|
|
860
|
+
*
|
|
861
|
+
* If the mapping contains the key map, the corresponding values
|
|
862
|
+
* are assigned to the data arguments, which massed be passed by
|
|
863
|
+
* reference, and 1 is returned. If key is not in map, 0 is
|
|
864
|
+
* returned and the data args are left unchanged.
|
|
865
|
+
* It is possible to use this function for a 0-value mapping, in
|
|
866
|
+
* which case it has the same effect as member(E).
|
|
867
|
+
*
|
|
868
|
+
* @deprecated Renamed to 'm_contains()' in LDMud 3.2.6.
|
|
869
|
+
Since LDMud 3.2.9, not available if driver is compiled without
|
|
870
|
+
USE_DEPRECATED.
|
|
871
|
+
Removed in LDMud 3.3.
|
|
872
|
+
*
|
|
873
|
+
*/
|
|
874
|
+
int mapping_contains(varargs mixed &data1, map, key);
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* map_mapping
|
|
878
|
+
*
|
|
879
|
+
* ob->func() is called resp. cl applied to every element in the mapping,
|
|
880
|
+
* with the key of the element as first argument, and then the extra args
|
|
881
|
+
* that were given to map_mapping (these args must not be protected
|
|
882
|
+
* references like &(i[0])). The data item in the mapping is replaced by
|
|
883
|
+
* the return value of the function. ob can also be a file_name of an
|
|
884
|
+
* object.
|
|
885
|
+
*
|
|
886
|
+
* If <ob> is omitted, or neither a string nor an object, it
|
|
887
|
+
* defaults to this_object().
|
|
888
|
+
*
|
|
889
|
+
* Note that if mapping m has more than one value per key, these
|
|
890
|
+
* are ignored: the resulting mapping always has one value per key.
|
|
891
|
+
*
|
|
892
|
+
* Also note that the behaviour of this function is different from
|
|
893
|
+
* map_array().
|
|
894
|
+
*
|
|
895
|
+
* @deprecated In LDMud 3.2.6 renamed to map_indices().
|
|
896
|
+
Since LDMud 3.2.9, not available if driver is compiled without
|
|
897
|
+
USE_DEPRECATED.
|
|
898
|
+
Removed in LDMud 3.3.
|
|
899
|
+
*
|
|
900
|
+
*/
|
|
901
|
+
mapping map_mapping(mapping m, string func, varargs string|object ob );
|
|
902
|
+
|
|
903
|
+
mapping map_mapping(mapping m, varargs closure cl );
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* map_array
|
|
907
|
+
*
|
|
908
|
+
* Returns an array holding the items of arr mapped through
|
|
909
|
+
* ob->fun(element, extra) resp. the closure cl. The function fun
|
|
910
|
+
* in ob is called for each element in arr with that element as
|
|
911
|
+
* parameter. A second parameter extra is sent in each call if
|
|
912
|
+
* given. ob can be an object or a string. Principal function:
|
|
913
|
+
*
|
|
914
|
+
* foreach (index) arr[index] = ob->fun(arr[index],extra);
|
|
915
|
+
*
|
|
916
|
+
* The value returned by ob->fun(array[index],extra) replaces the
|
|
917
|
+
* existing element in the array. If arr is not an array, then 0
|
|
918
|
+
* will be returned.
|
|
919
|
+
*
|
|
920
|
+
* The extra argument is optional and must not be a protected reference
|
|
921
|
+
* like &(i[0]). If <ob> is omitted, or neither a string nor an object,
|
|
922
|
+
* it defaults to this_object().
|
|
923
|
+
*
|
|
924
|
+
* @deprecated Since LDMud 3.2.6 obsoleted by map().
|
|
925
|
+
Since LDMud 3.2.9, not available if driver is compiled without
|
|
926
|
+
USE_DEPRECATED.
|
|
927
|
+
Removed in LDMud 3.3.
|
|
928
|
+
*
|
|
929
|
+
*/
|
|
930
|
+
mixed *map_array(mixed *arr, string fun, string|object ob, mixed extra);
|
|
931
|
+
|
|
932
|
+
mixed *map_array(mixed *arr, closure cl, mixed extra);
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* m_sizeof
|
|
936
|
+
*
|
|
937
|
+
* Returns the number of indices in mapping 'map'.
|
|
938
|
+
* This function is in fact an alias for sizeof().
|
|
939
|
+
*
|
|
940
|
+
* @deprecated Since LDMud 3.2.9, not available if driver is compiled without
|
|
941
|
+
USE_DEPRECATED.
|
|
942
|
+
Removed in LDMud 3.3.
|
|
943
|
+
*
|
|
944
|
+
*/
|
|
945
|
+
int m_sizeof(mapping map);
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* intersect_alist
|
|
949
|
+
*
|
|
950
|
+
* Does a fast set intersection on alist key vectors (NOT on full alists!).
|
|
951
|
+
* The operator '&' does set intersection on arrays in general.
|
|
952
|
+
*
|
|
953
|
+
* The function is available only if the driver is compiled with
|
|
954
|
+
* alist support. In that case, __ALISTS__ is defined.
|
|
955
|
+
*
|
|
956
|
+
* @example
|
|
957
|
+
* new_list = intersect_alist(list1, list2);
|
|
958
|
+
*
|
|
959
|
+
* @deprecated LDMud 3.3 made this an optional efun.
|
|
960
|
+
*
|
|
961
|
+
*/
|
|
962
|
+
mixed * intersect_alist(mixed * list1, mixed * list2);
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* insert_alist
|
|
966
|
+
*
|
|
967
|
+
* 1. Form: Alist Insertion
|
|
968
|
+
*
|
|
969
|
+
* The <key> and all following <data> values are inserted
|
|
970
|
+
* into the <alist>. If an entry for <key> already exists
|
|
971
|
+
* in the list, just the data values are replaced. The number
|
|
972
|
+
* of <data> values must match the number of data arrays
|
|
973
|
+
* in the alist, naturally.
|
|
974
|
+
*
|
|
975
|
+
* Result is the updated <alist>.
|
|
976
|
+
*
|
|
977
|
+
* 2. Form: Key Insertion
|
|
978
|
+
*
|
|
979
|
+
* Insert the <key> into the (ordered) array of <keys>, so that
|
|
980
|
+
* subsequent assoc()s can perform quick lookups. Result is the
|
|
981
|
+
* index at which <key> was inserted (or already found).
|
|
982
|
+
*
|
|
983
|
+
* CAVEAT: when working with string keys, the index might no longer
|
|
984
|
+
* be valid after the next call to insert_alist().
|
|
985
|
+
*
|
|
986
|
+
* Complexity: O(lg(n) + a*n) where n is the number of keys and
|
|
987
|
+
* s is a very small constant (for block move);
|
|
988
|
+
*
|
|
989
|
+
* The function is available only if the driver is compiled with
|
|
990
|
+
* alist support. In that case, __ALISTS__ is defined.
|
|
991
|
+
*
|
|
992
|
+
* @deprecated LDMud 3.3 made this an optional efun.
|
|
993
|
+
*
|
|
994
|
+
*/
|
|
995
|
+
mixed * insert_alist(mixed key, varargs mixed data, mixed * alist);
|
|
996
|
+
int insert_alist(mixed key, mixed * keys);
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* initialisation
|
|
1000
|
+
*
|
|
1001
|
+
* There are two different flavours of initialisations, selectable
|
|
1002
|
+
* in config.h :
|
|
1003
|
+
*
|
|
1004
|
+
* i) #undef INITIALIZATION_BY___INIT
|
|
1005
|
+
* ------------------------------------
|
|
1006
|
+
* Initialisation is done at compile time. This is fast and costs
|
|
1007
|
+
* no extra code in the program.
|
|
1008
|
+
* Allowed expressions currently include integer literals,
|
|
1009
|
+
* string literals, integer operators, string addition, bracketing,
|
|
1010
|
+
* array constructors, the empty mapping and structs.
|
|
1011
|
+
* When an object with initialised variables is cloned or inherited,
|
|
1012
|
+
* all initialised variables are copied from the blueprint.
|
|
1013
|
+
* A special application of this feature is to have an initialised
|
|
1014
|
+
* non-empty array or a mapping; it will be shared by all clones or
|
|
1015
|
+
* inheriting objects unless an assignment to the variable -
|
|
1016
|
+
* as opposed to an assignment to an element of the array/mapping -
|
|
1017
|
+
* is done in all clones etc.
|
|
1018
|
+
* To prevent unauthorised changes in initialised arrays/mappings,
|
|
1019
|
+
* you can declare the variables as private or use
|
|
1020
|
+
* a nomask reset/create that checks for undesired inheritance.
|
|
1021
|
+
*
|
|
1022
|
+
* ii) #define INITIALIZATION_BY___INIT
|
|
1023
|
+
* -------------------------------------
|
|
1024
|
+
* Creates a function names __INIT() from all variable
|
|
1025
|
+
* initialisations and from calls to __INIT() in all inherited
|
|
1026
|
+
* objects, and runs this function at object creation time.
|
|
1027
|
+
* Any efun can be used in the expressions for variable
|
|
1028
|
+
* initialisations, even ones with severe side effects, like
|
|
1029
|
+
* destruct() or shutdown(). The code created for __INIT() is
|
|
1030
|
+
* a little worse than a medium-skilled lpc-programmer would
|
|
1031
|
+
* generate, because it is scattered all over the program.
|
|
1032
|
+
*
|
|
1033
|
+
* @deprecated Since LDMud 3.3, order_alist() is no longer accepted without
|
|
1034
|
+
INITIALIZATION_BY___INIT.
|
|
1035
|
+
LDMud 3.3.378 replaced this static choice of initialisation
|
|
1036
|
+
methods by compile-time pragmas.
|
|
1037
|
+
*
|
|
1038
|
+
*/
|
|
1039
|
+
/**
|
|
1040
|
+
* get_root_uid
|
|
1041
|
+
*
|
|
1042
|
+
* Return the string to be used as root-uid.
|
|
1043
|
+
* Under !native, the function is expendable.
|
|
1044
|
+
*
|
|
1045
|
+
* @deprecated In 3.2.1@40, get_root_uid() was renamed to get_master_uid()
|
|
1046
|
+
and recieved a new semantic.
|
|
1047
|
+
*
|
|
1048
|
+
*/
|
|
1049
|
+
string get_root_uid(void);
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* get_max_commands
|
|
1053
|
+
*
|
|
1054
|
+
* Return the max number of commands the interactive <obj> is
|
|
1055
|
+
* allowed to execute per second. A negative result means
|
|
1056
|
+
* 'unlimited'.
|
|
1057
|
+
*
|
|
1058
|
+
* If <obj> is not given, the current interactive is queried.
|
|
1059
|
+
* For non-interactive objects the result is 0.
|
|
1060
|
+
*
|
|
1061
|
+
* A 'command' in this context means every received data packet
|
|
1062
|
+
* which causes a LPC call - actions and calls to input_to()
|
|
1063
|
+
* alike.
|
|
1064
|
+
*
|
|
1065
|
+
* @deprecated Introduced in LDMud 3.2.10.
|
|
1066
|
+
*
|
|
1067
|
+
*/
|
|
1068
|
+
int get_max_commands();
|
|
1069
|
+
|
|
1070
|
+
int get_max_commands(object obj);
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* get_connection_charset
|
|
1074
|
+
*
|
|
1075
|
+
* Return the connection charset of the current interactive in the form
|
|
1076
|
+
* requested by <mode>:
|
|
1077
|
+
* <mode> == CHARSET_VECTOR: return as bitvector
|
|
1078
|
+
* <mode> == CHARSET_STRING: return as string
|
|
1079
|
+
*
|
|
1080
|
+
* Alternatively, the status of the IAC quoting can be queried:
|
|
1081
|
+
* <mode> == CHARSET_QUOTE_IAC:
|
|
1082
|
+
* Return 0 if IACs are not quoted, return 1 if they are.
|
|
1083
|
+
*
|
|
1084
|
+
* The bitvector is interpreted as an array of 8-bit-values and might
|
|
1085
|
+
* contain up to 32 elements. Character n is "combinable"
|
|
1086
|
+
* if sizeof(bitvector) > n/8 && bitvector[n/8] & (1 << n%8) .
|
|
1087
|
+
*
|
|
1088
|
+
* If there is no current interactive, the function returns 0.
|
|
1089
|
+
*
|
|
1090
|
+
* @deprecated Introduced in LDMud 3.2.10.
|
|
1091
|
+
*
|
|
1092
|
+
*/
|
|
1093
|
+
mixed get_connection_charset(int mode);
|
|
1094
|
+
|
|
1095
|
+
/**
|
|
1096
|
+
* get_combine_charset
|
|
1097
|
+
*
|
|
1098
|
+
* Return the combine charset of the current interactive in the form
|
|
1099
|
+
* requested by <mode>:
|
|
1100
|
+
* <mode> == CHARSET_VECTOR: return as bitvector
|
|
1101
|
+
* <mode> == CHARSET_STRING: return as string
|
|
1102
|
+
*
|
|
1103
|
+
* The bitvector is interpreted as an array of 8-bit-values and might
|
|
1104
|
+
* contain up to 32 elements. Character n is "combinable"
|
|
1105
|
+
* if sizeof(bitvector) > n/8 && bitvector[n/8] & (1 << n%8) .
|
|
1106
|
+
*
|
|
1107
|
+
* If there is no current interactive, the function returns 0.
|
|
1108
|
+
*
|
|
1109
|
+
* @deprecated Introduced in LDMud 3.2.10.
|
|
1110
|
+
*
|
|
1111
|
+
*/
|
|
1112
|
+
mixed get_combine_charset(int mode);
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* filter_mapping
|
|
1116
|
+
*
|
|
1117
|
+
* ob->func() is called resp. cl applied to every element in the
|
|
1118
|
+
* mapping, with first argument being the key of the
|
|
1119
|
+
* element, and then the extra args that were given to
|
|
1120
|
+
* filter_mapping (these args must not be protected references like
|
|
1121
|
+
* &(i[0]). If the function returns true, the element is
|
|
1122
|
+
* element, and then the extra args that were given to
|
|
1123
|
+
* added to the result mapping. ob can also be a file_name of an
|
|
1124
|
+
* object.
|
|
1125
|
+
*
|
|
1126
|
+
* If <ob> is omitted, or neither a string nor an object, it
|
|
1127
|
+
* defaults to this_object().
|
|
1128
|
+
*
|
|
1129
|
+
* @deprecated In LDMud 3.2.6 renamed to filter_indices().
|
|
1130
|
+
Since LDMud 3.2.9, not available if driver is compiled without
|
|
1131
|
+
USE_DEPRECATED.
|
|
1132
|
+
Removed in LDMud 3.3.
|
|
1133
|
+
*
|
|
1134
|
+
*/
|
|
1135
|
+
mapping filter_mapping(mapping m, string func, varargs string|object ob );
|
|
1136
|
+
mapping filter_mapping(mapping m, varargs closure cl );
|
|
1137
|
+
|
|
1138
|
+
/**
|
|
1139
|
+
* filter_array
|
|
1140
|
+
*
|
|
1141
|
+
* Returns an array holding the items of arr filtered through
|
|
1142
|
+
* ob->fun(element, extra, ...), the closure cl, or the mapping map.
|
|
1143
|
+
* The function 'fun' in 'ob' resp. the closure 'cl' is called
|
|
1144
|
+
* for each element in arr with that element as parameter. The
|
|
1145
|
+
* extra and following parameters are in each call if given.
|
|
1146
|
+
* The mapping 'map' is likewise indexed by each element.
|
|
1147
|
+
* If ob->fun(arr[index], extra) returns != 0 resp.
|
|
1148
|
+
* map[arr[index]] exists, the element is included in the
|
|
1149
|
+
* returned array.
|
|
1150
|
+
*
|
|
1151
|
+
* If arr is not an array, an error occurs.
|
|
1152
|
+
*
|
|
1153
|
+
* The extra argument(s) are optional and must not be protected
|
|
1154
|
+
* references like &(i[0]).
|
|
1155
|
+
* If <ob> is omitted, or neither a string nor an object, it
|
|
1156
|
+
* defaults to this_object().
|
|
1157
|
+
*
|
|
1158
|
+
* Since 3.2.1@36, the second arg can also be a mapping. Then
|
|
1159
|
+
* only the elements of the array which belong to the map (as
|
|
1160
|
+
* keys) will be returned (i.e. map[arr[index]] != 0).
|
|
1161
|
+
*
|
|
1162
|
+
* @deprecated Since LDMud 3.2.6 obsoleted by efun filter().
|
|
1163
|
+
Since LDMud 3.2.9, not available if driver is compiled without
|
|
1164
|
+
USE_DEPRECATED.
|
|
1165
|
+
Removed in LDMud 3.3 .
|
|
1166
|
+
*
|
|
1167
|
+
*/
|
|
1168
|
+
mixed *filter_array(mixed *arr, string fun, string|object ob, varargs mixed extra );
|
|
1169
|
+
mixed *filter_array(mixed *arr, closure cl, varargs mixed extra );
|
|
1170
|
+
mixed *filter_array(mixed *arr, mapping map, varargs mixed extra );
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* file_name
|
|
1174
|
+
*
|
|
1175
|
+
* Get the name of an object <ob> or, if no argument is given, of
|
|
1176
|
+
* the current object.
|
|
1177
|
+
*
|
|
1178
|
+
* This name is the name under which the object is stored in the
|
|
1179
|
+
* muds object table. It is initialised at the creation of the
|
|
1180
|
+
* object such that blueprints are named after the file they are
|
|
1181
|
+
* compiled from (without the trailing '.c'), and clones receive
|
|
1182
|
+
* the name of their blueprint, extended by '#' followed by
|
|
1183
|
+
* a unique non-negative number. These rules also apply to
|
|
1184
|
+
* virtual objects - the real name/type of virtual objects
|
|
1185
|
+
* is ignored.
|
|
1186
|
+
*
|
|
1187
|
+
* The name of an object can be changed with rename_object(), and
|
|
1188
|
+
* object_name() will reflect any of these changes.
|
|
1189
|
+
*
|
|
1190
|
+
* The returned name always begins with '/' (absolute path),
|
|
1191
|
+
* except when the parser runs in COMPAT mode.
|
|
1192
|
+
*
|
|
1193
|
+
* @example
|
|
1194
|
+
* find_object(file_name(ob)) == ob
|
|
1195
|
+
*
|
|
1196
|
+
* This is guaranteed to be true for all objects ob that are not
|
|
1197
|
+
* destructed.
|
|
1198
|
+
*
|
|
1199
|
+
* @deprecated In LDMud 3.2.6 renamed to object_name(), this old name is
|
|
1200
|
+
available as alias.
|
|
1201
|
+
Since LDMud 3.2.9, not available if driver is compiled without
|
|
1202
|
+
USE_DEPRECATED.
|
|
1203
|
+
Removed in LDMud 3.3 .
|
|
1204
|
+
*
|
|
1205
|
+
*/
|
|
1206
|
+
string file_name();
|
|
1207
|
+
|
|
1208
|
+
string file_name(object ob);
|
|
1209
|
+
|
|
1210
|
+
/**
|
|
1211
|
+
* extract
|
|
1212
|
+
*
|
|
1213
|
+
* Extract a substring from a string.
|
|
1214
|
+
* This is the old notation for str[from..to] and supported
|
|
1215
|
+
* only for hysterical raisins.
|
|
1216
|
+
*
|
|
1217
|
+
* DO NOT USE THIS EFUN ANYMORE.
|
|
1218
|
+
*
|
|
1219
|
+
* @deprecated Removed in LDMud 3.3.
|
|
1220
|
+
*
|
|
1221
|
+
*/
|
|
1222
|
+
string extract(string str, int from, int to);
|
|
1223
|
+
|
|
1224
|
+
string extract(string str, int from);
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
* export_uid
|
|
1228
|
+
*
|
|
1229
|
+
* Set the uid of object ob to the current object's effective uid.
|
|
1230
|
+
* It is only possible when object ob has an effective uid of 0.
|
|
1231
|
+
*
|
|
1232
|
+
* @deprecated Since 3.2.1@47, this efun is availabe only when using euids.
|
|
1233
|
+
Since 3.2.7, this efun is always available.
|
|
1234
|
+
*
|
|
1235
|
+
*/
|
|
1236
|
+
void export_uid(object ob);
|
|
1237
|
+
|
|
1238
|
+
/**
|
|
1239
|
+
* end_mccp_compress
|
|
1240
|
+
*
|
|
1241
|
+
* This efun must be called inside an interactive player and stops
|
|
1242
|
+
* the compression of the driver -> client traffic.
|
|
1243
|
+
*
|
|
1244
|
+
* Returns non-zero on success, and zero on a failure.
|
|
1245
|
+
*
|
|
1246
|
+
* Available only if the driver is compiled with MCCP enabled;
|
|
1247
|
+
* __MCCP__ is defined in that case.
|
|
1248
|
+
*
|
|
1249
|
+
* @deprecated Added in LDMud 3.3.447, backported to LDMud 3.2.10.
|
|
1250
|
+
*
|
|
1251
|
+
*/
|
|
1252
|
+
int end_mccp_compress();
|
|
1253
|
+
|
|
1254
|
+
/**
|
|
1255
|
+
* enable_telnet
|
|
1256
|
+
*
|
|
1257
|
+
* Enable or disable the telnet machine for the interactive object <obj>.
|
|
1258
|
+
* Return the previous state of the telnet machine as result.
|
|
1259
|
+
*
|
|
1260
|
+
* <num> > 0 : enable telnet machine (default)
|
|
1261
|
+
* = 0 : disable telnet machine
|
|
1262
|
+
* < 0 : just query the current state of the telnet machine.
|
|
1263
|
+
* <obj> : the interactive object, default is the current interactive.
|
|
1264
|
+
* For non-interactive objects the function raises an error.
|
|
1265
|
+
*
|
|
1266
|
+
* The function raises a privilege_violation ("enable_telnet", obj, num)
|
|
1267
|
+
* if <num> is >= 0. If the privilege is denied, the call is ignored.
|
|
1268
|
+
*
|
|
1269
|
+
* WARNING: Careless use of this efun can cause great confusion for both
|
|
1270
|
+
* driver and clients! The efun exists mainly to support PSYCmuve, and
|
|
1271
|
+
* may vanish if a more consistent way of handling network connections
|
|
1272
|
+
* is introduced.
|
|
1273
|
+
*
|
|
1274
|
+
* @deprecated Introduced in LDMud 3.2.10.
|
|
1275
|
+
*
|
|
1276
|
+
*/
|
|
1277
|
+
int enable_telnet(int num);
|
|
1278
|
+
|
|
1279
|
+
int enable_telnet(int num, object obj);
|
|
1280
|
+
|
|
1281
|
+
/**
|
|
1282
|
+
* enable_commands
|
|
1283
|
+
*
|
|
1284
|
+
* Enable this object to use commands normally accessible to
|
|
1285
|
+
* users. This also marks the current object as "living".
|
|
1286
|
+
*
|
|
1287
|
+
* Avoid to call this function from other places then from inside
|
|
1288
|
+
* create() (or reset(0) in compat mode), because the command
|
|
1289
|
+
* giver will be set to this object.
|
|
1290
|
+
*
|
|
1291
|
+
* @example
|
|
1292
|
+
* void create() {
|
|
1293
|
+
* enable_commands();
|
|
1294
|
+
* set_living_name("dummymonster");
|
|
1295
|
+
* }
|
|
1296
|
+
*
|
|
1297
|
+
* This will make the current object a living object which then
|
|
1298
|
+
* can be accessed via find_living("dummymonster").
|
|
1299
|
+
*
|
|
1300
|
+
*
|
|
1301
|
+
*/
|
|
1302
|
+
void enable_commands();
|
|
1303
|
+
|
|
1304
|
+
/**
|
|
1305
|
+
* efun308
|
|
1306
|
+
*
|
|
1307
|
+
* The item is moved into its new environment env, which may be 0.
|
|
1308
|
+
* This efun is to be used in the move_object() hook, as it does
|
|
1309
|
+
* nothing else than moving the item - no calls to init() or such.
|
|
1310
|
+
*
|
|
1311
|
+
* Don't use it in your own objects!
|
|
1312
|
+
*
|
|
1313
|
+
* @deprecated Introduced in 3.2.1@1, renamed to 'set_environment()' in LDMud 3.2.6.
|
|
1314
|
+
Since LDMud 3.2.9, not available if driver is compiled without
|
|
1315
|
+
USE_DEPRECATED.
|
|
1316
|
+
Removed in LDMud 3.3 .
|
|
1317
|
+
*
|
|
1318
|
+
*/
|
|
1319
|
+
void efun308(object item, object env);
|
|
1320
|
+
|
|
1321
|
+
/**
|
|
1322
|
+
* disable_commands
|
|
1323
|
+
*
|
|
1324
|
+
* Disable this object to use commands normally accessible to
|
|
1325
|
+
* users.
|
|
1326
|
+
*
|
|
1327
|
+
* This is the opposite to the efun enable_commands().
|
|
1328
|
+
*
|
|
1329
|
+
*
|
|
1330
|
+
*/
|
|
1331
|
+
void disable_commands();
|
|
1332
|
+
|
|
1333
|
+
/**
|
|
1334
|
+
* define_include_dirs
|
|
1335
|
+
*
|
|
1336
|
+
* Return an array of string patterns giving the absolut paths
|
|
1337
|
+
* where to search an include file. The patterns have to have a
|
|
1338
|
+
* %s at the place where the name given in the #include statement
|
|
1339
|
+
* has to be inserted.
|
|
1340
|
+
*
|
|
1341
|
+
* @deprecated Dropped in 3.2.1, replaced by H_INCLUDE_DIRS hook.
|
|
1342
|
+
*
|
|
1343
|
+
*/
|
|
1344
|
+
string *define_include_dirs(void);
|
|
1345
|
+
|
|
1346
|
+
/**
|
|
1347
|
+
* debug_info
|
|
1348
|
+
*
|
|
1349
|
+
* Gather some driver internal debug information according
|
|
1350
|
+
* to the setting of flag:
|
|
1351
|
+
*
|
|
1352
|
+
* DINFO_OBJECT (0): Information like heart_beat, enable_commands
|
|
1353
|
+
* etc. of the specified object will be printed, and 0 returned.
|
|
1354
|
+
*
|
|
1355
|
+
* DINFO_MEMORY (1): Memory usage information like how many strings,
|
|
1356
|
+
* variables, inherited files, object size etc. will be printed
|
|
1357
|
+
* about the specified object, and 0 returned.
|
|
1358
|
+
*
|
|
1359
|
+
* DINFO_OBJLIST (2): Objects from the global object list are
|
|
1360
|
+
* returned. If the optional second arg is omitted, the first
|
|
1361
|
+
* element (numbered 0) is returned. If the second arg is a
|
|
1362
|
+
* number n, the n'th element of the object list returned. If the
|
|
1363
|
+
* second arg is an object, it's successor in the object list is
|
|
1364
|
+
* returned. If the optional <arg2> is omitted, the first
|
|
1365
|
+
* element(s) (numbered 0) is returned. If the <arg2> is a
|
|
1366
|
+
* number n, the n'th element(s) of the object list returned. If the
|
|
1367
|
+
* <arg2> is an object, it's successor(s) in the object list is
|
|
1368
|
+
* The optional <arg3> specifies the maximum number of objects
|
|
1369
|
+
* returned. If it's 0, a single object is returned. If it is
|
|
1370
|
+
* a positive number m, an array with at max 'm' objects is
|
|
1371
|
+
* returned. This way, by passing __INT_MAX__ as <arg3> it is
|
|
1372
|
+
* possible to create an array of all objects in the game
|
|
1373
|
+
* (given a suitable maximum array size).
|
|
1374
|
+
*
|
|
1375
|
+
* DINFO_MALLOC (3): Equivalent to typing ``malloc'' at the command
|
|
1376
|
+
* line. No second arg must be given. Returns 0.
|
|
1377
|
+
*
|
|
1378
|
+
* DINFO_STATUS (4): Collect the status information of the driver.
|
|
1379
|
+
* The optional second arg can be 0, "tables", "swap", "malloc",
|
|
1380
|
+
* "malloc extstats" or any other argument accepted by the actual
|
|
1381
|
+
* driver. The result is a printable string with the status
|
|
1382
|
+
* information, or 0 if an invalid argument was given.
|
|
1383
|
+
*
|
|
1384
|
+
* DINFO_DUMP (5): Dump the information specified by <arg2> into the
|
|
1385
|
+
* filename specified by <arg3>. If <arg3> is omitted, a default
|
|
1386
|
+
* file name is used. The function calls master->valid_write() to
|
|
1387
|
+
* check that it can write the files. The file in question is
|
|
1388
|
+
* always written anew.
|
|
1389
|
+
*
|
|
1390
|
+
* Result is 1 on success, or 0 if an error occurred.
|
|
1391
|
+
*
|
|
1392
|
+
* <arg2> == "objects": dump information about all live objects.
|
|
1393
|
+
* Default filename is '/OBJ_DUMP', the valid_write() will read
|
|
1394
|
+
* 'objdump' for the function.
|
|
1395
|
+
*
|
|
1396
|
+
* For every object, a line is written into the file with the
|
|
1397
|
+
* following information in the given order:
|
|
1398
|
+
* - object name
|
|
1399
|
+
* - size in memory, shared data counted only once
|
|
1400
|
+
* - size in memory if data wouldn't be shared
|
|
1401
|
+
* - number of references
|
|
1402
|
+
* - 'HB' if the object has a heartbeat, nothing if not.
|
|
1403
|
+
* - the name of the environment, or '--' if the object has no
|
|
1404
|
+
* environment
|
|
1405
|
+
* - in parentheses the number of execution ticks spent in this
|
|
1406
|
+
* object
|
|
1407
|
+
* - the swap status:
|
|
1408
|
+
* nothing if not swapped,
|
|
1409
|
+
* 'PROG SWAPPED' if only the program is swapped
|
|
1410
|
+
* 'VAR SWAPPED' if only the variabes are swapped
|
|
1411
|
+
* 'SWAPPED' if both program and variables are swapped
|
|
1412
|
+
* - the time the object was created
|
|
1413
|
+
*
|
|
1414
|
+
* <arg2> == "destructed": dump information about all destructed
|
|
1415
|
+
* objects. Default filename is '/DEST_OBJ_DUMP', the
|
|
1416
|
+
* valid_write() will read 'objdump' for the function.
|
|
1417
|
+
*
|
|
1418
|
+
* For every object, a line is written into the file with the
|
|
1419
|
+
* following information in the given order:
|
|
1420
|
+
* - object name
|
|
1421
|
+
* - number of references
|
|
1422
|
+
* - 'NEW' if the object was destructed in this executiong
|
|
1423
|
+
* thread, nothing if it is older already.
|
|
1424
|
+
*
|
|
1425
|
+
* <arg2> == "opcodes": dump usage information about the opcodes.
|
|
1426
|
+
* Default filename is '/OPC_DUMP', the valid_write() will read
|
|
1427
|
+
* 'opcdump' for the function.
|
|
1428
|
+
*
|
|
1429
|
+
* <arg2> == "memory": dump a list of all allocated memory
|
|
1430
|
+
* blocks (if the allocator supports this).
|
|
1431
|
+
* Default filename is '/MEMORY_DUMP', the valid_write()
|
|
1432
|
+
* will read 'memdump' for the function, and the new data
|
|
1433
|
+
* will be appended to the end of the file.
|
|
1434
|
+
*
|
|
1435
|
+
* If the allocator doesn't support memory dumps, this call will
|
|
1436
|
+
* always return 0, and nothing will be written.
|
|
1437
|
+
*
|
|
1438
|
+
* This works best if the allocator is compiled with
|
|
1439
|
+
* MALLOC_TRACE and/or MALLOC_LPC_TRACE.
|
|
1440
|
+
*
|
|
1441
|
+
* NOTE: Make sure that this option can't be abused!
|
|
1442
|
+
*
|
|
1443
|
+
*
|
|
1444
|
+
* DINFO_DATA (6): Return raw information about an aspect of
|
|
1445
|
+
* the driver specified by <arg2>. The result of the function
|
|
1446
|
+
* is an array with the information, or 0 for unsupported values
|
|
1447
|
+
* of <arg2>.
|
|
1448
|
+
*
|
|
1449
|
+
* If <arg3> is given and in the range of array indices
|
|
1450
|
+
* for the given <arg2>, the result will be just the indexed array
|
|
1451
|
+
* entry, but not the full array.
|
|
1452
|
+
*
|
|
1453
|
+
* Allowed values for <arg2> are: DID_STATUS, DID_SWAP, DID_MALLOC.
|
|
1454
|
+
*
|
|
1455
|
+
* <arg2> == DID_STATUS (0): Returns the "status" and "status tables"
|
|
1456
|
+
* information. Following indices are defined:
|
|
1457
|
+
*
|
|
1458
|
+
* int DID_ST_BOOT_TIME
|
|
1459
|
+
* The time() when the mud was started.
|
|
1460
|
+
*
|
|
1461
|
+
* int DID_ST_ACTIONS
|
|
1462
|
+
* int DID_ST_ACTIONS_SIZE
|
|
1463
|
+
* Number and size of allocated actions.
|
|
1464
|
+
*
|
|
1465
|
+
* int DID_ST_SHADOWS
|
|
1466
|
+
* int DID_ST_SHADOWS_SIZE
|
|
1467
|
+
* Number and size of allocated shadows.
|
|
1468
|
+
*
|
|
1469
|
+
* int DID_ST_OBJECTS
|
|
1470
|
+
* int DID_ST_OBJECTS_SIZE
|
|
1471
|
+
* Total number and size of objects.
|
|
1472
|
+
*
|
|
1473
|
+
* int DID_ST_OBJECTS_SWAPPED
|
|
1474
|
+
* int DID_ST_OBJECTS_SWAP_SIZE
|
|
1475
|
+
* Number and size of swapped-out object variable blocks.
|
|
1476
|
+
*
|
|
1477
|
+
* int DID_ST_OBJECTS_LIST
|
|
1478
|
+
* Number of objects in the object list.
|
|
1479
|
+
*
|
|
1480
|
+
* int DID_ST_OBJECTS_NEWLY_DEST
|
|
1481
|
+
* Number of newly destructed objects (ie. objects destructed
|
|
1482
|
+
* in this execution thread).
|
|
1483
|
+
*
|
|
1484
|
+
* int DID_ST_OBJECTS_DESTRUCTED
|
|
1485
|
+
* Number of destructed but still referenced objects, not
|
|
1486
|
+
* counting the DID_ST_OBJECTS_NEWLY_DEST.
|
|
1487
|
+
*
|
|
1488
|
+
* int DID_ST_OBJECTS_PROCESSED
|
|
1489
|
+
* Number of listed objects processed in the last backend
|
|
1490
|
+
* cycle.
|
|
1491
|
+
*
|
|
1492
|
+
* float DID_ST_OBJECTS_AVG_PROC
|
|
1493
|
+
* Average number of objects processed each cycle, expressed
|
|
1494
|
+
* as percentage (0..1.0).
|
|
1495
|
+
*
|
|
1496
|
+
* int DID_ST_OTABLE
|
|
1497
|
+
* Number of objects listed in the object table.
|
|
1498
|
+
*
|
|
1499
|
+
* int DID_ST_OTABLE_SLOTS
|
|
1500
|
+
* Number of hash slots provided by the object table.
|
|
1501
|
+
*
|
|
1502
|
+
* int DID_ST_OTABLE_SIZE
|
|
1503
|
+
* Size occupied by the object table.
|
|
1504
|
+
*
|
|
1505
|
+
* int DID_ST_HBEAT_OBJS
|
|
1506
|
+
* Number of objects with a heartbeat.
|
|
1507
|
+
*
|
|
1508
|
+
* int DID_ST_HBEAT_CALLS
|
|
1509
|
+
* Number of active heart_beat cycles executed so far
|
|
1510
|
+
* (ie. cycles in which at least one heart_beat() function
|
|
1511
|
+
* was called).
|
|
1512
|
+
*
|
|
1513
|
+
* int DID_ST_HBEAT_CALLS_TOTAL
|
|
1514
|
+
* Total number of heart_beats cycles so far.
|
|
1515
|
+
*
|
|
1516
|
+
* int DID_ST_HBEAT_SLOTS
|
|
1517
|
+
* int DID_ST_HBEAT_SIZE
|
|
1518
|
+
* Number of allocated entries in the heart_beat table
|
|
1519
|
+
* and its size.
|
|
1520
|
+
*
|
|
1521
|
+
* int DID_ST_HBEAT_PROCESSED
|
|
1522
|
+
* Number of heart_beats called in the last backend cycle.
|
|
1523
|
+
*
|
|
1524
|
+
* float DID_ST_HBEAT_AVG_PROC
|
|
1525
|
+
* Average number of heart_beats called each cycle, expressed
|
|
1526
|
+
* as fraction (0..1.0).
|
|
1527
|
+
*
|
|
1528
|
+
* int DID_ST_CALLOUTS
|
|
1529
|
+
* int DID_ST_CALLOUT_SIZE
|
|
1530
|
+
* Number and total size of pending call_outs.
|
|
1531
|
+
*
|
|
1532
|
+
* int DID_ST_ARRAYS
|
|
1533
|
+
* int DID_ST_ARRAYS_SIZE
|
|
1534
|
+
* Number and size of all arrays.
|
|
1535
|
+
*
|
|
1536
|
+
* int DID_ST_MAPPINGS
|
|
1537
|
+
* int DID_ST_MAPPINGS_SIZE
|
|
1538
|
+
* Number and size of all mappings.
|
|
1539
|
+
*
|
|
1540
|
+
* int DID_ST_HYBRID_MAPPINGS
|
|
1541
|
+
* int DID_ST_HASH_MAPPINGS
|
|
1542
|
+
* Number of hybrid (hash+condensed) and hash mappings.
|
|
1543
|
+
*
|
|
1544
|
+
* int DID_ST_STRUCTS
|
|
1545
|
+
* int DID_ST_STRUCTS_SIZE
|
|
1546
|
+
* Number and size of all struct instances.
|
|
1547
|
+
*
|
|
1548
|
+
* int DID_ST_STRUCT_TYPES
|
|
1549
|
+
* int DID_ST_STRUCT_TYPES_SIZE
|
|
1550
|
+
* Number and size of all struct type instances.
|
|
1551
|
+
*
|
|
1552
|
+
* int DID_ST_PROGS
|
|
1553
|
+
* int DID_ST_PROGS_SIZE
|
|
1554
|
+
* Number and size of all programs.
|
|
1555
|
+
*
|
|
1556
|
+
* int DID_ST_PROGS_SWAPPED
|
|
1557
|
+
* int DID_ST_PROGS_SWAP_SIZE
|
|
1558
|
+
* Number and size of swapped-out programs.
|
|
1559
|
+
*
|
|
1560
|
+
* int DID_ST_USER_RESERVE
|
|
1561
|
+
* int DID_ST_MASTER_RESERVE
|
|
1562
|
+
* int DID_ST_SYSTEM_RESERVE
|
|
1563
|
+
* Current sizes of the three memory reserves.
|
|
1564
|
+
*
|
|
1565
|
+
* int DID_ST_ADD_MESSAGE
|
|
1566
|
+
* int DID_ST_PACKETS
|
|
1567
|
+
* int DID_ST_PACKET_SIZE
|
|
1568
|
+
* Number of calls to add_message(), number and total size
|
|
1569
|
+
* of sent packets.
|
|
1570
|
+
* If the driver is not compiled with COMM_STAT, all three
|
|
1571
|
+
* values are returned as -1.
|
|
1572
|
+
*
|
|
1573
|
+
* int DID_ST_PACKETS_IN
|
|
1574
|
+
* int DID_ST_PACKET_SIZE_IN
|
|
1575
|
+
* Number and total size of received packets.
|
|
1576
|
+
* If the driver is not compiled with COMM_STAT, all three
|
|
1577
|
+
* values are returned as -1.
|
|
1578
|
+
*
|
|
1579
|
+
* int DID_ST_APPLY
|
|
1580
|
+
* int DID_ST_APPLY_HITS
|
|
1581
|
+
* Number of calls to apply_low(), and how many of these
|
|
1582
|
+
* were cache hits.
|
|
1583
|
+
* If the driver is not compiled with APPLY_CACHE_STAT, all two
|
|
1584
|
+
* values are returned as -1.
|
|
1585
|
+
*
|
|
1586
|
+
* int DID_ST_STRINGS
|
|
1587
|
+
* int DID_ST_STRING_SIZE
|
|
1588
|
+
* Total number and size of string requests.
|
|
1589
|
+
*
|
|
1590
|
+
* int DID_ST_STR_TABLE_SIZE
|
|
1591
|
+
* Size of the string table structure itself.
|
|
1592
|
+
*
|
|
1593
|
+
* int DID_ST_STR_OVERHEAD
|
|
1594
|
+
* Size of the overhead per string.
|
|
1595
|
+
*
|
|
1596
|
+
* int DID_ST_UNTABLED
|
|
1597
|
+
* int DID_ST_UNTABLED_SIZE
|
|
1598
|
+
* Total number and size of existing untabled strings.
|
|
1599
|
+
*
|
|
1600
|
+
* int DID_ST_TABLED
|
|
1601
|
+
* int DID_ST_TABLED_SIZE
|
|
1602
|
+
* Total number and size of existing directly tabled strings.
|
|
1603
|
+
*
|
|
1604
|
+
* int DID_ST_STR_CHAINS
|
|
1605
|
+
* Number of hash chains in the string table.
|
|
1606
|
+
*
|
|
1607
|
+
* int DID_ST_STR_ADDED
|
|
1608
|
+
* Number of distinct strings added to the table so far.
|
|
1609
|
+
*
|
|
1610
|
+
* int DID_ST_STR_DELETED
|
|
1611
|
+
* Number of distinct strings removed from the table so far.
|
|
1612
|
+
*
|
|
1613
|
+
* int DID_ST_STR_COLLISIONS
|
|
1614
|
+
* Number of distinct strings added to an existing hash chain
|
|
1615
|
+
* so far.
|
|
1616
|
+
*
|
|
1617
|
+
* int DID_ST_STR_SEARCHES
|
|
1618
|
+
* int DID_ST_STR_SEARCHLEN
|
|
1619
|
+
* Number and accumulated length of string searches by address.
|
|
1620
|
+
*
|
|
1621
|
+
* int DID_ST_STR_SEARCHES_BYVALUE
|
|
1622
|
+
* int DID_ST_STR_SEARCHLEN_BYVALUE
|
|
1623
|
+
* Number and accumulated length of string searches by value.
|
|
1624
|
+
*
|
|
1625
|
+
* int DID_ST_STR_FOUND
|
|
1626
|
+
* int DID_ST_STR_FOUND_BYVALUE
|
|
1627
|
+
* Number of successful searches by address resp. by value.
|
|
1628
|
+
*
|
|
1629
|
+
* int DID_ST_RX_CACHED
|
|
1630
|
+
* Number of regular expressions cached.
|
|
1631
|
+
*
|
|
1632
|
+
* int DID_ST_RX_TABLE
|
|
1633
|
+
* int DID_ST_RX_TABLE_SIZE
|
|
1634
|
+
* Number of slots in the regexp cache table, and size of the
|
|
1635
|
+
* memory currently held by it and the cached expressions.
|
|
1636
|
+
*
|
|
1637
|
+
* int DID_ST_RX_REQUESTS
|
|
1638
|
+
* Number of requests for new regexps.
|
|
1639
|
+
*
|
|
1640
|
+
* int DID_ST_RX_REQ_FOUND
|
|
1641
|
+
* Number of requested regexps found in the table.
|
|
1642
|
+
*
|
|
1643
|
+
* int DID_ST_RX_REQ_COLL
|
|
1644
|
+
* Number of requested new regexps which collided with
|
|
1645
|
+
* a cached one.
|
|
1646
|
+
*
|
|
1647
|
+
* int DID_ST_MB_FILE
|
|
1648
|
+
* The size of the 'File' memory buffer.
|
|
1649
|
+
*
|
|
1650
|
+
* int DID_ST_MB_SWAP
|
|
1651
|
+
* The size of the 'Swap' memory buffer.
|
|
1652
|
+
*
|
|
1653
|
+
*
|
|
1654
|
+
* <arg2> == DID_SWAP (1): Returns the "status swap" information:
|
|
1655
|
+
*
|
|
1656
|
+
* int DID_SW_PROGS
|
|
1657
|
+
* int DID_SW_PROG_SIZE
|
|
1658
|
+
* Number and size of swapped-out program blocks.
|
|
1659
|
+
*
|
|
1660
|
+
* int DID_SW_PROG_UNSWAPPED
|
|
1661
|
+
* int DID_SW_PROG_U_SIZE
|
|
1662
|
+
* Number and size of unswapped program blocks.
|
|
1663
|
+
*
|
|
1664
|
+
* int DID_SW_VARS
|
|
1665
|
+
* int DID_SW_VAR_SIZE
|
|
1666
|
+
* Number and size of swapped-out variable blocks.
|
|
1667
|
+
*
|
|
1668
|
+
* int DID_SW_FREE
|
|
1669
|
+
* int DID_SW_FREE_SIZE
|
|
1670
|
+
* Number and size of free blocks in the swap file.
|
|
1671
|
+
*
|
|
1672
|
+
* int DID_SW_FILE_SIZE
|
|
1673
|
+
* Size of the swap file.
|
|
1674
|
+
*
|
|
1675
|
+
* int DID_SW_REUSED
|
|
1676
|
+
* Total reused space in the swap file.
|
|
1677
|
+
*
|
|
1678
|
+
* int DID_SW_SEARCHES
|
|
1679
|
+
* int DID_SW_SEARCH_LEN
|
|
1680
|
+
* Number and total length of searches for block to reuse
|
|
1681
|
+
* in the swap file.
|
|
1682
|
+
*
|
|
1683
|
+
* int DID_SW_F_SEARCHES
|
|
1684
|
+
* int DID_SW_F_SEARCH_LEN
|
|
1685
|
+
* Number and total length of searches for a block to free.
|
|
1686
|
+
*
|
|
1687
|
+
* int DID_SW_COMPACT
|
|
1688
|
+
* TRUE if the swapper is running in compact mode.
|
|
1689
|
+
*
|
|
1690
|
+
* int DID_SW_RECYCLE_FREE
|
|
1691
|
+
* TRUE if the swapper is currently recycling free block.
|
|
1692
|
+
*
|
|
1693
|
+
*
|
|
1694
|
+
* <arg2> == DID_MEMORY (2): Returns the "status malloc" information:
|
|
1695
|
+
*
|
|
1696
|
+
* string DID_MEM_NAME
|
|
1697
|
+
* The name of the allocator: "sysmalloc", "smalloc",
|
|
1698
|
+
* "slaballoc"
|
|
1699
|
+
*
|
|
1700
|
+
* int DID_MEM_SBRK (slaballoc, smalloc)
|
|
1701
|
+
* int DID_MEM_SBRK_SIZE (slaballoc, smalloc)
|
|
1702
|
+
* Number and size of memory blocks requested from the
|
|
1703
|
+
* operating system (non-mmapped memory).
|
|
1704
|
+
*
|
|
1705
|
+
* int DID_MEM_LARGE (slaballoc, smalloc)
|
|
1706
|
+
* int DID_MEM_LARGE_SIZE (slaballoc, smalloc)
|
|
1707
|
+
* int DID_MEM_LFREE (slaballoc, smalloc)
|
|
1708
|
+
* int DID_MEM_LFREE_SIZE (slaballoc, smalloc)
|
|
1709
|
+
* Number and size of large allocated resp. free blocks.
|
|
1710
|
+
* smalloc: The large allocated blocks include the
|
|
1711
|
+
* small chunk blocks.
|
|
1712
|
+
*
|
|
1713
|
+
* int DID_MEM_LWASTED (slaballoc, smalloc)
|
|
1714
|
+
* int DID_MEM_LWASTED_SIZE (slaballoc, smalloc)
|
|
1715
|
+
* Number and size of unusable large memory fragments.
|
|
1716
|
+
*
|
|
1717
|
+
* int DID_MEM_CHUNK (smalloc)
|
|
1718
|
+
* int DID_MEM_CHUNK_SIZE (smalloc)
|
|
1719
|
+
* Number and size of small chunk blocks.
|
|
1720
|
+
*
|
|
1721
|
+
* int DID_MEM_SLAB (slaballoc)
|
|
1722
|
+
* int DID_MEM_SLAB_SIZE (slaballoc)
|
|
1723
|
+
* Number and size of slabs (including fully free slabs).
|
|
1724
|
+
*
|
|
1725
|
+
* int DID_MEM_SLAB_FREE (slaballoc)
|
|
1726
|
+
* int DID_MEM_SLAB_FREE_SIZE (slaballoc)
|
|
1727
|
+
* Number and size of free slabs (part of DID_MEM_SLAB).
|
|
1728
|
+
*
|
|
1729
|
+
* int DID_MEM_SMALL (slaballoc, smalloc)
|
|
1730
|
+
* int DID_MEM_SMALL_SIZE (slaballoc, smalloc)
|
|
1731
|
+
* int DID_MEM_SFREE (slaballoc, smalloc)
|
|
1732
|
+
* int DID_MEM_SFREE_SIZE (slaballoc, smalloc)
|
|
1733
|
+
* Number and size of small allocated resp. free blocks.
|
|
1734
|
+
*
|
|
1735
|
+
* int DID_MEM_SWASTED (smalloc)
|
|
1736
|
+
* int DID_MEM_SWASTED_SIZE (smalloc)
|
|
1737
|
+
* Number and size of unusably small memory fragments.
|
|
1738
|
+
*
|
|
1739
|
+
* int DID_MEM_SMALL_OVERHEAD_SIZE (slaballoc)
|
|
1740
|
+
* Size of the slab management overhead (not including
|
|
1741
|
+
* the overhead incurred by each allocated small block).
|
|
1742
|
+
*
|
|
1743
|
+
* int DID_MEM_MINC_CALLS (slaballoc, smalloc)
|
|
1744
|
+
* int DID_MEM_MINC_SUCCESS (slaballoc, smalloc)
|
|
1745
|
+
* int DID_MEM_MINC_SIZE (slaballoc, smalloc)
|
|
1746
|
+
* Number of calls to malloc_increment(), the number
|
|
1747
|
+
* of successes and the size of memory allocated this
|
|
1748
|
+
* way.
|
|
1749
|
+
*
|
|
1750
|
+
* int DID_MEM_PERM (slaballoc, smalloc)
|
|
1751
|
+
* int DID_MEM_PERM_SIZE (slaballoc, smalloc)
|
|
1752
|
+
* Number and size of permanent (non-GCable) allocations.
|
|
1753
|
+
*
|
|
1754
|
+
* int DID_MEM_CLIB (slaballoc, smalloc)
|
|
1755
|
+
* int DID_MEM_CLIB_SIZE (slaballoc, smalloc)
|
|
1756
|
+
* Number and size of allocations done through the
|
|
1757
|
+
* clib functions (if supported by the allocator).
|
|
1758
|
+
*
|
|
1759
|
+
* int DID_MEM_OVERHEAD (slaballoc, smalloc)
|
|
1760
|
+
* Overhead for every allocation.
|
|
1761
|
+
*
|
|
1762
|
+
* int DID_MEM_ALLOCATED (slaballoc, smalloc)
|
|
1763
|
+
* The amount of memory currently allocated from the
|
|
1764
|
+
* allocator, including the overhead for the allocator.
|
|
1765
|
+
*
|
|
1766
|
+
* int DID_MEM_USED (slaballoc, smalloc)
|
|
1767
|
+
* The amount of memory currently used for driver data,
|
|
1768
|
+
* excluding the overhead from the allocator.
|
|
1769
|
+
*
|
|
1770
|
+
* int DID_MEM_TOTAL_UNUSED (slaballoc, smalloc)
|
|
1771
|
+
* The amount of memory allocated from the system, but
|
|
1772
|
+
* not used by the driver.
|
|
1773
|
+
*
|
|
1774
|
+
* int DID_MEM_DEFRAG_CALLS (smalloc)
|
|
1775
|
+
* Total number of calls to defragment_small_lists().
|
|
1776
|
+
*
|
|
1777
|
+
* int DID_MEM_DEFRAG_CALLS_REQ (smalloc)
|
|
1778
|
+
* Number of calls to defragment_small_lists() with a
|
|
1779
|
+
* desired size.
|
|
1780
|
+
*
|
|
1781
|
+
* int DID_MEM_DEFRAG_REQ_SUCCESS (smalloc)
|
|
1782
|
+
* Number of times, a defragmentation for a desired
|
|
1783
|
+
* size was successful.
|
|
1784
|
+
*
|
|
1785
|
+
* int DID_MEM_BLOCKS_INSPECTED (smalloc)
|
|
1786
|
+
* Number of blocks inspected during defragmentations.
|
|
1787
|
+
*
|
|
1788
|
+
* int DID_MEM_BLOCKS_MERGED (smalloc)
|
|
1789
|
+
* Number of blocks merged during defragmentations.
|
|
1790
|
+
*
|
|
1791
|
+
* int DID_MEM_BLOCKS_RESULT (smalloc)
|
|
1792
|
+
* Number of defragmented blocks (ie. merge results).
|
|
1793
|
+
*
|
|
1794
|
+
* int DID_MEM_AVL_NODES (slaballoc, smalloc)
|
|
1795
|
+
* Number of AVL nodes used to manage the large free
|
|
1796
|
+
* blocks. This value might go away again.
|
|
1797
|
+
*
|
|
1798
|
+
* mixed * DID_MEM_EXT_STATISTICS (slaballoc, smalloc)
|
|
1799
|
+
* If the driver was compiled with extended smalloc
|
|
1800
|
+
* statistics, they are returned in this entry; if the
|
|
1801
|
+
* driver was compiled without the statistics, 0 is
|
|
1802
|
+
* returned.
|
|
1803
|
+
*
|
|
1804
|
+
* This value might go away again.
|
|
1805
|
+
*
|
|
1806
|
+
* The array contains NUM+2 entries, where NUM is the
|
|
1807
|
+
* number of distinct small block sizes. Entry [NUM]
|
|
1808
|
+
* describes the statistics of oversized small blocks
|
|
1809
|
+
* (smalloc) resp. for all slabs (slaballoc),
|
|
1810
|
+
* entry [NUM+1] summarizes all large blocks. Each
|
|
1811
|
+
* entry is an array of these fields:
|
|
1812
|
+
*
|
|
1813
|
+
* int DID_MEM_ES_MAX_ALLOC:
|
|
1814
|
+
* Max number of allocated blocks of this size.
|
|
1815
|
+
*
|
|
1816
|
+
* int DID_MEM_ES_CUR_ALLOC:
|
|
1817
|
+
* Current number of allocated blocks of this size.
|
|
1818
|
+
*
|
|
1819
|
+
* int DID_MEM_ES_MAX_FREE:
|
|
1820
|
+
* Max number of allocated blocks of this size.
|
|
1821
|
+
*
|
|
1822
|
+
* int DID_MEM_ES_CUR_FREE:
|
|
1823
|
+
* Current number of allocated blocks of this size.
|
|
1824
|
+
*
|
|
1825
|
+
* float DID_MEM_ES_AVG_XALLOC:
|
|
1826
|
+
* Number of explicit allocation requests per
|
|
1827
|
+
* second.
|
|
1828
|
+
*
|
|
1829
|
+
* float DID_MEM_ES_AVG_XFREE:
|
|
1830
|
+
* Number of explicit deallocation requests per
|
|
1831
|
+
* second.
|
|
1832
|
+
*
|
|
1833
|
+
* int DID_MEM_ES_FULL_SLABS:
|
|
1834
|
+
* Number of fully used slabs (slaballoc only).
|
|
1835
|
+
*
|
|
1836
|
+
* int DID_MEM_ES_FREE_SLABS:
|
|
1837
|
+
* Number of fully free slabs (slaballoc only).
|
|
1838
|
+
*
|
|
1839
|
+
* int DID_MEM_ES_TOTAL_SLABS:
|
|
1840
|
+
* Total number of slabs: partially used, fully used
|
|
1841
|
+
* and fully free (slaballoc only).
|
|
1842
|
+
*
|
|
1843
|
+
* The allocation/deallocation-per-second statistics do
|
|
1844
|
+
* not cover internal shuffling of the freelists.
|
|
1845
|
+
*
|
|
1846
|
+
* The slab statistics (entry [NUM], slaballoc only)
|
|
1847
|
+
* shows in the AVG statistics the frequence with which
|
|
1848
|
+
* slabs were allocated from resp. returned to the large
|
|
1849
|
+
* memory pool.
|
|
1850
|
+
*
|
|
1851
|
+
*
|
|
1852
|
+
* DINFO_TRACE (7): Return the call stack 'trace' information as specified
|
|
1853
|
+
* by <arg2>. The result of the function is either an array (format
|
|
1854
|
+
* explained below), or a printable string. Omitting <arg2> defaults
|
|
1855
|
+
* to DIT_CURRENT.
|
|
1856
|
+
*
|
|
1857
|
+
* <arg2> == DIT_CURRENT (0): Current call trace
|
|
1858
|
+
* == DIT_ERROR (1): Most recent error call trace (caught
|
|
1859
|
+
* or uncaught)
|
|
1860
|
+
* == DIT_UNCAUGHT_ERROR (2): Most recent uncaught-error call
|
|
1861
|
+
* trace
|
|
1862
|
+
* Return the information in array form.
|
|
1863
|
+
*
|
|
1864
|
+
* The error traces are changed only when an appropriate error
|
|
1865
|
+
* occurs; in addition a GC deletes them. After an uncaught
|
|
1866
|
+
* error, both error traces point to the same array (so the '=='
|
|
1867
|
+
* operator holds true).
|
|
1868
|
+
*
|
|
1869
|
+
* If the array has more than one entries, the first entry is 0 or
|
|
1870
|
+
* the name of the object with the heartbeat which started the
|
|
1871
|
+
* current thread; all following entries describe the call stack
|
|
1872
|
+
* starting with the topmost function called.
|
|
1873
|
+
*
|
|
1874
|
+
* All call entries are arrays themselves with the following
|
|
1875
|
+
* elements:
|
|
1876
|
+
*
|
|
1877
|
+
* int[TRACE_TYPE]: The type of the call frame:
|
|
1878
|
+
* TRACE_TYPE_SYMBOL (0): a function symbol (shouldn't happen).
|
|
1879
|
+
* TRACE_TYPE_SEFUN (1): a simul-efun.
|
|
1880
|
+
* TRACE_TYPE_EFUN (2): an efun closure.
|
|
1881
|
+
* TRACE_TYPE_LAMBDA (3): a lambda closure.
|
|
1882
|
+
* TRACE_TYPE_LFUN (4): a normal lfun.
|
|
1883
|
+
*
|
|
1884
|
+
* mixed[TRACE_NAME]: The 'name' of the called frame:
|
|
1885
|
+
* _TYPE_EFUN: either the name of the efun, or the code of
|
|
1886
|
+
* the instruction for operator closures
|
|
1887
|
+
* _TYPE_LAMBDA: the numeric lambda identifier.
|
|
1888
|
+
* _TYPE_LFUN: the name of the lfun.
|
|
1889
|
+
*
|
|
1890
|
+
* string[TRACE_PROGRAM]: The (file)name of the program holding the
|
|
1891
|
+
* code.
|
|
1892
|
+
* string[TRACE_OBJECT]: The name of the object for which the code
|
|
1893
|
+
* was executed.
|
|
1894
|
+
* int[TRACE_LOC]:
|
|
1895
|
+
* _TYPE_LAMBDA: current program offset from the start of the
|
|
1896
|
+
* closure code.
|
|
1897
|
+
* _TYPE_LFUN: the line number.
|
|
1898
|
+
*
|
|
1899
|
+
* <arg2> == DIT_STR_CURRENT (3): Return the information about the
|
|
1900
|
+
* current call trace as printable string.
|
|
1901
|
+
*
|
|
1902
|
+
* <arg2> == DIT_CURRENT_DEPTH (4): Return the current number of
|
|
1903
|
+
* frames on the control stack (recursion depth).
|
|
1904
|
+
*
|
|
1905
|
+
* DINFO_EVAL_NUMBER (8): Return the current evaluation number.
|
|
1906
|
+
* The number is incremented for each top-level call. Top-level
|
|
1907
|
+
* calls are initiated by the driver, usually in reaction to an
|
|
1908
|
+
* external event:
|
|
1909
|
+
* - commands (added by add_action)
|
|
1910
|
+
* - heart_beat, reset, clean_up
|
|
1911
|
+
* - calls from call_out or input_to
|
|
1912
|
+
* - master applies triggered by external events
|
|
1913
|
+
* - calls of driver hooks in reaction to external events
|
|
1914
|
+
* - send_erq callbacks
|
|
1915
|
+
* - logon in interactives
|
|
1916
|
+
*
|
|
1917
|
+
* The number can be used to detect cases where the same code is
|
|
1918
|
+
* executed twice in the same top level evaluation (say, heart_beat),
|
|
1919
|
+
* and also for time stamps for ordering some events.
|
|
1920
|
+
*
|
|
1921
|
+
* Please note that the counter may overflow, especially on 32 bit
|
|
1922
|
+
* systems. As a result, it can also be negative.
|
|
1923
|
+
*
|
|
1924
|
+
* @deprecated Since 3.2.7, DINFO_STATUS returns the status information instead
|
|
1925
|
+
of printing it.
|
|
1926
|
+
DINFO_DUMP introduced with 3.2.7.
|
|
1927
|
+
LDMud 3.2.8 added the data size of the object to the result of
|
|
1928
|
+
DINFO_MEMORY; the DINFO_DATA request; the DID_MEM_WASTED* stats.
|
|
1929
|
+
LDMud 3.2.9 added DINFO_TRACE; the indexing feature for DINFO_DATA;
|
|
1930
|
+
the 'destructed' DINFO_DUMP; the DID_MEM_CLIB*, DID_MEM_PERM*,
|
|
1931
|
+
DID_ST_OBJECTS_NEWLY_DEST, DID_ST_OBJECTS_DEST, DID_MEM_OVERHEAD,
|
|
1932
|
+
DID_MEM_ALLOCATED, DID_MEM_USED, DID_MEM_TOTAL_UNUSED, and
|
|
1933
|
+
DID_ST_HBEAT_CALLS_TOTAL stats.
|
|
1934
|
+
LDMud 3.2.10 added the object creation time to DINFO_DUMP:"objects",
|
|
1935
|
+
removed DID_MEM_UNUSED from DINFO_DATA:DID_MEMORY; added
|
|
1936
|
+
DID_ST_BOOT_TIME, DID_ST_MB_FILE and DID_ST_MB_SWAP to
|
|
1937
|
+
DINFO_DATA:DID_STATUS; removed DID_ST_CALLOUT_SLOTS and from
|
|
1938
|
+
DINFO_DATA:DID_STATUS; added the third argument to
|
|
1939
|
+
DINFO_OBJLIST, and changed the meaning of
|
|
1940
|
+
DID_ST_CALLOUT_SIZE and DID_ST_HBEAT_SIZE/_SLOTS.
|
|
1941
|
+
LDMud 3.3 replaced the string related DID_ST_ constants according to
|
|
1942
|
+
the new string implementation.
|
|
1943
|
+
LDMud 3.3.387 added the ptmalloc values for DINFO_DATA:DID_MEMORY.
|
|
1944
|
+
LDMud 3.3.479 added the DID_MEM_DEFRAG_ values
|
|
1945
|
+
for DINFO_DATA:DID_MEMORY.
|
|
1946
|
+
LDMud 3.3.526 added DINFO_DUMP:"memory".
|
|
1947
|
+
LDMud 3.3.533 added DID_MEM_AVL_NODES for DINFO_DATA:DID_MEMORY.
|
|
1948
|
+
LDMud 3.3.603 added DID_MEM_EXT_STATISTICS for
|
|
1949
|
+
DINFO_DATA:DID_MEMORY.
|
|
1950
|
+
LDMud 3.3.645 added DINFO_DATA:DID_ST_PACKETS_IN and
|
|
1951
|
+
DID_ST_PACKET_SIZE_IN.
|
|
1952
|
+
LDMud 3.3.679 removed DID_ST_IT_OVERHEAD and DID_ST_ITABLED*;
|
|
1953
|
+
added DID_ST_HYBRID_MAPPINGS and DID_ST_HASH_MAPPINGS.
|
|
1954
|
+
LDMud 3.3.718 added DIT_CURRENT_DEPTH to DINFO_TRACE.
|
|
1955
|
+
LDMud 3.3.719 added DINFO_EVAL_NUMBER
|
|
1956
|
+
LDMud 3.5.0 removed the ptmalloc values for DINFO_DATA:DID_MEMORY.
|
|
1957
|
+
*
|
|
1958
|
+
*/
|
|
1959
|
+
mixed debug_info(int flag);
|
|
1960
|
+
|
|
1961
|
+
mixed debug_info(int flag, mixed arg);
|
|
1962
|
+
|
|
1963
|
+
mixed debug_info(int flag, mixed arg2, mixed arg3);
|
|
1964
|
+
|
|
1965
|
+
/**
|
|
1966
|
+
* creator_file
|
|
1967
|
+
*
|
|
1968
|
+
* Return the name of the creator of a newly created object, i.e.
|
|
1969
|
+
* the name of the user that is responsible for the LPC source
|
|
1970
|
+
* file the object was loaded from. If the function returns 0,
|
|
1971
|
+
* the object can't be loaded and is destructed again
|
|
1972
|
+
* immediately.
|
|
1973
|
+
*
|
|
1974
|
+
* In !compat mode, the returned string serves as the initial uid
|
|
1975
|
+
* (``cuid'') of the object. Objects whose cuid is the
|
|
1976
|
+
* backbone-id will then get the uid of the currently active user
|
|
1977
|
+
* as their userid instead.
|
|
1978
|
+
*
|
|
1979
|
+
* Under compat mode this function is called as well and provides
|
|
1980
|
+
* the information returned by the creator() efun.
|
|
1981
|
+
*
|
|
1982
|
+
* If this function is not provided by the master object, no
|
|
1983
|
+
* other object can be loaded.
|
|
1984
|
+
*
|
|
1985
|
+
* @deprecated Dropped in 3.2.1, replaced by the _UID driver hooks.
|
|
1986
|
+
*
|
|
1987
|
+
*/
|
|
1988
|
+
string creator_file(mixed ob);
|
|
1989
|
+
|
|
1990
|
+
/**
|
|
1991
|
+
* copy_mapping
|
|
1992
|
+
*
|
|
1993
|
+
* This efun is needed to create copies of mappings instead of
|
|
1994
|
+
* just passing a reference, like adding/subtraction from a
|
|
1995
|
+
* mapping do.
|
|
1996
|
+
*
|
|
1997
|
+
* @deprecated Superseeded by the copy() efun.
|
|
1998
|
+
Removed in LDMud 3.3.
|
|
1999
|
+
*
|
|
2000
|
+
*/
|
|
2001
|
+
mapping copy_mapping(mapping m);
|
|
2002
|
+
|
|
2003
|
+
/**
|
|
2004
|
+
* cat
|
|
2005
|
+
*
|
|
2006
|
+
* List the file found at path.
|
|
2007
|
+
*
|
|
2008
|
+
* In most installations it is not legal to have '..' or spaces
|
|
2009
|
+
* in the path. This commands is normally connected to the "cat"
|
|
2010
|
+
* command that wizards have. It is also used by the "help"
|
|
2011
|
+
* command. The optional arguments start and num are start line
|
|
2012
|
+
* number and number of lines. If they are not given the whole
|
|
2013
|
+
* file is printed from the beginning.
|
|
2014
|
+
*
|
|
2015
|
+
* The total number of lines will not exceed a system limit, which
|
|
2016
|
+
* normally is 50 lines.
|
|
2017
|
+
*
|
|
2018
|
+
* cat() returns the number of lines read and printed if success,
|
|
2019
|
+
* 0 if no such file or no lines to read (if start or len is < 0,
|
|
2020
|
+
* or if the file has less than start lines).
|
|
2021
|
+
*
|
|
2022
|
+
* This efun has been deprecated in 3.3.719. Please don't use it in new
|
|
2023
|
+
* code. Use either a combination of read_bytes() + tell_object() or the
|
|
2024
|
+
* sefun cat() from the driver package.
|
|
2025
|
+
*
|
|
2026
|
+
* @example
|
|
2027
|
+
* cat("/doc/efun/cat", 5, 9);
|
|
2028
|
+
*
|
|
2029
|
+
* This will print out the file "/doc/efun/cat" begining at line
|
|
2030
|
+
* 5 and ending with line 13.
|
|
2031
|
+
*
|
|
2032
|
+
* @deprecated Deprecated in LDMud 3.3.719.
|
|
2033
|
+
Removed in LDMud 3.5.0
|
|
2034
|
+
*
|
|
2035
|
+
*/
|
|
2036
|
+
int cat(string path, int start, int num);
|
|
2037
|
+
|
|
2038
|
+
/**
|
|
2039
|
+
* assoc
|
|
2040
|
+
*
|
|
2041
|
+
* All invocation forms search for a <key> in an <alist> (an array
|
|
2042
|
+
* of two equal-sized arrays) or in an ordered array <keys>.
|
|
2043
|
+
* An attempt to search in any other structure will yield an
|
|
2044
|
+
* unpredictable result.
|
|
2045
|
+
*
|
|
2046
|
+
* Complexity: O(lg(n)) , where n is the number of keys.
|
|
2047
|
+
*
|
|
2048
|
+
*
|
|
2049
|
+
* 1. Form: Key Search
|
|
2050
|
+
*
|
|
2051
|
+
* <key> is searched in the array <keys>, result is the index at
|
|
2052
|
+
* which <key> was found. If it isn't found, -1 is returned.
|
|
2053
|
+
*
|
|
2054
|
+
*
|
|
2055
|
+
* 2. Form: Alist Lookup
|
|
2056
|
+
*
|
|
2057
|
+
* <key> is searched in the <alist>, result is the data associated
|
|
2058
|
+
* with <key> if it is found. If it isn't found, the result
|
|
2059
|
+
* will be 0, or <fail> if specified.
|
|
2060
|
+
*
|
|
2061
|
+
*
|
|
2062
|
+
* 3. Form: Ordered List Lookup
|
|
2063
|
+
*
|
|
2064
|
+
* <key> is searched in the array <keys>, the index at which it
|
|
2065
|
+
* is found is as index into <data> to get the return value.
|
|
2066
|
+
* If <key> is not found, the reuslt will be 0, or <fail> if
|
|
2067
|
+
* specified.
|
|
2068
|
+
*
|
|
2069
|
+
* For this to be useful, <data> has to be ordered so that
|
|
2070
|
+
* it matches <key>. This form of lookup is therefore used
|
|
2071
|
+
* primarily with multidimensional alists.
|
|
2072
|
+
*
|
|
2073
|
+
* The function is available only if the driver is compiled with
|
|
2074
|
+
* alist support. In that case, __ALISTS__ is defined.
|
|
2075
|
+
*
|
|
2076
|
+
* @deprecated LDMud 3.3 made this an optional efun.
|
|
2077
|
+
*
|
|
2078
|
+
*/
|
|
2079
|
+
int assoc(mixed key, mixed *keys);
|
|
2080
|
+
varargs mixed assoc(mixed key, mixed *alist , mixed fail);
|
|
2081
|
+
varargs mixed assoc(mixed key, mixed *keys, mixed *data , mixed fail);
|
|
2082
|
+
|
|
2083
|
+
/**
|
|
2084
|
+
* allocate_mapping
|
|
2085
|
+
*
|
|
2086
|
+
* Reserve memory for a mapping.
|
|
2087
|
+
*
|
|
2088
|
+
* size is the number of entries (i.e. keys) to reserve, width is
|
|
2089
|
+
* the number of data items per entry. If the optional width is
|
|
2090
|
+
* omitted, 1 is used as default.
|
|
2091
|
+
*
|
|
2092
|
+
* This is useful only when you are going to construct a mapping
|
|
2093
|
+
* whose approximate size you know beforehand, to save on malloc
|
|
2094
|
+
* overhead. If you don't fill in data for all the allocated
|
|
2095
|
+
* elements, any leftovers will be freed after the current
|
|
2096
|
+
* function execution ended. It is also useful if you want the
|
|
2097
|
+
* mapping to have a certain width even if you don't provide
|
|
2098
|
+
* all the data items for the keys yet.
|
|
2099
|
+
*
|
|
2100
|
+
* @deprecated Renamed to 'm_allocate()' in LDMud 3.2.6.
|
|
2101
|
+
Since LDMud 3.2.9, not available if driver is compiled without
|
|
2102
|
+
USE_DEPRECATED.
|
|
2103
|
+
Removed in LDMud 3.3.
|
|
2104
|
+
*
|
|
2105
|
+
*/
|
|
2106
|
+
mapping allocate_mapping(int size, int width);
|
|
2107
|
+
|
|
2108
|
+
/**
|
|
2109
|
+
* alists
|
|
2110
|
+
*
|
|
2111
|
+
* Alists provide a fast and convenient way to access data
|
|
2112
|
+
* associatively.
|
|
2113
|
+
*
|
|
2114
|
+
* Alists are implemented as arrays of arrays, the first being
|
|
2115
|
+
* the array holding the keys, the others arrays holding
|
|
2116
|
+
* associated data. An empty alist is an array of empty arrays.
|
|
2117
|
+
*
|
|
2118
|
+
* Note that the the dimensions of the arrays are used the other
|
|
2119
|
+
* way than in lisp to allow for faster searching.
|
|
2120
|
+
*
|
|
2121
|
+
* Keys have to be of type integer, string or object. Types can
|
|
2122
|
+
* be mixed.
|
|
2123
|
+
*
|
|
2124
|
+
* The search functions return an undefined value when another
|
|
2125
|
+
* list is given in place of a presorted key list.
|
|
2126
|
+
*
|
|
2127
|
+
* A list with non-numeric keys retrieved by restore_object() has
|
|
2128
|
+
* to be readjusted by using order_alist(), especially after
|
|
2129
|
+
* reboot.
|
|
2130
|
+
*
|
|
2131
|
+
* Deleting an entry can safely be done with exclude_array as
|
|
2132
|
+
* long as all associated data lists are treated like the key
|
|
2133
|
+
* array; index finding for such purposes can be done with assoc.
|
|
2134
|
+
*
|
|
2135
|
+
* Typical applications: holding administrary information about
|
|
2136
|
+
* wizards, list of visitors in a pub, list of customers having
|
|
2137
|
+
* some sort of credit, information remembered about items etc.
|
|
2138
|
+
*
|
|
2139
|
+
* @deprecated LDMud 3.3 made alists an optional efun.
|
|
2140
|
+
LDMud 3.5 removed the support for alists.
|
|
2141
|
+
*
|
|
2142
|
+
*/
|
|
2143
|
+
/**
|
|
2144
|
+
* add_xverb
|
|
2145
|
+
*
|
|
2146
|
+
*
|
|
2147
|
+
*
|
|
2148
|
+
* @deprecated Removed in LDMud 3.3, obsoleted by add_action().
|
|
2149
|
+
*
|
|
2150
|
+
*/
|
|
2151
|
+
/**
|
|
2152
|
+
* add_verb
|
|
2153
|
+
*
|
|
2154
|
+
* This function is connected to the add_action() function. It
|
|
2155
|
+
* will set up the command str to trigger a call to the function
|
|
2156
|
+
* set up by the previous call to add_action().
|
|
2157
|
+
*
|
|
2158
|
+
* This function is now obsolete as the verb can be given directly
|
|
2159
|
+
* with add_action(). add_verb() remains for compatibility.
|
|
2160
|
+
*
|
|
2161
|
+
* [marion Sun Jan 19 1992 Don't use it. This file is retained
|
|
2162
|
+
* because of somewhat nostalgic reasons.]
|
|
2163
|
+
*
|
|
2164
|
+
* @deprecated Removed in LDMud 3.3, obsoleted by add_action().
|
|
2165
|
+
*
|
|
2166
|
+
*/
|
|
2167
|
+
void add_verb(string str);
|
|
2168
|
+
|