Update doc/efun/ aus Driversourcen.
Manpages der efuns aktualisiert, neue Manpages hinzugefuegt.
Change-Id: I7cc91684269ff56d1aef47d5c5e7c87f7fd531dc
diff --git "a/doc/efun/\133\135" "b/doc/efun/\133\135"
index afbc0fe..357092f 100644
--- "a/doc/efun/\133\135"
+++ "b/doc/efun/\133\135"
@@ -1,66 +1,97 @@
SYNOPSIS
- mixed arr[index];
- int str[index];
+ mixed arr[index]
+ int str[index]
- mixed * arr[from..to];
- string str[from..to];
+ mixed * arr[from .. to]
+ string str[from .. to]
+ mixed m[key, from .. to]
-BESCHREIBUNG
- Liefert ein Element aus einem Array oder String (erste Form), oder
- eine Teilmenge (zweite Form).
+DESCRIPTION
+ Return one element from a string/array (first form), or a slice
+ (substring resp. subarray) of a string/array/mapping (second form).
- Die Indizes <index>, <from> und <to> sind durchnummeriert von 0 bis
- strlen(<str>)-1 bzw. sizeof(<arr>)-1. Wenn ein <index> als '<wert'
- geschrieben wird, wird der Wert vom Ende des Stings / Arrays her
- gezaehlt. Dabei wird nummeriert von 1 bis strlen(<str>) bzw.
- sizeof(<arr>). Wird <from> weggelassen, beginnt die Teilmenge mit
- dem ersten Element. Wird <to> weggelassen, endet die Teilmenge mit
- dem letzten Element.
+ The indexes <index>, <from> and <to> are numbered 0 to
+ strlen(str)-1, sizeof(arr)-1 resp. widthof(m)-1.
- In der ersten Form muss <index> innerhalb der Grenzen des Strings /
- Arrays sein, sonst wird ein Laufzeitfehler (RTE) verursacht. In der
- zweiten Form werden die Indizes an die Groesse des Strings / Arrays
- angepasst. Wenn <from> groesser ist als <to> oder beide ausserhalb
- der Groesse des Strings / Arrays liegen, wird ein leerer String ""
- bzw. ein leeres Array ({}) zurueck geliefert.
+ If an index is written '<value', the value is counted from the
+ end of the string/array/mapping and is numbered 1 to strlen(str),
+ sizeof(arr) resp. widthof(m).
- Die Notation als Closure ist entsprechend:
+ If an index is written '>value', the value is counted from the
+ end of the string/array/mapping if it is negative (starting with
+ -1 for the last element), and from the beginning if it is positive
+ (starting with 0 for the first element).
- [index] -> ({'#[, arr, index })
- [<index] -> ({'#[<, arr, index })
- [from..to] -> ({'#[..], arr, from, to })
- [<from..to] -> ({'#[<..], arr, from, to })
- [from..<to] -> ({'#[..<], arr, from, to })
- [<from..<to] -> ({'#[<..<], arr, from, to })
+ If <from> is omitted, it defaults to the beginning of the
+ string/array/mapping.
+ If <to> is omitted, it defaults to the beginning of the
+ string/array/mapping.
-BEISPIELE
+ In the first form, the <index> must be within the bounds of
+ the string/array, or a runtime error occurs.
+ In the second form, the indexes will be fitted to the bounds of
+ the string/array/mapping. If <from> is greater than <to>, or both
+ outside the bounds, an empty string/array ("" resp. ({})) will
+ be returned.
+
+ The closure notation is straightforward:
+
+ [index] -> ({'#[, arr, index })
+ [<index] -> ({'#[<, arr, index })
+ [>index] -> ({'#[>, arr, index })
+ [from..to] -> ({'#[..], arr, from, to })
+ [<from..to] -> ({'#[<..], arr, from, to })
+ [from..<to] -> ({'#[..<], arr, from, to })
+ [<from..<to] -> ({'#[<..<], arr, from, to })
+ [>from..to] -> ({'#[>..], arr, from, to })
+ [from..>to] -> ({'#[..>], arr, from, to })
+ [>from..<to] -> ({'#[>..<], arr, from, to })
+ [<from..>to] -> ({'#[<..>], arr, from, to })
+ [>from..>to] -> ({'#[>..>], arr, from, to })
+ [key,index] -> ({'#[,], m, index })
+ [key,<index] -> ({'#[,<], m, index })
+ [key,>index] -> ({'#[,>], m, index })
+ [key,from..to] -> ({'#[,..], m, from, to })
+ [key,<from..to] -> ({'#[,<..], m, from, to })
+ [key,from..<to] -> ({'#[,..<], m, from, to })
+ [key,<from..<to] -> ({'#[,<..<], m, from, to })
+ [key,>from..to] -> ({'#[,>..], m, from, to })
+ [key,from..>to] -> ({'#[,..>], m, from, to })
+ [key,>from..<to] -> ({'#[,>..<], m, from, to })
+ [key,<from..>to] -> ({'#[,<..>], m, from, to })
+ [key,>from..>to] -> ({'#[,>..>], m, from, to })
+
+EXAMPLES
foo = ({ 1, 2, 3, 4 }); str = "test";
foo[1] -> 1 str[1] -> 'e' == 101
foo[1..2] -> ({ 2, 3 }) str[1..2] -> "es"
foo[2..1] -> ({ }) str[2..1] -> ""
foo[0..<2] -> ({ 1, 2 }) str[0..<2] -> "tes"
-
foo[..<2] -> ({ 1, 2 }) str[..<2] -> "tes"
foo[<3..] -> ({ 2, 3, 4 }) str[<3..] -> "est"
- foo[1] = 5 -> foo == ({ 1, 5, 3, 4 })
- foo[1..2] = ({ 5, 6, 7 }) -> foo == ({ 1, 5, 6, 7, 4 })
- foo[1..2] = ({ }) -> foo == ({ 1, 4 })
+ foo[1] = 5 -> foo == ({ 1, 5, 3, 4 })
+ foo[1..2] = ({ 5, 6, 7 }) -> foo == ({ 1, 5, 6, 7, 4 })
+ foo[1..2] = ({ }) -> foo == ({ 1, 4 })
- str[1] = 'a' -> str == "tast"
- str[1..2] = "bar" -> str == "tbart"
- str[1..2] = "" -> str == "tt"
+ str[1] = 'a' -> str == "tast"
+ str[1..2] = "bar" -> str == "tbart"
+ str[1..2] = "" -> str == "tt"
-GESCHICHTE
- slice_array() ist die alte Form der []-Operatoren fuer Arrays,
- extract() ist die alte Form der []-Operatoren fuer Strings.
- BEIDE VARIANTEN SIND VERALTET, WERDEN NICHT MEHR UNTERSTUETZT UND
- SOLLTEN DESHALB NICHT MEHR VERWENDET WERDEN.
+HISTORY
+ slice_array() is the old form of the [] operator on arrays.
+ extract() is the old form of the [] operator on strings.
+ Both ARE NO LONGER SUPPORTED and should not be used anymore!
- Die Syntax fuer 'rueckwaerts zaehlen vom letzten Element' hat sich von
- Version 3.1.J zu 3.1.K geaendert von '-1' zu '<1'. Auch ist seit dann
- foo[0..-1] ein leeres Array bzw. ein leerer String.
+ The syntax for ``counting from last element'' has changed
+ between versions 3.1.J and 3.1.K from ``-1'' to ``<1''.
+ foo[0..-1] is now an empty string resp. array.
-SIEHE AUCH
- member(E), sizeof(E), slice_array(E)
+ LDMud 3.3 introduced the '>' indexing method.
+
+ LDMud 3.6.6 introduced range indexing for mappings.
+
+SEE ALSO
+ member(E), sizeof(E)
+
diff --git a/doc/efun/abs b/doc/efun/abs
index d242124..cba9a32 100644
--- a/doc/efun/abs
+++ b/doc/efun/abs
@@ -2,19 +2,18 @@
int abs(int arg)
float abs(float arg)
-BESCHREIBUNG
- Liefert den Betrag des Argumentes <arg>.
+DESCRIPTION
+ Returns the absolute value of the argument <arg>.
-BEISPIELE
- Funktion Rueckgabewert
- -------------------------------------------------------------------
- abs(-18 ) 18
- abs( 11 ) 11
- abs( -1.974) 1.974
+EXAMPLES
+ abs(-18) - returns 18
+ abs(11) - returns 11
+ abs(-1.974) - returns 1.974
+ ...
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.6.
+HISTORY
+ Introduced in LDMud 3.2.6.
-SIEHE AUCH
- sin(E), asin(E), cos(E), acos(E), tan(E), atan(E), log(E), exp(E),
- sqrt(E), floor(E), ceil(E), pow(E), sgn(E)
+SEE ALSO
+ sin(E), asin(E), cos(E), acos(E), tan(E), atan(E), log(E),
+ exp(E), sqrt(E), floor(E), ceil(E), pow(E), sgn(E)
diff --git a/doc/efun/acos b/doc/efun/acos
index 84bad82..f31e71f 100644
--- a/doc/efun/acos
+++ b/doc/efun/acos
@@ -1,8 +1,8 @@
SYNOPSIS
float acos(float)
-BESCHREIBUNG
- Liefert den Arkuskosinus des Argumentes.
+DESCRIPTION
+ Returns the arcus cosine of the argument.
-SIEHE AUCH
+SEE ALSO
sin(E), asin(E), cos(E), tan(E), atan(E), atan2(E)
diff --git a/doc/efun/add_action b/doc/efun/add_action
index 19813d2..000bf54 100644
--- a/doc/efun/add_action
+++ b/doc/efun/add_action
@@ -1,117 +1,122 @@
SYNOPSIS
#include <commands.h>
- void add_action(string|closure fun, string cmd);
- void add_action(string|closure fun, string cmd, int flag);
- void add_action(string|closure fun); /* veraltet */
+ void add_action(string|closure fun, string cmd)
+ void add_action(string|closure fun, string cmd, int flag)
-BESCHREIBUNG
- Setzt eine lokale Funktion fun, die aufgerufen wird, wenn der Spieler
- das Kommandos <cmd< eintippt. Der Funktion werden die Argumente des
- vom Spieler eingegebenen Kommandos als string uebergeben. Die
- Funktion muss entweder 1 zurueck geben, wenn das Kommando erfolgreich
- ausgefuehrt werden konnte, sonst 0.
+DESCRIPTION
+ Set up a local function fun to be called when user input
+ matches the command cmd. Functions called by a user command
+ will get the arguments as a string. It must then return 0 if
+ it was the wrong command, otherwise 1.
- Wenn das Kommando nicht erfolgreich ausgefuehrt werden konnte, sucht
- der Parser weiter nach einer passenden Funktion, bis eine solche
- 1 zurueck liefert. Falls der Parser keine Funktion findet, wird an
- den Spieler eine Fehlermeldung ausgegeben. ("Wie bitte?")
+ If it was the wrong command, the parser will continue
+ searching for another command, until one returns 1 or give an
+ error message to the user.
- Wenn add_action() ohne das zweite Argument (string cmd) aufgerufen
- wird, muss dieses mit add_verb() oder add_xverb() angegeben werden.
- DIESE DEKLARATION IST JEDOCH VERALTET UND SOLLTE NICHT VERWENDET
- WERDEN. Sie funktioniert auch nur, wenn USE_DEPRECATED gesetzt ist.
+ For example, there can be a wand and a rod. Both of these
+ objects define as command "wave". One of them will be randomly
+ called first, and it must look at the argument, and match
+ against "wand" or "rod" respectively.
- Die Funktion fun wird mit einem string als Argument aufgerufen, der
- die Worte nach dem Verb in der Inputzeile enthaelt. Das Verb kann
- mit der Efun query_verb() abgefragt werden. Das Verb ist immer das
- erste Wort in der Inputzeile bis zum ersten Leerschlag.
+ The function associated to a command will be called with a
+ string as argument which stands for the given words behind the
+ typed command. The verb entered can be retrieved using the
+ query_verb() efun and is always the first word in the input
+ line up to the first space.
- add_action() muss immer aus einer init() Routine heraus aufgerufen
- werden. Das Objekt, welches das Kommando cmd definiert, muss sich in
- der Umgebung des Spielers befinden; also entweder der Spieler selbst,
- im Inventar des Spielers, der Raum, in dem sich der Spieler befindet
- oder ein Objekt im gleichen Raum wie der Spieler. Wenn der Spieler
- die Umgebung des Objekts verlaesst, werden alle von add_action()
- definierten Kommandos automatisch entfernt.
+ Always have add_action() called only from an init() routine.
+ The object defining these commands must be present to the
+ user, either being the user, being carried by the user,
+ being the room around the user, or being an object in the
+ same room as the user. If the player leaves this vicinity of the
+ object, the actions are automatically removed.
- Die Kommandos lassen sich auch manuell entfernen. Die Efun dazu lautet
- remove_actions().
+ Actions can also be removed on demand with the remove_actions() efun.
- Wenn das Argument <flag> AA_SHORT (d.h. 1) ist, koennen Argumente von
- cmd ohne einen Leerschlag an cmd angehaengt sein. An die Funktion fun
- werden alle Zeichen nach dem ersten Leerschlag als Argument
- uebergeben.
+ If argument <flag> is AA_SHORT (1), then the arguments may
+ follow the verb without separating space. Any arguments after
+ the first space are passed as argument string.
- Wenn <flag> AA_NOSPACE (d.h. 2) ist, koennen die Argumente wiederum
- ohne Leerschlag ans Verb angehaengt sein. Im Unterschied zu AA_SHORT
- werden alle Zeichen nach dem Verb als Argument an die Funktion
- uebergeben. Die Zeichen, welche nicht durch einen Leerschlag vom
- Verb getrennt sind, werden ZUSAETZLICH von query_verb() zurueck
- gegeben.
+ If argument <flag> is AA_NOSPACE (2), then again the arguments
+ may follow the verb without separating space. In contrast to
+ AA_SHORT, all characters following the verb are passed as
+ the argument string. However, note that the characters immediately
+ following the given verb are passed as argument AND as result
+ of query_verb().
- Wenn <flag> AA_IMM_ARGS (3) ist, werden alle Zeichen nach dem Verb
- als Argument uebergeben, nicht aber von query_verb() beruecksichtigt.
+ If argument <flag> is AA_IMM_ARGS (3), then again the arguments
+ may follow the verb without separating space. All characters following
+ the given verb are passed as argument, and only as argument.
- Wenn -<flag> eine negative Zahl ist, muss das vom Spieler eingegebene
- Kommando nur mit den ersten <flag> Zeichen von cmd uebereinstimmen.
+ If argument <flag> is negative, the verb given by the player
+ has to match only the leading -<flag> characters of the verb <cmd>.
- Als Name fuer die Funktion fun duerfen keine geschuetzten Namen wie
- zum Beispiel create, init, reset, heart_beat etc. verwendet werden
- (eine vollstaendige Liste findet man unter /doc/applied/).
+ Never use one of the functions 'create' 'reset' 'init' 'exit'
+ 'heart_beat' etc as the first argument to add_action(). In
+ general, a function with a name defined in /doc/applied should
+ have the behaviour defined there.
-BEISPIELE
- add_action("geh_rein", "betrete");
- Wenn der Spieler "betrete" eintippt, wird die Funktion geh_rein()
- aufgerufen.
+EXAMPLES
+ add_action("GoInside", "enter");
- add_action("disfunc", "disconnect", AA_NOSPACE);
+ When typing "enter" the function GoInside() will be invoked.
- Die Funktion disfunc() wird aufgerufen, wenn der Spieler "disconnect"
- oder eine Abkuerzung davon (zum Beispiel "di" oder "discon") eingibt.
- Laengere Worte (zum Beispiel "disconnecting") werden NICHT erkannt.
- Um rauszufinden, was der Spieler tatsaechlich eingegeben hat, muss
- query_verb() aufgerufen werden.
+ add_action("DisFunc", "dis", AA_SHORT);
- add_action("fun", "cmd");
- add_action("fun", "scmd", AA_SHORT);
- add_action("fun", "ncmd", AA_NOSPACE);
- add_action("fun", "icmd", AA_IMM_ARGS);
+ Whenever you type in a command which starts with "dis" the
+ function DisFunc() will be called. To get the real word which
+ was typed in (because until now you only know that it was a
+ command beginning with "dis") you have to call the efun
+ query_verb().
- Die folgende Tabelle zeigt, was die oben aufgefuehrten Kommandos bzw.
- <flag> fuer Werte an query_verb() und als Argumente an die Funktion
- fun uebergeben:
+ add_action("DisFunc", "disconnect", AA_NOSPACE);
- |-------------------|--------------|----------------------------|
- | Eingabe | query_verb() | Argument der Funktion fun |
- |-------------------|--------------|----------------------------|
- | "cmd" | "cmd" | 0 |
- | "cmd bla fasel" | "cmd" | "bla fasel" |
- |-------------------|--------------|----------------------------|
- | "scmd" | "scmd" | 0 |
- | "scmd bla" | "scmd" | "bla" |
- | "scmdbla" | "scmdbla" | 0 |
- | "scmd bla fasel" | "scmd" | "bla fasel" |
- | "scmdbla fasel" | "scmdbla" | "fasel" |
- |-------------------|--------------|----------------------------|
- | "ncmd" | "ncmd" | 0 |
- | "ncmd bla" | "ncmd" | " bla" |
- | "ncmdbla" | "ncmdbla" | "bla" |
- | "ncmd bla fasel" | "ncmd" | " bla fasel" |
- | "ncmdbla fasel" | "ncmdbla" | "bla fasel" |
- |-------------------|--------------|----------------------------|
- | "icmd" | "icmd" | 0 |
- | "icmd bla" | "icmd" | " bla" |
- | "icmdbla" | "icmd" | "bla" |
- | "icmd bla fasel" | "icmd" | " bla fasel" |
- | "icmdbla fasel" | "icmd" | "bla fasel" |
- |-------------------|--------------|----------------------------|
+ The function DisFunc() will be called for all commands which
+ use "disconnect" or a shortened form like "di", "dis" or
+ "discon" as verb. The command 'disconnecting' will _not_
+ be recognized. To get the real word which was typed in
+ you have to call the efun query_verb().
-GESCHICHTE
- Das Argument <flag> < 0 wird seit 3.2@127 unterstuetzt, aber erst ab
- LDMud 3.2.8 richtig implementiert. LDMud 3.2.9 fuehrte das AA_IMM_ARGS
- Flag ein. Ab LDMud 3.5 kann man Closures als Funktionen uebergeben.
-SIEHE AUCH
- query_verb(E), query_command(E), add_verb(E), add_xverb(E), init(A)
+ add_action("...", "cmd");
+ add_action("...", "xcmd", AA_SHORT);
+ add_action("...", "scmd", AA_NOSPACE);
+ add_action("...", "icmd", AA_IMM_ARGS);
+
+ When given the following commands, the driver will parse it
+ as described below. 'verb' is what query_verb() would return,
+ 'arg' is what would be passed to the command function.
+
+ "cmd" -> verb "cmd", arg 0
+ "cmd foo bar" -> verb "cmd", arg "foo bar"
+
+ "xcmd" -> verb "xcmd", arg 0
+ "xcmd foo" -> verb "xcmd", arg "foo"
+ "xcmdfoo" -> verb "xcmdfoo", arg 0
+ "xcmd foo bar" -> verb "xcmd", arg "foo bar"
+ "xcmdfoo bar" -> verb "xcmdfoo", arg "bar"
+
+ "scmd" -> verb "scmd", arg 0
+ "scmd foo" -> verb "scmd", arg " foo"
+ "scmdfoo" -> verb "scmdfoo", arg "foo"
+ "scmd foo bar" -> verb "scmd", arg " foo bar"
+ "scmdfoo bar" -> verb "scmdfoo", arg "foo bar"
+
+ "icmd" -> verb "icmd", arg 0
+ "icmd foo" -> verb "icmd", arg " foo"
+ "icmdfoo" -> verb "icmd", arg "foo"
+ "icmd foo bar" -> verb "icmd", arg " foo bar"
+ "icmdfoo bar" -> verb "icmd", arg "foo bar"
+
+
+HISTORY
+ The flag < 0 argument was supported since 3.2@127, but not
+ really implemented before LDMud 3.2.8.
+ LDMud 3.2.9 introduced the AA_IMM_ARGS flag.
+ LDMud 3.3 removed the historical add_action(fun) notation.
+ Since LDMud 3.5 the function can be given as a closure.
+
+SEE ALSO
+ query_verb(E), query_command(E), remove_action(E), init(A)
diff --git a/doc/efun/all_environment b/doc/efun/all_environment
index 3da7cb6..ca10bea 100644
--- a/doc/efun/all_environment
+++ b/doc/efun/all_environment
@@ -1,22 +1,20 @@
SYNOPSIS
object * all_environment()
- object * all_environment(object ob)
+ object * all_environment(object o)
-BESCHREIBUNG
- Gibt ein Array mit allen Umgebungen des Objekts <ob> zurueck.
- Wenn <ob> nicht angegeben wird, wird standardmaessig this_object()
- verwendet.
+DESCRIPTION
+ Returns an array with all environments object <o> is in. If <o> is
+ omitted, the environments of the current object is returned.
- Wenn <o> keine Umgebung hat oder zerstoert wurde, wird 0 zurueck
- gegeben.
+ If <o> has no environment, or if <o> is destructed, 0 is returned.
-BEISPIELE
- Wenn <ob> ein Zuendholz in einer Schachtel in einer Truhe in einem
- Raum ist, so liefert all_environment(ob) das Array
- ({ Schachtel, Truhe, Raum }) zurueck.
+EXAMPLES
+ If o is a match in a matchbox which is in a box in a chest,
+ in a room, all_environment(o) will return
+ ({ matchbox, box, chest, room }).
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.6. Ein Vorschlag von Tubmud.
+HISTORY
+ Introduced in LDMud 3.2.6, suggested by Tubmud.
-SIEHE AUCH
+SEE ALSO
environment(E), all_inventory(E)
diff --git a/doc/efun/all_inventory b/doc/efun/all_inventory
index 212c530..ee4a6b7 100644
--- a/doc/efun/all_inventory
+++ b/doc/efun/all_inventory
@@ -2,11 +2,10 @@
object * all_inventory()
object * all_inventory(object ob)
-BESCHREIBUNG
- Liefert ein Feld (Array) mit allen Objekten, die sich im Objekt ob
- befinden (bzw. in this_object(), sofern kein Argument angegeben
- wurde).
+DESCRIPTION
+ Returns an array of the objects contained in the inventory of
+ ob, or of this_object(), if no arg given.
-SIEHE AUCH
+SEE ALSO
first_inventory(E), next_inventory(E), deep_inventory(E),
all_environment(E), environment(E)
diff --git a/doc/efun/allocate b/doc/efun/allocate
index cf74429..bdd3eb3 100644
--- a/doc/efun/allocate
+++ b/doc/efun/allocate
@@ -2,27 +2,28 @@
mixed * allocate(int size)
mixed * allocate(int size, mixed init_value)
- mixed * allocate(*int sizes)
- mixed * allocate(*int sizes, mixed init_value)
+ mixed * allocate(int *sizes)
+ mixed * allocate(int *sizes, mixed init_value)
-BESCHREIBUNG
- Allokiert ein Array von <size> Elementen. Die Anzahl Elemente muss
- groesser sein als 0, darf aber das Systemmaximum (normalerweise 1000)
- nicht uebersteigen. Wird <init_value> angegeben, wird allen Elementen
- dieser als Anfangswert zugewiesen. Wenn <init_value> ein Mapping oder
- ein Array ist, wird fuer jedes Element eine einfache Kopie erstellt.
- Wird <init_value> nicht angegeben, sind alle Elemente 0.
+DESCRIPTION
+ Allocate an array of size elements. The number of elements
+ must be >= 0 and not bigger than a system maximum (usually
+ 1000).
- In der zweiten Form (mit einem Feld von <sizes> anstelle nur einer
- <size>) erzeugt allocate() ein mehrdimensionales Array, ein Array aus
- Arrays.
+ If <init_value> is given, all array elements will be set
+ to this value (if <init_value> is an array or mapping, a shallow
+ copy will be created for each element), otherwise they all will be 0.
- Heute wird allocate() kaum mehr benoetigt, weil Arrays mit dem
- +-Operator addiert und mit dem ({})-Operator initialisiert werden
- koennen. Der einzige Nutzen der Funktion ist, grosse leere
- oder initialisierte Arrays zu erzeugen.
+ In the second form (using an array of sizes instead of one size),
+ the efun will allocate a multidimensional array, that is an array
+ of arrays.
-BEISPIELE
+ Note that this function is hardly needed anymore, because
+ arrays can be added by the + operator, and can be constructed
+ and initialized by the ({ }) operator. The functions only
+ use is to construct big empty arrays.
+
+EXAMPLES
string *buffer;
buffer = allocate(50);
buffer = allocate(50, "");
@@ -30,9 +31,9 @@
buffer = allocate( ({ 2, 3 }) )
--> ({ ({ 0, 0, 0 }), ({ 0, 0, 0 }) })
-GESCHICHTE
- LDMud 3.2.9 fuehrte den Anfangswert <init_value> und die
- Initialisierung von mehrdimensionalen Arrays ein.
+HISTORY
+ LDMud 3.2.9 added the initialization value and the multi-dimensional
+ allocation.
-SIEHE AUCH
+SEE ALSO
sizeof(E)
diff --git a/doc/efun/and_bits b/doc/efun/and_bits
index d1d89a3..0ee8426 100644
--- a/doc/efun/and_bits
+++ b/doc/efun/and_bits
@@ -1,13 +1,13 @@
SYNOPSIS
string and_bits(string str1, string str2)
-BESCHREIBUNG
- <str1> und <str2> seien beides Bitstrings. Das Resultat von and_bits()
- ist ein Bitstring mit dem binaeren Und von <str1> und <str2>, das
- heisst ein String, in dem ein Bit nur gesetzt ist, wenn das
- entsprechende Bit in beiden Strings <str1> und <str2> gesetzt ist.
+DESCRIPTION
+ <str1> and <str2> are both bitstrings. The result of the function
+ is a bitstring with the binary-and of <str1> and <str2>,
+ ie. a string in which a bit is set only if both corresponding
+ bits in the input strings are set, too.
-BEISPIELE
+EXAMPLES
string s1, s2, s3;
s1 = set_bit("", 3); s1 = set_bit(s1, 15); -> s1 is "( ("
@@ -15,9 +15,8 @@
s3 = and_bits(s1, s2);
- --> s3 ist jetzt "8", d.h. ein Bitstring, in dem nur das 3. Bit
- gesetzt ist.
+ -> s3 is now "8", ie. a bitstring with bit 3 set only.
-SIEHE AUCH
+SEE ALSO
clear_bit(E), set_bit(E), test_bit(E), next_bit(E), last_bit(E),
count_bits(E), or_bits(E), xor_bits(E), invert_bits(E), copy_bits(E)
diff --git a/doc/efun/apply b/doc/efun/apply
index d7c891e..0a8002e 100644
--- a/doc/efun/apply
+++ b/doc/efun/apply
@@ -1,35 +1,49 @@
SYNOPSIS
- mixed apply(closure cl, mixed arg, ...)
+ mixed apply(closure cl, ...)
-BESCHREIBUNG
- Wertet die Closure <cl> aus. Wenn <cl> keine Closure ist, wird <cl>
- unveraendert zurueck geliefert und alle Argumente <arg> werden
- ignoriert.
+DESCRIPTION
+ Evaluates the closure <cl> with the following arguments.
+ If the last argument is an array or struct, it will be
+ flattened: ie. the array/struct itself will be removed and its
+ contents added to the argument list of <cl>
- Es gibt einen kleinen Unterschied zu funcall(), das ja im Wesentlichen
- das gleiche tut (naemlich, eine Closure auswerten): wenn das letzte
- Argument von apply() ein Array ist, wird jedes Element dieses Arrays
- zu einem separaten zusaetzlichen Parameter der Closure umgewandelt.
+ If <cl> is not a closure, it will simply be returned (and all
+ other arguments are ignored).
- Eine moegliche Anwendung waere:
- mixed eval(object ob,string func,mixed *args)
- {
- return apply(#'call_other,ob,func,args);
- }
+EXAMPLES
+ The flattening of the last argument is the important difference
+ between apply() and funcall(). For example:
- Das fuehrt zu folgenden Aufrufen:
- ob->func(args[0],args[1],...,args[sizeof(args)-1])
+ mixed eval(object ob, string func, mixed *args)
+ {
+ return apply(#'call_other, ob, func, args);
+ }
- Waere stattdessen funcall() aufgerufen worden, so haette das ergeben:
- ob->func(args)
+ This will result in calling
- Eine wichtige Anwendung von apply() ist das Auswerten des
- Array-Arguments in "varargs" Funktionen.
+ ob->func(args[0],args[1],...,args[sizeof(args)-1]).
-GESCHICHTE
- Eingefuehrt in 3.2@70.
- LDMud 3.2.8 fuehrte ein, dass das erste Argument zurueck gegeben wird,
- wenn es sich nicht um eine Closure handelt.
+ Using funcall() instead of apply() would have given us
-SIEHE AUCH
+ ob->func(args).
+
+
+ Of course, with the '...' operator we could also write
+
+ mixed eval(object ob, string func, mixed *args)
+ {
+ return funcall(#'call_other, ob, func, args...);
+ }
+
+ and achieve the same result.
+
+HISTORY
+ Introduced in 3.2@70
+ LDMud 3.2.8 adds the returning of a non-closure as first
+ argument.
+ LDMud 3.3 added the '...' operator and thus made apply() in fact
+ redundant.
+ LDMud 3.3.266 added support for structs.
+
+SEE ALSO
funcall(E), closures(LPC), varargs(LPC)
diff --git a/doc/efun/asin b/doc/efun/asin
index a8ebc9b..60d79e7 100644
--- a/doc/efun/asin
+++ b/doc/efun/asin
@@ -1,8 +1,8 @@
SYNOPSIS
float asin(float)
-BESCHREIBUNG
- Liefert den Arkussinus des Argumentes.
+DESCRIPTION
+ Returns the arcus sine of its argument.
-SIEHE AUCH
+SEE ALSO
sin(E), cos(E), acos(E), tan(E), atan(E), atan2(E)
diff --git a/doc/efun/atan b/doc/efun/atan
index f8242b5..3077af2 100644
--- a/doc/efun/atan
+++ b/doc/efun/atan
@@ -1,11 +1,11 @@
SYNOPSIS
float atan(int|float)
-BESCHREIBUNG
- Liefert den Arkustangens des Argumentes.
+DESCRIPTION
+ Returns the argument's arcus tangent.
-GESCHICHTE
- LDMud 3.2.9: Ganzzahlen (Integers) als Argument hinzugefuegt.
+HISTORY
+ LDMud 3.2.9 added integers as arguments.
-SIEHE AUCH
+SEE ALSO
atan2(E), sin(E), cos(E), tan(E), asin(E), acos(E)
diff --git a/doc/efun/atan2 b/doc/efun/atan2
index e1c939a..66d78ab 100644
--- a/doc/efun/atan2
+++ b/doc/efun/atan2
@@ -1,16 +1,16 @@
SYNOPSIS
float atan2(int|float y, int|float x)
-BESCHREIBUNG
- Liefert den Winkel der Polarkoordinaten des Punktes (x, y) im
- Bereich (-Pi, Pi].
+DESCRIPTION
+ Returns the angle part of the polar coordinates of the point (x, y)
+ in the range (-pi, pi].
- Man beachte die Vertauschung der Koordinaten x und y in der
- Parameter-Liste, die die Abfolge in der Steigungs-Winkel-Umrechnung
- atan(y / x) widerspiegelt.
+ Note the exchange of the coordinates x and y in the parameter list
+ reflecting the sequenz in the gradient to angle transformation
+ atan(y / x).
-GESCHICHTE
- LDMud 3.2.9: Ganzzahlen (Integers) als Argumente hinzugefuegt.
+HISTORY
+ LDMud 3.2.9 added integers as arguments.
-SIEHE AUCH
+SEE ALSO
sin(E), cos(E), tan(E), asin(E), acos(E), atan(E)
diff --git a/doc/efun/attach_erq_demon b/doc/efun/attach_erq_demon
index 118a1ff..015b520 100644
--- a/doc/efun/attach_erq_demon
+++ b/doc/efun/attach_erq_demon
@@ -1,37 +1,37 @@
-GESCHUETZT
SYNOPSIS
- int attach_erq_demon(object ob, int do_close)
+ int attach_erq_demon(object ob, int do_close)
int attach_erq_demon(string obname, int do_close)
-BESCHREIBUNG
- Diese geschuetzte Funktion setzt oder aendert die die Verbindung des
- Treibers zum externen Erq-Demon, aendert also effektiv die Demons.
+DESCRIPTION
+ This privileged efun is to set/change the connection of the
+ driver to the external erq demon, thus in effect changing the
+ demons.
- Die Verbindung wird dabei vom interaktiven Objekt <ob> entfernt (!)
- und als Erq-Verbindung gespeichert. Das Objekt <ob> wird anschliessend
- nicht mehr benoetigt, es kann aber als (nicht interaktives) Objekt
- weiter existieren.
+ The connection of the given interactive 'ob'ject is taken away(!)
+ from it and stored as the erq-connection. The object itself is
+ then no longer needed, but may stay alive - it is just another
+ non-interactive object then.
- In der zweiten Form wird der String an den Dateinamen ERQFILE<obname>
- angehaengt, das dann als Binary als neuer Erq-Demon aufgespalten wird.
- Die Kommunikation mit diesem Erq verlaeuft ueber Unix Domainsockets.
- ERQFILE greift standardmaessig auf BINDIR/erq zu, wobei BINDIR der
- konfigurierte Wert fuer das ausfuehrbare Verzeichnis ist.
+ In the second form, the string will be combined as suffix to
+ the filename ERQFILE<obname>, which is then the binary to be
+ forked off as new erq demon. The communication with this erq
+ will take place over unix domain sockets. ERQFILE defaults to
+ BINDIR/erq, where BINDIR is the configuration value for the
+ executable directory.
- Besteht bereits eine Verbindung zu einem Erq-Demon, schlaegt die
- Funktion fehl, wenn nicht do_close auf 1 gesetzt ist (Standard ist
- do_close == 0). In diesem Fall wird die alte Verbindung geschlossen,
- bevor zum neuen Demon verbunden wird.
+ If there is alreay an erq demon connected to the driver, the
+ function will fail unless 'do_close' (default 0) is specified
+ as 1 (or any other odd integer): then the old connection will
+ be closed before attaching the new.
+ The efun returns 1 on success, else 0.
- Die Efun liefert 1 bei Erfolg, 0 sonst.
+EXAMPLES
+ To restart the (default) erq, write in
+ master.c::stale_erq(closure c):
+ attach_erq_demon("", 0);
-BEISPIELE
- Um den (Standard-)Erq neu zu starten, muss in
- master.c::stale_erq(closure c) geschrieben werden:
- attach_erq_demon("", 0);
+HISTORY
+ Introduced in 3.2.1@61.
-GESCHICHTE
- Eingefuehrt in 3.2.1@61.
-
-SIEHE AUCH
+SEE ALSO
send_erq(E), erq(C)
diff --git a/doc/efun/baseof b/doc/efun/baseof
index d64cc20..41d8db0 100644
--- a/doc/efun/baseof
+++ b/doc/efun/baseof
@@ -1,5 +1,5 @@
SYNOPSIS
- int baseof (struct b, struct s)
+ int baseof(struct b, struct s)
DESCRIPTION
Test if the type of struct <b> is a base of struct <s> (the
diff --git a/doc/efun/binary_message b/doc/efun/binary_message
index 5b909a9..8d952f7 100644
--- a/doc/efun/binary_message
+++ b/doc/efun/binary_message
@@ -1,36 +1,32 @@
-GESCHUETZT
SYNOPSIS
- int binary_message(int *|bytes messages, int flags)
+ int binary_message(int *|bytes message, int flags)
-BESCHREIBUNG
- Liest den Output aus und sendet diesen direkt mit write() OHNE IAC
- QUOTING. Die Nachricht kann Nullen enthalten, wenn sie als
- int * angegeben sind. Die Nachricht wird an this_object() ausgegeben,
- aber nur, wenn dieses interaktiv ist.
+DESCRIPTION
+ Flush output and send output directly with write WITHOUT IAC QUOTING.
+ The message may contain zeroes if given as int *.
+ The messages goes to this_object(), but only if interactive.
+ return value: number of characters actually written.
+ Any 'allowed charset' setting is ignored.
- Der Rueckgabewert ist die Anzahl tatsaechlich gedruckter Zeichen. Eine
- allfaellige "allowed charset" Einstellung wird uebergangen.
+ Flag settings are interpreted bitwise and may be ored
+ together (only for clients not using MCCP compression):
- <flags> werden bitweise interpretiert und koennen ueber das binaere
- Oder verbunden werden.
+ Bit 0 (value 1): when set, add_message() is used instead of
+ write(). Thus no previous flushing of the buffer is
+ needed, but the output is not immediate, nor can the
+ number of bytes actually sent be determined - the return
+ value is undefined.
+ Bit 1 (value 2): The buffer is flushed _after_ adding the
+ message. Useful only in conjunction with Bit 0.
- Bit 0 (Wert 1): wenn gesetzt, wird add_message() anstelle von
- write() verwendet. So muss der Output nicht zuerst ausgelesen
- werden, allerdings erfolgt die Ausgabe nicht sofort. Auch kann
- dann die Anzahl effektiv uebertragener Zeichen nicht bestimmt
- werden - der Rueckgabewert ist nicht definiert.
+ The idea behind the flag settings is that sending command
+ codes for colours and other things needs to bypass the allowed
+ charset filters, but isn't important enough to waste bandwith
+ on a synchronous transmission.
- Bit 1 (Wert 2): Der Puffer wird ausgelesen, _nachdem_ die Nachricht
- angefuegt wurde. Macht nur in Verbindung mit Bit 0 Sinn.
+HISTORY
+ Introduced in 3.2.1@40.
+ Argument 'flags' introduced in 3.2.1@60.
- Die Idee hinter den Flags ist, dass das Senden von Kommandocodes
- zum Beispiel fuer Farben an den vorhandenen Filtern fuer erlaubte
- Zeichen vorbeigeschleust werden muss, jedoch nicht wichtig genug
- ist, um die Verschwendung von Bandbreite mittels einer
- synchronen Uebertragung zu rechtfertigen.
-
-GESCHICHTE
- Eingefuehrt in 3.2.1@40.
-
-SIEHE AUCH
+SEE ALSO
set_connection_charset(E)
diff --git a/doc/efun/bind_lambda b/doc/efun/bind_lambda
index 96e70af..cc06783 100644
--- a/doc/efun/bind_lambda
+++ b/doc/efun/bind_lambda
@@ -1,18 +1,16 @@
SYNOPSIS
- closure bind_lambda(closure cl, object|lwobject ob)
+ closure bind_lambda(closure, object|lwobject ob)
-BESCHREIBUNG
- Bindet eine ungebundene Lambda-Closure (die von unbound_lambda()
- erzeugt wurde) an ein Objekt <ob> und gibt die Closure zurueck. Die
- Funktion kann auch dazu genutzt werden, eine Efun-, Simul-Efun- oder
- Operator-Closure an ein anderes Objekt zu binden.
+DESCRIPTION
+ Binds an unbound lambda closure to an object and return it.
+ The efun can also be used to rebind an efun-, simul-efun
+ or operator closure to a different object.
- Wenn das optionale Argument <ob> nicht mit this_object()
- uebereinstimmt, wird eine Schutzverletzung ("bind_lambda",
- this_object(), ob) verursacht.
+ If the optional argument ob is not this_object(), the privilege
+ violation ("bind_lambda", this_object(), ob) occurs.
-GESCHICHTE
- Eingefuehrt in 3.2.1@82.
+HISTORY
+ Introduced in 3.2@82.
-SIEHE AUCH
+SEE ALSO
lambda(E), unbound_lambda(E), apply(E), funcall(E), closures(LPC)
diff --git a/doc/efun/blueprint b/doc/efun/blueprint
index 78c4f0a..0017942 100644
--- a/doc/efun/blueprint
+++ b/doc/efun/blueprint
@@ -1,23 +1,26 @@
-VORLAEUFIG
+PRELIMINARY
SYNOPSIS
object blueprint()
object blueprint(string|object|lwobject ob)
-BESCHREIBUNG
- Die Efun liefert den Blueprint fuer das angegeben Objekt <ob> oder
- fuer this_object(), wenn nicht angegeben.
+DESCRIPTION
+ The efuns returns the blueprint for the given object <ob>, or for
+ the current object if <ob> is not specified.
- Wenn der Blueprint zerstoert wurde, liefert die Funktion 0. Fuer
- Objekte mit replace_program() liefert die Funktion den Blueprint des
- ersetzenden Programs.
+ If the blueprint is destructed, or its program replaced, the efun
+ returns 0.
-BEISPIELE
- blueprint("/obj/ding"); -> liefert /obj/ding
- blueprint(find_object("/obj/ding")); -> liefert /obj/ding
- blueprint(clone_object("/obj/ding")); -> liefert /obj/ding
+ For objects with replaced programs, the efun returns the blueprint
+ for the replacement program.
+ In COMPAT mode the returned blueprint does not start with a "/".
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
+EXAMPLES
+ blueprint("/std/thing")) -> /std/thing
+ blueprint(find_object("/std/thing")) -> /std/thing
+ blueprint(clone_object("/std/thing")) -> /std/thing
-SIEHE AUCH
+HISTORY
+ Introduced in LDMud 3.2.9.
+
+SEE ALSO
clones(E), clone_object(E)
diff --git a/doc/efun/break_point b/doc/efun/break_point
index 6566923..584453e 100644
--- a/doc/efun/break_point
+++ b/doc/efun/break_point
@@ -1,11 +1,11 @@
-OPTIONAL, GESCHUETZT
+OPTIONAL
SYNOPSIS
void break_point()
-BESCHREIBUNG
- Diese Funktion ist fuer interne Benutzung und sollte niemals von einem
- Userobjekt aufgerufen werden. Die Funktion prueft die Integritaet des
- Stacks und faehrt den Driver herunter, falls sie Schaeden feststellt.
+DESCRIPTION
+ This function is for system internal use and should never be called by
+ user objects. It is supposed to check the stack integrity and aborts
+ the driver when it detects corruption.
-SIEHE AUCH
+SEE ALSO
shutdown(E), swap(E)
diff --git a/doc/efun/bytesp b/doc/efun/bytesp
index 89e1a2a..a6b9524 100644
--- a/doc/efun/bytesp
+++ b/doc/efun/bytesp
@@ -8,5 +8,6 @@
Introducted in LDMud 3.6.0.
SEE ALSO
- clonep(E), closurep(E), floatp(E), mappingp(E), objectp(E), intp(E),
- referencep(E), pointerp(E), stringp(E), structp(E), symbolp(E)
+ clonep(E), closurep(E), coroutinep(E), floatp(E), intp(E),
+ lpctypep(E), lwobjectp(E), mappingp(E), objectp(E), pointerp(E),
+ referencep(E), stringp(E), structp(E), symbolp(E)
diff --git a/doc/efun/call_coroutine b/doc/efun/call_coroutine
new file mode 100644
index 0000000..80f4197
--- /dev/null
+++ b/doc/efun/call_coroutine
@@ -0,0 +1,23 @@
+SYNOPSIS
+ mixed call_coroutine(coroutine cr, mixed value = 0)
+
+DESCRIPTION
+ Continues execution of the coroutine.
+
+ The value will be passed as the result of its last suspension
+ point (the previous yield() call of its execution). If the
+ coroutine is at its start, the value will be discarded.
+
+ The coroutine may pass execution to other coroutines through
+ await() and yield() calls. A yield() call without a coroutine,
+ a return statement or simply the end of the statement block
+ will return to the caller.
+
+ The result of the call will be the value given to the yield()
+ or return statement.
+
+HISTORY
+ Coroutines were introduced in LDMud 3.6.5.
+
+SEE ALSO
+ coroutines(LPC), this_coroutine(E)
diff --git a/doc/efun/call_direct b/doc/efun/call_direct
index 94ab028..493b16d 100644
--- a/doc/efun/call_direct
+++ b/doc/efun/call_direct
@@ -1,26 +1,22 @@
SYNOPSIS
- unknown call_direct (object ob, string fun, mixed arg, ...)
- unknown call_direct (object *ob, string fun, mixed arg, ...)
+ unknown call_direct(object ob, string fun, mixed arg, ...)
+ unknown call_direct(object *ob, string fun, mixed arg, ...)
DESCRIPTION
- Call a member function <fun> in another object <ob> with an
- the argument(s) <arg...>. Result is the value returned from
+ Call a member function <fun> in another object <ob> with
+ argument(s) <arg...>. Result is the value returned from
the called function (or 0 for non-existing or void functions).
This efun is a twin to call_other(), with the difference
being that call_direct() never calls a default method.
- Optionally the driver can be configured to accept an array of
- objects as <ob>: the function is called with the same
- arguments in all the given objects. The single results are
- collected in an array and yield the final result. Array
- elements can be objects or the names of existing objects;
- destructed objects and 0s will yield a '0' as result, but
+ Additionally the efun accepts an array of objects as <ob>: the
+ function is called with the same arguments in all the given objects.
+ The single results are collected in an array and yield the final
+ result. Array elements can be objects or the names of existing
+ objects; destructed objects and 0s will yield a '0' as result, but
don't cause an error.
- If the array-calling mode is available, the macro
- __LPC_ARRAY_CALLS__ is defined.
-
The object(s) can be given directly or via a string (i.e. its
object_name). If it is given by a string and the object does not
exist yet, it will be loaded.
@@ -47,6 +43,7 @@
'unknown', and the result of call_other() must be casted to
the appropriate type before you can use it for anything.
+
EXAMPLES
// All the following statements call the lfun QueryProp()
// in the current player with the argument P_SHORT.
@@ -61,7 +58,7 @@
// This statement calls the lfun short() in all interactive users
// and stores the collected results in a variable.
- string * s;
+ string *s;
s = (string *)call_direct(users(), "short");
@@ -69,7 +66,9 @@
HISTORY
Introduced in LDMud 3.3.113 with the H_DEFAULT_METHOD hook.
LDMud 3.2.10 made the call on arrays of objects configurable.
+ LDMud 3.5.0 made the call on arrays of objects non-optional.
SEE ALSO
- call_other(E), call_direct_resolved(E), create(A), pragma(LPC),
- extern_call(E), function_exists(E), functions(LPC)
+ call_other(E), call_strict(E), call_direct_strict(E),
+ call_resolved(E), call_direct_resolved(E), create(A), pragma(LPC),
+ extern_call(E), function_exists(E), functions(LPC), map_objects(E)
diff --git a/doc/efun/call_direct_resolved b/doc/efun/call_direct_resolved
index e227934..c0f9120 100644
--- a/doc/efun/call_direct_resolved
+++ b/doc/efun/call_direct_resolved
@@ -1,5 +1,6 @@
SYNOPSIS
int call_direct_resolved(mixed result, object ob, string func, ...)
+ int* call_direct_resolved(mixed* result, object* ob, string func, ...)
DESCRIPTION
Similar to call_direct(). If ob->func() is defined and publicly
@@ -17,9 +18,20 @@
ob can also be an object_name. If a string is passed for ob, and
no object with that name does exist, an error occurs.
+ Additionally the efun accepts an array of objects as <ob>: the
+ function is called with the same arguments in all the given objects.
+ The single results are collected in two arrays, one for the result
+ of the function calls that will be stored in the result parameter,
+ and one for the efun result codes that will finally be returned from
+ the efun. Array elements can be objects or the names of existing
+ objects; destructed objects and 0s will yield a '0' as result in
+ both arrays, but don't cause an error.
+
HISTORY
Introduced in LDMud 3.3.113 with the H_DEFAULT_METHOD hook.
+ LDMud 3.6.2 added array calls.
SEE ALSO
- call_direct(E), call_resolved(E), function_exists(E),
- find_object(E)
+ call_other(E), call_strict(E), call_resolved(E), call_direct(E),
+ call_direct_strict(E), create(A), pragma(LPC), extern_call(E),
+ function_exists(E), functions(LPC), map_objects(E)
diff --git a/doc/efun/call_direct_strict b/doc/efun/call_direct_strict
new file mode 100644
index 0000000..f9f319c
--- /dev/null
+++ b/doc/efun/call_direct_strict
@@ -0,0 +1,34 @@
+SYNOPSIS
+ unknown call_direct_strict(object|string ob, string func, ...)
+ unknown call_direct_strict(object*|string* ob, string func, ...)
+
+DESCRIPTION
+ Similar to call_other(). Call a member function <fun> in another
+ object <ob> if the function is defined and publicly accessible.
+ Any of the optional extra arguments are passed to the function.
+ Result is the value returned from the called function.
+
+ This efun is a twin to call_strict(), with the difference
+ being that call_direct_strict() never calls a default method.
+
+ Thus if ob::fun does not define a publicly accessible function,
+ the efun will raise a runtime error.
+
+ ob can also be an object_name. If a string is passed for ob
+ and an object with that name can't be found or loaded, an
+ error occurs.
+
+ Additionally the efun accepts an array of objects as <ob>: the
+ function is called with the same arguments in all the given objects.
+ The single results are collected in an array and yield the final
+ result. Array elements can be objects or the names of existing
+ objects. If a call to any of the objects failes, the efun will
+ raise a runtime error.
+
+HISTORY
+ Introduced in LDMud 3.6.2.
+
+SEE ALSO
+ call_other(E), call_resolved(E), call_direct(E), call_strict(E),
+ call_direct_resolved(E), create(A), pragma(LPC), extern_call(E),
+ function_exists(E), functions(LPC), map_objects(E)
diff --git a/doc/efun/call_other b/doc/efun/call_other
index ee6ebdd..4cfaddd 100644
--- a/doc/efun/call_other
+++ b/doc/efun/call_other
@@ -2,93 +2,95 @@
unknown call_other(object ob, string fun, mixed arg, ...)
unknown call_other(object *ob, string fun, mixed arg, ...)
- ob->fun(mixed arg, ...)
- ob->"fun"(mixed arg, ...)
- ob->(fun)(mixed arg, ...)
+ ob->fun (mixed arg, ...)
+ ob->"fun" (mixed arg, ...)
+ ob->(fun) (mixed arg, ...)
-BESCHREIBUNG
- Ruft die in einem anderen Objekt <ob> die Funktion <fun> mit den
- Argumenten <arg...> auf und gibt den Wert zurueck, der von der
- Funktion <fun> geliefert wird (oder 0 fuer nicht existierende oder
- als void deklarierte Funktionen).
+DESCRIPTION
+ Call a member function <fun> in another object <ob> with an
+ the argument(s) <arg...>. Result is the value returned from
+ the called function (or 0 for non-existing or void functions).
- Weiterhin wird auch ein Array von Objekten *<ob> akzeptiert. Die
- Funktion <fun> wird dann fuer jedes Objekt <ob> im Array mit den
- Argumenten <arg...> aufgerufen.
- Die einzelnen Resultate werden in einem Array zusammen gefasst und
- dieses Array dann als Endresultat von call_other() zurueck gegeben.
- Die Elemente von *<ob> koennen Objekte oder Namen von Objekten sein.
- Zerstoerte Objekte und 0 als Element geben eine 0 zurueck, fuehren
- aber nicht zu einem Fehler.
+ Additionally the efun accepts an array of objects as <ob>: the
+ function is called with the same arguments in all the given objects.
+ The single results are collected in an array and yield the final
+ result. Array elements can be objects or the names of existing
+ objects; destructed objects and 0s will yield a '0' as result, but
+ don't cause an error.
- Das Objekt (bzw. die Objekte) kann direkt oder ueber einen String
- (d.h. den Objektnamen) angegeben werden. Wenn ein String angegeben
- wird und das Objekt noch nicht existiert, wird es geladen.
+ The object(s) can be given directly or via a string (i.e. its
+ object_name). If it is given by a string and the object does not
+ exist yet, it will be loaded.
- ob->fun(args) und "ob_name"->fun(args) sind aequivalent zu
- call_other(ob, "fun", args). Heutzutage kann "ob_name" auch eine
- Variable sein. ob->(fun)(args) ist aequivalent zu
- call_other(ob, fun, args), wobei <fun> ein Runtime Ausdruck ist,
- der den Funktionsnamen liefert.
+ ob->fun(args) and "ob_name"->fun(args) is equivalent to
+ call_other(ob, "fun", args). Nowadays the ob_name string can
+ also be a variable.
- Wenn das Objekt <ob> keine oeffentliche Funktion mit dem Namen <fun>
- enthaelt, gibt call_other() den Wert 0 zurueck. Dies ist nicht
- unterscheidbar von einer Funktion <fun>, die 0 zurueck liefert.
- Oeffentlich bedeutet "public", wenn andere Objekte aufgerufen
- werden und "public" oder "static", wenn der Aufruf an this_object()
- ergeht. Funktionen, die "private" oder "protected" definiert sind,
- koennen niemals von call_other() aufgerufen werden.
+ ob->fun(args) and ob->"fun"(args) are equivalent to
+ call_other(ob, "fun", args). ob->(fun)(args) are equivalent
+ to call_other(ob, fun, args) where fun is a runtime expression
+ returning the function name.
- Der Rueckgabewert von call_other() ist standardmaessig 'any'. Falls
- aber #pragma strict_types gesetzt ist, ist der Rueckgabewert
- 'unknown', und das Resultat des call_other() muss zuerst auf einen
- zutreffenden Variablentyp gecastet werden, bevor man es fuer etwas
- verwenden kann.
+ If ob::fun does not define a publicly accessible function, the
+ efun will call the H_DEFAULT_METHOD hook if set. If the hook
+ is not set or can't resolve the call either, call_other()
+ will return 0, which is indistinguishable from a function returning 0.
-BEISPIELE
- Die nachfolgenden Beispiele rufen alle die Funktion "QueryProp" auf
- mit dem Argument P_SHORT.
+ Calls to the master object never use the H_DEFAULT_METHOD hook.
+ To force non-default calls, the efun call_direct() can be used.
- string str, fun;
- str = (string)call_other(this_player(), "QueryProp", P_SHORT);
- fun = "QueryProp";
- str = (string)call_other(this_player(), fun, P_SHORT);
+ "publicly accessible" means "public" when calling other objects,
+ and "public" or "static" when calling this_object(). "private"
+ and "protected" function can never be called with call_other().
- str = (string)this_player()->QueryProp(P_SHORT);
- str = (string)this_player()->"QueryProp"(P_SHORT);
- fun = "QueryProp";
- str = (string)this_player()->(fun)(P_SHORT);
+ The return type of call_other() is 'any' by default. However,
+ if your LPC code uses #pragma strict_types, the return type is
+ 'unknown', and the result of call_other() must be casted to
+ the appropriate type before you can use it for anything.
- Solange #pragma strict_types gesetzt ist, muss man das Resultat von
- call_other() explizit auf einen passenden Typ casten, weil
- call_other() unknown liefert.
+EXAMPLES
+ // All the following statements call the lfun QueryProp()
+ // in the current player with the argument P_SHORT.
+ string str, fun;
- Das folgende Statement ruft die lfun short() in allen aktiven
- Benutzern auf und speichert das gesammelte Resultat in einer
- Variablen:
+ str = (string)call_other(this_player(), "QueryProp", P_SHORT);
+ fun = "QueryProp";
+ str = (string)call_other(this_player(), fun, P_SHORT);
- string *s;
- s = (string *)users()->short();
- !Compat: call_other("/users/luser/thing", "???", 0);
- Compat: call_other("users/luser/thing", "???", 0);
+ str = (string)this_player()->QueryProp(P_SHORT);
+ str = (string)this_player()->"QueryProp"(P_SHORT);
+ fun = "QueryProp";
+ str = (string)this_player()->(fun)(P_SHORT);
- Das sieht etwas merkwuerdig aus, wurde aber oft verwendet, um einfach
- ein Objekt zu laden. Dazu wurde die (nicht existierende) Funktion
- "???" im Objekt aufgerufen. Gluecklicherweise gibt es heute zu
- diesem Zweck die Efun load_object().
+ You have to do explicit type casting because of the unknown
+ return type, if you have set #pragma strict_types.
-GESCHICHTE
- In LDMud 3.2.8 wurden die folgenden Verbesserungen eingefuehrt:
- - die Formen x->"y"() und x->(y)() werden erkannt;
- - die Form x->y() kollidiert nicht mehr mit einer lokalen Variablen,
- die auch "y" heisst.
- - eine simul_efun call_other() erwischt auch Aufrufe der Form ->().
- - call_other kann auch auf Arrays von Objekten angewandt werden.
- LDMud 3.2.10 machte den Aufruf von Objektarrays konfigurierbar.
- LDMud 3.3.113 fuehrte den Hook H_DEFAULT_METHOD ein.
- LDMud 3.5.0 machte den Aufruf von Objektarrays nicht mehr optional.
+ // This statement calls the lfun short() in all interactive users
+ // and stores the collected results in a variable.
+ string *s;
-SIEHE AUCH
- call_direct(E), call_direct_resolved(E), call_resolved(E), create(A),
- pragma(LPC), extern_call(E), function_exists(E), functions(LPC),
- map_objects(E)
+ s = (string *)users()->short();
+
+ !Compat: call_other("/users/luser/thing", "???", 0);
+ Compat: call_other("users/luser/thing", "???", 0);
+
+ This looks a bit weird but it was used very often to just load
+ the object by calling a not existing function like "???".
+ Fortunately nowadays there is an efun load_object() for this
+ purpose.
+
+HISTORY
+ In LDMud 3.2.8 the following improvements were made:
+ - the forms x->"y"() and x->(y)() are recognized;
+ - the form x->y() no longer clashes with a local variable also
+ called "y";
+ - a simul_efun call_other() also catches ->() calls.
+ - call_other can be applied on arrays of objects.
+ LDMud 3.2.10 made the call on arrays of objects configurable.
+ LDMud 3.3.113 introduced the H_DEFAULT_METHOD hook.
+ LDMud 3.5.0 made the call on arrays of objects non-optional.
+
+SEE ALSO
+ call_direct(E), call_strict(E), call_direct_strict(E),
+ call_resolved(E), call_direct_resolved(E), create(A), pragma(LPC),
+ extern_call(E), function_exists(E), functions(LPC), map_objects(E)
diff --git a/doc/efun/call_out b/doc/efun/call_out
index 0293b3e..f3293c0 100644
--- a/doc/efun/call_out
+++ b/doc/efun/call_out
@@ -2,48 +2,52 @@
void call_out(string fun, int delay, mixed arg, ...)
void call_out(closure cl, int delay, mixed arg, ...)
-BESCHREIBUNG
- Ruft zeitverzoegert die Funktion <fun> im aktuellen Objekt oder
- die Closure <cl> auf. Der Aufruf erfolgt in <delay> Sekunden.
- Die Funktion / Closure wird mit den <arg> Argumenten aufgerufen.
- Die minimale Verzoegerung ist 0 (negative <delay> werden implizit als
- 0 behandelt). Allerdings ist die reale Verzoegerung etwas zwischen
- <delay> und __ALARM_TIME__.
+DESCRIPTION
+ Set up a call to function fun in the current object, or to
+ closure cl. The call will take place after <delay> seconds, with the
+ remaining argument list provided.
+ <delay> can be a minimum time of 0 (negative values are implicitly
+ treated as 0), but the real delay will be something between <delay>
+ and <delay> + __ALARM_TIME__.
- call_out() merkt sich den aktuellen User und ruft die Funktion
- entsprechend auf. call_out() kann nur Funktionen aufrufen, die
- oeffentlich zugaenglich sind, das heisst "public" und "static"
- deklarierte Funtionen. "private" und "protected" deklarierte
- Funktionen koennen nicht aufgerufen werden.
+ call_out() saves and restores the current user. It is now
+ possible to use say() or write() which rely on a current
+ user to be something useful.
- Die Ausfuehrung von call_out()s erfordert einen einfachen (nicht
- zu aufwendigen) Schutz gegen Rabbits: die Evalkosten aller
- gleichzeitig anstehenden call_out()s werden auf einer pro-UID-Basis
- summiert. Uebersteigt die Summe ein vorgegebenes Maximum, wird
- ein Fehler 'too long evaluation' erzeugt, und es werden alle
- call_out()s des betreffenden Benutzers, die zur gleichen Zeit
- faellig werden, entfernt.
+ call_out() can only call functions by name <fun> which are publicly
+ accessible, i.e. "public" and "static" functions. "private" and
+ "protected" functions can't be called.
- Wenn zwei call_out()s zum gleichen Zeitpunkt ausgefuehrt werden
- sollen, wird der zuerst gestartete zuerst ausgefuehrt.
+ If <fun> does not define a publicly accessible function, the
+ efun will call the H_DEFAULT_METHOD hook if set.
+ Calls to the master object never use the H_DEFAULT_METHOD hook.
-BEISPIELE
+ The execution of the call_out()s implies a simple (not
+ exhaustive) measure against rabbits: the evaluation costs of
+ those call_outs() executing at the same time are summed up on
+ a per-UID base. If the summed-up costs exceed the given maximum,
+ a 'too long evaluation' error will occur and any remaining
+ call_outs() of this user scheduled for the same time are
+ discarded.
+
+ If two call_out()s were started with the same target time
+ the one that was issued first will be executed first.
+
+EXAMPLES
call_out("RefreshMe", 10);
- Dies ruft die Funktion RefreshMe() nach Ablauf von 10 Sekunden ohne
- irgendwelche Argumente auf. Die Funktion RefresMe() kann dann
- wiederum selbst call_out()s starten, auch auf sich selbst, was
- eine Schleife erzeugt (keine Rekursion). Mit einer solchen Schleife
- koennen Anweisungen in einem Objekt in regelmaessigen Zeitintervallen
- ausgefuehrt werden. Es ist allerdings zu beachten, dass call_out()s
- in einer linearen Liste gespeichert werden, und deshalb ziemlich
- rechenaufwendig fuer den Treiber sind.
+ This will call the function RefreshMe() in 10 seconds without
+ any arguments. The function RefreshMe() can then call out
+ itself again which will result in a loop (not in a recursion)
+ which can be used to check or set up things in the object in
+ intervals. Be aware that callouts are stored in a linear
+ list, and so are somewhat expensive for the driver.
- Und JA: selbst-replizierende call_out()s, bei denen jeder call_out()
- selbst zwei oder mehr call_out()s in einem Loop erzeugt (sogenannte
- Rabbits) verlangsamen das Mud ungemein und koennen es sogar zum
- Crash bringen. Kein Grund, es selbst auszuprobieren.
+ And YES: self-replicating call_out()s, where each call_out()
+ creates two or more other call_out()s in a loop (so called
+ 'rabbits') slow the mud down very fast, and are even able
+ to crash it. No need to try it yourself.
-SIEHE AUCH
+SEE ALSO
remove_call_out(E), call_out_info(E), find_call_out(E),
this_player(E), reset(A), heart_beat(A)
diff --git a/doc/efun/call_out_info b/doc/efun/call_out_info
index df357bc..8038bdd 100644
--- a/doc/efun/call_out_info
+++ b/doc/efun/call_out_info
@@ -1,19 +1,18 @@
SYNOPSIS
- mixed * call_out_info()
+ mixed * call_out_info(void)
-BESCHREIBUNG
- Liefert Informationen ueber alle laufenden call_out()s. Das Resultat
- ist ein Array, bei dem jedes Element wiederum aus einem Array besteht,
- das einen call_out() beschreibt. Jedes dieser Unter-Arrays enthaelt 3
- oder mehr Elemente:
+DESCRIPTION
+ Get information about all pending call outs. The result is an
+ array in which every entry is itself an array describing one
+ call_out. Each of these arrays consists of 3 or more elements:
- 1. Das Objekt, in dem die Funktion oder die Closure aufgerufen wird.
- 2. Die Funktion oder Closure.
- 3. Der verbleibende Delay bis zum Aufruf.
- 4ff. Die (optionalen) Argumente.
+ 1. The object the function/closure is called in.
+ 2. The function or closure.
+ 3. The delay to go
+ 4ff. The optional argument(s)
- call_out()s fuer zerstoerte Objekte werden nicht in der Liste
- aufgefuehrt.
+ Callouts for destructed objects will not be contained in the
+ list.
-SIEHE AUCH
+SEE ALSO
call_out(E), remove_call_out(E), find_call_out(E)
diff --git a/doc/efun/call_resolved b/doc/efun/call_resolved
index 2b101df..68fe6bc 100644
--- a/doc/efun/call_resolved
+++ b/doc/efun/call_resolved
@@ -1,33 +1,41 @@
SYNOPSIS
- int call_resolved(mixed result, object ob, string func, mixed arg,...)
- int* call_resolved(mixed* result, object* ob, string func, mixed arg,...)
+ int call_resolved(mixed result, object ob, string func, ...)
+ int* call_resolved(mixed* result, object* ob, string func, ...)
-BESCHREIBUNG
- Die Funktion ist aehnlich zu call_other(). Wenn obj->func() definiert
- und oeffentlich ist, werden alle Argumente <arg> an obj->func()
- uebergeben. Das Resultat dieses Funktionsaufrufes wird in <result>
- gespeichert und muss deshalb als Referenz uebergeben werden.
+DESCRIPTION
+ Similar to call_other(). If ob->func() is defined and publicly
+ accessible, any of the optional extra arguments are passed to
+ ob->func(...). The result of that function call is stored in
+ result, which must be passed by reference.
- Wenn <ob> zerstoert wurde oder keine oeffentlich zugaengliche Funktion
- <func> definiert, liefert call_resolved() 0 fuer Fehler, 1 bei Erfolg.
+ The efun returns 1 if the function could be called.
+ If ob::fun does not define a publicly accessible function, the
+ efun will call the H_DEFAULT_METHOD hook if set. If the hook
+ is not set or can't resolve the call either, the efun will return 0.
+ If the hook is set and can resolve the call, the efun will return -1.
- <ob> kann auch ein object_name() sein. Wenn <ob> ein String ist und
- das Objekt mit diesem Namen nicht gefunden oder geladen werden kann,
- tritt ein Fehler auf.
+ Calls to the master object never use the H_DEFAULT_METHOD hook.
+ To force non-default calls, the efun call_direct_resolved() can
+ be used.
- Ausserdem akzeptiert diese Efun auch Arrays von Objekten in <ob>:
- The Funktion wird dann mit den gleichen Argumenten in allen angegebenen
- Objekten aufgerufen. Die Ergebnisse des Funktionsaufrufes werden
- in einem Array gespeichert, das an <result> zugewiesen wird, und die
- Status-Codes werden in einem zweiten Array gesammelt, welches von der
- Efun zurueckgeliefert wird. In dem Array koennen Objekte oder Namen
- der Objekte angegebenen werden. Zerstoerte Objekte oder Nullen werden
- als 0 in beiden Arrays eingetragen, verursachen jedoch keinen Fehler.
+ ob can also be an object_name. If a string is passed for ob
+ and an object with that name can't be found or loaded, an
+ error occurs.
-GESCHICHTE
- LDMud 3.6.2 fuegte die Aufrufe von Arrays hinzu.
+ Additionally the efun accepts an array of objects as <ob>: the
+ function is called with the same arguments in all the given objects.
+ The single results are collected in two arrays, one for the result
+ of the function calls that will be stored in the result parameter,
+ and one for the efun result codes that will finally be returned from
+ the efun. Array elements can be objects or the names of existing
+ objects; destructed objects and 0s will yield a '0' as result in
+ both arrays, but don't cause an error.
-SIEHE AUCH
+HISTORY
+ LDMud 3.3.113 introduced the H_DEFAULT_METHOD hook.
+ LDMud 3.6.2 added array calls.
+
+SEE ALSO
call_other(E), call_strict(E), call_direct(E), call_direct_strict(E),
call_direct_resolved(E), create(A), pragma(LPC), extern_call(E),
function_exists(E), functions(LPC), map_objects(E)
diff --git a/doc/efun/call_strict b/doc/efun/call_strict
index fbf6bd3..dddfbf7 100644
--- a/doc/efun/call_strict
+++ b/doc/efun/call_strict
@@ -3,8 +3,8 @@
unknown call_strict(object*|string* ob, string func, ...)
ob.fun(...)
- ob->"fun"(...)
- ob->(fun)(...)
+ ob."fun"(...)
+ ob.(fun)(...)
DESCRIPTION
Similar to call_other(). Call a member function <fun> in another
diff --git a/doc/efun/caller_stack b/doc/efun/caller_stack
index a08c8d1..7d6e286 100644
--- a/doc/efun/caller_stack
+++ b/doc/efun/caller_stack
@@ -2,32 +2,31 @@
<object|lwobject>* caller_stack()
<object|lwobject>* caller_stack(int add_interactive)
-BESCHREIBUNG
- Liefert ein Array der previous_object(), die einen call_other() auf
- this_object() verursacht haben. Dabei entspricht previous_object(i)
- caller_stack()[i].
+DESCRIPTION
+ Returns an array of the previous_object()s who caused the
+ call_other() to this_object().
+ previous_object(i) equals caller_stack()[i].
- Wenn die Funktion mit <add_interactive> (als wahr) aufgerufen wird,
- wird this_interactive() dem Array hinzugefuegt, oder 0, wenn kein
- this_interactive() existiert.
+ If you pass the optional argument <add_interactive> (as true value)
+ this_interactive() is appended to the array, or 0 if there is no
+ current interactive.
-BEISPIELE
- Das interaktive Objekt A gibt ein Kommando ein, das im Objekt B eine
- Funktion aufruft, die auf das Objekt C verweist, welches wiederum
- eine Funktion im Objekt D aufruft.
+ Note: calls to 'alien lfun closures' (see symbol_function(E))
+ generate two entries on the stack if the bound object differs
+ from the closure object: the first is for the bound object,
+ the second for the closure object.
- Wenn D nun caller_stack() aufruft, ergibt dies: ({C,B}).
- Fuer caller_stack(1) ergibt die Funktion: ({C,B,A}).
+EXAMPLES
+ interactive object A enters a command which causes
+ a call to a function in object B, that one calls a
+ function in object C and that, in turn, in object D
-ANMERKUNGEN
- Aufrufe von "alien lfun closures" (vergleiche symbol_function())
- erzeugen zwei Eintraege im Stack, wenn das gebundene Objekt sich vom
- Objekt der Closure unterscheidet: der erste Eintrag steht fuer das
- gebundene Objekt, der zweite fuer das Closure-Objekt.
+ If D now calls caller_stack() the result would be: ({C,B}).
+ If it calls caller_stack(1) the result is: ({C,B,A}).
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.6, vorgeschlagen von Tubmud.
+HISTORY
+ Introduced in LDMud 3.2.6, suggested by Tubmud.
-SIEHE AUCH
+SEE ALSO
caller_stack_depth(E), previous_object(E), this_interactive(E),
call_other(E)
diff --git a/doc/efun/caller_stack_depth b/doc/efun/caller_stack_depth
index 41b4e79..230827e 100644
--- a/doc/efun/caller_stack_depth
+++ b/doc/efun/caller_stack_depth
@@ -1,9 +1,9 @@
SYNOPSIS
- int caller_stack_depth()
+ int caller_stack_depth(void)
-BESCHREIBUNG
- Liefert die Anzahl previous_object()s im Caller Stack. Dies kann fuer
- Sicherheitschecks genutzt werden.
+DESCRIPTION
+ Returns the number of previous objects on the stack. This
+ can be used for security checks.
-SIEHE AUCH
+SEE ALSO
caller_stack(E), previous_object(E), call_other(E), call_resolved(E)
diff --git a/doc/efun/capitalize b/doc/efun/capitalize
index 5c3b107..bbb82b7 100644
--- a/doc/efun/capitalize
+++ b/doc/efun/capitalize
@@ -1,12 +1,12 @@
SYNOPSIS
string capitalize(string str)
-BESCHREIBUNG
- Konvertiert das erste Zeichen des Strings <str> in einen
- Grossbuchtaben und gibt den neuen String zurueck.
+DESCRIPTION
+ Convert the first character in str to upper case, and return
+ the new string.
-BEISPIELE
- capitalize("hallo welt!") -> "Hallo welt!"
+EXAMPLES
+ capitalize("heya!") -> "Heya!"
-SIEHE AUCH
+SEE ALSO
lower_case(E), upper_case(E)
diff --git a/doc/efun/catch b/doc/efun/catch
index 57c58aa..f9a6056 100644
--- a/doc/efun/catch
+++ b/doc/efun/catch
@@ -1,65 +1,67 @@
SYNOPSIS
mixed catch(expr, expr, ...)
- mixed catch(expr, expr, ...; modifiers)
+ mixed catch(expr, expr, ... ; modifiers)
-BESCHREIBUNG
- Wertet die Ausdruecke <expr> aus. Wenn kein Fehler auftritt, wird 0
- zurueck geliefert. Wenn ein Fehler auftritt, wird die Ausfuehrung an
- diesem Punkt abgebrochen und ein String mit der Fehlermeldung wird
- zurueck gegeben.
+DESCRIPTION
+ Evaluate the expressions. If there is no error, 0 is returned.
+ If there is an error, the evaluation of the expressions stops at
+ that point, and a string with the error message is returned.
- Systemeigene Fehlermeldungen beginnen mit einem "*", benutzerdefinierte
- Fehlermeldungen aus throw() und raise_error() (sofern von 0
- verschieden), werden unveraendert zurueck geliefert.
+ System error messages start with a leading '*', user-defined
+ error values (other than 0) as given to throw() and raise_error() are
+ returned as they are.
- Wenn zum Zeitpunkt, zu dem catch() aufgerufen wird, weniger als
- __CATCH_EVAL_COST__ Rechenticks uebrig sind, wird ein Laufzeitfehler
- RTE innerhalb von catch() erzeugt (und somit wie jeder andere
- Fehler abgefangen) und es werden keine Ausdruecke <expr> aus catch()
- ausgewertet. Der Modifikator 'reserve' kann verwendet werden,
- einen anderen Wert fuer die Reserve anzugeben.
+ If at the time the catch() is encountered less than
+ __CATCH_EVAL_COST__ eval ticks are left, a runtime error will be
+ thrown from inside the catch() (and thus caught like every other
+ error) and the expressions will not be executed. The 'reserve'
+ modifier can be used to reserve a different amount of eval ticks.
- Das Verhalten von catch() kann durch <modifiers> veraendert werden:
+ The default behaviour of catch() can be changed using modifiers:
- 'nolog': Normalerweise wird der Fehler im Fehlerlog
- gespeichert, um die Fehlersuche zu erleichtern. Wird
- 'nolog' gesetzt, wird dieser Log-Eintrag unterdrueckt.
- 'publish': Normalerweise wird master::runtime_error() fuer einen
- Fehler innerhalb eines catch() nicht aufgerufen. Mit
- diesem <modifier> wird runtime_error() trotzdem
- aufgerufen.
- 'reserve <expr>': <expr> muss eine ganzen Zahl groesser 0
- ergeben, welche dann als Rechenreserve anstelle
- von __CATCH_EVAL_COST__ verwendet wird. Das Minimum
- ist 2 * __MASTER_EVAL_COST__ .
+ 'nolog': Normally, the caught error will be logged in the
+ error logs for easier debugging. With this
+ modifier, the log is suppressed.
- catch() an sich ist nicht besonders laufzeit-intensiv: es braucht
- nur etwas mehr Zeit als ein Intra-Objekt-Funktionsaufruf.
-
- throw() ist ebenfalls nicht sehr teuer, da lediglich einige
- interne Strukturen aufgeraeumt werden muessen.
+ 'publish': Normally, master::runtime_error() is not called
+ for a caught error. This modifier instructs
+ catch() to call it nevertheless.
- Echte Laufzeitfehler (ob nun mit oder ohne catch()) sind hingegen
- sehr zeitintensiv.
+ 'reserve <expr>': The expression has to evaluate to a number
+ greater than 0 and is used to determine the amount
+ of eval ticks to reserve, instead of the default
+ of __CATCH_EVAL_COST__. The minimum required
+ are 2 * __MASTER_EVAL_COST__.
+ 'limit <expr>': The expression has to evaluate to a number
+ greater than 0 and is used to limit the eval cost
+ for the evaluation of the expression.
- catch ist nicht im eigentlichen Sinne eine Efun, sondern eine Compiler
- Anweisung.
+ catch() itself is not expensive as far as execution time is
+ concerned: it is about the same as a intra-object function call.
+ throw() is not very expensive either, but does include the
+ internal cleanup of several structures.
-BEISPIELE
+ Real runtime errors on the other hand are expensive regardless
+ of whether they are caught or not, as they include the generation
+ of the stack backtrace.
+
+ catch() is not really an efun but a compiler directive.
+
+EXAMPLES
object obj;
string err;
- if(err = catch(obj = clone_object("/foo/bar/baz")))
- write("Kann das Objekt nicht clonen. Grund: "+err+"\n");
+ if (err = catch(obj = clone_object("/foo/bar/baz")))
+ write("Cannot clone object, reason:"+err"+\n");
-GESCHICHTE
- LDMud 3.2.9 fuehrte den 'nolog' catch() als experimentelles Feature
- ein.
- LDMud 3.2.10 implementierte 'nolog' als offizielle Form und fuehrte
- zudem 'publish' ein.
- LDMud 3.3.559 verlegte den Test auf verbleibende Rechenticks in die
- vom catch() umschlossenen Ausfuehrung.
- LDMud 3.3.560 fuegte den Modifikator 'reserve' ein.
+HISTORY
+ LDMud 3.2.9 introduced the 'nolog' catch() as experimental feature.
+ LDMud 3.2.10 implemented 'nolog' as official form and added
+ 'publish'.
+ LDMud 3.3.559 moved the check regarding __CATCH_EVAL_COST__ inside
+ the catch().
+ LDMud 3.3.560 added the 'reserve' modifier.
+ LDMud 3.6.7 added the 'limit' modifier.
-SIEHE AUCH
+SEE ALSO
throw(E), raise_error(E), predefined(D), runtime_error(M)
diff --git a/doc/efun/ceil b/doc/efun/ceil
index 6989baa..f5893f8 100644
--- a/doc/efun/ceil
+++ b/doc/efun/ceil
@@ -1,19 +1,19 @@
SYNOPSIS
float ceil(int|float arg)
-BESCHREIBUNG
- Rundet <arg> zur naechsten ganzen Zahl auf und liefert das Resultat
- zurueck. Wenn <arg> ein Integer ist, wird das Resultat in float
- konvertiert.
+DESCRIPTION
+ Round the <arg>ument upwards the nearest whole number, returning
+ that value. If the <arg>ument value is an integer, the result will
+ be that value, converted to float.
-BEISPIELE
- ceil(4.5); ergibt: 5.0
- ceil(-4.5); ergibt: -4.0
- ceil(5); ergibt: 5.0
+EXAMPLES
+ ceil(4.5) - returns 5.0
+ ceil(-4.5) - returns -4.0
+ ceil(4) - returns 4.0
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.7.
- LDMud 3.2.9 fuehrte neu Integer als moegliche Argumente ein.
+HISTORY
+ Introduced in LDMud 3.2.7.
+ LDMud 3.2.9 allowed integers as argument values.
-SIEHE AUCH
+SEE ALSO
abs(E), floor(E)
diff --git a/doc/efun/check_type b/doc/efun/check_type
new file mode 100644
index 0000000..01977cd
--- /dev/null
+++ b/doc/efun/check_type
@@ -0,0 +1,16 @@
+SYNOPSIS
+ int check_type(mixed arg, lpctype type)
+
+DESCRIPTION
+ Returns 1 if the first argument <arg> fulfills the type <type>,
+ 0 otherwise.
+
+ This check is similar to runtime type checks. The target type
+ doesn't need to match exactly, but a variable of that type should
+ be able to hold the argument.
+
+HISTORY
+ Introduced in LDMud 3.6.7
+
+SEE ALSO
+ get_type_info(E), lpctypes(LPC)
diff --git a/doc/efun/clear_bit b/doc/efun/clear_bit
index eddd69d..04b80be 100644
--- a/doc/efun/clear_bit
+++ b/doc/efun/clear_bit
@@ -1,35 +1,37 @@
SYNOPSIS
string clear_bit(string str, int n)
-BESCHREIBUNG
- Gibt einen neuen String zurueck, in dem das n-te Bit im String <str>
- nicht gesetzt ist. Dabei wird <str> selbst nicht veraendert.
+DESCRIPTION
+ Return the new string where bit n is cleared in string str.
+ Note that the old string str is not modified.
- Jedes Zeichen enthaelt sechs Bits. So kann in jedem Zeichen eine Zahl
- zwischen 0 und 63 (2^6=64) gespeichert werden. Das erste Zeichen ist
- der Leerschlag " " mit Wert 0. Das erste Zeichen im String ist jenes
- mit den niedrigsten Bits (0 bis 5).
+ Each character contains 6 bits. So you can store a value
+ between 0 and 63 ( 2^6=64) in one character. Starting
+ character is the blank character " " which has the value 0.
+ The first charcter in the string is the one with the lowest
+ bits (0-5).
-BEISPIELE
+EXAMPLES
string s;
- s = clear_bit("_", 5);
+ s=clear_bit("_",5);
- Weil "_" den hoechsten moeglichen Wert enthaelt (63), enthaelt die
- Variable s nun das Zeichen "?", das dem Wert 31 entspricht (63-2^5=31).
+ Because "_" is the highest possible value (63), the variable s
+ will now contain the charcter "?" wich is equal to 31
+ (63-2^5=31).
string s;
- s = clear_bit("?<",3);
- s = clear_bit(s, 8);
+ s=clear_bit("?<",3);
+ s=clear_bit(s,8);
- s enthaelt nun den String "78". "?" entspricht dem Wert 31 und "<" dem
- Wert 28. "?<" entspricht also dem Wert 31+28<<6=31+1792=1823, was in
- Binaerschreibweise (hoechstes Bit rechts) 11111000111 ergibt. Werden
- aus dieser Zahl die Bits 3 und 8 (die Nummerierung beginnt mit dem
- 0. Bit) ergibt dann: 11101000011. Die ersten 6 Bits 010111 sind in
- Dezimalschreibweise 23. Die zweiten 6 Bits (0)11000 ergeben 24 in
- Dezimalschreibweise. Nun entspricht der Wert 23 dem Zeichen "7" und
- der Wert 24 dem Zeichen "8". Der String s enthaelt also "78".
+ s will now contain the string "78". "?" equals 31 and "<"
+ equals 28. Now "?<" is equal to 31+28<<6=31+1792=1823 which is
+ in binary notation (highest bit on the right side)
+ 11111000111. Now clearing the bit 3 and bit 8 (bit numbering
+ starts with zero) will result in 11101000011. The first 6 bits
+ are in decimal notation 23 and the next 6 are equal to 24. Now
+ the 23 is the character "7" and 24 is the "8". So the string s
+ contains "78".
-SIEHE AUCH
+SEE ALSO
set_bit(E), next_bit(E), last_bit(E), test_bit(E), count_bits(E),
and_bits(E), or_bits(E), xor_bits(E), invert_bits(E), copy_bits(E)
diff --git a/doc/efun/clone_object b/doc/efun/clone_object
index 3b6734f..dd48ec2 100644
--- a/doc/efun/clone_object
+++ b/doc/efun/clone_object
@@ -1,48 +1,55 @@
SYNOPSIS
- object clone_object(string name)
- object clone_object(object template)
+ object clone_object(string name, ...)
+ object clone_object(object template, ...)
-BESCHREIBUNG
- Clont ein neues Objekt aus der Definiton <name> oder alternativ aus
- dem Objekt <template>. In beiden Faellen wird dem Clon ein
- individueller Name zugeordnet, dann wird der Clon zurueck gegeben.
+DESCRIPTION
+ Clone a new object from definition <name>, or alternatively from
+ the object <template>. In both cases, the new object is given
+ an unique name and returned.
- Das Original, Blueprint genannt, wird nur fuer das Clonen verwendet
- und sollte deshalb nicht im Spiel genutzt werden. Die geclonten
- Objekte enthalten nur Daten, der Blueprint hingegen auch den
- Funktionscode.
+ The original used for cloning, called blueprint, should not be
+ used in the system, just for cloning. The cloned objects
+ contain only the data but the blueprint also the function code.
+ The blueprint is the one without a unique number at the end of
+ the object's name. The clone_object() function never
+ returns a blue print.
- Den Blueprint erkennt man daran, dass er keine Nummer im Objektnamen
- traegt. clone_object() liefert niemals einen Blueprint zurueck.
+ If the <name> or <template> designates a cloned object itself,
+ the system looks up the blueprint object _by name_.
- Wenn der Blueprint existiert und einen heart_beat() aufweist, schaltet
- clone_object() diesen aus.
+ Any further arguments will be passed to the H_CREATE_CLONE
+ hook to initialize the cloned object.
- Die Pfadangabe muss komplett sein. Relative Pfade sind nicht gestattet.
- Wenn strikte EUIDs gefordert werden, muss das clonende Objekt eine
- EUID != 0 haben.
+ If the blueprint exists and has a heart_beat(), clone_object()
+ turns it off.
+
+ Note that the pathname must be complete, which means there are no
+ relative paths allowed.
+
+ If strict euids are enforced, the cloning object must have
+ a non-zero euid.
- -- Variablen Initialisierung --
+ -- Variable Initialization --
- Allgemein werden die Variablen in Blueprints und Clones gleichermassen
- durch Aufruf der internen lfun __INIT() initialisiert.
+ In general, variables are initialized for blueprints and clones alike
+ with a call to the internal lfun __INIT().
+
+ However, if #pragma share_variables is in effect (either explicitely
+ given in the source or implicitly as runtime option), the values for
+ a clone's uninitialized variables are taken from the _current_
+ variables of the object's blueprint.
- Ist allerdings das #pragma share_variables in Effekt (entweder
- explizit im Objekt angegeben, oder als allgemeine Laufzeitoption),
- werden die Werte fuer die Klonvariable aus den _aktuellen_ Variablen
- der Blueprint kopiert.
-
- Variablen ohne explizite Initialisierung sind hiervon unbetroffen und
- werden stets auf 0 gesetzt.
+ In the absence of share_variables, variables without explicit
+ initializers are initialized to 0.
-BEISPIELE
- // Clone eine Fackel (Name des Files nicht im Compat Format)
- object fackel;
- fackel = clone_object("/obj/fackel");
+EXAMPLES
+ // Clone a torch (filename in non-compat format)
+ object torch;
+ torch = clone_object("/obj/torch");
- // Clone zwei Schluessel (Name des Files im Compat Format)
+ // Clone two keys (filename in compat format)
object key1, key2;
key1 = clone_object(load_object("obj/key"));
key2 = clone_object(key1);
@@ -61,11 +68,11 @@
}
-GESCHICHTE
- Modifiziert in LDMud 3.2.6: es werden auch Objekte als Argument
- akzeptiert.
- LDMud 3.3.378 fuehrte das pragma share_variables ein.
+HISTORY
+ Modified in LDMud 3.2.6 to take an object as argument.
+ LDMud 3.3.378 consolidated the variable initialization with the
+ share_variables pragma.
-SIEHE AUCH
+SEE ALSO
blueprint(E), clonep(E), destruct(E), clones(E), load_name(E),
load_object(E), move_object(E), uids(C), program_name(E), pragma(LPC)
diff --git a/doc/efun/clonep b/doc/efun/clonep
index 6e63cd2..06534d2 100644
--- a/doc/efun/clonep
+++ b/doc/efun/clonep
@@ -4,25 +4,27 @@
int clonep(string obj)
int clonep(mixed arg)
-BESCHREIBUNG
- Liefert 1, wenn das angegebene Objekt ein Klon ist, ansonsten 0.
- Das Objekt kann dabei auch durch seinen Objekt-Namen angegeben werden.
- Wird kein Argument uebergeben, so wird this_object() getestet.
- Liefert 0, wenn das Argument von einem anderen Typ ist.
- Ein Objekt, dessen Programm mittels replace_program() ersetzt wurde,
- zaehlt nicht als Klon.
+DESCRIPTION
+ The efun returns 1 if <obj> is a clone, and 0 if it is not.
+ The <obj> can be given as the object itself, or by its name.
+ If <obj> is omitted, the current object is tested.
+ Arguments of other types return 0.
+ Objects with replaced programs no longer count as clones.
-BEISPIELE
+EXAMPLES
object o;
- o = clone_object("/obj/ding");
- write(clonep(o)); --> schreibt "1"
- write(clonep("/obj/ding")) --> schreibt "0"
+ o = clone_object("/std/thing");
+ write(clonep(o)); --> writes "1"
+ write(clonep("/std/thing")) --> writes "0"
- (Im COMPAT_MODE "obj/ding" als Dateinahmen benutzen)
+ (In COMPAT_MODE use "std/thing" as the filename)
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.6, geaendert in 3.2.7, so dass Objekte mit
- ersetzten Programmen nicht mehr als Klone zaehlen.
+HISTORY
+ Introduced in LDMud 3.2.6, changed in 3.2.7 so that objects
+ with replaced programs no longer count as clones.
-SIEHE AUCH
- load_name(E), clone_object(E), clones(E)
+SEE ALSO
+ load_name(E), clone_object(E), clones(E), bytesp(E),
+ closurep(E), coroutinep(E), floatp(E), intp(E), lpctypep(E),
+ lwobjectp(E), mappingp(E), objectp(E), pointerp(E), referencep(E),
+ stringp(E), structp(E), symbolp(E)
diff --git a/doc/efun/clones b/doc/efun/clones
index f302287..c402c0b 100644
--- a/doc/efun/clones
+++ b/doc/efun/clones
@@ -3,36 +3,40 @@
object * clones(int what)
object * clones(string|object obj [, int what])
-BESCHREIBUNG
- Diese Efun liefert ein Array mit allen Clones eines bestimmten
- Blueprints. Dabei unterliegt das Array den normalen Systemlimiten.
+DESCRIPTION
+ The efuns returns an array with all clones of a certain blueprint.
+ The array is subject to the usual runtime limits.
- Wenn <obj> angegeben ist, werden alle Clones des Blueprints von <obj>
- (oder von <obj> selbst, falls <obj> ein Blueprint ist) ausgegeben,
- sonst die Clone des aktuellen Objekts bzw. die Clone des Blueprints
- des aktuellen Objekts. Wenn <obj> als String angegeben ist, muss es
- der Name eines existierenden Objekts sein.
+ If <obj> is given, all clones of the blueprint of <obj> (which
+ may be <obj> itself) are returned, otherwise all clones of the
+ current object resp. of the current object's blueprint. If <obj>
+ is given as string, it must name an existing object.
- <what> waehlt aus, wie Clone von aelteren Versionen des Blueprints
- zu behandeln sind:
- == 0: liefert nur die Clone des aktuellen Blueprints (Standard)
- == 1: liefert nur die Clone der alten Blueprint-Version
- == 2: liefert alle Clones aller Blueprint-Versionen
+ <what> selects how to treat clones made from earlier versions
+ of the blueprint:
+ == 0: (default) return the clones of the current blueprint only.
+ == 1: return the clones of the previous blueprints only.
+ == 2: return all clones of the blueprint.
- Wenn der Treiber mit DYNAMIC_COSTS kompiliert wurde, sind die Kosten
- fuer diese Funktion proportional zur Anzahl Objekte im Spiel.
+ Note: this efun is computationally expensive.
-BEISPIELE
+ If the driver is compiled with DYNAMIC_COSTS, the cost of this
+ efun is proportional to the number of objects in the game.
+
+EXAMPLES
object o, p;
- o = clone_object("/std/thing"); /* oder "std/thing" im COMPAT-Modus */
+ o = clone_object("/std/thing"); /* or "std/thing" in COMPAT mode */
destruct(find_object("/std/thing"));
p = clone_object("/std/thing");
- clones("/std/thing") --> ergibt ({ p })
- clones("/std/thing", 0) --> ergibt ({ p })
- clones("/std/thing", 1) --> ergibt ({ o })
- clones("/std/thing", 2) --> ergibt ({ o, p })
+ clones("/std/thing") --> returns ({ p })
+ clones("/std/thing", 0) --> returns ({ p })
+ clones("/std/thing", 1) --> returns ({ o })
+ clones("/std/thing", 2) --> returns ({ o, p })
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.8.
- LDMud 3.2.9 fuehrte die dynamischen Kosten ein.
+HISTORY
+ Introduced in LDMud 3.2.8.
+ LDMud 3.2.9 added the dynamic cost.
+
+SEE ALSO
+ blueprint(E), clone_object(E), clonep(E)
diff --git a/doc/efun/closurep b/doc/efun/closurep
index e93183a..3bb8f60 100644
--- a/doc/efun/closurep
+++ b/doc/efun/closurep
@@ -1,11 +1,13 @@
SYNOPSIS
- int closurep(mixed arg)
+ int closurep(mixed)
-BESCHREIBUNG
- Liefert 1, wenn das Argument eine Closure ist, ansonsten 0.
+DESCRIPTION
+ Returns 1 if the argument is a closure.
-GESCHICHTE
- Eingefuehrt in 3.2@70.
+HISTORY
+ Introduced in 3.2@70
-SIEHE AUCH
- intp(E), referencep(E), symbolp(E)
+SEE ALSO
+ bytesp(E), clonep(E), coroutinep(E), floatp(E), intp(E), lpctypep(E),
+ lwobjectp(E), mappingp(E), objectp(E), pointerp(E), referencep(E),
+ stringp(E), structp(E), symbolp(E)
diff --git a/doc/efun/command b/doc/efun/command
index 5058a14..e32ee61 100644
--- a/doc/efun/command
+++ b/doc/efun/command
@@ -1,31 +1,29 @@
-GESCHUETZT
SYNOPSIS
int command(string str)
int command(string str, object ob)
-BESCHREIBUNG
- Wertet <str> wie ein Kommando aus, das direkt von einem interaktiven
- Benutzer gegeben wurde. Das Kommando wird auf das aktuelle Objekt
- angewendet oder, falls angegeben, auf das Objekt <obj>.
+DESCRIPTION
+ Execute str as a command given directly by the user. Any
+ effects of the command will apply to the current object,
+ or to the given <ob>ject.
- Der Rueckgabewert ist 0 bei Fehlschlag. Bei Erfolg wird ein
- numerischer Wert zurueckgegeben, der die Eval Kosten darstellt. Ein
- hoeherer Rueckgabewert bedeutet hoehere Kosten. Die Eval Kosten
- entsprechen ungefaehr der Anzahl ausgefuehrter LPC Maschinencode
- Instruktionen.
+ Return value is 0 for failure. Otherwise a numeric value is
+ returned which tells the evaluation cost. Bigger number means
+ higher cost. The evaluation cost is approximately the number
+ of LPC machine code instructions executed.
- Wenn command() auf auf ein anderes Objekt angewedet wird, koennen auf
- diesem Wege keine "static" deklarierten Funktionen aufgerufen werden,
- um etwas Schutz vor unerlaubten Aufrufen zu geben.
+ If command() is called on another object, it is not possible
+ to call static functions in this way, to give some protection
+ against illegal forces.
- Kommandos werden gestapelt, das heisst, nach der Ausfuehrung von <str>
- werden die alten Werte fuer this_player(), query_verb() etc. wieder
- hergestellt.
+ Commands are stacked, meaning that after the given command <str>
+ has finished, the old settings of this_player(), query_verb()
+ etc, are restored.
-GESCHICHTE
- Bis 3.2.6 im Native-Modus konnten Kommandos nur auf das aktuelle
- Objekt angewendet werden.
- Seit 3.2.7 werden Kommandos gestapelt.
+HISTORY
+ Up to 3.2.6 in native mode, commands could be applied to the current
+ object only.
+ Since 3.2.7, commands are stacked.
-SIEHE AUCH
+SEE ALSO
command_stack(E), notify_fail(E), enable_commands(E), get_eval_cost(E)
diff --git a/doc/efun/command_stack b/doc/efun/command_stack
index 37e2f0b..3efd0cb 100644
--- a/doc/efun/command_stack
+++ b/doc/efun/command_stack
@@ -1,34 +1,31 @@
-GESCHUETZT
SYNOPSIS
#include <commands.h>
- mixed * command_stack()
+ mixed * command_stack(void)
-BESCHREIBUNG
- Liefert ein Array, das den Kommandostack beschreibt. Das Array
- umfasst command_stack_depth() Eintraege; der erste davon beschreibt
- das Top-Level-Kommando, der letzte Eintrag das aktuelle Kommando.
+DESCRIPTION
+ Return an array describing the current command stack. The array has
+ command_stack_depth() entries, the first describing the top-level
+ command, and the last describing the current one.
- Jeder Eintrag ist wiederum ein Array mit folgenden Eintraegen:
+ Each entry is an array itself with these entries:
- string [CMD_VERB]: das Verb dieses Kommandos
- string [CMD_TEXT]: der volle Text des Kommandos
- object [CMD_ORIGIN]: der urspruengliche Kommandogeber
- object [CMD_PLAYER]: der momentane Kommandogeber
- mixed [CMD_FAIL]: der Inhalt von notify_fail() (oder 0)
- mixed [CMD_FAILOBJ]: das Objekt, welches notify_fail() gesetzt
- hat
+ string [CMD_VERB]: the verb of this command
+ string [CMD_TEXT]: the full command text
+ object [CMD_ORIGIN]: the original command giver
+ object [CMD_PLAYER]: the current command giver
+ mixed [CMD_FAIL]: the notify_fail setting (or 0).
+ mixed [CMD_FAILOBJ]: the object which set the notify_fail setting.
- CMD_ORIGIN und CMD_PLAYER sind fuer gewoehnlich das gleiche Objekt.
- Es gibt nur einen Unterschied, wenn der modify_command-Hook den
- Kommandogeber mit set_this_player() aendert.
+ CMD_ORIGIN and CMD_PLAYER are usually the same; there is a difference
+ only if the modify_command hook changes the command giver with
+ set_this_player().
-ANMERKUNGEN
- Jeder der Eintraege im Array kann 0 sein.
+ Note that any of the entries may be returned as 0.
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.7.
- LDMud 3.2.8 fuegte den CMD_FAILOBJ Eintrag hinzu.
+HISTORY
+ Introduced in LDMud 3.2.7.
+ LDMud 3.2.8 added the CMD_FAILOBJ result.
-SIEHE AUCH
+SEE ALSO
command(E), command_stack_depth(E), notify_fail(E)
diff --git a/doc/efun/command_stack_depth b/doc/efun/command_stack_depth
index b9b67c5..16ab86f 100644
--- a/doc/efun/command_stack_depth
+++ b/doc/efun/command_stack_depth
@@ -1,13 +1,12 @@
-GESCHUETZT
SYNOPSIS
- int command_stack_depth()
+ int command_stack_depth(void)
-BESCHREIBUNG
- Liefert die Anzahl der verschachtelten Kommandos, also die Tiefe des
- Command Stacks.
+DESCRIPTION
+ Return the number of nested commands, ie. the depth of the command
+ stack
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.7.
+HISTORY
+ Introduced in LDMud 3.2.7.
-SIEHE AUCH
+SEE ALSO
command(E), command_stack(E)
diff --git a/doc/efun/compile_string b/doc/efun/compile_string
new file mode 100644
index 0000000..b2242dd
--- /dev/null
+++ b/doc/efun/compile_string
@@ -0,0 +1,78 @@
+SYNOPSIS
+ #include <compile_string.h>
+
+ closure compile_string(symbol* args, string str)
+ closure compile_string(symbol* args, string str
+ , struct compile_string_options opts)
+ closure compile_string(symbol* args, string &str
+ , struct compile_string_options opts)
+
+DESCRIPTION
+ Compiles <str> into a closure. The closure will be bound to the
+ current object. By default the string will be interpreted as an
+ LPC expression. The string may also contain preprocessor directives
+ (which must occur on their own line).
+
+ The argument names are given as the first argument <args>.
+
+ Optionally the function accepts a struct with additional options.
+ All entries in this struct are optional. These are the members:
+
+ functions:
+ variables:
+ structs:
+ A mapping or closure for the lookup of functions, variables,
+ resp. structs during compilation. A mapping is looked up using
+ the name, the closure will be called with the name as its only
+ argument. The name of the function, variable, resp. struct will
+ be given as a symbol. The result (mapping value resp. closure
+ return value) should be:
+ - for <functions> a closure,
+ - for <variables> a reference, and
+ - for <structs> a template struct (i.e. a struct whose data
+ is irrelevant, only its type will be used).
+
+ use_object_functions:
+ use_object_variables:
+ use_object_structs:
+ If set (integer != 0) the compiled code may reference the
+ current object's functions, variables, resp. structs. However
+ successful lookups in <variables>, <functions>, resp. <structs>
+ have precedence. Private variables, functions and structs
+ cannot be accessed this way.
+
+ compile_expression:
+ If set (integer != 0) the string is interpreted as an expression
+ (eg. "1+1") and therefore must not contain a terminal semicolon.
+ If no compile mode is selected, this is the default.
+
+ compile_block:
+ If set (integer != 0) the string is interpreted as a block (code
+ between braces), the surrounding braces can be omitted. To return
+ a value, the code needs a return statement.
+
+ as_async:
+ If set (integer != 0) the code will be compiled as a coroutine,
+ i.e. the resulting closure will return a coroutine when called.
+
+ detect_end:
+ If set (integer != 0) the driver will try(!) to detect the end
+ of the expression/block and return the remaining string in <str>
+ (<str> needs to be passed as a reference for this).
+ An end is detected if the word or character following a full
+ expression or block is not suitable to continue the expression
+ or block. Also a comma will end an expression.
+
+ When compiling expressions the result of the H_AUTO_INCLUDE_EXPRESSION
+ driver hook will be prepended, for blocks the H_AUTO_INCLUDE_BLOCK
+ hook will be used.
+
+EXAMPLES
+ funcall(compile_string(({'a,'b}), "a+b"), 1, 2);
+
+HISTORY
+ Introduced in LDMud 3.6.7.
+
+SEE ALSO
+ compile_string_options(S), lambda(E), block(LPC),
+ auto_include_expression(H), auto_include_block(H)
diff --git a/doc/efun/configure_driver b/doc/efun/configure_driver
index fa2407b..0924da2 100644
--- a/doc/efun/configure_driver
+++ b/doc/efun/configure_driver
@@ -118,6 +118,73 @@
the swap file as small as possible.
(Same as the --swap-compact command line switch.)
+ <what> == DC_SWAP_TIME
+ Sets the time until the program of an unused object is swapped out
+ (if possible). Setting the interval to 0 disables swapping of
+ programs.
+ <data> is an integer and measured in seconds.
+ (Same as the --swap-time command line switch.)
+
+ <what> == DC_SWAP_VAR_TIME
+ Sets the time until the variables of an unused object are swapped
+ out. Setting the interval to 0 disables swapping of variables.
+ <data> is an integer and measured in seconds.
+ (Same as the --swap-variables command line switch.)
+
+ <what> == DC_CLEANUP_TIME
+ Sets the time until the cleanup hook is called in unused objects.
+ <data> is an integer and measured in seconds.
+ (Same as the --cleanup-time command line switch.)
+
+ <what> == DC_RESET_TIME
+ Sets the default time until the reset hook is called in objects.
+ The change will take effect for each object after its next reset.
+ <data> is an integer and measured in seconds.
+ (Same as the --reset-time command line switch.)
+
+ <what> == DC_DEBUG_FILE
+ Sets the debug log file.
+ The filename can be given relative to the mudlib directory
+ or absolute with regard to the operating system.
+ Settings this option will force closing and reopening
+ the log file (even if the name didn't change).
+
+ <what> == DC_FILESYSTEM_ENCODING
+ Sets the character encoding used in the filesystem.
+ If not set, the default encoding is derived from the LC_CTYPE
+ environment setting. If LC_CTYPE is not defined, or it is set to
+ the "C" locale, then "UTF-8" is used as a default.
+
+ <what> == DC_SIGACTION_SIGHUP
+ <what> == DC_SIGACTION_SIGINT
+ <what> == DC_SIGACTION_SIGUSR1
+ <what> == DC_SIGACTION_SIGUSR2
+ Sets the default action when the driver encounters those
+ POSIX signals. It can be set to one of the following options:
+
+ DCS_DEFAULT:
+ This is the default action: Call handle_external_signal()
+ in the master and act upon its result.
+
+ DCS_IGNORE:
+ Ignore the signal.
+
+ DCS_TERMINATE:
+ Terminate the process immediately.
+
+ DCS_SHUTDOWN:
+ Do a graceful shutdown.
+
+ DCS_INFORM_MASTER:
+ Call handle_external_signal(), but ignore its result.
+
+ DCS_RELOAD_MASTER:
+ Reload the master object.
+
+ DCS_THROW_EXCEPTION:
+ Cause an error in the currently running LPC or Python
+ function.
+
HISTORY
Introduced in LDMud 3.3.719.
DC_ENABLE_HEART_BEATS was added in 3.5.0.
@@ -128,6 +195,12 @@
DC_TLS_DHE_PARAMETER was added in 3.5.0.
DC_TLS_CIPHERLIST was added in 3.5.0.
DC_SWAP_COMPACT_MODE was added in 3.5.0.
+ DC_SWAP_TIME was added in 3.5.2
+ DC_SWAP_VAR_TIME was added in 3.5.2
+ DC_CLEANUP_TIME was added in 3.5.2
+ DC_RESET_TIME was added in 3.5.2
+ DC_DEBUG_FILE was added in 3.5.2.
+ DC_SIGACTION_* were added in 3.5.2.
SEE ALSO
configure_interactive(E)
diff --git a/doc/efun/configure_interactive b/doc/efun/configure_interactive
index b7d145d..360c8b7 100644
--- a/doc/efun/configure_interactive
+++ b/doc/efun/configure_interactive
@@ -35,7 +35,8 @@
interactive user <ob>. Non-combinable characters and single
received characters are returned as separate strings as usual.
- The newline '\n' and the NUL character '\0' are always
+ The newline '\n', the NUL character '\0' and non-ASCII
+ characters (unicode characters > 127) are always
non-combinable.
The given string should contain all combinable characters.
@@ -46,7 +47,7 @@
Set the set of characters which can be combined into a single
string, just like IC_COMBINE_CHARSET_AS_STRING.
- The given array shall contain an array of up to 32 integers
+ The given array shall contain an array of up to 16 integers
that are interpreted as 8-bit-values. Each character is encoded
as one bit (ASCII characters 0-7 in the first integer, and so on).
So a character <n> is treated as combinable if
@@ -58,8 +59,10 @@
<what> == IC_CONNECTION_CHARSET_AS_STRING
Set the set of characters which can be output to the interactive
- user <ob>. All other characters are discarded. (This does not
- apply to binary_message()).
+ user <ob>. All other characters are discarded. This does only
+ apply to characters in the ASCII character set (first 128
+ characters). This does not apply to unicode characters > 127
+ or to binary_message().
The given string should contain all allowed characters.
If given as the number 0, the default charset is re-established.
@@ -68,7 +71,7 @@
Set the set of characters which can be output to the interactive
user <ob>, just like IC_CONNECTION_CHARSET_AS_STRING.
- The given array shall contain an array of up to 32 integers
+ The given array shall contain an array of up to 16 integers
that are interpreted as 8-bit-values. Each character is encoded
as one bit (ASCII characters 0-7 in the first integer, and so on).
So a character <n> is allowed to be output if
@@ -131,9 +134,20 @@
from modify_command() to something else using the
H_MODIFY_COMMAND_FNAME hook.
+ <what> == IC_ENCODING
+ Sets the encoding to convert the network input to/from.
+ All received bytes (except telnet negotiations) will be converted
+ using this encoding to the internal unicode representation.
+ And all text strings will be converted back to this encoding
+ when sent to the interactive.
+
+ Default is "ISO-8859-1//TRANSLIT".
+
HISTORY
Introduced in LDMud 3.3.719.
+ IC_ENCODING introduced in LDMud 3.6.0.
+
SEE ALSO
configure_driver(E)
diff --git a/doc/efun/configure_object b/doc/efun/configure_object
index d3d7c0f..7e13d40 100644
--- a/doc/efun/configure_object
+++ b/doc/efun/configure_object
@@ -5,7 +5,7 @@
DESCRIPTION
Sets the option <what> to the value <data> on the object <ob>
- or the default for all interactives if <ob> is 0.
+ or the default for all objects if <ob> is 0.
If the first argument <ob> is not this_object(), the privilege
violation ("configure_object", this_object(), ob, what, data)
@@ -46,4 +46,5 @@
Introduced in LDMud 3.5.0.
SEE ALSO
- object_info(E), configure_interactive(E), configure_driver(E)
+ object_info(E), configure_interactive(E), configure_lwobject(E),
+ configure_driver(E)
diff --git a/doc/efun/copy b/doc/efun/copy
index be041ac..8ee701b 100644
--- a/doc/efun/copy
+++ b/doc/efun/copy
@@ -1,24 +1,29 @@
SYNOPSIS
mixed copy(mixed arg)
-BESCHREIBUNG
- Erzeugt eine flache Kopie von <arg> und liefert diese zurueck. Fuer
- Arrays und Mappings heisst das, dass neue Arrays bzw. Mappings erzeugt
- werden, die Kopien der Elemente des Originals enthalten. Eingebettete
- Arrays und Mappings werden jedoch als Referenz uebergeben!
+DESCRIPTION
+ Create a shallow copy of <arg> and return it. For arrays, mappings,
+ structs and lightweight objects this means that a new array, mapping,
+ struct resp. lightweight object is created with copies of the
+ original content. Embedded arrays, mappings, structs or lightweight
+ objects are copied by reference!
- Fuer andere Werte von <arg> bewirkt diese Funktion nichts.
+ For other values this function is a no-op.
-BEISPIELE
+ If a lightweight objects was copied, the H_CREATE_LWOBJECT_COPY hook
+ will be called to finish initialization of the lightweight object.
+
+EXAMPLES
mixed *a, *b;
+
a = ({ 1, ({ 21, 22 }) });
b = copy(a);
a[0] = -1; a[1][0] = -21;
- --> a ist nun ({ -1, ({ -21, 22 }) })
- b ist nun ({ 1, ({ -21, 22 }) })
+ --> a is now ({ -1, ({ -21, 22 }) })
+ b is now ({ 1, ({ -21, 22 }) })
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.6.
+HISTORY
+ Introduced in LDMud 3.2.6.
-SIEHE AUCH
+SEE ALSO
deep_copy(E)
diff --git a/doc/efun/copy_bits b/doc/efun/copy_bits
index c3a8eb2..f103855 100644
--- a/doc/efun/copy_bits
+++ b/doc/efun/copy_bits
@@ -1,41 +1,42 @@
SYNOPSIS
- string copy_bits(string src, string dest [, int srcstart
- [, int deststart [, int copylen]]])
+ string copy_bits(string src, string dest
+ [, int srcstart [, int deststart [, int copylen ]]])
-BESCHREIBUNG
- Kopiert den Bitbereich [<srcstart> .. <srcstart> + <copylen>] aus dem
- Bitstring <src> in den Bitstring <dest> beginnend an der Position
- <deststart>. Die alten Werte von <dest> werden dabei ueberschrieben.
+DESCRIPTION
+ Copy the bitrange [<srcstart>..<srcstart>+<copylen>[ from
+ bitstring <src> and copy it into the bitstring <dest> starting
+ at <deststart>, overwriting the original bits at those positions.
- Der resultierende String wird zurueck geliefert, die beiden
- Originalstrings bleiben unbeeinflusst.
+ The resulting combined string is returned, the input strings remain
+ unaffected.
- Wird <srcstart> nicht angegeben, wird <src> von Anfang an kopiert.
- Ist <srcstart> negativ, wird vom letzten Bit her gezaehlt (d.h. -1
- bezeichnet das letzte Bit).
+ If <srcstart> is not given, <src> is copied from the start.
+ If <srcstart> is negative, it is counted from one past the last set
+ bit in the string (ie. '-1' will index the last set bit).
- Wird <deststart> nicht angegeben, wird <dest> von Anfang an kopiert.
- Ist <deststart> negativ, wird vom letzten Bit her gezaehlt (d.h. -1
- bezeichnet das letzte Bit).
+ If <deststart> is not given, <dest> will be overwritten from the start.
+ If <deststart> is negative, it is counted from one past the last set
+ bit in the string (ie. '-1' will index the last set bit).
- Wird <copylen> nicht angegeben wird, so wird der gesamte Bitstring
- <src> kopiert. Das Resultat besteht dann aus dem Bitstring <dest>
- bis zur Position <deststart>, gefolgt von <src> ab der Position
- <srcstart>.
+ If <copylen> is not given, it is assumed to be infinite, ie. the result
+ will consist of <dest> up to position <deststart>, followed by
+ the data copied from <src>.
+ If <copylen> is negative, the function will copy the abs(<copylen>)
+ bits _before_ <srcstart> in to the result.
- Wenn <copylen> negativ ist, werden abs(<copylen>) _vor_ <srcstart> in
- das Resultat kopiert.
+ None of the range limits can become negative.
-BEISPIELE
- copy_bits(src, dest, 10) === src[10..]
- copy_bits(src, dest, 10, 5) === dest[0..4] + src[10..]
- copy_bits(src, dest, 10, 5, 3) === dest[0..4] + src[10..12] + dest[8..]
+EXAMPLES
+ copy_bits(src, dest, 10) === src[10..]
+ copy_bits(src, dest, 10, 5) === dest[0..4] + src[10..]
+ copy_bits(src, dest, 10, 5, 3)
+ === dest[0..4] + src[10..12] + dest[8..]
- (Die Notation src[] / dest[] dient nur der Illustration!)
+ (The src[]/dest[] is just for explanatory purposes!)
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
+HISTORY
+ Introduced in LDMud 3.3.166.
-SIEHE AUCH
+SEE ALSO
clear_bit(E), set_bit(E), test_bit(E), next_bit(E), last_bit(E),
count_bits(E), or_bits(E), xor_bits(E), invert_bits(E), and_bits(E)
diff --git a/doc/efun/copy_file b/doc/efun/copy_file
index 7f12111..685fd03 100644
--- a/doc/efun/copy_file
+++ b/doc/efun/copy_file
@@ -1,22 +1,22 @@
SYNOPSIS
int copy_file(string from, string to)
-BESCHREIBUNG
- Die Efun copy_file() kopiert die Datei <from> nach <to>. Wenn <to> ein
- existierendes Verzeichnis ist, wird <from> in dieses Verzeichnis
- kopiert und behaelt seinen Namen.
+DESCRIPTION
+ The efun copy_file() will copy the file <from> to the new name <to>.
+ If <to> exists and is a directory, then <from> will be placed in that
+ directory and keep its original name.
- Die Funktion erfordert Lesezugriff auf <from> und Schreibrechte fuer
- <to>.
+ You must have read permission for <from> and write permission for
+ the target file to copy the file.
- Bei Erfolg liefert die Funktion 0 zurueck, im Fehlerfalle einen
- Wert ungleich Null.
+ On successfull completion copy_file() will return 0. If any error
+ occurs, a non-zero value is returned.
-BEISPIELE
+EXAMPLES
copy_file("/players/wizard/obj.c", "/players/wizard/newobj.c");
-GESCHICHTE
- LDMud 3.2.9 beschraenkte die Fehlermeldungen auf Werte != 0.
+HISTORY
+ LDMud 3.2.9 restricted the error behaviour to returning non-0.
-SIEHE AUCH
+SEE ALSO
mkdir(E), rmdir(E), rm(E), rename(E)
diff --git a/doc/efun/coroutinep b/doc/efun/coroutinep
new file mode 100644
index 0000000..373d218
--- /dev/null
+++ b/doc/efun/coroutinep
@@ -0,0 +1,13 @@
+SYNOPSIS
+ int coroutinep(mixed arg)
+
+DESCRIPTION
+ Returns 1 if the argument is a coroutine.
+
+HISTORY
+ Introduced in LDMud 3.6.5.
+
+SEE ALSO
+ bytesp(E), clonep(E), closurep(E), floatp(E), intp(E), lpctypep(E),
+ lwobjectp(E), mappingp(E), objectp(E), pointerp(E), referencep(E),
+ stringp(E), structp(E), symbolp(E)
diff --git a/doc/efun/cos b/doc/efun/cos
index 1345404..359e016 100644
--- a/doc/efun/cos
+++ b/doc/efun/cos
@@ -1,11 +1,11 @@
SYNOPSIS
float cos(int|float)
-BESCHREIBUNG
- Liefert den Kosinus des Argumentes.
+DESCRIPTION
+ Returns the cosinus of the argument.
-GESCHICHTE
- LDMud 3.2.9: Ganzzahlen (Integers) als Argument hinzugefuegt.
+HISTORY
+ LDMud 3.2.9 added integers as arguments.
-SIEHE AUCH
+SEE ALSO
sin(E), asin(E), acos(E), tan(E), atan(E), atan2(E)
diff --git a/doc/efun/count_bits b/doc/efun/count_bits
index 67e6dd4..c3f61c8 100644
--- a/doc/efun/count_bits
+++ b/doc/efun/count_bits
@@ -1,15 +1,17 @@
SYNOPSIS
int count_bits(string str)
-BESCHREIBUNG
- Diese Funktion zaehlt die Anzahl gesetzer Bits im Bitstring <str> und
- liefert die Anzahl als Resultat zurueck.
+DESCRIPTION
+ Count the number of set bits in bitstring <str> and return the number
+ as result.
-BEISPIELE
+EXAMPLES
string s;
- s = set_bit("", 3); s = set_bit(s, 15);
- count_bits(s) --> liefert 2
-SIEHE AUCH
+ s = set_bit("", 3); s = set_bit(s, 15);
+
+ count_bits(s) --> returns 2
+
+SEE ALSO
clear_bit(E), set_bit(E), test_bit(E), next_bit(E), last_bit(E),
or_bits(E), xor_bits(E), invert_bits(E), copy_bits(E)
diff --git a/doc/efun/creator b/doc/efun/creator
index 93bc69b..ab07b7f 100644
--- a/doc/efun/creator
+++ b/doc/efun/creator
@@ -1,13 +1,15 @@
SYNOPSIS
string creator(object|lwobject ob)
-BESCHREIBUNG
- Diese Funktion ist nur im COMPAT-Modus verfuegbar.
+DESCRIPTION
+ This efun is for backward compatibility only. It is only
+ available in compat mode.
- Resultat is der Name des Erzeugers des Objektes. Dies kann ein
- Wizard sein, oder eine Domain.
+ Returns the creator (i.e. the name of the wizard or domain) of
+ the object. Default for ob is this_object().
- Default fuer <ob> ist this_object().
+HISTORY
+ Since 3.2.1@47, this efun is an alias for getuid().
-SIEHE AUCH
+SEE ALSO
getuid(E), native(C), uids(C)
diff --git a/doc/efun/crypt b/doc/efun/crypt
index e6c183d..57266f9 100644
--- a/doc/efun/crypt
+++ b/doc/efun/crypt
@@ -1,18 +1,18 @@
SYNOPSIS
string crypt(string str, int seed)
string crypt(string str, string seed)
- string crypt(bytes str, int seed)
- string crypt(bytes str, string seed)
+ string crypt(bytes str, int seed)
+ string crypt(bytes str, string seed)
-BESCHREIBUNG
- Verschluesselt den String <str> mit dem Schluessel <seed>. <seed> kann
- entweder ein Integer sein oder zwei Zeichen aus dem String <seed>.
- Wenn <seed> 0 ist, wird ein zufaelliger Schluessel erzeugt.
+DESCRIPTION
+ Crypt the string <str> the first two characters
+ from the string <seed> as a seed. If <seed> is an integer, then
+ a random seed is used.
- Das Resultat enthaelt den Schluessel als die ersten beiden Zeichen.
+ The result has the first two characters as the seed.
- Fuer Passwortabfragen, die ohne Echo eingegeben werden koennen sollen,
- bietet input_to() ein spezielles Flag.
+ If you want to let enter password information without echo,
+ input_to() can be used with special argument.
-SIEHE AUCH
- md5_crypt(E), md5(E), sha1(E), hash(E), hmac(E)
+SEE ALSO
+ md5(E), md5_crypt(E), sha1(E), hash(E), hmac(E)
diff --git a/doc/efun/ctime b/doc/efun/ctime
index 5bb3136..c06d72a 100644
--- a/doc/efun/ctime
+++ b/doc/efun/ctime
@@ -2,24 +2,23 @@
string ctime(int clock)
string ctime(int *uclock)
-BESCHREIBUNG
- Interpretiert das Argument <clock> als Anzahl Sekunden seit dem
- 01.JAN.1970, 00:00 Uhr und konvertiert dieses in einen ansehnlichen
- String, der Datum und Zeit enthaelt. Wenn <clock> nicht angegeben
- wird, wird time() verwendet.
+DESCRIPTION
+ Interpret the argument clock as number of seconds since Jan,
+ 1st, 1970, 0.00 and convert it to a nice date and time string.
+ If clock is not specified, time() is used as default.
- Die zweite Form entspricht der ersten, ausser dass das Argument ein
- Array mit zwei Integer Elementen ist. Das erste Element int[0] gibt
- die Anzahl Sekunden seit dem 01. Januar 1970 an, das zweite Element
- int[1] die Anzahl Millisekunden innerhalb dieser Sekunde.
+ The second form is like the first, except that it takes as argument
+ an array of ints as it is returned from utime(): int[0] is the number
+ of seconds like before, int[1] is the number of microseconds within
+ that second.
-BEISPIELE
+EXAMPLES
write(ctime()+"\n");
- Dies gibt etwas aus wie "Sun Oct 26 19:28:30 2003".
+ This will print out something like "Fri Jul 17 19:13:33 1992".
-GESCHICHTE
- LDMud 3.2.9 fuehrte die zweite Variante ein.
+HISTORY
+ LDMud 3.2.9 introduced the second form.
-SIEHE AUCH
+SEE ALSO
gmtime(E), localtime(E), mktime(E), strftime(E), time(E), utime(E)
diff --git a/doc/efun/db_affected_rows b/doc/efun/db_affected_rows
index 1ea2783..999fb88 100644
--- a/doc/efun/db_affected_rows
+++ b/doc/efun/db_affected_rows
@@ -2,23 +2,21 @@
SYNOPSIS
int db_affected_rows(int handle)
-BESCHREIBUNG
- Resultat ist die Anzaehl der Zeilen die vom letzten SQL-Befehl
- beeinflusst wurden, welches zum SQL-server via <handle> gesendet
- wurde. Diese Funktion ist nuetzlich lediglich fuer DELETE-
- und UPDATE-Befehle.
+DESCRIPTION
+ Return the number of affected rows of the last SQL-statement that
+ has been sent to the SQL-server via handle <handle>.
+ Only useful for DELETE- or UPDATE-operations.
- Die Funktion ist nur verfuegbar wenn der Driver mit
- mySQL-Unterstuetzung compiliert wurde. In diesem Fall ist das Makro
- __MYSQL__ definiert.
+ The function is available only if the driver is compiled with
+ mySQL support. In that case, __MYSQL__ is defined.
- Die Efun ist privilegiert als ("mysql", "db_affected_rows").
+ The efun triggers a privilege violation ("mysql", "db_affected_rows").
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
- LDMud 3.2.11 machte die Efun privilegiert.
+HISTORY
+ Added in 3.2.9 .
+ LDMud 3.2.11 added the privilege violation.
-SIEHE AUCH
+SEE ALSO
db_conv_string(E), db_close(E), db_coldefs(E), db_connect(E),
db_exec(E), db_error(E), db_fetch(E), db_insert_id(E), db_handles(E),
mysql(C), privilege_violation(M)
diff --git a/doc/efun/db_close b/doc/efun/db_close
index 208176c..8bfd4fb 100644
--- a/doc/efun/db_close
+++ b/doc/efun/db_close
@@ -2,21 +2,20 @@
SYNOPSIS
int db_close(int handle)
-BESCHREIBUNG
- Schliesse die Verbindung <handle> zum SQL-Server. Resultat ist
- <handle> bei Erfolg.
+DESCRIPTION
+ Close the server-connection with the handle <handle>
+ Return the handle-number on success.
- Die Funktion ist nur verfuegbar wenn der Driver mit
- mySQL-Unterstuetzung compiliert wurde. In diesem Fall ist das Makro
- __MYSQL__ definiert.
+ The function is available only if the driver is compiled with
+ mySQL support. In that case, __MYSQL__ is defined.
- Die Efun ist privilegiert als ("mysql", "db_close").
+ The efun triggers a privilege violation ("mysql", "db_close").
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
- LDMud 3.2.11 machte die Efun privilegiert.
+HISTORY
+ Added in 3.2.9 .
+ LDMud 3.2.11 added the privilege violation.
-SIEHE AUCH
+SEE ALSO
db_affected_rows(E), db_conv_string(E), db_coldefs(E), db_connect(E),
db_exec(E), db_error(E), db_fetch(E), db_handles(E), db_insert_id(E),
- mysql(C, privilege_violation(M))
+ mysql(C), privilege_violation(M)
diff --git a/doc/efun/db_coldefs b/doc/efun/db_coldefs
index bf08fc2..e3a5d49 100644
--- a/doc/efun/db_coldefs
+++ b/doc/efun/db_coldefs
@@ -2,22 +2,21 @@
SYNOPSIS
string * db_coldefs(int handle)
-BESCHREIBUNG
- Resultat ist ein Array mit den Spaltennamen der Tabelle des
- letzten QUERY-Befehls. Gab die Datenbank keine Tabelle zurueck, dann
- gibt die Efun 0 als Ergebnis.
+DESCRIPTION
+ Return an array with the column names of the current table.
+ If the database didn't return a result, the result of this efun
+ is 0.
- Die Funktion ist nur verfuegbar wenn der Driver mit
- mySQL-Unterstuetzung compiliert wurde. In diesem Fall ist das Makro
- __MYSQL__ definiert.
+ The function is available only if the driver is compiled with
+ mySQL support. In that case, __MYSQL__ is defined.
- Die Efun ist privilegiert als ("mysql", "db_coldefs").
+ The efun triggers a privilege violation ("mysql", "db_coldefs").
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
- LDMud 3.2.11 machte die Efun privilegiert.
+HISTORY
+ Added in 3.2.9.
+ LDMud 3.2.11 added the privilege violation.
-SIEHE AUCH
+SEE ALSO
db_affected_rows(E), db_conv_string(E), db_close(E), db_connect(E),
db_exec(E), db_error(E), db_fetch(E), db_handles(E), db_insert_id(E),
mysql(C), privilege_violation(M)
diff --git a/doc/efun/db_connect b/doc/efun/db_connect
index ffbd515..df7b560 100644
--- a/doc/efun/db_connect
+++ b/doc/efun/db_connect
@@ -4,30 +4,26 @@
int db_connect(string database, string user)
int db_connect(string database, string user, string password)
-BESCHREIBUNG
- Stelle eine Verbindung zur SQL-Datenbank <database> des
- lokalen SQL-Servers her. Das Ergebnis ist die Handle-Nummer fuer diese
- Verbindung und kann fuer Anfragen zu dieser Datenbank verwendet
- werden. Bei der Verbindung ist die automatische Wiederverbindung
- aktiv - moegliche Folgen davon finden sich in mysql(C).
+DESCRIPTION
+ Connect to the database <database> on the local mySQL-server.
+ The return-value is the handle for this connection. Automatic
+ reconnects are enabled for this connection; see mysql(C) for
+ implications.
+ If the database does not exist or the server is NOT started,
+ a runtime-error is raised.
- Existiert die Datenbank nicht, oder kann der lokale SQL-Server nicht
- gefunden werden, wird ein Laufzeitfehler erzeugt.
+ If specified, the connection is made for <user> with <password>.
- Wenn angegeben, wird die Verbindung fuer <user> mit <password>
- erzeugt.
+ The function is available only if the driver is compiled with
+ mySQL support. In that case, __MYSQL__ is defined.
- Die Funktion ist nur verfuegbar wenn der Driver mit
- mySQL-Unterstuetzung compiliert wurde. In diesem Fall ist das Makro
- __MYSQL__ definiert.
+ The efun triggers a privilege violation ("mysql", "db_connect").
- Die Efun ist privilegiert als ("mysql", "db_connect").
+HISTORY
+ Added in 3.2.9 .
+ LDMud 3.2.11 added the privilege violation.
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
- LDMud 3.2.11 machte die Efun privilegiert.
-
-SIEHE AUCH
+SEE ALSO
db_affected_rows(E), db_conv_string(E), db_close(E), db_coldefs(E),
db_exec(E), db_error(E), db_fetch(E), db_handles(E),
db_insert_id(E), mysql(C), privilege_violation(M)
diff --git a/doc/efun/db_conv_string b/doc/efun/db_conv_string
index b630d6f..6c2fa37 100644
--- a/doc/efun/db_conv_string
+++ b/doc/efun/db_conv_string
@@ -2,19 +2,18 @@
SYNOPSIS
string db_conv_string(string str)
-BESCHREIBUNG
- Wandele den String <str> in einen String um, der von der Datenbank
- korrekt interpretiert werden kann; z.B. werden all Apostrophe
- durch \' ersetzt.
+DESCRIPTION
+ Convert the string <str> into a string that is correctly interpretated
+ for usage as a string in db_exec(), e.g. ' is replaced with \' and so
+ on.
- Die Funktion ist nur verfuegbar wenn der Driver mit
- mySQL-Unterstuetzung compiliert wurde. In diesem Fall ist das Makro
- __MYSQL__ definiert.
+ The function is available only if the driver is compiled with
+ mySQL support. In that case, __MYSQL__ is defined.
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
+HISTORY
+ Added in 3.2.9 .
-SIEHE AUCH
+SEE ALSO
db_affected_rows(E), db_close(E), db_coldefs(E), db_connect(E),
db_exec(E), db_error(E), db_fetch(E), db_handles(E), db_insert_id(E),
mysql(C)
diff --git a/doc/efun/db_error b/doc/efun/db_error
index cb6d291..f5271d0 100644
--- a/doc/efun/db_error
+++ b/doc/efun/db_error
@@ -2,22 +2,21 @@
SYNOPSIS
string db_error(int handle)
-BESCHREIBUNG
- Result ist ein String, der den Fehler der letzten
- Datenbanktransaktion beschreibt. War die letzte Transaktion
- erfolgreich, ist das Ergebnis 0.
+DESCRIPTION
+ Return a string describing the error which occurred during the last
+ database transaction. If the last database transaction was successful,
+ this call returns 0.
- Die Funktion ist nur verfuegbar wenn der Driver mit
- mySQL-Unterstuetzung compiliert wurde. In diesem Fall ist das Makro
- __MYSQL__ definiert.
+ The function is available only if the driver is compiled with
+ mySQL support. In that case, __MYSQL__ is defined.
- Die Efun ist privilegiert als ("mysql", "db_error").
+ The efun triggers a privilege violation ("mysql", "db_error").
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
- LDMud 3.2.11 machte die Efun privilegiert.
+HISTORY
+ Added in 3.2.9 .
+ LDMud 3.2.11 added the privilege violation.
-SIEHE AUCH
+SEE ALSO
db_affected_rows(E), db_conv_string(E), db_close(E), db_coldefs(E),
db_connect(E), db_exec(E), db_fetch(E), db_handles(E), db_insert_id(E),
mysql(C), privilege_violation(M)
diff --git a/doc/efun/db_exec b/doc/efun/db_exec
index 274c983..2c48faa 100644
--- a/doc/efun/db_exec
+++ b/doc/efun/db_exec
@@ -2,21 +2,21 @@
SYNOPSIS
int db_exec(int handle, string statement)
-BESCHREIBUNG
- Fuehre den SQL-Befehl <statement> fuer die Verbindung <handle> aus.
- Resultat ist das Handle bei Erfolg, oder 0 bei einem Fehler.
+DESCRIPTION
+ Execute the SQL-statement <statement> for the connection <handle> to
+ the SQL-server. The result is the handle if all went okay. If there
+ was an error in the statement, 0 is returned.
- Die Funktion ist nur verfuegbar wenn der Driver mit
- mySQL-Unterstuetzung compiliert wurde. In diesem Fall ist das Makro
- __MYSQL__ definiert.
+ The function is available only if the driver is compiled with
+ mySQL support. In that case, __MYSQL__ is defined.
- Die Efun ist privilegiert als ("mysql", "db_exec").
+ The efun triggers a privilege violation ("mysql", "db_exec").
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
- LDMud 3.2.11 machte die Efun privilegiert.
+HISTORY
+ Added in 3.2.9 .
+ LDMud 3.2.11 added the privilege violation.
-SIEHE AUCH
+SEE ALSO
db_affected_rows(E), db_conv_string(E), db_close(E), db_coldefs(E),
db_connect(E), db_error(E), db_fetch(E), db_handles(E),
db_insert_id(E), mysql(C), privilege_violation(M)
diff --git a/doc/efun/db_fetch b/doc/efun/db_fetch
index b143e8a..39465b2 100644
--- a/doc/efun/db_fetch
+++ b/doc/efun/db_fetch
@@ -2,22 +2,21 @@
SYNOPSIS
mixed db_fetch(int handle)
-BESCHREIBUNG
- Hole _eine_ Resultatzeile der letzten SQL-Aktion fuer Verbindung
- <handle>. Sind keine weiteren Zeilen verfuegbar, wird 0
- zurueckgegeben.
+DESCRIPTION
+ Retrieve _ONE_ line of result of the latest SQL-action to the server
+ based on the handle <handle>. If not more results are on the server,
+ 0 is returned.
- Die Funktion ist nur verfuegbar wenn der Driver mit
- mySQL-Unterstuetzung compiliert wurde. In diesem Fall ist das Makro
- __MYSQL__ definiert.
+ The function is available only if the driver is compiled with
+ mySQL support. In that case, __MYSQL__ is defined.
- Die Efun ist privilegiert als ("mysql", "db_fetch").
+ The efun triggers a privilege violation ("mysql", "db_fetch").
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
- LDMud 3.2.11 machte die Efun privilegiert.
+HISTORY
+ Added in 3.2.9 .
+ LDMud 3.2.11 added the privilege violation.
-SIEHE AUCH
+SEE ALSO
db_affected_rows(E), db_conv_string(E), db_close(E), db_coldefs(E),
db_connect(E), db_error(E), db_exec(E), db_handles(E), db_insert_id(E),
mysql(C), privilege_violation(M)
diff --git a/doc/efun/db_handles b/doc/efun/db_handles
index 99811a6..de9fa23 100644
--- a/doc/efun/db_handles
+++ b/doc/efun/db_handles
@@ -2,23 +2,24 @@
SYNOPSIS
int * db_handles()
-BESCHREIBUNG
- Result ist ein Array mit allen aktiven Verbindungshandles zum
- SQL-Server. Das Array ist nach der Zeit der letzten Aktion sortiert:
- das zuletzt genutzte Handle kommt an erster Stelle. Sind keine
- Verbindungen aktiv, ist das Array leer.
+DESCRIPTION
+ Returns an array with all open handles to the SQL-server.
+ As mySQL is most of the time limited to 100 connections, you
+ should not let this number grow too big. The handles are sorted
+ in a special order: The last used handle is the first one and
+ the handle that hasn't been used for the longest time is
+ the last one. If no handles are open, an empty array is returned.
- Die Funktion ist nur verfuegbar wenn der Driver mit
- mySQL-Unterstuetzung compiliert wurde. In diesem Fall ist das Makro
- __MYSQL__ definiert.
+ The function is available only if the driver is compiled with
+ mySQL support. In that case, __MYSQL__ is defined.
- Die Efun ist privilegiert als ("mysql", "db_handles").
+ The efun triggers a privilege violation ("mysql", "db_handles").
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
- LDMud 3.2.11 machte die Efun privilegiert.
+HISTORY
+ Added in 3.2.9 .
+ LDMud 3.2.11 added the privilege violation.
-SIEHE AUCH
+SEE ALSO
db_affected_rows(E), db_conv_string(E), db_close(E), db_coldefs(E),
db_connect(E), db_error(E), db_exec(E), db_fetch(E), db_insert_id(E),
mysql(C), privilege_violation(M)
diff --git a/doc/efun/db_insert_id b/doc/efun/db_insert_id
index 93159e2..ae73c10 100644
--- a/doc/efun/db_insert_id
+++ b/doc/efun/db_insert_id
@@ -2,22 +2,21 @@
SYNOPSIS
int db_insert_id(int handle)
-BESCHREIBUNG
- Nach dem Einfuegen einer Zeile in eine Tabelle mit einem
- AUTO_INCREMENT-Feld, diese Efun kann dazu benutzt werden den neuen
- Wert dieses Feldes zurueckzugeben.
+DESCRIPTION
+ After inserting a line into a table with an AUTO_INCREMENT field,
+ this efun can be used to return the (new) value of the AUTO_INCREMENT
+ field.
- Die Funktion ist nur verfuegbar wenn der Driver mit
- mySQL-Unterstuetzung compiliert wurde. In diesem Fall ist das Makro
- __MYSQL__ definiert.
+ The function is available only if the driver is compiled with
+ mySQL support. In that case, __MYSQL__ is defined.
- Die Efun ist privilegiert als ("mysql", "db_insert_id").
+ The efun triggers a privilege violation ("mysql", "db_insert_id").
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
- LDMud 3.2.11 machte die Efun privilegiert.
+HISTORY
+ Added in 3.2.9 .
+ LDMud 3.2.11 added the privilege violation.
-SIEHE AUCH
+SEE ALSO
db_affected_rows(E), db_conv_string(E), db_close(E), db_coldefs(E),
db_connect(E), db_error(E), db_exec(E), db_fetch(E), db_handles(E),
mysql(C), privilege_violation(M)
diff --git a/doc/efun/debug_message b/doc/efun/debug_message
index 6b3b652..35e09e1 100644
--- a/doc/efun/debug_message
+++ b/doc/efun/debug_message
@@ -4,34 +4,35 @@
void debug_message(string text)
void debug_message(string text, int flags)
-BESCHREIBUNG
- Gibt <text> an die Ausgaenge stdout und stderr sowie an die Datei
- <host>.debug.log oder an eine beliebige Kombination dieser drei aus.
+DESCRIPTION
+ Prints the given text to stdout, stderr, the <host>.debug.log file,
+ or any combination of these.
- Das Argument <flag> bezeichnet durch eine Kombination von Bitflags das
- Ziel und die Art, in der das Resultat geschrieben wird.
+ The parameter <flags> is a combination of bitflags determining the
+ target and the mode of writing.
- Die Ziel-Flags sind: DMSG_STDOUT, DMSG_STDERR und DMS_LOGFILE. Wird
- zusaetzlich das Flag DMSG_STAMP gesetzt, erhaelt jeder Eintrag einen
- Zeitstempel (Timestamp) im Format 'YYYY.MM.DD HH:MM:SS '.
+ The target flags are: DMSG_STDOUT, DMSG_STDERR and DMSG_LOGFILE.
+ If the flag DMSG_STAMP is given, the message is prepended with the
+ current date and time in the format 'YYYY.MM.DD HH:MM:SS '.
- Wenn <flags> 0 ist, weggelassen wird oder kein Ziel-Flag enthaelt,
- wird <text> standardmaessig an stdout und ins Logfile ausgegeben.
+ If <flags> is given as 0, left out, or contains no target
+ definition, debug_message() will print to stdout and to the logfile.
-BEISPIELE
- debug_message("Dieser Text geht an stdout und ins Logfile.\n");
- debug_message("Dies geht an stderr.\n", DMSG_STDERR);
- debug_message("Dies geht an stdout und stderr.\n", DMSG_STDOUT
- | DMSG_STDERR);
- debug_message("Dies geht an stdout und ins Logfile, mit Timestamp.\n",
- DMSG_STAMP);
- debug_message("Die geht an stdout, mit vorangestelltem Timestamp.\n",
- DMSG_STDOUT | DMSG_STAMP);
+EXAMPLES
+ debug_message("This goes to stdout and the logfile.\n");
+ debug_message("This goes to stderr.\n", DMSG_STDERR);
+ debug_message("This goes to stdout and stderr.\n"
+ , DMSG_STDOUT | DMSG_STDERR);
-GESCHICHTE
- Eingefuehrt in 3.2.1@34.
- LDMud 3.2.9 fuehrte das Argument <flags> ein.
+ debug_message("This goes to stdout and the logfile, with timestamp.\n"
+ , DMSG_STAMP);
+ debug_message("This goes to stdout and has the timestamp in front.\n"
+ , DMSG_STDOUT | DMSG_STAMP);
-SIEHE AUCH
+HISTORY
+ Introduced in 3.2.1@34.
+ LDMud 3.2.9 introduced the <flags> parameter.
+
+SEE ALSO
last_instructions(E)
diff --git a/doc/efun/deep_copy b/doc/efun/deep_copy
index 460d90a..1a4d7e1 100644
--- a/doc/efun/deep_copy
+++ b/doc/efun/deep_copy
@@ -1,27 +1,34 @@
SYNOPSIS
mixed deep_copy(mixed arg)
-BESCHREIBUNG
- Erzeugt eine echte Kopie von <arg> und liefert diese zurueck. Fuer
- Arrays und Mappings bedeutet dies, dass ein neues Array oder Mapping
- erzeugt wird, das exakte Kopien der Eintraege des Originals enthaelt.
- Eingebettete Arrays und Mappings werden ebenso echt kopiert.
+DESCRIPTION
+ Create a deep copy of <arg> and return it. For arrays, mappings,
+ structs and lightweight objects this means that a new array, mapping,
+ struct resp. lightweight object is created with copies of the
+ original content. Embedded arrays, mappings, structs or lightweight
+ objects are truly copied, too.
- Fuer andere Typen als Mappings und Arrays bewirkt diese Funktion
- nichts.
+ For other values this function is a no-op.
- Wenn im Driver DYNAMIC_COST definiert ist, zaehlt jedes eingebettete
- Mapping oder Array zu den Evaluationskosten sowohl in der Groesse als
- auch in der Einbettungstiefe.
+ If a lightweight objects was copied, the H_CREATE_LWOBJECT_COPY hook
+ will be called to finish initialization of the lightweight object.
-BEISPIELE
+ If DYNAMIC_COST is defined, every nested array, mapping, struct and
+ lightweight objects counts towards the evaluation cost in both size
+ and nesting depth.
+
+EXAMPLES
mixed *a, *b;
+
a = ({ 1, ({ 21, 22 }) });
b = deep_copy(a);
a[0] = -1; a[1][0] = -21;
- --> a ist jetzt ({ -1, ({ -21, 22 }) })
- b bleibt ({ 1, ({ 21, 22 }) })
+ --> a is now ({ -1, ({ -21, 22 }) })
+ b is still ({ 1, ({ 21, 22 }) })
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.6.
- LDMud 3.2.9 fuegte die dynamischen Kosten zur Efun hinzu.
+HISTORY
+ Introduced in LDMud 3.2.6.
+ LDMud 3.2.9 added the dynamic cost to the efun.
+
+SEE ALSO
+ copy(E)
diff --git a/doc/efun/deep_inventory b/doc/efun/deep_inventory
index 05200f1..12a2e8a 100644
--- a/doc/efun/deep_inventory
+++ b/doc/efun/deep_inventory
@@ -1,36 +1,40 @@
SYNOPSIS
- object * deep_inventory()
+ object * deep_inventory(void)
object * deep_inventory(object ob)
object * deep_inventory(object ob, int depth)
-BESCHREIBUNG
- Gibt ein Array der Objekte zurueck, die in <obj> enthalten sind.
- Wenn <obj> nicht angegeben wird, wird standardmaessig this_object()
- verwendet. Ebenso werden alle Objekte angegeben, die sich im Inventory
- der in <obj> enthaltenen Objekte befinden. Die Suche verlaeuft
- rekursiv absteigend.
+DESCRIPTION
+ Returns an array of the objects contained in the inventory of
+ ob (or this_object() if no arg given) and in the inventories
+ of these objects, climbing down recursively.
- Ist <depth> angegeben und ungleich 0, ist das Resultat wie folgt
- gefiltert:
- <depth> > 0: Nur die Objekte in den ersten <depth> Ebenen
- werden zurueckgegeben.
- <depth> < 0: Nur die Objekte in der -<depth>ten Ebene werden
- zurueckgegeben.
+ If <depth> is given and not 0, the result is limited as follows:
-BEISPIELE
+ <depth> > 0: Only the objects in the first <depth> levels of
+ inventory are returned.
+ <depth> < 0: Only the objects in level -<depth> of inventory are
+ returned.
+
+ In this, level '1' is the inventory of <ob> itself.
+
+EXAMPLES
+ Given the following inventory structure
+
ob
+- ob1
+- ob2
- | +- ob21
+ | `- ob21
| ob3
- | +- ob31
+ | `- ob31
+- ob4
-
- deep_inventory(ob) => ({ob1, ob2, ob3, ob4, ob21, ob31})
- deep_inventory(ob, 1) => ({ob1, ob2, ob3, ob4})
- deep_inventory(ob, 2) => ({ob1, ob2, ob3, ob4, ob21, ob31})
+ deep_inventory(ob) => ({ob1, ob2, ob3, ob4, ob21, ob31})
+ deep_inventory(ob, 1) => ({ob1, ob2, ob3, ob4})
+ deep_inventory(ob, 2) => ({ob1, ob2, ob3, ob4, ob21, ob31})
deep_inventory(ob, -2) => ({ob21, ob31})
-SIEHE AUCH
+HISTORY
+ LDMud 3.3.554 added the <depth> parameter.
+
+SEE ALSO
first_inventory(E), next_inventory(E), all_inventory(E)
diff --git a/doc/efun/destruct b/doc/efun/destruct
index fd4ab2c..2947aad 100644
--- a/doc/efun/destruct
+++ b/doc/efun/destruct
@@ -1,43 +1,43 @@
SYNOPSIS
void destruct(object ob)
-BESCHREIBUNG
- Zerstoert und entfernt das Objekt ob. Ist ob == 0 (ob wurde schon
- zerstoert), so passiert nichts. Nach dem Aufruf von destruct()
- existieren keine globalen Variablen mehr, sondern nur noch lokale
- Variablen und Argumente.
+DESCRIPTION
+ Completely destroy and remove object ob (if not already done so).
+ After the call to destruct(), no global variables will exist any
+ longer, only local ones, and arguments.
- Wenn sich ein Objekt selbst zerstoert, wird die Ausfuehrung nicht
- sofort abgebrochen. Wird die Efun this_object() aufgerufen, so
- liefert diese 0 zurueck.
+ If an object self-destructs, it will not immediately terminate
+ execution. If the efun this_object() will be called by the
+ destructed object, the result will be 0. Furthermore, all
+ calls to other objects and to simul-efuns will be ignored, instead
+ the driver will return 0 als 'call' result.
- Die meisten Mudlibs moegen es nicht, wenn andere Objekte mittels
- destruct() ins Daten-Nirwana geschickt werden. Stattdessen erwarten
- sie den Aufruf einer speziellen Lfun im zu zerstoerenden Objekt,
- welche normalerweise remove() heisst. Damit kann das zu
- zerstoerende Objekt noch abschliessende Arbeiten im Zusammenhang
- mit seinem Ableben erledigen, wie z. B. die Anpassung des Gewichtes
- seiner Umgebung etc. pp.
+ To keep things consistent, most mudlibs frown upon the
+ destruct()ion of other objects, and instead demand call_others
+ to a specific lfun in the object to destruct (traditionally
+ named "remove"). This will then ensure correct update of e.g.
+ weights, volumes etc. Additionally or instead, the master apply
+ prepare_destruct() can be used for this 'cleanup' functionality.
- Der Interpreter zerstoert das Objekt nicht sofort, sondern er
- markiert es als zerstoert, entfernt es von der Liste, die alle
- Objekte enthaelt, und fuegt es zu der Liste zu zerstoerenden
- Objekte hinzu. Die tatsaechliche Zerstoerung geschieht erst dann,
- wenn keine Referenzen mehr auf das Objekt existieren. Deshalb ist
- es moeglich, dass ein Objekt noch lange nach seiner Zerstoerung
- Speicher belegt, obwohl es von ausserhalb nicht mehr gefunden wird.
+ The interpreter does not really destruct the object
+ immediately, but marks it as deleted, removes it from the list
+ of all objects, and puts it onto a list of to-be-destructed
+ objects. The actual freeing occurs only when all references to
+ a destructed object have gone. Thus it is possible, that an
+ object occupies memory long after it has been destructed,
+ although the object is not visible anywhere anymore from
+ outside.
-BEISPIELE
+EXAMPLES
ob->remove();
- if(ob) // es existiert noch, vielleicht ist die Lfun
- // remove() nicht definiert?
- destruct(ob);
+ if(ob) /* still there, probably ob does not provide remove() */
+ destruct(ob);
- Dies ist die Standard-Methode, ein Objekt zu zerstoeren, ihm aber
- vorher noch die Chance zu geben, es selber zu tun.
+ This is a way of destructing an object but giving it a chance
+ to do it by itself.
-GESCHICHTE
- LDMud 3.2.7: 0 (zerstoerte Objekt) als Argument annehmen.
+HISTORY
+ Changed in 3.2.7 to accept destructed objects as argument, too.
-SIEHE AUCH
- clone_object(E), remove(A)
+SEE ALSO
+ clone_object(E), remove(A), prepare_destruct(M)
diff --git a/doc/efun/driver_info b/doc/efun/driver_info
index f609e63..45e7485 100644
--- a/doc/efun/driver_info
+++ b/doc/efun/driver_info
@@ -376,9 +376,27 @@
<what> == DI_NUM_REGEX_TABLE_SLOTS:
Number of slots in the regexp cache table.
- <what> == DI_NUM_LVALUES
+ <what> == DI_NUM_LVALUES:
Number of lvalues (values referenced by &var).
+ <what> == DI_NUM_NAMED_OBJECT_TYPES:
+ Number of named object types.
+
+ <what> == DI_NUM_NAMED_OBJECT_TYPES_TABLE_SLOTS:
+ Number of table entries for named object types.
+
+ <what> == DI_NUM_COROUTINES:
+ Number of coroutines.
+
+ <what> == DI_NUM_LWOBJECTS:
+ Number of lightweight objects.
+
+ <what> == DI_NUM_LPC_PYTHON_REFS:
+ Number of references to Python objects from LPC.
+
+ <what> == DI_NUM_PYTHON_LPC_REFS:
+ Number of references to LPC values from Python.
+
<what> == DI_SIZE_ACTIONS:
Total size of allocated actions.
@@ -449,6 +467,17 @@
<what> == DI_SIZE_BUFFER_SWAP:
The size of the memory buffer for the swap file.
+ <what> == DI_SIZE_NAMED_OBJECT_TYPES_TABLE:
+ The size of the table for named object types.
+
+ <what> == DI_SIZE_LWOBJECTS:
+ The size of all lightweight objects (not counting the size
+ of the values of their variables).
+
+ <what> == DI_SIZE_COROUTINES
+ The size of all coroutines (not counting the size of any
+ values held by the coroutines).
+
Memory swapper statistics:
@@ -659,7 +688,7 @@
- Status texts:
+ Status texts:
<what> == DI_STATUS_TEXT_MEMORY:
A printable string containing information about
@@ -682,6 +711,13 @@
(if the driver was compiled with them).
+ Misc Status:
+
+ <what> == DI_NUM_SIMUL_EFUNS_TABLED:
+ The number of known simul_efuns (active or not) in the simul_efun
+ table.
+
+
HISTORY
Introduced in LDMud 3.5.0.
diff --git a/doc/efun/dump_driver_info b/doc/efun/dump_driver_info
index 111f8ad..fb765ba 100644
--- a/doc/efun/dump_driver_info
+++ b/doc/efun/dump_driver_info
@@ -5,13 +5,13 @@
int dump_driver_info(int what, string filename)
DESCRIPTION
- Dumps information specificied by <what> into a file
+ Dumps information specified by <what> into a file
specified by <filename>. If <filename> is omitted,
a default file name is used. The function calls
master->valid_write() to check that it can write
the files. The file in question is always written anew
- On success the efun returns 1, or 0 if an error occured.
+ On success the efun returns 1, or 0 if an error occurred.
<what> == DDI_OBJECTS:
Dumps information about all live objects.
@@ -32,7 +32,7 @@
- the swap status:
nothing if not swapped,
'PROG SWAPPED' if only the program is swapped
- 'VAR SWAPPED' if only the variabes are swapped
+ 'VAR SWAPPED' if only the variables are swapped
'SWAPPED' if both program and variables are swapped
- the time the object was created
diff --git a/doc/efun/ed b/doc/efun/ed
index 44c84ff..8a8dc33 100644
--- a/doc/efun/ed
+++ b/doc/efun/ed
@@ -3,17 +3,17 @@
void ed(string file)
void ed(string file, string func)
-BESCHREIBUNG
- Der Aufruf von ed() ohne Argumente startet den Editor mit dem Namen
- der Fehlerdatei, die von master->valid_read(0, geteuid(this_player()),
- "ed_start", this_player()) bestimmt wird, gewoehnlich etwas wie
- ~/.err. Wenn dieses File leer ist, wird ed() sofort wieder beendet.
+DESCRIPTION
+ Calling without arguments will start the editor ed with the
+ name of the error file, that was returned by
+ master->valid_read(0, geteuid(this_player()), "ed_start",
+ this_player()), usually something like ~/.err. If that file is
+ empty, ed will immediatly exit again.
+ Calling ed() with argument file will start the editor on the
+ file. If the optional argument func is given, this function
+ will be called after exiting the editor.
- Wird ed() mit einem Argument <file> aufgerufen, wird der Editor fuer
- dieses File geoeffnet. Wird zusaetzlich das optionale Argument <func>
- angegeben, wird diese Funktion nach dem Beenden des ed() aufgerufen.
+ The editor ed is almost ed(1) compatible.
- Der LPC-Editor ist fast ed(1)-kompatibel.
-
-SIEHE AUCH
+SEE ALSO
enable_commands(E), query_editing(E), ed0(LPC)
diff --git a/doc/efun/efun b/doc/efun/efun
index 2e9ae6a..1f94ee4 100644
--- a/doc/efun/efun
+++ b/doc/efun/efun
@@ -1,18 +1,19 @@
NAME
efun
-BESCHREIBUNG
- Dieses Directory enthaelt die Beschreibungen fuer die Efuns in
- LDMud 3.3.
+DESCRIPTION
+ This directory contains descriptions for the efuns of LDMud 3.3.
- Diese Funktionen werden vom Driver zur Verfuegung gestellt und koennen
- von jedem LPC-Objekt verwendet werden.
+ These are functions that are supplied by the driver and can be
+ called by any LPC object (somewhat similar to system calls in the
+ C library).
- Spezielle Arten dieser Efuns sind:
+ There a few kinds of efuns:
- - 'Optional'
+ - 'optional'
- Es steht dem Mud-Betreiber frei, diese Efuns zu deaktivieren.
+ A mud's maintainer is free to deactivate these efuns when
+ compiling the driver:
break_point()
db_*()
@@ -36,23 +37,24 @@
json_serialize()
json_parse()
- - 'Vorlaeufig'
+ - 'preliminary' or 'experimental'
- Das Verhalten dieser Efuns kann sich in spaeteren Driverversionene
- aendern.
+ The behaviour of these efuns is not fixed yet, and may change
+ with further releases:
tls_*()
- xml_*()
+ xml_generate()
+ xml_parse()
- - 'Obsolet' bzw. 'Veraltet'
+ - 'deprecated' or 'obsolete'
+
+ These efuns should no longer be used, they are merely provided
+ for backwards compatibility:
make_shared_string()
md5()
sha1()
- Diese Efuns sollten nicht weiter verwendet werden. Sie stehen
- lediglich aus Kompatibilitaetsgruenden zur Verfuegung, und
- werden in einer spaeteren Drivervariante entfernt werden.
-SIEHE AUCH
+SEE ALSO
efuns(LPC), applied(A), master(M), lpc(LPC), concepts(C), driver(D)
diff --git a/doc/efun/environment b/doc/efun/environment
index 38ca58e..f4fc6ac 100644
--- a/doc/efun/environment
+++ b/doc/efun/environment
@@ -1,22 +1,21 @@
SYNOPSIS
- object environment()
+ object environment(void)
object environment(object obj)
object environment(string obj)
-BESCHREIBUNG
- Gibt das umgebende Objekt von <obj> wider. Das Objekt <obj> kann
- direkt angegeben werden oder ueber seinen Namen als String. Wenn
- kein Argument angegeben wird, wird die Umgebung des aktuellen
- Objekts zurueck gegeben.
+DESCRIPTION
+ Returns the surrounding object of obj, which may be given by name.
+ If no argument is given, it returns the surrounding of the current
+ object.
- Zerstoerte Objekte haben kein Environment.
+ Destructed objects do not have an environment.
-BEISPIELE
+EXAMPLES
object room;
room = environment(this_player());
- Dies liefert den Raum, in dem sich der Spieler im Moment aufhaelt.
+ This will return the current room you are in.
-SIEHE AUCH
+SEE ALSO
first_inventory(E), next_inventory(E), all_inventory(E),
all_environment(E)
diff --git a/doc/efun/exec b/doc/efun/exec
index 10a320a..7df1df5 100644
--- a/doc/efun/exec
+++ b/doc/efun/exec
@@ -1,40 +1,39 @@
-GESCHUETZT
SYNOPSIS
int exec(object new, object old)
-BESCHREIBUNG
- exec() schaltet die Verbindung um vom interaktiven Objekt <old> zum
- Objekt <old>. Wenn <new> ebenfalls interaktiv ist, wird dessen
- Verbindung zum Objekt <old> uebertragen, die Verbindungne von <old>
- und <new> werden also ausgetauscht. Wenn <new> nicht interaktiv ist,
- ist <old> nach der Ausfuehrung von exec() nicht mehr interaktiv.
+DESCRIPTION
+ exec() switches the connection from the interactive object old
+ to the object new. If the new object is also interactive, it's
+ connection will be transferred to the old object, thus
+ exchaning the two connections between the object. If the new
+ object is not interactive, the old will not be interactive
+ anymore after the exec call succeeded.
- Das Resultat von exec() ist 1 bei Erfolg, 0 sonst.
+ The result is 1 on success, and 0 on failure.
- exec() wird verwendet, um unterschiedliche "user objects" zu laden
- oder um User mit totem Netz wieder zu verbinden.
+ exec() is used to load different "user objects" or to reconnect
+ link dead users.
- Um Sicherheitsmechanismen zu gewaehrleisten, wird im Masterobjekt
- valid_exec(<laufendes Programm>, <new>, <old>) aufgerufen. Dieser
- Aufruf muss etwas von 0 verschiedenes liefern, um den Aufruf von
- exec() zu erlauben.
+ To provide security mechanisms, the interpreter calls
+ master->valid_exec(current_program, new, old), which must
+ return anything other than 0 to allow this exec() invocation.
- Wenn <old> this_player() war, enthaelt this_player() nach dem Aufruf
- von exec() <new> und umgekehrt. Gleiches gilt fuer this_interactive().
+ After the exec(), if arg 2 was this_player(), this_player()
+ becomes arg 1, else vice versa. Ditto for this_interactive().
- Vorsicht ist geboten, wenn eine simul-efun() um exec() herum gebaut
- wird: das <laufende Programm>, das an valid_exec() uebergeben wird,
- ist das simul-efun Objekt. Um dieses Problem zu umgehen, kann mittels
- bind_lambda() #'exec an das richtige Objekt gebunden und anschliessend
- mit funcall() aufgerufen werden.
+ Take care when writing a simul-efun around exec(): the
+ 'current_program' passed to the valid_exec() function will be
+ that of the simul-efun object. To get around this, use
+ bind_lambda() to bind #'exec to the real object and funcall()
+ the resulting closure.
-BEISPIELE
+EXAMPLES
ob = clone_object("std/player");
exec(ob, this_object());
destruct(this_object());
-GESCHICHTE
- LDMud 3.2.9 fuehrte den Austauschprozess fuer this_interactive() ein.
+HISTORY
+ LDMud 3.2.9 added the switchover of this_interactive().
-SIEHE AUCH
+SEE ALSO
connect(M), disconnect(M), logon(A), interactive(E)
diff --git a/doc/efun/execute_command b/doc/efun/execute_command
index 1ef2343..c0e8a0b 100644
--- a/doc/efun/execute_command
+++ b/doc/efun/execute_command
@@ -1,21 +1,27 @@
-VORLAEUFIG, GESCHUETZT
SYNOPSIS
int execute_command(string command, object origin, object player)
-BESCHREIBUNG
- Diese Funktion bietet Low-Level Zugriff auf den Kommandoparser:
- <command> wird in Verb und Rest aufgespaltet und es werden die
- entsprechenden add_actions in <origin> aufgerufen. Fuer die
- Ausfuehrung der Funktion(en) wird this_player() auf <player> gesetzt.
- execute_command() setzt auch passende Werte fuer query_command()
- und query_verb(), die dem angegebenen <command> entsprechen.
+DESCRIPTION
+ Low-level access to the command parser: take the <command>, parse it
+ into verb and argument and call the appropriate action added to
+ <origin> (read: <origin> is the object 'issuing' the command).
+ For the execution of the function(s), this_player() is set to
+ player. The function also sets results of query_command() and
+ query_verb() to match the given <command>.
- execute_command() beruecksichtigt weder den H_MODIFY_COMMAND noch den
- H_NOTIFY_FAIL Hook. Zwar kann notify_fail() verwendet werden, die
- Verarbeitung muss jedoch durch das aufrufende Objekt erfolgen.
+ The result is non-0 if the command was found and execute, and 0
+ otherwise.
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.7.
+ The efun raises a privilege violation ("execute_command",
+ this_object(), origin, command).
-SIEHE AUCH
- hooks(C), command(E), notify_fail(E), command_stack(E)
+ Note that this function does not use the H_MODIFY_COMMAND
+ and H_NOTIFY_FAIL hooks; the notify_fail() efun is can be used,
+ but must be evaluated by the caller.
+
+HISTORY
+ Introduced in LDMud 3.2.7.
+
+SEE ALSO
+ hooks(C), match_command(E), command(E), notify_fail(E),
+ command_stack(E)
diff --git a/doc/efun/exp b/doc/efun/exp
index 584fc0b..112c141 100644
--- a/doc/efun/exp
+++ b/doc/efun/exp
@@ -1,11 +1,11 @@
SYNOPSIS
- float exp(int|float zahl)
+ float exp(int|float)
-BESCHREIBUNG
- Die Exponentialfunktion. Liefert e^zahl.
+DESCRIPTION
+ The exponential function.
-GESCHICHTE
- LDMud 3.2.9 erlaubte Ganzzahlen als Argument.
+HISTORY
+ LDMud 3.2.9 added integers as arguments.
-SIEHE AUCH
+SEE ALSO
log(E), pow(E)
diff --git a/doc/efun/expand_define b/doc/efun/expand_define
index 5e2eca0..3313d3b 100644
--- a/doc/efun/expand_define
+++ b/doc/efun/expand_define
@@ -2,23 +2,23 @@
string expand_define(string name)
string expand_define(string name, string arg, ...)
-BESCHREIBUNG
- Wandelt das Makro <name> mit den Argumenten <arg> in den
- vollstaendigen String um. Fuer <arg> wird standardmaessig ein
- leerer String "" verwendet. Die Funktion liefert das umgewandelte
- Makro oder 0, wenn kein Makro mit dem Namen <name> existiert.
+DESCRIPTION
+ Expands the macro <name> with the argument(s) <arg>... (default is
+ one empty string "").
+ Result is the expanded macro, or 0 if there is no macro with
+ that name.
- Diese Efun kann nur aufgerufen werden, waehrend das Objekt kompiliert
- wird, ihre Benutzung ist deshalb auf wenige Funktionen beschraenkt,
- etwa den H_INCLUDE_DIRS Treiber Hook oder runtime_error() im
- Masterobjekt.
+ This efun is applicable only while an object is compiled,
+ therefore its usage is restricted to a few functions like the
+ H_INCLUDE_DIRS driver hook, or the masters runtime_error()
+ function.
-BEISPIELE
- Waehrend dem Kompilieren von 'foo.c':
- expand_define("__FILE__") --> "foo.c"
+EXAMPLES
+ While compiling 'foo.c':
+ expand_define("__FILE__") --> "foo.c"
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.1@93.
+HISTORY
+ Introduced in 3.2.1@93.
-SIEHE AUCH
+SEE ALSO
hooks(C), runtime_error(M)
diff --git a/doc/efun/explode b/doc/efun/explode
index f004d41..fca1aa8 100644
--- a/doc/efun/explode
+++ b/doc/efun/explode
@@ -2,17 +2,15 @@
string * explode(string str, string del)
bytes * explode(bytes str, bytes del)
-BESCHREIBUNG
- Liefert ein Feld (Array) mit Zeichenketten (Strings), indem alle
- Vorkommen von del (delimiter = Trenner) aus str herausgeschnitten
- werden und so str in mehrere Zeichenketten zerlegt wird. Falls
- eine Bytefolge uebergeben wurde, so wird diese in gleicher Weise
- zerschnitten und zurueckgegeben.
+DESCRIPTION
+ Return an array of strings, created when the string str is split
+ into substrings as divided by del. When given a byte sequence
+ returns an array of byte sequences in a similar fashion.
- implode(explode(str, del), del) == str ist immer wahr.
+ implode(explode(str, del), del) == str is always true.
-BEISPIELE
- Funktion Rueckgabewert
+EXAMPLES
+ function returns
-------------------------------------------------------------------
explode(" ab cd ef ", " ") ({ "", "ab", "cd", "ef", "" })
explode("abc", "abc") ({ "", "" })
@@ -21,14 +19,14 @@
explode("abc", "xyz") ({ "abc" })
explode("abc", "") ({ "a", "b", "c" })
-GESCHICHTE
- Zeitpunkt der Aenderung unbekannt.
- explode(" ab cd ef ", " ") lieferte frueher ({ "ab", "cd", "ef" })
- anstatt ({ "", "ab", "cd", "ef", "" }), d. h., leere Zeichenketten
- wurden ignoriert. Das neue Verhalten ist schoener, da nun
- implode(explode(str, del), del) == str immer wahr ist.
- Seit 3.5.0 liefert explode("","") ({""}) zurueck, sodass garantiert
- ist, dass ein nicht-leeres Array geliefert wird.
+HISTORY
+ Date of change is unknown.
+ explode(" ab cd ef ", " ") formerly returned ({ "ab", "cd", "ef" })
+ instead of ({ "", "ab", "cd", "ef", "" }), i. e. the empty strings
+ were ignored. The new behaviour is more consistent, because now
+ implode(explode(str, del), del) == str is always true.
+ Since 3.5.0 explode("","") returns ({""}), so it is guaranteed to
+ return a non-empty array.
-SIEHE AUCH
+SEE ALSO
sscanf(E), extract(E), implode(E), regexplode(E)
diff --git a/doc/efun/extern_call b/doc/efun/extern_call
index b20bbf8..a1e4fcf 100644
--- a/doc/efun/extern_call
+++ b/doc/efun/extern_call
@@ -1,15 +1,15 @@
SYNOPSIS
- int extern_call()
+ int extern_call();
-BESCHREIBUNG
- Liefert 0, wenn die momentane ausgefuehrte Funktion durch eine lokale
- Funktion aufgerufen wurde, einen Wert ungleich 0 fuer Aufrufe durch
- call_other(), den Treiber, Closures etc. Im Moment liefert die
- Funktion in all diesen Faellen 1 zurueck, in Zukunft koennte
- allerdings eine Unterscheidung der Aufrufe moeglich werden.
+DESCRIPTION
+ Returns zero, if the function that is currently being executed
+ was called by a local call, non-zero for call_other(), driver
+ applies, closure calls, etc. Currently the only return value
+ for them is 1, but later the various methods may be
+ distinguished by means of the return value.
-GESCHICHTE
- Eingefuehrt in 3.2@263 bzw. 3.2.1@12.
+HISTORY
+ Introduced in 3.2@263 resp. 3.2.1@12
-SIEHE AUCH
+SEE ALSO
call_other(E), previous_object(E)
diff --git a/doc/efun/file_size b/doc/efun/file_size
index 59a1ec3..78673e1 100644
--- a/doc/efun/file_size
+++ b/doc/efun/file_size
@@ -3,15 +3,13 @@
int file_size(string file)
-BESCHREIBUNG
- Liefert die Dateigroesse in Bytes.
+DESCRIPTION
+ Returns the size of the file in bytes.
- Existiert die angegebene Datei nicht oder ist fuer das aufrufende
- Objekt bzw. den aufrufenden Benutzer nicht lesbar, so wird
- FSIZE_NOFILE (-1) zurueckgeliefert.
+ Size FSIZE_NOFILE (-1) indicates that the file either does not exist,
+ or that it is not readable for the calling object/user.
+ Size FSIZE_DIR (-2) indicates that it is a directory.
- Verzeichnisse haben die Groesse FSIZE_DIR (-2).
-SIEHE AUCH
- write_file(E), write_bytes(E), read_file(E), read_bytes(E),
- get_dir(E)
+SEE ALSO
+ write_file(E), write_bytes(E), read_file(E), read_bytes(E), get_dir(E)
diff --git a/doc/efun/filter b/doc/efun/filter
index f75b98d..dca723f 100644
--- a/doc/efun/filter
+++ b/doc/efun/filter
@@ -13,34 +13,36 @@
, mixed extra...)
mapping filter(mapping arg, closure cl, mixed extra...)
-BESCHREIBUNG
- Ruft fuer jedes Element des Arrays oder Mappings <arg> die Funktion
- <ob>-><func>() bzw. die Closure <cl> auf und liefert jene Elemente,
- fuer die die Funktion / Closure TRUE ergeben hat. Die <extra>
- Argumente werden als zusaetzliche Parameter an die Funktion
- uebergeben und duerfen keine Referenzen von Array- oder Mapping-
- Elementen sein (wie &(i[1]) ).
+DESCRIPTION
+ Call the function <ob>-><func>() resp. the closure <cl> for
+ every element of the array, or mapping <arg>, and return a
+ result made from those elements for which the function call
+ returns TRUE. The <extra> arguments are passed as additional
+ parameters to the function calls and must not be references of
+ array of mapping elements (like &(i[1]) ).
- Wird <ob> nicht angegeben oder ist es weder ein String noch ein
- Objekt, wird standardmaessig this_object() verwendet.
+ If <ob> is omitted, or neither a string nor an object, it
+ defaults to this_object().
- Ist <arg> ein Array oder struct, wird <fun> mit jedem Element des
- Arrays/der struct als ersten Parameter aufgerufen, gefolgt von den
- <extra> Argumenten. Wenn das Resultat der Funktion TRUE ergibt, wird
- das Element in das Ergebnis der filter() Operation mit einbezogen.
- Wird filter() mit einem Mapping <map> anstelle der Funktion <func>
- aufgerufen, wird jedes Element im Array <arg>, das ein Key von <map>
- ist, ins Ergebnis mit einbezogen.
+ If <arg> is an array or struct, the function will be called with
+ each of the array/struct values as first parameter, followed by the
+ <extra> arguments. If the result from the function call is true,
+ the array element in question is included into the efun result.
- Wenn <arg> ein Mapping ist, wird die Funktion <func> mit jedem Key
- als erstem und (falls vorhanden) den Werten dieses Keys als zweitem
- Parameter, gefolgt von den <extra> Argumenten, aufgerufen. Wenn die
- Funktion TRUE ergibt, wird das betreffende Element des Mappings ins
- Ergebnis aufgenommen.
+ If the efun is used with a mapping <map> instead of a function,
+ every array element which is key in <map> is included into the
+ result.
- Abhaengig von der Groesse des Mappings <arg> erfolgt der Aufruf der
- Funktion auf drei unterschiedliche Arten:
+
+ If <arg> is a mapping, the function will be called with
+ each of the mapping keys as first, and (if existing) the
+ associated values as second parameter, followed by the <extra>
+ arguments. If the result is true, the mapping element in question
+ is included into the result.
+
+ Depending on the width of the mapping <arg>, the function
+ call takes one of three forms:
widthof(arg) == 0: ob->func(key, 0, extra...)
== 1: ob->func(key, arg[key], extra...)
@@ -48,22 +50,25 @@
, ({ arg[key,0] ...arg[key,width-1] })
, extra...)
- Der Vorteil dieser Vorgehensweise ist, dass beide Typen von
- multidimensionalen Mappings (Mappings mit mehreren Werte pro Key und
- Mappings aus Arrays) gleich verarbeitet werden koennen.
+ The advantage of this approach is that the two types of
+ multi-dimensional mappings (mappings with multiple values
+ per key, and mappings of arrays) can be treated in the same way.
- Ist <arg> ein String, werden der Filterfunktion die einzelnen Zeichen
- des Strings uebergeben und nur jene Zeichen im zurueckgegebenen
- String aufgenommen, fuer die die Filterfunkton != 0 zurueckgibt.
+ If <arg> is a string, the function will be called with each of the
+ characters of the string. If the result is true, the character in
+ question is included into the result.
-ANMERKUNGEN
+NOTES
- Fuer Arrays wirkt filter() wie filter_array(), fuer Mappings stellt
- filter() eine Verallgemeinerung von filter_indices() dar.
+ Historical Note: filter() used with arrays behaves like
+ filter_array(), but used with mappings is a generalisation of
+ filter_indices().
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.6. Die Funktion loest filter_array() ab.
+HISTORY
+ Introduced in LDMud 3.2.6, obsoletes filter_array().
+ LDMud 3.3.439 added filtering of strings.
-SIEHE AUCH
+SEE ALSO
filter(E), filter_indices(E), map(E), walk_mapping(E), member(E),
m_contains(E)
+
diff --git a/doc/efun/filter_indices b/doc/efun/filter_indices
index 504effe..3c5bb50 100644
--- a/doc/efun/filter_indices
+++ b/doc/efun/filter_indices
@@ -1,27 +1,23 @@
-VERALTET
SYNOPSIS
- mapping filter_indices(mapping map, string func, string|object ob,
- mixed extra ... )
- mapping filter_indices(mapping map, closure cl, mixed extra ... )
+ mapping filter_indices(mapping, string func, string|object ob, ...)
+ mapping filter_indices(mapping, closure cl, ...)
-BESCHREIBUNG
- Die Funktion ob->func() bzw. die Closure cl wird fuer jedes Element
- von <map> aufgerufen. Das erste Argument von func() ist dabei der Key
- von <map>, die restlichen Argumente von func() sind die <extra>
- Argumente. Die Werte von <extra> duerfen keine geschuetzten
- Referenzen wie &(i[0]) enthalten.
+DESCRIPTION
+ ob->func() is called resp. cl applied to every element in the
+ mapping, with first argument being the key of the
+ element, and then the extra args that were given to
+ filter_indices (these args must not be protected references like
+ &(i[0]). If the function returns true, the element is
+ added to the result mapping. ob can also be an object_name of an
+ object.
- Wenn <func> TRUE liefert, wird das Element in das Resultat
- uebernommen. Fuer <ob> kann man entweder ein Objekt oder den
- Objektnamen uebergeben.
+ If <ob> is omitted, or neither a string nor an object, it
+ defaults to this_object().
- Wird <ob> nicht angegeben oder weder ein String noch ein Objekt, so
- wird standardmaessig this_object() verwendet.
+HISTORY
+ In LDMud 3.2.6 renamed from filter_mapping() and generalised
+ by efun filter().
-GESCHICHTE
- In LDMud 3.2.6 umbenannt aus filter_mapping() und verallgemeinert in
- der Efun filter().
-
-SIEHE AUCH
+SEE ALSO
filter(E), map(E), map_indices(E), walk_mapping(E), member(E),
m_contains(E)
diff --git a/doc/efun/filter_objects b/doc/efun/filter_objects
index e895818..79a82f2 100644
--- a/doc/efun/filter_objects
+++ b/doc/efun/filter_objects
@@ -2,11 +2,12 @@
<object|lwobject> * filter_objects(<object|lwobject> *arr,
string fun, mixed extra, ...)
-BESCHREIBUNG
- Diese Efun ist aehnlich wie filter(), es wird aber
- arr[n]->fun(extra,...) aufgerufen. Wenn der Aufruf einen Wert != 0
- liefert, wird das Objekt arr[n] in das Resultat uebernommen.
- 0-Eintraege in <arr> werden ignoriert.
+DESCRIPTION
+ Similar to filter_array() but calls arr[n]->fun(extra, ...).
+ If the call returns != 0, the object arr[n] ist included in
+ the returned array.
+ 0-entries in arr are ignored.
-SIEHE AUCH
+SEE ALSO
filter(E), map(E), map_objects(E)
+
diff --git a/doc/efun/find_call_out b/doc/efun/find_call_out
index 6716a04..a89ee29 100644
--- a/doc/efun/find_call_out
+++ b/doc/efun/find_call_out
@@ -1,28 +1,14 @@
SYNOPSIS
- int find_call_out(string fun)
- int find_call_out(closur cl)
+ int find_call_out(string func)
+ int find_call_out(closure func)
-BESCHREIBUNG
- Findet den ersten call_out() auf die Funktion fun im aktuellen Objekt
- (bzw. auf die Closure cl) der ausgefuehrt werden soll. Zurueck gegeben
- wird die verbleibende Zeit bis zum Aufruf. Wenn kein call_out()
- anhaengig ist, wird -1 zurueck gegeben.
+DESCRIPTION
+ Find the first call-out due to be executed for function <func>
+ in the current object resp. for the closure <func>, and return the
+ time left. If no call-out is found return -1.
-FEHLER
- Die Suche nach call_out()s auf Closures funktioniert nur, wenn der
- genaue Wert der Closure gesucht wird.
+HISTORY
+ Finding a call_out to a closure was introduced in 3.2.1@45.
- Das funktioniert:
- closure cl = symbol_function("main", obj);
- call_out(cl, 2);
- find_call_out(cl);
-
- Das funktioniert nicht:
- call_out(symbol_function("main", obj), 2);
- find_call_out(symbol_function("main", obj));
-
-GESCHICHTE
- Die Suche nach call_out()s auf Closures wurde in 3.2.1@45 eingefuehrt.
-
-SIEHE AUCH
+SEE ALSO
call_out(E), remove_call_out(E), call_out_info(E)
diff --git a/doc/efun/find_input_to b/doc/efun/find_input_to
index e499452..f5f4d89 100644
--- a/doc/efun/find_input_to
+++ b/doc/efun/find_input_to
@@ -4,23 +4,22 @@
int find_input_to(object player, object|lwobject fun)
int find_input_to(object player, object|lwobject ob, string fun)
-BESCHREIBUNG
- Findet den zuletzt fuer <player> gestarteten input_to(), abhaengig vom
- Argument <fun>:
- - <fun> ist ein String: der Funktionsname des input_to() muss passen
- - <fun> ist ein Objekt: das Objekt, an welches die Funktion des
- input_to() gebunden ist, muss passen
- - <fun> ist eine Closure: die input_to() Closure muss passen
- - <ob> und <fun> sind angegeben: sowohl Objekt als auch
- Funktionsname muessen passen.
+DESCRIPTION
+ Find the input_to most recently added to the interactive <player>
+ object matching the <fun> argument:
+ - <fun> is a string: the input_to functionname has to match
+ - <fun> is an object: the object the input_to function is bound to
+ has to match
+ - <fun> is a closure: the input_to closure has to match.
+ - <ob> and <fun> are given: both the object and the functionname have
+ to match
- Die Funktion liefert -1, wenn kein input_to() gefunden wurde, sonst
- die Position im input_to() Stack (wobei 0 den als letztes
- hinzugefuegten input_to() bezeichnet).
+ Return -1 if not found, or the position in the input_to stack (0
+ being _least_ recently added input_to).
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
+HISTORY
+ Introduced in LDMud 3.2.9.
-SIEHE AUCH
+SEE ALSO
input_to(E), input_to_info(E), remove_input_to(E),
query_input_pending(E)
diff --git a/doc/efun/find_object b/doc/efun/find_object
index 58e611a..3b6e708 100644
--- a/doc/efun/find_object
+++ b/doc/efun/find_object
@@ -1,23 +1,23 @@
SYNOPSIS
object find_object(string str)
-BESCHREIBUNG
- Liefert das Objekt mit dem Namen <str>. Wenn das Objekt nicht
- geladen ist, wird es nicht gefunden.
+DESCRIPTION
+ Find an object with the object_name str. If the object isn't loaded,
+ it will not be found.
-BEISPIELE
+EXAMPLES
object obj;
obj = find_object("std/thing");
obj = find_object("std/thing.c");
obj = find_object("/std/thing");
obj = find_object("/std/thing.c");
- Alle vier Zeilen sind gleichwertig.
+ All four statements are equal.
obj = find_object("/std/thing#42");
- Liefert den Clone, dessen object_name "std/thing#42" ist, wenn er
- existiert.
+ returns the clone whose object_name is "std/thing#42", if
+ it exists.
-SIEHE AUCH
+SEE ALSO
object_name(E), to_object(E)
diff --git a/doc/efun/first_inventory b/doc/efun/first_inventory
index d571d8c..612b3c8 100644
--- a/doc/efun/first_inventory
+++ b/doc/efun/first_inventory
@@ -3,45 +3,42 @@
object first_inventory(string ob)
object first_inventory(object ob)
-BESCHREIBUNG
- Liefert das erste Objekt im Inventory von <obj>, wobei <obj> entweder
- ein Objekt oder der Name eines Objekts ist. Wenn <obj> nicht angegeben
- wird, wird standardmaessig this_object() verwendet.
+DESCRIPTION
+ Get the first object in the inventory of ob, where ob is
+ either an object or the file name of an object. If ob is not
+ given, the current object is assumed.
-BEISPIELE
- Diese Efun verwendet man am haeufigsten im folgenden Kontext:
+EXAMPLES
+ This efun is mostly used in the following context:
- for(obj=first_inventory(container);obj;obj=next_inventory(obj))
- {
- <irgendwelcher Code>
- }
+ for(ob=first_inventory(container);ob;ob=next_inventory(ob)) {
+ <some actions>
+ }
- Wer solche Aufrufe haeufig verwendet, findet es moeglicherweise
- sinnvoll, ein Praeprozessor-Makro zu verwenden:
+ If you use such calls frequently then it would be very useful
+ to use a preprocessor macro:
- #define FORALL(x, y) for(x=first_inventory(y);x;
- x=next_inventory(x))
+ #define FORALL(x, y) for(x=first_inventory(y);x;x=next_inventory(x))
- Damit vereinfacht sich das obige Beispiel zu:
+ So the above example could be written like this:
- FORALL(obj, container)
- {
- <irgendwelcher Code>
- }
+ FORALL(ob, container) {
+ <some actions>
+ }
- ACHTUNG: Wenn das Objekt <obj> innerhalb von <irgendwelcher Code>
- bewegt wird, liefert next_inventory() ein Objekt aus dem neuen
- Inventory von <obj>. Auch sollte next_inventory() nicht fuer
- zerstoerte Objekte <obj> aufgerufen werden. Fuer den Fall, dass
- <obj> bewegt und/oder zerstoert wird, ist folgende Loesung
- vorzuziehen:
+ Warning: If the object ob is moved inside <some actions>, then
+ next_inventory() will return an object from the new inventory
+ of ob. You also shouldn't call next_inventory() on destructed
+ objects. So in case of move and/or destruction the following
+ is a better solution:
- for(obj=first_inventory(container);obj;)
- {
- next=next_inventory(obj);
- <irgendwelcher Code mit Moves oder Removes>
- obj=next;
- }
+ for(ob=first_inventory(container);ob;) {
+ next=next_inventory(ob);
+ <some actions and moves and/or removes>
+ ob=next;
+ }
-SIEHE AUCH
- next_inventory(E), all_inventory(E), environment(E), deep_inventory(E)
+
+SEE ALSO
+ next_inventory(E), all_inventory(E), environment(E),
+ deep_inventory(E)
diff --git a/doc/efun/floatp b/doc/efun/floatp
index 43fe9ba..2bcd396 100644
--- a/doc/efun/floatp
+++ b/doc/efun/floatp
@@ -1,10 +1,10 @@
SYNOPSIS
- int floatp(mixed arg)
+ int floatp(mixed)
-BESCHREIBUNG
- Liefert 1, wenn das Argument eine Fliesskommazahl (float) ist,
- ansonsten 0.
+DESCRIPTION
+ Returns 1 if the arg is a floating point number, 0 else.
-SIEHE AUCH
- intp(E), mappingp(E), stringp(E), bytesp(E), closurep(E),
- objectp(E), referencep(E), pointerp(E), symbolp(E), clonep(E)
+SEE ALSO
+ bytesp(E), clonep(E), closurep(E), coroutinep(E), intp(E),
+ lpctypep(E), lwobjectp(E), mappingp(E), objectp(E), pointerp(E),
+ referencep(E), stringp(E), structp(E), symbolp(E)
diff --git a/doc/efun/floor b/doc/efun/floor
index 9599a16..375f81c 100644
--- a/doc/efun/floor
+++ b/doc/efun/floor
@@ -1,19 +1,19 @@
SYNOPSIS
float floor(float arg)
-BESCHREIBUNG
- Rundet das Argument <arg> ab auf die naechste ganze Zahl und gibt
- diesen Wert zurueck. Wenn <arg> ein Integer ist, wird das Resultat
- trotzdem als Float zurueckgegeben.
+DESCRIPTION
+ Round the <arg>ument downwards the nearest whole number, returning
+ that value. If the <arg>ument value is an integer, the result will
+ be that value, converted to float.
-BEISPIELE
- floor(4.5) --> liefert 4.0
- floor(-4.5) --> liefert -5.0
- floor(5) --> liefert 5.0
+EXAMPLES
+ floor(4.5) - returns 4.0
+ floor(-4.5) - returns -5.0
+ floor(5) - returns 5.0
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.7.
- LDMud 3.2.9 erlaubt auch Integer als Argumente.
+HISTORY
+ Introduced in LDMud 3.2.7.
+ LDMud 3.2.9 added integers as argument values.
-SIEHE AUCH
+SEE ALSO
abs(E), ceil(E)
diff --git a/doc/efun/funcall b/doc/efun/funcall
index e507ad6..25900ab 100644
--- a/doc/efun/funcall
+++ b/doc/efun/funcall
@@ -1,15 +1,37 @@
SYNOPSIS
- mixed funcall(closure cl, mixed arg, ...)
+ mixed funcall(closure cl, mixed arg ...)
-BESCHREIBUNG
- Wertet die Closure <cl> aus. Die Argumente <args> werden als Argumente
- an die Closure uebergeben. Wenn <cl> keine Closure ist, wird <cl>
- zurueck gegeben.
+DESCRIPTION
+ Evaluates the closure. The extra args will be passed as args
+ to the closure. If cl is not a closure, it will simply be
+ returned.
-GESCHICHTE
- Eingefuehrt in 3.2@70.
- Das Zurueckgeben von <cl>, wenn es sich nicht um eine Closure handelt,
- auch wenn Argumente angegeben wurden, wurde in 3.2.1 eingefuehrt.
+EXAMPLES
+ mixed eval(object ob, string func, mixed *args)
+ {
+ return funcall(#'call_other, ob, func, args);
+ }
-SIEHE AUCH
+ This will result in calling
+
+ ob->func(args).
+
+ In combination with the '...' operator, the functionality
+ of apply() can be implemented:
+
+ mixed eval(object ob, string func, mixed *args)
+ {
+ return funcall(#'call_other, ob, func, args...);
+ }
+
+ will result in calling
+
+ ob->func(args[0],args[1],...,args[sizeof(args)-1]).
+
+HISTORY
+ Introduced in 3.2@70.
+ Returning a non-closure as it is even when args are given was
+ introduced with 3.2.1.
+
+SEE ALSO
apply(E), quote(E)
diff --git a/doc/efun/function_exists b/doc/efun/function_exists
index 2c7f03a..516d69b 100644
--- a/doc/efun/function_exists
+++ b/doc/efun/function_exists
@@ -6,55 +6,54 @@
mixed function_exists(string str, object|lwobject ob)
mixed function_exists(string str, object|lwobject ob, int flags)
-BESCHREIBUNG
- Sucht eine Funktion <str> im aktuellen Objekt bzw. im Objekt <ob>. Je
- nach den angegeben <flags> werden folgende Informationen angezeigt:
+DESCRIPTION
+ Look up a function <str> in the current object, respectively
+ in the object <ob>. Depending on the value of <flags>, one
+ of the following informations is returned:
- FEXISTS_PROGNAME (0, default):
- Liefert den Namen des Programms, in dem die Funktion definiert ist.
- Das kann entweder der Objektname object_name(ob) sein, oder der
- Name eines geerbten Programms. Wenn der Driver nicht im Compat-Modus
- laeuft, beginnt der Name immer mit einem '/'.
+ <flags> == FEXISTS_PROGNAME (0, default):
+ Return the name of the program the function is defined in.
+ This can be either object_name(ob), or the name of an inherited
+ program. If !compat mode, the returned name always begins
+ with a '/'.
- FEXISTS_FILENAME (1):
- Liefert den Namen der Datei, in der die Funktion definiert ist. Das
- kann auch ein Inlcude-File sein. Wenn der Driver nicht im Compat-
- Modus laeuft, beginnt der Name mit einem '/'.
+ <flags> == FEXISTS_FILENAME (1):
+ Return the name of the file the function is defined in (this
+ may be an include file). If !compat mode, the returned name
+ always begins with a '/'.
- FEXISTS_LINENO (2):
- Liefert die Zeilennummer im Quellcode, in der die Funktion definiert
- wird.
+ <flags> == FEXISTS_LINENO (2):
+ Return the line number within the source file.
- FEXISTS_ALL (3):
- Liefert ein Array mit der gesamten Information der anderen Flags,
- sowie zusaetzlichen Informationen ueber die Funktion:
+ <flags> == FEXISTS_ALL (3):
+ Return an array with all the above information, plus information
+ about the function type/flags/number of arguments.
- string [FEXISTS_PROGNAME]: der Programmname
- string [FEXISTS_FILENAME]: der Dateiname
- int [FEXISTS_LINENO]: die Zeilennummer
- int [FEXISTS_NUMARG]: die Anzahl der Funktionsargumente
- int [FEXISTS_TYPE]: der Ergebnistyp der Funktion
- int [FEXISTS_FLAGS]: die Funktionsflags
+ The returned array contains this information:
+ string [FEXISTS_PROGNAME]: the program name
+ string [FEXISTS_FILENAME]: the filename
+ int [FEXISTS_LINENO]: the linenumber
+ int [FEXISTS_NUMARG]: the number of arguments to the function
+ int [FEXISTS_TYPE]: the return type of the function
+ int [FEXISTS_FLAGS]: the function flags
- <flags> kann mit einem binaren Oder mit NAME_HIDDEN ergaenzt
- werden, um Informationen ueber als static und protected deklarierte
- Funktionen in anderen Objekten zu erhalten. Es ist nicht moeglich,
- Informationen ueber als private deklarierte Funktionen zu erhalten.
+ The <flags> value can be or-ed to NAME_HIDDEN to return
+ information about static and protected functions in other objects.
+ It is not possible to return information about private functions.
- Wenn die gesuchte Funktion nicht gefunden werden kann (weil sie
- nicht existiert oder fuer den Aufrufer nicht sichtbar ist), dann
- wird als Rueckgabewert 0 geliefert.
+ If the function cannot be found (because it doesn't exist or
+ it is not visible to the caller), the result is 0.
-BEISPIELE
- function_exists("create");
+EXAMPLES
+ function_exists("create")
function_exists("create", that_object, NAME_HIDDEN|FEXISTS_ALL);
-GESCHICHTE
- LDMud 3.2.10 erweiterte die Menge der zurueck gelieferten Werte und
- fuehrte das <flags> Argument ein.
- LDMud 3.2.12/3.3.713 fuegte die zusaetzliche Funktionsinformation zum
- FEXISTS_ALL Ergebnis hinzu.
+HISTORY
+ LDMud 3.2.10 broadened the range of returned values and introduced
+ the <flags> argument.
+ LDMud 3.2.12/3.3.713 added the function type/flags/number of arguments
+ to the result of FEXISTS_ALL.
-SIEHE AUCH
+SEE ALSO
call_other(E), call_resolved(E), functionlist(E), variable_exists(E)
diff --git a/doc/efun/functionlist b/doc/efun/functionlist
index 2845648..7ac8e34 100644
--- a/doc/efun/functionlist
+++ b/doc/efun/functionlist
@@ -1,56 +1,55 @@
-GESCHUETZT
SYNOPSIS
#include <functionlist.h>
#include <lpctypes.h>
mixed * functionlist(object|lwobject|string ob, int flags)
-BESCHREIBUNG
- Liefert ein Array mit Informationen zu den Lfuns von <ob>. Fuer jede
- Funktion werden 1 bis 4 Werte (abhaengig von <flags>) in das Ergebnis
- eingetragen, und zwar in folgender Reihenfolge:
- - der Name der Funktion
- - die Flags der Funktion (vergleiche weiter unten)
- - den Rueckgabetyp (aufgelistet in <lpctypes.h>)
- - die Anzahl Argumente, die die Funktion akzeptiert.
+DESCRIPTION
+ Returns an array with information about <ob>s lfunctions. For every
+ function, 1 to 4 values (depending on <flags>) are stored in
+ the result array conveying in this order:
+ - the name of the function
+ - the function flags (see below)
+ - the return type (listed in <lpctypes.h>)
+ - the number of accepted argumens
- <ob> kann als normales oder leichtgewichtiges Objekt oder als
- Objektname uebergeben werden. Im zweiten Fall versucht die Efun
- nicht, das Objekt vorher zu laden.
+ <ob> may be given as regular or lightweight object or as a filename.
+ In the latter case, the efun does not try to load the object before
+ proceeding.
- <flags> bestimmt sowohl, welche Informationen im Ergebnis gesammelt
- werden, als auch, fuer welche Funktionen die Pruefung durchgefuehrt
- wird. Der Wert von <flags> wird durch binaere Veroderung folgender
- Konstanten aus <functionlist.h> festgelegt:
+ <flags> determines both which information is returned for every
+ function, and which functions should be considered at all.
+ Its value is created by bin-or'ing together following flags from
+ <functionlist.h>:
- Festlegen der gesammelten Information:
- RETURN_FUNCTION_NAME liefert den Funktionsnamen
- RETURN_FUNCTION_FLAGS liefert die Flags der Funktion
- RETURN_FUNCTION_TYPE liefert den Rueckgabetyp der Funktion
- RETURN_FUNCTION_NUMARG liefert die Anzahl moeglicher
- Argumente.
+ Control of returned information:
+ RETURN_FUNCTION_NAME include the function name
+ RETURN_FUNCTION_FLAGS include the function flags
+ RETURN_FUNCTION_TYPE include the return type as an integer
+ RETURN_FUNCTION_LPCTYPE include the return type as lpctype value
+ RETURN_FUNCTION_NUMARG include the number of arguments.
- RETURN_FUNCTION_ARGTYPE ist definiert, aber nicht
- implementiert.
+ The name RETURN_FUNCTION_ARGTYPE is defined but not implemented.
- Festlegen der geprueften Funktionen:
- NAME_INHERITED geerbte Funktionen nicht beachten
- TYPE_MOD_STATIC static deklarierte Funktion nicht beachten
- TYPE_MOD_PRIVATE private deklarierte Funktionen nicht beachten
- TYPE_MOD_PROTECTED protected deklarierte Funktionen nicht
- beachten
- NAME_HIDDEN nur beachten, wenn sichtbar durch Vererbung
+ Control of listed functions:
+ NAME_INHERITED don't list if defined by inheritance
+ TYPE_MOD_STATIC don't list if static function
+ TYPE_MOD_PRIVATE don't list if private
+ TYPE_MOD_PROTECTED don't list if protected
+ NAME_HIDDEN don't list if not visible through inheritance
- <flags> besteht aus der binaeren Veroderung der oben genannten Flags,
- zusammen mit den folgenden:
- TYPE_MOD_VARARGS die Funktion ist varargs deklariert
- NAME_UNDEFINED die Funktion ist noch nicht definiert, aber
- referenziert
- NAME_CROSS_DEFINED die Funktion ist definiert, um in einem
- anderen Programm verwendet zu werden
- TYPE_MOD_NOMASK die Funktion ist nomask deklariert
- TYPE_MOD_PUBLIC die Funktion ist public deklariert
+ The 'flags' information consists of the bin-or of the list control
+ flags given above, plus the following:
-SIEHE AUCH
+ TYPE_MOD_VARARGS function takes varargs
+ NAME_UNDEFINED function not defined yet, but referenced.
+ NAME_CROSS_DEFINED function is defined to be in a different program
+ TYPE_MOD_NO_MASK function is nomask
+ TYPE_MOD_PUBLIC function is public
+
+HISTORY
+ LDMud 3.6.7 introduced RETURN_FUNCTION_LPCTYPE.
+
+SEE ALSO
inherit_list(E), function_exists(E), variable_list(E),
call_resolved(E)
diff --git a/doc/efun/garbage_collection b/doc/efun/garbage_collection
index 86a87c4..4caa2df 100644
--- a/doc/efun/garbage_collection
+++ b/doc/efun/garbage_collection
@@ -1,29 +1,55 @@
-GESCHUETZT
SYNOPSIS
void garbage_collection()
void garbage_collection(string filename)
+ void garbage_collection(string filename, int flag)
-BESCHREIBUNG
- Befiehlt dem Treiber, nach Ende der aktuellen Ausfuehrung eine
- Garbage Collection zu beginnen. Je nachdem, welcher Memory Allocator
- verwendet wird, ist die Garbage Collection mehr oder weniger
- gruendlich.
+DESCRIPTION
+ Tell the parser to initiate a garbage collection after the
+ current execution ended. Depending on the type of memory
+ allocator used, this GC is more less thorough.
- Wird der smalloc Memory Allocator verwendet, erzeugt GC einen Output
- in einem Logfile. Der Standardname fuer das Logfile wird beim
- Programmstart festgelegt, kann aber zur Laufzeit veraendert werden,
- wenn das Argument <filename> angegeben ist. Der Log-Output wird in
- diesem Fall an das bezeichnete Logfile angefuegt.
+ If the 'smalloc' memory allocator is used, the GC produces
+ output to a log file. The default name of the log file is
+ specified at program start, but can be modified at runtime:
- Fuer andere Memory Allocators erzeugt garbage_collection() keinen
- Output. Ein allfaelliges Argument <filename> wird ignoriert.
+ With the <filename> argument a log file for the GC output
+ different from the default log file can be specified.
- Diese efun verursacht den Aufruf von privilege_violation().
+ If <flag> is not given or 0, the output from the next
+ and only the next GC will go into the log file. If the file
+ already exists, the new output will be appended.
-GESCHICHTE
- LDMud 3.2.9 fuehrte das Argument <filename> ein.
- LDMud 3.3.209 fuehrte das Argument <flag> ein.
- LDMud 3.5.0 machte die efun privilegiert.
+ If <flag> is 1, the <filename> will be used as the new
+ default log file for all following GCs. If the file already
+ exists, it will be overwritten from the start.
-SIEHE AUCH
+ If a different memory allocator is used, the GC does not produce
+ output and the <filename> and <flag> arguments are ignored.
+
+ Calling this efun causes a privilege_violation.
+
+EXAMPLES
+ garbage_collection()
+ [ GC occurs -> logs into default file ]
+
+ garbage_collection("/GCLOG")
+ [ GC occurs -> logs into "/GCLOG" ]
+
+ garbage_collection("/GCLOG", 1)
+ [ GC occurs -> logs into "/GCLOG", sets default log to "/GCLOG" ]
+
+ garbage_collection("/GCLOG")
+ garbage_collection("/GCLOG2")
+ [ GC occurs -> logs into "/GCLOG" ]
+
+ garbage_collection("/GCLOG", 1)
+ garbage_collection("/GCLOG2")
+ [ GC occurs -> logs into "/GCLOG2", sets default log to "/GCLOG" ]
+
+HISTORY
+ LDMud 3.2.9 added the <filename> argument.
+ LDMud 3.3.209 added the <flag> argument.
+ LDMUd 3.5.0 made the efun privileged.
+
+SEE ALSO
rusage(E), valid_write(M), privilege_violation(M)
diff --git a/doc/efun/get_dir b/doc/efun/get_dir
index d0bdf5a..d298e3e 100644
--- a/doc/efun/get_dir
+++ b/doc/efun/get_dir
@@ -4,124 +4,114 @@
mixed * get_dir(string str)
mixed * get_dir(string str, int mask)
-BESCHREIBUNG
- Benoetigt einen Pfad als erstes Argument und liefert ein Feld
- (Array) mit Dateinamen bzw. Eigenschaften der gefundenen Dateien im
- angegebenen Verzeichnis.
+DESCRIPTION
+ This function takes a path as argument and returns an array of file
+ names and attributes in that directory.
- Liefert 0 zurueck, wenn es das Verzeichnis, in dem gesucht werden
- soll, nicht gibt.
+ Returns 0 if the directory to search in does not exist.
- Der Dateinamen-Teil des Pfades darf "*" und "?" als Platzhalter
- enthalten: jeder "*" steht fuer eine beliebige Anzahl Zeichen (oder
- sich selber), "?" fuer ein beliebiges Zeichen. Entsprechend liefert
- get_dir("/pfad/*") ein alphabetisch sortiertes Feld aller Dateien
- im Verzeichnis "/pfad" oder ({ "/pfad/*" }), wenn es diese Datei
- geben sollte.
+ The filename part of the path may contain '*' or '?' as wildcards:
+ every '*' matches an arbitrary amount of characters (or just itself),
+ a '?' matches any character. Thus get_dir("/path/*") would return an
+ alphabetically sorted array of all files in directory "/path", or
+ just ({ "/path/*" }) if this file happens to exist.
- Gibt man den Pfad eines Verzeichnisses mit abschliessendem "/" oder
- "/." an (z. B. get_dir("/pfad/.")), so erhaelt man den Inhalt des
- Verzeichnisses. Um Informationen ueber das Verzeichnis selber zu
- erhalten, muss man den Pfad des Verzeichnisses angeben.
+ To query the content of a directory, use the directory name with a
+ trailing '/' or '/.', for example get_dir("/path/."). Use the
+ directory name as it is to get information about the directory itself.
- Das optionale zweite Argument ist eine Bitmaske, mit der man
- angeben kann, welche Informationen man ueber die angegebenen
- Dateien erhalten moechte.
+ The optional second argument mask can be used to get
+ information about the specified files.
- GETDIR_EMPTY (0x00) get_dir() liefert ein leeres Feld (nicht
- wirklich sinnvoll)
- GETDIR_NAMES (0x01) liefert die alphabetisch sortierten
- Dateinamen.
- GETDIR_SIZES (0x02) liefert die unsortierten Dateigroessen
- (file_size()), Verzeichnisse haben die
- Dateigroesse FSIZE_DIR (-2).
- GETDIR_DATES (0x04) liefert die unsortierten Zeiten der jeweils
- letzten Aenderung in Sekunden seit dem
- 01.01.1970.
- GETDIR_ACCESS (0x40) liefert die unsortierten Zeiten des jeweils
- letzten Zugriffes in Sekunden seit dem
- 01.01.1970.
- GETDIR_MODES (0x80) liefert die Filemode-Maske
+ GETDIR_EMPTY (0x00) get_dir returns an empty array (not very
+ useful).
+ GETDIR_NAMES (0x01) put the alphabetically sorted file names into
+ the returned array.
+ GETDIR_SIZES (0x02) put the file sizes unsorted into the returned
+ array. directories have size FSIZE_DIR (-2).
+ GETDIR_DATES (0x04) put the file modification dates (in seconds
+ since 01/01/1970) unsorted into the
+ returned array.
+ GETDIR_ACCESS (0x40) put the file access dates unsorted into
+ the returned array.
+ GETDIR_MODES (0x80) put the unix file modes unsorted into
+ the returned array.
- GETDIR_ALL (0xDF) Liefert all Werte zurueck.
+ GETDIR_ALL (0xDF) Return all.
- GETDIR_PATH (0x10) Dateinamen werden als volle Pfade geliefert.
- (ein ev. fehlendes GETDIR_NAMES wird als
- vorhanden angenommen).
- GETDIR_UNSORTED (0x20) Das Ergebnis wird nicht sortiert.
+ GETDIR_PATH (0x10) if this mask bit is set, the filenames with
+ the full path will be returned
+ (GETDIR_NAMES is implied).
+ GETDIR_UNSORTED (0x20) if this mask bit is set, the result of will
+ _not_ be sorted.
- Wichtig: Man muss GETDIR_NAMES|GETDIR_UNSORTED verwenden, wenn man
- die Eintraege in der selben Reihenfolge wie bei GETDIR_SIZES und
- GETDIR_DATES haben moechte.
+ Note: You should use GETDIR_NAMES|GETDIR_UNSORTED to get the entries
+ in the same order as with GETDIR_SIZES and GETDIR_DATES.
- Die Eintraege in der Bitmaske koennen miteinander kombiniert
- werden.
+ The values of mask can be added together.
-ANMERKUNGEN
- Der als Argument angegebene Pfad wird vor Benutzung von valid_read()
- im Master der Mudlib verarbeitet. Hierbei kann die Mudlib eine
- Normalisierung vornehmen (z.B. fuehrende und endstaendige "/"
- entfernen). Dann fuehrt dann u.U. zu erwarteten Resultaten (z.B. dass
- get_dir("/dir/", ...) nicht den Inhalt von /dir/ zurueckgibt).
- Compat mode: GETDIR_PATH liefert die Pfade ohne fuehrenden /.
+NOTES
+ The path argument to this efun is processed by valid_read() in the
+ mudlib master before being used. The mudlib may normalize this path
+ (e.g. strip leading or trailing "/") and this may lead to expected
+ results (e.g. get_dir("/dir/", ...) not returning the contents
+ of /dir/).
+ COMPAT mode: GETDIR_PATH will return the paths without leading /.
-BEISPIELE
- Funktion Rueckgabewert
+EXAMPLES
+ function returns
-------------------------------------------------------------------
- get_dir("/obj/.") Alle Dateien, die im Verzeichnis
- /obj enthalten sind.
- get_dir("/obj/") Wie get_dir("/obj/").
+ get_dir("/obj/.") all files contained in directory /obj.
+ get_dir("/obj/") the same as get_dir("/obj/")
- get_dir("/obj/schwert.c") ({ "schwert.c" }), sofern
- /obj/schwert.c existiert (als
- Datei oder Verzeichnis), ansonsten
- ({}), sofern /obj ein Verzeichnis
- ist, ansonsten 0.
+ get_dir("/obj/sword.c") ({ "sword.c" }) if /obj/sword.c
+ exists (it may be a file or a
+ directory), otherwise ({ }) if
+ /obj is a directory,
+ otherwise 0.
- get_dir("/obj/*") ({ "*" }), sofern * existiert.
- Ansonsten und normalerweise ein
- alphabetisch sortiertes Feld mit
- den Namen aller Dateien und
- Verzeichnisse in /obj, sofern /obj
- ein Verzeichnis ist, ansonsten 0.
+ get_dir("/obj/*") ({ "*" }) if * exists.
+ otherwise and normally an
+ alphabetically sorted array with all
+ names of files and directories in
+ /obj if /obj is a directory,
+ otherwise 0.
- get_dir("/obj/schwert.c", GETDIR_SIZES)
- ({ <Groesse von /obj/schwert.c> }),
- sofern /obj/schwert.c existiert.
- get_dir("/obj/.", GETDIR_NAMES) Wie get_dir("/obj/.").
- get_dir("/obj/.", GETDIR_SIZES) Ein unsortiertes Feld mit den
- Groessen der Dateien in /obj.
- get_dir("/obj/.", GETDIR_NAMES|GETDIR_SIZES|GETDIR_DATES)
- oder kuerzer
- get_dir("/obj/.", GETDIR_ALL) Ein eindimensionales und nach
- Namen sortiertes Feld, das fuer
- jede Datei in /obj den Namen, die
- Groesse und den Zeitpunkt der
- letzten Aenderung enthaelt, z.B.
+ get_dir("/obj/sword.c", GETDIR_SIZES) ({ <size of /obj/sword.c> })
+ if that file exists.
+ get_dir("/obj/.", GETDIR_NAMES) the same as get_dir("/obj/.").
+ get_dir("/obj/.", GETDIR_SIZES) an array with the sizes of the files
+ in /obj, not sorted by names.
+ get_dir("/obj/.", GETDIR_NAMES|GETDIR_SIZES|GETDIR_DATES) or shorter
+ get_dir("/obj/.", GETDIR_ALL) an one-dimensional array that
+ contains for each file in /obj its
+ name, its size and its modification
+ date, sorted by names, for example
({
- "axt.c" , 927, 994539583,
- "schwert.c", 1283, 998153903,
+ "axe.c" , 927, 994539583,
+ "sword.c", 1283, 998153903,
}).
- get_dir("/obj/schwert.c", GETDIR_NAMES|GETDIR_PATH)
- ({ "/obj/sword.c" }), sofern
- vorhanden.
- get_dir("/obj/schwert.c", GETDIR_PATH) Kurzform dafuer.
+ get_dir("/obj/sword.c", GETDIR_NAMES|GETDIR_PATH)
+ ({ "/obj/sword.c" }) if applicable.
+ get_dir("/obj/sword.c", GETDIR_PATH) Short form of the same query.
+
transpose_array(({ get_dir(str, GETDIR_NAMES|GETDIR_UNSORTED)
, get_dir(str, GETDIR_SIZES)
, get_dir(str, GETDIR_DATES) }));
- Liefert ein unsortiertes Feld mit Feldern, von denen ein jedes
- Name, Groesse und Zeit einer Datei enthaelt, z. B.
+ This returns an array of arrays, with filename, size and
+ filetime as elements, not sorted by names, for example
({
- ({ "schwert.c", 1283, 998153903 }),
- ({ "axt.c" , 927, 994539583 }),
+ ({ "sword.c", 1283, 998153903 }),
+ ({ "axe.c" , 927, 994539583 }),
}).
-GESCHICHTE
- LDMud 3.2.9: GETDIR_PATH eingefuehrt.
- LDMud 3.2.11: GETDIR_ACCESS und GETDIR_MODES eingefuehrt.
-SIEHE AUCH
+HISTORY
+ LDMud 3.2.9 added GETDIR_PATH.
+ LDMud 3.2.11/3.3.648 added GETDIR_ACCESS and GETDIR_MODES.
+
+SEE ALSO
mkdir(E), rmdir(E), file_size(E), write_file(E), write_bytes(E),
read_file(E), read_bytes(E)
diff --git a/doc/efun/get_error_file b/doc/efun/get_error_file
index d97a1a5..d01a69d 100644
--- a/doc/efun/get_error_file
+++ b/doc/efun/get_error_file
@@ -1,21 +1,21 @@
SYNOPSIS
mixed * get_error_file(string name, int set_forget_flag)
-BESCHREIBUNG
- Liefert Informationen ueber den letzten Fehler, der fuer <name>
- aufgetreten ist, wobei <name> ein gueltiger Eintrag in der Wizlist
- sein muss.
+DESCRIPTION
+ Return information about the last error which occurred for
+ <name> (where <name> is a valid name from the wiz list).
- Das Resultat ist ein Array aus vier Elementen: der Dateiname des
- Programms, in dem der Fehler aufgetreten ist, die Zeilennummer in der
- Datei, die Fehlermeldung (Laufzeitfehler beginnen gewoehnlich mit
- einem *) und ein numerisches Flag (das 'forget flag'), wenn der
- Fehler bereits angeschaut wurde.
+ Result is an array of four elements: the filename of the
+ program where the error occurred, the linenumber in the
+ program, the error message (runtime error messages usually
+ start with a '*'), and a numerical flag (the 'forget flag') if
+ the error information has been queried already.
- Wenn es keinen Fehler fuer <name> gibt, wird 0 zurueckgegeben.
+ If there is no error stored for the given <name>, 0 is
+ returned.
- Wenn <set_forget_flag> ungleich 0 ist, wird das 'forget flag' gesetzt,
- nachdem die Fehlermeldung ausgegeben wurde.
+ If <set_forget_flag> is non-zero, the 'forget' flag is set
+ for the error message after it has been returned.
-SIEHE AUCH
+SEE ALSO
ed(E), valid_read(M)
diff --git a/doc/efun/get_eval_cost b/doc/efun/get_eval_cost
index ac3ab9d..62f95b7 100644
--- a/doc/efun/get_eval_cost
+++ b/doc/efun/get_eval_cost
@@ -1,16 +1,15 @@
SYNOPSIS
int get_eval_cost()
-BESCHREIBUNG
- Liefert die noch verbleibenden Eval Kosten, die das momentane
- Kommando noch verbrauchen darf.
+DESCRIPTION
+ Returns the remaining evaluation cost the current
+ execution (the current command) may use up.
- Das Resultat beginnt bei einer hohen, vom Treiber festgelegten Zahl
- und nimmt fuer jede ausgefuehrte Anweisung ab.
+ It starts at a driver given high value and
+ is reduced with each executed statement.
-GESCHICHTE
- Der Anfangswert, also die vom Treiber zur Verfuegung gestellten Evals,
- sind seit 3.2.6 in LDMud als Makro verfuegbar.
+HISTORY
+ The initial value was made available as macro in LDMud 3.2.6.
-SIEHE AUCH
+SEE ALSO
rusage(E), command(E), query_limits(E)
diff --git a/doc/efun/get_extra_wizinfo b/doc/efun/get_extra_wizinfo
index fd77b86..1f55b0a 100644
--- a/doc/efun/get_extra_wizinfo
+++ b/doc/efun/get_extra_wizinfo
@@ -1,16 +1,21 @@
-GESCHUETZT
SYNOPSIS
- mixed get_extra_wizinfo(object|lwobject|string|int wiz)
+ mixed get_extra_wizinfo(object wiz)
+ mixed get_extra_wizinfo(lwobject wiz)
+ mixed get_extra_wizinfo(string wiz)
+ mixed get_extra_wizinfo(int wiz)
-BESCHREIBUNG
- Liefert die <extra> Information, die in der Wizlist fuer den
- angegebenen Gott <wiz> angegeben wurde.
+DESCRIPTION
+ Returns the 'extra' information that was set for the given
+ wizard <wiz> in the wizlist.
- Ist <wiz> ein normales oder leichtgewichtiges Objekt, so wird
- der Eintrag des Erzeugers (UID) verwendet.
- Ist <wiz> ein String (ein Erzeuger oder eine UID), so bezeichnet er
- den Namen des Eintrags in der Wizlist, der gelesen werden soll.
- Ist <wiz> 0, wird der Standardeintrag aus der Wizlist genommen.
+ If <wiz> is a regular or lightweight object, the entry of its
+ creator (uid) is used.
+ If <wiz> is a string (a creator aka uid), it names the entry
+ to use.
+ If <wiz> is the number 0, the data is get from the default wizlist
+ entry.
-SIEHE AUCH
+ The function causes a privilege violation.
+
+SEE ALSO
wizlist_info(E), set_extra_wizinfo(E)
diff --git a/doc/efun/get_type_info b/doc/efun/get_type_info
index 09e1e4e..a0de5ad 100644
--- a/doc/efun/get_type_info
+++ b/doc/efun/get_type_info
@@ -1,57 +1,62 @@
SYNOPSIS
+ mixed get_type_info(mixed arg)
mixed get_type_info(mixed arg, int flag)
-BESCHREIBUNG
- Liefert Informationen uber den Typ von <arg>, wie von <flag>
- angegeben.
+DESCRIPTION
+ Returns info about the type of arg, as controlled by the flag.
- Wenn <flag> keine Zahl ist, liefert get_type_info() ein Array, dessen
- erstes Element ein Integer ist, der den Datentyp bezeichnet, wie in
- <lpctypes.h> definiert. Der zweite Eintrag kann zusaetzliche
- Informationen zu <arg> enthalten.
+ If the optional argument <flag> is not given, an array is
+ returned whose first element is an integer denoting the data
+ type, as defined in <lpctypes.h>. The second entry can contain
+ additional information about arg.
- Ist <flag> 0, wird nur das erste Element (d.h. der Datentyp) geliefert.
- Ist <flag> 1, wird nur das zweite Element geliefert.
+ If <flag> flag is the number 0, only the first element of that array
+ (i.e. the data type) is returned (as int). If <flag> is 1, the
+ second element is returned.
- Wenn <arg> eine Closure enthaelt, so kann get_type_info() das Objekt
- der Closure liefern, wenn fuer <flag> 2 gesetzt ist. (Fuer 'alien
- lfun closures' ist das das Objekt, in dem die Closure definiert ist,
- nicht das Objekt, an das die Closure gebunden ist.)
+ If <arg> is a closure or coroutine, the <flag> setting 2 lets the
+ efun return the object of the closure resp. coroutine (which for
+ 'lfun closures' is the object the lfun is defined in, which is not
+ necessarily the object the closure is bound to).
- Wenn <arg> eine LFun/Context-Closure enthaelt, so kann get_type_info()
- den Namen des definierenden Programmes liefern, wenn fuer <flag> 3
- gesetzt ist. Fur andere Closures wird 0 zurueckgegeben.
+ If <arg> is a struct, the <flag> setting 2 lets the efun
+ return the base name of the struct.
- Wenn <arg> eine LFun/Context-Closure enthaelt, so kann get_type_info()
- den Namen der Funktion liefern, wenn fuer <flag> 4
- gesetzt ist. Fur andere Closures wird 0 zurueckgegeben.
+ If <arg> is a lfun, context closure or coroutine, the <flag>
+ setting 3 lets the efun return the name of the program the closure
+ resp. coroutine was defined in. For other closures, <flag>
+ setting 3 returns 0.
- Fuer jeden anderen Wert fuer <flag> liefert die Funktion -1.
+ If <arg> is a lfun, context closure or coroutine, the <flag>
+ setting 4 lets the efun return the name of the function.
+ For other closures, <flag> setting 4 returns 0.
- Die zusaetzlichen Informationen (also der zweite Eintrag des Arrays)
- beinhalten:
- - fuer Mappings deren Breite, also die Anzahl Datenwerte pro Key.
- - fuer Symbole und gequotete Arrays die Anzahl Quotes.
- - fuer Closures den (internen) Typ der Closure.
- - fuer gemeinsam verwendete Strings 0, ungleich 0 fuer andere Strings
- - fuer structs der eindeutige Identifizierungsstring
- - -1 fuer alle anderen Datentypen
+ For every other <flag> setting, -1 is returned.
-FEHLER
- Diese Funktion unterliegt haeufigen Veraenderungen im Zug der
- Treiberentwicklung.
+ The secondary information is:
+ - for mappings the width, ie the number of data items per key.
+ - for symbols and quoted arrays the number of quotes.
+ - for closures, the (internal) closure type, as defined in
+ <lpctypes.h>.
+ - for strings 0 for shared strings, and non-0 for others.
+ - for structs the unique identifier string.
+ - for Python objects the name of the type.
+ - -1 for all other datatypes.
-GESCHICHTE
- Eingefuehrt in 3.2@127.
- Flagwert 2 eingefuehrt in 3.2.1@84.
- Zusatzinformationen zu Strings eingefuehrt in 3.2.7.
- Bis und mit 3.2.7 lieferte get_type_info(closure, 2) keine Objekte
- von Lamda Closures und gebundenen Lambda Closures.
- Bis und mit 3.2.7 lieferte get_type_info(closure, 2) keine Objekte von
- Efun-, Simul-Efun- oder Operator-Closures.
- LDMud 3.3.276 fuegte die zusaetzliche Information fuer structs hinzu.
- LDMud 3.3.548 fuegte Flagwert '3' hinzu.
- LDMud 3.3.708 fuegte Flagwert '4' hinzu.
+BUGS
+ This function seems to be due to frequent changes as the
+ driver develops resp. is debugged.
-SIEHE AUCH
- debug_info(E), typeof(E), to_object(E)
+HISTORY
+ Introduced in 3.2@127
+ Flag setting 2 was introduced in 3.2.1@84.
+ Secondary string information was introduced in 3.2.7.
+ Up to 3.2.7 inclusive, get_type_info(closure,2) did not return
+ the object from a lambda closure or bound-lambda closure.
+ In the 3.2 branch, the 'flag' argument could be of any type.
+ LDMud 3.3.276 added the secondary information for structs.
+ LDMud 3.3.548 added flag setting '3' for lfun/context closures.
+ LDMud 3.3.708 added flag setting '4' for lfun/context closures.
+
+SEE ALSO
+ debug_info(E), typeof(E), to_object(E), check_type(E)
diff --git a/doc/efun/geteuid b/doc/efun/geteuid
index d107e85..93c0bde 100644
--- a/doc/efun/geteuid
+++ b/doc/efun/geteuid
@@ -1,17 +1,15 @@
SYNOPSIS
string geteuid(object|lwobject ob)
-BESCHREIBUNG
- Liefert die effektive User-ID des Objekts <obj> (normalerweise ein
- Gott oder eine Domain). Objekte, die durch <obj> geclonet werden,
- erhalten diese User-ID. Die effektive User-ID wird auch fuer
- Zugriffschecks verwendet. Wenn <obj> nicht angegeben wird, wird
- standardmaessig this_object() verwendet.
+DESCRIPTION
+ Get the effective user-id of the object (mostly a wizard or
+ domain name). Standard objects cloned by this object will get
+ that userid. The effective userid is also used for checking access
+ permissions. If ob is omitted, is this_object() as default.
-GESCHICHTE
- Seit 3.2.1@47 war diese Efun nur verfuegbar, wenn EUIDs verwendet
- wurden.
- Seit 3.2.7 ist diese Efun immer verfuegbar.
+HISTORY
+ Since 3.2.1@47, this efun is availabe only when using euids.
+ Since 3.2.7, this efun is always available.
-SIEHE AUCH
+SEE ALSO
getuid(E), configure_object(E)
diff --git a/doc/efun/getuid b/doc/efun/getuid
index c417586..7512d0b 100644
--- a/doc/efun/getuid
+++ b/doc/efun/getuid
@@ -1,16 +1,15 @@
SYNOPSIS
string getuid(object|lwobject ob)
-BESCHREIBUNG
- User-IDs werden im COMPAT-Modus nicht verwendet.
- Die Funktion liefert die UID des Objekts, also den Namen des Gottes
- oder der Domain oder Gruppe, die fuer das Objekt verantwortlich ist.
- Der Name entspricht dem Namen, der in der Wizlist verwendet wird.
- Wird <ob> nicht angegeben, wird standardmaessig this_object()
- genommen.
+DESCRIPTION
+ User-ids are not used in compat mode.
+ Get user-id of the object, i.e. the name of the wizard or
+ domain that is responsible for the object. This name is also
+ the name used in the wizlist. If no arg is given, use
+ this_object() as default.
-GESCHICHTE
- Seit 3.2.1@47 ist diese Efun ein Alias fuer creator().
+HISTORY
+ Since 3.2.1@47, this creator() is an alias for this efun.
-SIEHE AUCH
+SEE ALSO
geteuid(E), configure_object(E), creator(E)
diff --git a/doc/efun/gmtime b/doc/efun/gmtime
index ff0303f..10ae708 100644
--- a/doc/efun/gmtime
+++ b/doc/efun/gmtime
@@ -4,35 +4,35 @@
int * gmtime(int clock)
int * gmtime(int *uclock)
-BESCHREIBUNG
- Interpretiert <clock> als Anzahl Sekunden seit dem 01. Januar 1970,
- 00:00:00 Uhr und gibt die Zeit in UTC in einer schoenen Struktur
- aus. Wird <clock> nicht angegeben, wird stattdessen time() verwendet.
+DESCRIPTION
+ Interpret the argument clock as number of seconds since Jan,
+ 1st, 1970, 0:00, and return the time in UTC in a nice structure.
+ if <clock> is not specified, time() is used as default.
- Alternativ kann auch ein Array mit zwei Elementen angegeben werden,
- wie es von uclock() geliefert wird: das erste Element wird
- wie <clock> interpretiert, das zweite Element bezeichnet die
- Mikrosekunden in der aktuellen Sekunde. Dieses zweite Element wird
- ignoriert.
+ Alternatively, accept an array of two ints: the first is <clock>
+ value as in the first form, the second int is the number of
+ microseconds elapsed in the current second, which is ignored.
- Das Resultat von gmtime() ist ein Array, das folgende Werte beinhaltet:
- int TM_SEC (0) : Sekunden (0..59)
- int TM_MIN (1) : Minuten (0..59)
- int TM_HOUR (2) : Stunden (0..23)
- int TM_MDAY (3) : Tag im Monat (1..31)
- int TM_MON (4) : Monat im Jahr (0..11)
- int TM_YEAR (5) : Jahr (z.B. 2001)
- int TM_WDAY (6) : Wochentag (Sunday = 0)
- int TM_YDAY (7) : Tag im Jahr (0..365)
- int TM_ISDST (8) : TRUE: Daylight saving time
+ The result is an array of integers:
-BEISPIELE
- printf("Heute ist %s\n", ({ "Sonntag", "Montag", "Dienstag",
- "Mittwoch", "Donnerstag", "Freitag", "Samstag"})
- [gmtime()[TM_WDAY]]);
+ int TM_SEC (0) : Seconds (0..59)
+ int TM_MIN (1) : Minutes (0..59)
+ int TM_HOUR (2) : Hours (0..23)
+ int TM_MDAY (3) : Day of the month (1..31)
+ int TM_MON (4) : Month of the year (0..11)
+ int TM_YEAR (5) : Year (e.g. 2001)
+ int TM_WDAY (6) : Day of the week (Sunday = 0)
+ int TM_YDAY (7) : Day of the year (0..365)
+ int TM_ISDST (8) : TRUE: Daylight saving time
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
-SIEHE AUCH
+EXAMPLES
+ printf("Today is %s\n",
+ ({ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
+ "Friday", "Saturday" })[gmtime()[TM_WDAY]]);
+
+HISTORY
+ Introduced in LDMud 3.2.9.
+
+SEE ALSO
ctime(E), localtime(E), time(E), utime(E)
diff --git a/doc/efun/hash b/doc/efun/hash
index 72b432a..f913736 100644
--- a/doc/efun/hash
+++ b/doc/efun/hash
@@ -5,15 +5,14 @@
string hash(int method, bytes arg [, int iterations ] )
string hash(int method, int * arg [, int iterations ] )
-BESCHREIBUNG
- Berechne den Hash <method> vom Argument <arg>. Der Hash wird
- mit <iterations> Wiederholungen berechnet, wird der Wert weggelassen,
- wird eine Wiederholung verwendet. Falls ein String als <arg>
- uebergeben wurde, so wird dieser in eine UTF-8-Bytefolge konvertiert
- und davon der Hash berechnet.
+DESCRIPTION
+ Calculate the hash from <arg> as determined by <method>. The hash is
+ calculated with <iterations> iterations, default is 1 iteration.
+ If <arg> is a string, it will be converted to a UTF-8 byte sequence
+ of which then the hash will be created.
- <method> ist eine der TLS_HASH_-Konstanten in tls.h; nicht jede
- beschriebene Methode ist in einem gegebenen Driver vorhanden:
+ <method> is one of the TLS_HASH_ constants defined in tls.h; not
+ all recognized methods may be supported for a given driven:
TLS_HASH_SHA1 (1)
TLS_HASH_SHA224 (2)
@@ -23,21 +22,21 @@
TLS_HASH_MD5 (6)
TLS_HASH_RIPEMD160 (7)
- Wenn der Driver ohne OpenSSL- oder GCrypt-Unterstuetzung compiliert
- wurde, sind nur TLS_HASH_SHA1 und TLS_HASH_MD5 verfuegbar.
+ If the driver is compiled without OpenSSL or GCrypt support
+ only TLS_HASH_SHA1 and TLS_HASH_MD5 are available.
- Jede Iteration kostet 10 Evalution-Ticks.
+ The efun costs 10 ticks per iteration.
-BEISPIELE
+EXAMPLES
string s;
s = hash(TLS_HASH_SHA1, "Hello", 2);
s = hash(TLS_HASH_SHA1, ({ 'H', 'e', 'l', 'l', 'o' }) )
-GESCHICHTE
- Eingefuehrt in LDMud 3.3.714.
- LDMud 3.3.719 fuehrte die iterationsbasierten Evaluationskosten ein.
+HISTORY
+ Introduced in LDMud 3.3.714.
+ LDMud 3.3.719 added the iteration-based evaluation cost.
-SIEHE AUCH
+SEE ALSO
crypt(E), md5(E), md5_crypt(E), sha1(E), hmac(E)
diff --git a/doc/efun/heart_beat_info b/doc/efun/heart_beat_info
index a640b2c..fb6ca89 100644
--- a/doc/efun/heart_beat_info
+++ b/doc/efun/heart_beat_info
@@ -1,9 +1,9 @@
SYNOPSIS
object * heart_beat_info()
-BESCHREIBUNG
- Resultat ist ein Array mit allen Objekten, die einen aktiven
- heart_beat() haben.
+DESCRIPTION
+ This function returns an array of all objects having their heart
+ beat turned on.
-SIEHE AUCH
+SEE ALSO
set_heart_beat(E), heart_beat(A), call_out_info(E)
diff --git a/doc/efun/hmac b/doc/efun/hmac
index 1c712fa..7df00a5 100644
--- a/doc/efun/hmac
+++ b/doc/efun/hmac
@@ -8,13 +8,14 @@
string hmac(int method, bytes key, bytes arg )
string hmac(int method, bytes key, int * arg )
-BESCHREIBUNG
- Berechnet den Hashed Message Authenication Code fuer <arg>
- nach Methode <method> und fuer das Password <key>. Strings
- werden zuvor in eine UTF-8-Bytefolge konvertiert.
+DESCRIPTION
+ Calculate the Hashed Message Authenication Code for <arg> based
+ on the digest <method> and the password <key>. Return the HMAC.
+ Any strings given as <key> or <arg> are converted to a UTF-8
+ byte sequence before being used.
- <method> ist eine der TLS_HASH_-Konstanten in tls.h; nicht jede
- beschriebene Methode ist in einem gegebenen Driver vorhanden:
+ <method> is one of the TLS_HASH_ constants defined in tls.h; not
+ all recognized methods may be supported for a given driven:
TLS_HASH_SHA1 (1)
TLS_HASH_SHA224 (2)
@@ -24,18 +25,18 @@
TLS_HASH_MD5 (6)
TLS_HASH_RIPEMD160 (7)
- Wenn der Driver ohne OpenSSL- oder GCrypt-Unterstuetzung compiliert
- wurde, erzeugt diese Funktion einen Fehler.
+ If the driver is compiled without OpenSSL or GCrypt support
+ an error is thrown.
-BEISPIELE
+EXAMPLES
string s;
s = hmac(TLS_HASH_SHA1, "secret", "Hello");
s = hmac(TLS_HASH_SHA1, "secret", ({ 'H', 'e', 'l', 'l', 'o' }) )
-GESCHICHTE
- Eingefuehrt in LDMud 3.3.714
+HISTORY
+ Introduced in LDMud 3.3.714.
-SIEHE AUCH
+SEE ALSO
crypt(E), md5(E), md5_crypt(E), sha1(E), hmac(E)
diff --git a/doc/efun/idna_stringprep b/doc/efun/idna_stringprep
index 5ec1a44..70ddfbd 100644
--- a/doc/efun/idna_stringprep
+++ b/doc/efun/idna_stringprep
@@ -4,19 +4,19 @@
string idna_stringprep(string str, int profile, int flags)
-BESCHREIBUNG
- Prepariere den UTF-8-String <str> passend zum Profil <profile>
- (siehe auch libidn stringprep(3)).
+DESCRIPTION
+ Prepare the UTF-8 string <str> according to the stringprep
+ <profile> (see also libidn stringprep(3)).
- <profile> und <flags> sind definiert in <idn.h>.
+ <profile> and <flags> are one of the values defined in <idn.h>.
- Sollte ein Fehler auftreten, wird eine Exception geworfen.
+ If an error occurs, an exception is thrown.
- Diese Efun is nur auf Systemen mit einer installierten libidn
- verfuegbar -- in diesem Fall ist das Makro __IDNA__ definiert.
+ The efun is available only if the system supports libidn - in
+ that case __IDNA__ is defined.
-GESCHICHTE
+HISTORY
Introduced in LDMud 3.3.713.
-SIEHE AUCH
+SEE ALSO
idna_to_ascii(E), idna_to_unicode(E)
diff --git a/doc/efun/idna_to_ascii b/doc/efun/idna_to_ascii
index 3d6236e..e0c05e4 100644
--- a/doc/efun/idna_to_ascii
+++ b/doc/efun/idna_to_ascii
@@ -4,17 +4,16 @@
string idna_to_ascii(string name)
-BESCHREIBUNG
- Wandelt den String <name> von UTF-8 to IDNA Darstellung
- (8z punycode).
+DESCRIPTION
+ Convert string <name> from UTF-8 to idna representation (8z punycode).
- Sollte ein Fehler auftreten, wird eine Exception geworfen.
+ If an error occurs, an exception is thrown.
- Diese Efun is nur auf Systemen mit installierter libidn
- verfuegbar - in diesem Fall ist das Makro __IDNA__ definiert.
+ The efun is available only if the system supports libidn - in
+ that case __IDNA__ is defined.
-GESCHICHTE
+HISTORY
Introduced in LDMud 3.3.713.
-SIEHE AUCH
- idna_to_unicode(E), idna_stringprep(E)
+SEE ALSO
+ idna_to_ascii(E), idna_stringprep(E)
diff --git a/doc/efun/idna_to_unicode b/doc/efun/idna_to_unicode
index 23f6f9c..2e3a9db 100644
--- a/doc/efun/idna_to_unicode
+++ b/doc/efun/idna_to_unicode
@@ -4,17 +4,17 @@
string idna_to_unicode(string name)
-BESCHREIBUNG
- Wandle den String <name> von IDNA Darstellung (8z punycode)
- nach UTF-8.
+DESCRIPTION
+ Convert string <name> from idna representation (8z punycode)
+ to UTF-8.
- Sollte ein Fehler auftreten, wird eine Exception geworfen.
+ If an error occurs, an exception is thrown.
- Diese Efun is nur auf Systemen mit installierter libidn
- verfuegbar - in diesem Fall ist das Makro __IDNA__ definiert.
+ The efun is available only if the system supports libidn - in
+ that case __IDNA__ is defined.
-GESCHICHTE
+HISTORY
Introduced in LDMud 3.3.713.
-SIEHE AUCH
+SEE ALSO
idna_to_ascii(E), idna_stringprep(E)
diff --git a/doc/efun/implode b/doc/efun/implode
index 6d11762..7f0b3b5 100644
--- a/doc/efun/implode
+++ b/doc/efun/implode
@@ -1,27 +1,25 @@
SYNOPSIS
- string implode(mixed *arr, string del)
- bytes implode(mixed *arr, bytes del)
+ string implode(string *arr, string del)
+ bytes implode(bytes *arr, bytes del)
-BESCHREIBUNG
- Setzt alle Zeichenketten (Strings) aus dem Feld (Array) arr zu
- einer Zeichenkette zusammen und fuegt dabei die Zeichenkette del
- zwischen je zwei Elementen ein. Elemente aus dem Feld arr, welche
- keine Zeichenketten sind, werden ignoriert. Mit Bytefolgen wird
- analog verfahren.
+DESCRIPTION
+ Concatenate all strings found in array arr, with the string
+ del between each element. Only strings are used from the array.
+ Works similar with arrays of byte sequences.
-BEISPIELE
- Funktion Rueckgabewert
+EXAMPLES
+ function returns
-------------------------------------------------------------------
- implode(({ "foo", "bar", "" }), "*") "foo*bar*"
- implode(({ "a", 2, this_object(), "c" }), "b") "abc"
+ implode(({ "foo", "bar", "" }), "*") "foo*bar*"
+ implode(({ "a", 2, this_object(), "c" }), "b") "abc"
- Kann zusammen mit explode() als Funktion zum Ersetzen von
- Zeichenketten verwendet werden:
+ Together with explode() this can be used as a search and replace
+ function of strings:
implode(explode("a short text", " "), "_") "a_short_text"
- Heutzutage kann man stattdessen auch
- regreplace("a short text", " ", "_", 1)
- verwenden.
+ But nowadays you can also use
+ regreplace("a short text", " ", "_", 1)
+ instead.
-SIEHE AUCH
+SEE ALSO
explode(E), regreplace(E)
diff --git a/doc/efun/include_list b/doc/efun/include_list
index 2c14554..d251be9 100644
--- a/doc/efun/include_list
+++ b/doc/efun/include_list
@@ -5,77 +5,79 @@
string * include_list(object|lwobject ob)
string * include_list(object|lwobject ob, int flags)
-BESCHREIBUNG
- Diese Funktion liefert Informationen ueber alle Dateien, die bei der
- Kompilierung von <ob> in dieses Objekt eingebunden wurden, inklusive
- den Programmnamen von <ob>. Wird <ob> nicht angegeben, wird
- standardmaessig das aktuelle Objekt verwendet.
- Im resultierenden Array besteht die Information zu einem Includefile
- aus drei Elementen:
- - string [i+0]: der Name des Includefiles, wie er im Programm
- auftaucht, inklusive den Trennzeichen wie " " oder
- < >.
- - string [i+1]: der absolute Dateipfad des Includefiles.
- - int [i+2]: die Tiefe der Inklusion (gewoehnlich 1, fuer
- verschachtelte Includes auch groesser als 1)
+DESCRIPTION
+ Return information about all files included into the compilation
+ of <ob>, including <ob> program's own filename.
+ If <ob> is omitted, it defaults to the current object.
- Der erste Eintrag im Resultat ist der Name des Programmes selbst in
- [i+0], die anderen beiden Elemente [i+1] und [i+2] sind 0.
+ In the resulting array(s), the information for one include file takes
+ up three elements:
- <flag> bezeichnet die Struktur des Ergebnisses:
- - <flag> = INCLIST_FLAT (0, Standard):
- Das Resultat ist ein flaches Array. Der erste Eintrag bezeichnet
- <ob> selbst, die restlichen Eintraege bezeichnen alle Includefiles
- in der Reihenfolge, in der sie auftreten.
- - <flag> = INCLIST_TREE (1):
- Das Resultat ist ein Array, dessen erster Eintrag das Objekt <ob>
- selbst bezeichnet. Alle folgenden Eintraege bezeichnen die
- Includefiles von <ob>. Wenn ein Includefile von <ob> selbst keine
- Includefiles hat, wird seine Information direkt im Array
- gespeichert. Fuer verschachtelte Includefiles wird ein Untervektor
- erzeugt und dann in diesem Untervektor abgespeichert (wiederum
- in [i+0], [i+1] und [i+2] sind 0). Diese Untervektoren haben
- die gleiche Struktur wie das Resultatarray.
+ string [i+0]: the name as it appeared in the program, including the
+ delimiters ("" or <>, resp.).
+ string [i+1]: the absolute filename of the include file.
+ int [i+2]: the inclusion depth (usually 1, more for nested
+ includes).
- Wenn ein Objekt inklusive <ob> einem replace_program() unterworfen
- war, spiegeln die gelieferten Dateinamen das effektiv aktive Programm
- wider.
+ The first entry in the result is the program's own name in [i+0],
+ the other two elements [i+1] and [i+2] are 0.
- Die Includepfade, die geliefert werden, beginnen immer mit '/'
- (absolute Pfade), auch wenn der Treiber im COMPAT Modus laeuft.
- Trotzdem beginnt der tatsaechliche Dateiname nicht mit einem '/',
- wenn der Treiber im COMPAT Modus laeuft.
+ The <flag> determines the exact structure of the result:
+
+ <flag> = INCLIST_FLAT (0, default):
+ The result is a flat array of the entries, starting the with
+ the entry for <ob> itself, followed by the entries for all
+ included files in the order they were encountered.
+
+ <flag> = INCLIST_TREE (1):
+ The result is an array starting the with the entry
+ of <ob> itself, followed by the entries for all directly included
+ files. If one of the included files has no nested includes by itself,
+ then its information will be stored directly in the array.
+ If one included file has includes by itself, a subvector will
+ be created and stored in the result vector (again in [i+0], with
+ [i+1] and [i+2] being 0). These subvectors have the same
+ structure as the main result vector.
+
+ If objects, including <ob>, had been undergone a replace_program(),
+ the returned filenames will reflect the actual active program.
+
+ The returned proper include filenames always begin with '/' (absolute
+ path), even when the parser runs in COMPAT mode. The filename of
+ the object itself however does not begin with a '/' in COMPAT
+ mode.
-BEISPIELE
- Dieser Code erzeugt (mit /sys als Includeverzeichnis des Systems):
+EXAMPLES
+ Given this source code (and /sys as system include directory):
- a.c: #include "b.h"
- #include <c.h>
- b.h: #include "d.h"
- c.h: #define BAR
- d.h: #define FOO
+ a.c: #include "b.h"
+ #include <c.h>
+ b.h: #include "d.h"
+ c.h: #define BAR
+ d.h: #define FOO
- Die Efun liefert drei Resultate:
+ the efun will give these results:
- include_list(a, INCLIST_FLAT)
+ include_list(a, INCLIST_FLAT)
-> ({ "a.c", 0, 0
, "\"b.h\"", "/.../b.h", 1
, "\"d.h\"", "/.../d.h", 2
, "<c.h>", "/sys/c.h", 1
})
- include_list(a, INCLIST_TREE)
- -> ({ "a.c", 0, 0
- , ({ "\"b.h\"", "/.../b.h", 1
- , "\"d.h\"", "/.../d.h", 2
- }), 0, 0
- , "<c.h>", "/sys/c.h", 1
- })
+ include_list(a, INCLIST_TREE)
+ -> ({ "a.c", 0, 0
+ , ({ "\"b.h\"", "/.../b.h", 1
+ , "\"d.h\"", "/.../d.h", 2
+ }), 0, 0
+ , "<c.h>", "/sys/c.h", 1
+ })
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9, 3.3.128.
-SIEHE AUCH
+HISTORY
+ Implemented in LDMud 3.2.9/3.3.128.
+
+SEE ALSO
debug_info(E), inherit_list(E)
diff --git a/doc/efun/inherit_list b/doc/efun/inherit_list
index 62b12ee..98d1cb4 100644
--- a/doc/efun/inherit_list
+++ b/doc/efun/inherit_list
@@ -5,57 +5,59 @@
string * inherit_list(object|lwobject ob)
string * inherit_list(object|lwobject ob, int flags)
-BESCHREIBUNG
- Liefert die Namen von allen Dateien, die von <ob> geerbt werden,
- inklusive <ob>s eigener Dateiname. Wird <ob> nicht angegeben, wird
- standarndmaessig das aktuelle Objekt verwendet.
- Der Wert von <flags> bestimmt die Struktur des Rueckgabewertes:
- - <flag> = INHLIST_FLAT (0, default):
- inherit_list() liefert ein Array von Dateinamen, beginnend mit dem
- Namen von <ob> selbst, gefolgt von den Namen aller geerbten
- Objekten.
- - <flag> = INHLIST_TREE (1):
- inherit_list() liefert ein Array von Dateinamen, beginnend mit dem
- Namen von <ob> selbst. Wenn ein geerbte File selbst keine Files
- erbt, wird sein Name direkt in das Ergebnis eingetragen. Wenn ein
- geerbtes File selbst Files erbt, wird ein Untervektor erzeugt, in
- dem die Inherits eingetragen werden. Der Untervektor hat die
- gleiche Struktur wie der Haupvektor.
- - <flag> = INHLIST_TAG_VIRTUAL (2):
- Alle Namen im Ergebnisvektor haben ein leeres Tag " " (zwei
- Leerschlaege) fuer normale Inherits und "v " fuer virtuelle
- Inherits als Praefix vorangestellt.
+DESCRIPTION
+ Returns the names of all files inherited by <ob>, including
+ <ob>s own filename. If <ob> is omitted, it defaults to the current
+ object. The value of <flags> determines the structure of the output.
- Alle Flags koennen mit einem binaeren Oder | verbunden werden, wobei
- INHLIST_FLAT und INHLIST_TREE sich gegenseitig ausschliessen.
+ <flag> = INHLIST_FLAT (0, default):
+ The result is an array of filenames, starting the with the filename
+ of <ob> itself, followed by the names of all inherited objects
+ in breadth order.
- Wenn ein Objekt inklusive <ob> einem replace_program() unterworfen
- war, spiegeln die gelieferten Dateinamen das effektiv aktive Programm
- wider.
+ <flag> = INHLIST_TREE (1):
+ The result is an array starting the with the filename
+ of <ob> itself, followed by the all directly inherited
+ objects. If one of the inherited objects has no inherits by itself,
+ then its name will be stored directly in the array. If one inherited
+ object has inherits by itself, a subvector will be created and
+ stored in the result vector. The subvector(s) have the same
+ structure as the main result vector.
- Die Inheritpfade, die geliefert werden, beginnen immer mit '/'
- (absolute Pfade), auch wenn der Treiber im COMPAT Modus laeuft.
+ <flag> = INHLIST_TAG_VIRTUAL (2):
+ All names in the result are prefixed with a tag: " " (two spaces)
+ for normal inherits, "v " for virtual inherits.
+
+ All flags can be combined with binary-|, just _FLAT and _TREE are
+ mutually exclusive.
+
+ If objects, including <ob>, had been undergone a replace_program(),
+ the returned filenames will reflect the actual active program.
+
+ The returned names always begin with '/' (absolute path), except
+ when the parser runs in COMPAT mode.
-BEISPIELE
- Gegeben folgende Vererbungsstruktur:
+EXAMPLES
+ Given this inheritance structure:
/ c - d
a
\ b
- Wobei d virtuell geerbt wird, ergeben sich folgende Resultate:
+ the efun will give the following results:
- inherit_list(a) -> ({ "a", "c", "b", "d" })
- inherit_list(c) -> ({ "c", "d" })
- inherit_list(a, 1) -> ({ "a", ({ "c", "d" }), "b" })
- inherit_list(a, 3) -> ({ " a", ({ " c", "v d" }), " b" })
+ inherit_list(a) -> ({ "a", "c", "b", "d" })
+ inherit_list(c) -> ({ "c", "d" })
+ inherit_list(a, 1) -> ({ "a", ({ "c", "d" }), "b" })
-GESCHICHTE
- Vor 3.2.8, begannen die gelieferten Namen niemals mit einem '/'.
- LDMud 3.2.9 fuehrte die Baumstruktur (_TREE) und Tags fuer virtuelle
- Inherits ("v ") ein.
-SIEHE AUCH
+HISTORY
+ Before 3.2.8, the returned names never started with a '/'.
+ LDMud 3.2.9/3.3.111 added the tree representation.
+ LDMud 3.2.9/3.3.125 added the tagging of virtual inherits.
+
+
+SEE ALSO
debug_info(E), include_list(E)
diff --git a/doc/efun/input_to b/doc/efun/input_to
index 87748d5..973d470 100644
--- a/doc/efun/input_to
+++ b/doc/efun/input_to
@@ -5,112 +5,109 @@
void input_to(string|closure fun, int flag, ...)
void input_to(string|closure fun, int flag, string|closure prompt, ...)
-BESCHREIBUNG
- Die naechste Zeile, die der Spieler eintippt, wird als Argument an die
- Funktion <fun> uebergeben. Ausnahme: wenn die naechste Zeile mit einem
- '!' beginnt, wird sie als Kommando ausgewertet bzw. an das letzte
- input_to() uebergeben, das das INPUT_IGNORE_BANG Flag gesetzt hat.
- Die Funktion <fun> kann "static" deklariert sein, nicht aber "private"
- (sonst wird sie nicht gefunden).
+DESCRIPTION
+ Enable next line of user input to be sent to the function <fun>
+ as an argument. Exception: if the next input
+ line starts with a "!", it will be parsed as a command resp.
+ passed to the most recent input_to() given with the
+ INPUT_IGNORE_BANG flag.
+ The function <fun> may be static, but must not be private (or
+ it won't be found).
- Der Aufruf von <fun> erfolgt nicht sofort, sondern erst, wenn der
- Spieler die Entertaste drueckt.
+ Note that fun is not called immediately but after pressing the
+ RETURN key.
- Wenn input_to() mehr als einmal pro Funktion aufgerufen wird,
- wird normalerweise nur das erste input_to() beruecksichtigt.
- Diese Verhalten kann durch die Angabe von INPUT_APPEND
- modifiziert werden: in diesem Fall wird das input_to() an die
- Liste der bereits anhaengigen input_tos angehaengt (siehe
- BEISPIELE).
+ Usually, if input_to() is called more than once in the same execution,
+ only the first call has any effect. This behaviour can be
+ modified by specifying the INPUT_APPEND flag which will append
+ the given input_to to the already existing input_tos (see
+ EXAMPLES).
- Wird andererseits waehrend einem laufenden input_to() (mittels "!" am
- Zeilenanfang) eine neue Funktion aufgerufen, die wiederum ein
- input_to() enthaelt, wird das urspruengliche input_to() so lange
- unterbrochen, bis das neue input_to() abgearbeitet wurde,
- anschliessend wird es wieder aktiv.
+ Also, if a command given during an input_to() (using the "!"
+ escape) issues its own input_to(), the previous input_to() is
+ suspended until the new input_to() has been handled, then the
+ previous one becomes active again.
- Das optionale <flag> kann ein binaeres Oder (|) der folgenden
- Werte sein:
+ The optional argument <flag> may be a binary-OR ('|') of the
+ following option values:
- INPUT_NOECHO (1):
- Die vom Spieler eingegebene Zeile erzeugt kein Echo und wird auch
- nicht erkannt, wenn der Spieler beobachtet wird.
+ INPUT_NOECHO (1):
+ The line given by the player will not be echoed, and is
+ not seen if snooped.
- Dieser Modus kann nur geaendert werden, wenn telnet enabled ist.
+ A change of this mode not possible with telnet disabled.
- INPUT_CHARMODE (2):
- Die Verbindung zum User wechselt von Zeilen- auf Zeichenmodus. So
- wird nur ein einzelnes Zeichen (!) vom Spieler empfangen.
+ INPUT_CHARMODE (2):
+ The connection is switched from line- into charmode to
+ retrieve a single character(!) from the player.
- Ist telnet disabled, wird lediglich die Interpretation der
- einkommenden Daten durch den Driver umgeschaltet - das
- Clientprogramm des Spieler verbleibt im gerade aktiven Modus.
+ Is telnet disabled, then only the handling of the
+ incoming data by the driver is changed - the client
+ program of the player will remain in its current mode.
- Nachdem die Funktion <fun> ausgefuehrt wurde, wechselt die
- Verbindung zurueck in Zeilenmodus, ausser ein nachfolgendes
- input_to( , 2) wurde gestartet.
+ After execution of <fun>, the connection is switched
+ back into linemode unless a subsequent input_to( , 2)
+ has been issued.
- Zeilenumbrueche werden je nach Client unterschiedlich empfangen,
- entweder als "", als "\r" gefolgt von "" oder als "\r" (letzteres
- kommt vor allem bei Windows Clients vor).
+ Lineends are received exactly as the client sent them:
+ "\n", "\r" followed by "\n", or just "\r".
- Das Frontend des Spielers kann dauernd im Zeilenmodus bleiben.
- Auch wenn input_to() nur ein einzelnes Zeichen fordert, muss der
- Spieler unter Umstaenden das Zeichen und einen Zeilenumbruch
- druecken (und senden). Normalerweise erhaelt <fun> dann den
- gesamten Input auf einmal.
+ Note that the players frontend is free to stay in
+ linemode all the time: even if you request a single
+ character, the player might be forced to type (and send)
+ that character plus the return key. Usually your function
+ will then receive the complete input line (including the
+ newline character sequence!) in one call.
- Will man laenger im Zeichenmodus bleiben, kann der Overhead
- reduziert werden, indem set_combine_charset() verwendet wird. So
- koennen Zeichensequenzen als ein String anstelle von
- Zeichen-fuer-Zeichen empfangen werden. In einem screenorientierten
- Editor gilt dies fuer die meisten druckbaren Zeichen.
+ If you plan to stay in charmode a longer time , you can
+ reduce the call overhead by using set_combine_charset()
+ to retrieve sequences of certain characters as one string
+ instead of one-by-one. In a screen-oriented editor for
+ example this would be most of the printable characters.
- INPUT_PROMPT (4):
- Das Argument nach dem <flag> wird als Prompt fuer die Eingabe
- verwendet. Wenn dieses Argument nicht angegeben (und damit kein
- Propmt definiert) ist, wird kein Prompt ausgegeben.
+ INPUT_PROMPT (4):
+ The argument following the <flag> argument is used as
+ prompt for the input. If this flag is not given, and thus
+ no prompt specified, nothing will be printed.
- INPUT_NO_TELNET (8):
- Modifiziert das INPUT_CHARMODE Argument: der Driver aendert
- seine Behandlung von eingehenden Daten entsprechend dem _CHARMODE
- Argument, sendet aber keine Telnetkommandos zur Anpassung
- des Verhaltens des Clientprogrammes.
+ INPUT_NO_TELNET (8):
+ Modifies the INPUT_CHARMODE flag: the driver will switch
+ it's internal handling of incoming data, but not send out
+ any telnet commands to switch the client's behaviour.
- INPUT_APPEND (16):
- Das input_to() wird an die Liste der bereits anhaengigen
- input_tos angehaengt.
+ INPUT_APPEND (16):
+ Append the input_to to the list of currently pending input_tos
+ (if any).
- INPUT_IGNORE_BANG (128):
- Eingaben, die mit ! beginnen, werden NICHT als Kommandos geparst,
- sondern auch als Argument an die Funkion <fun> uebergeben. Die
- Verwendung dieses Flags ist eingeschraenkt.
+ INPUT_IGNORE_BANG (128):
+ Input lines starting with '!' (or whatever the input
+ escape character was configured to be) will _not_ be parsed as
+ commands, but are given to the function as well. Usage
+ of this option is privileged.
- Alle nachfolgenden Argumente werden als zweites bzw. drittes usw.
- Argument an <fun> uebergeben.
+ The optional trailing args will be passed as second and
+ subsequent args to the function fun.
-
-BEISPIELE
+EXAMPLES
void func() {
- ...
- input_to("enter_name", INPUT_PROMPT, "Wie lautet dein Name?:");
- /* Frueher erledigte man dies mit:
- * write("Wie lautet dein Name?:");
- * input_to("enter_name");
- */
- ...
- }
-
- void enter_name(string str) {
- write("Heisst du wirklich '"+str+"'?? *kicher*\n");
- ...
+ ...
+ input_to("enter_name", INPUT_PROMPT, "Please enter your name:");
+ /* The traditional way of doing this was:
+ * write("Please enter your name:");
+ * input_to("enter_name");
+ */
+ ...
+ }
+ enter_name(string str) {
+ write("Is '"+str+"' really your name?? *giggle*\n");
+ ...
}
- Bei der input_to() Anweisung fuehrt der Driver die Funktion
- func() aus, erwartet aber gleichzeitig Input vom Spieler. Wenn
- dieser etwas eingegeben UND DIE ENTERTASTE GEDRUECKT HAT, arbeitet
- der Driver die Funktion enter_name() mit dem eingegebenen String
- als Argument ab.
+ When reaching the input_to() statement the driver
+ continues the function func() but also asks the user for
+ input. If you entered whatever is asked and press RETURN the
+ driver will invoke the enter_name() function with the
+ string you entered as argument to it.
void func() {
@@ -120,26 +117,53 @@
...
}
- Diese Sequenze erzeugt zwei input_tos: Eingaben gehen zuerst
- an enter_firstname(); und wenn diese Funktion fertig ist
- (einschliesslich etwaiger eigener non-INPUT_APPEND input_tos), geht
- die naechste Eingabe an enter_lastname().
+ This sequence will queue two input_tos: the input first goes
+ to enter_firstname(); and when this function is done
+ (including any non-INPUT_APPEND input_to()s on its own), the next
+ input will go to enter_lastname().
-GESCHICHTE
- Die Bedeutung von <flag> wurde in 3.2.1@93 erweitert.
- Die Limitierung fuer das "stapeln" von input_to()s aus !-Kommandos
- wurde in LDMud 3.2.8 implementiert.
- Seit LDMud 3.2.8 kann <fun> in Form einer Closure angegeben werden.
- LDMud 3.2.9 fuehrte das Flag INPUT_PROMPT samt zugehoerigem Argument
- ein.
- LDMud 3.2.11/3.3.593 fuehrte das INPUT_NO_TELNET Flag ein.
- LDMud 3.2.11/3.3.637 fuehrte das INPUT_APPEND Flag ein.
-FEHLER
- Im Zeichenmodus sollten Zeilenumbrueche eigentlich als "\n" zurueck
- gegeben werden. Dies allerdings kann existierenden Code zerstoeren.
+ Note that the list of input_to-s is treated as a flat list:
-SIEHE AUCH
- call_other(E), sscanf(E), privilege_violation(M),
- set_combine_charset(E), query_input_pending(E), find_input_to(E),
- input_to_info(E), remove_input_to(E), enable_telnet(E)
+ void func() {
+ ..
+ input_to("func1");
+ input_to("func2", INPUT_APPEND);
+ }
+
+ void func1() {
+ ..
+ input_to("func3", INPUT_APPEND);
+ }
+
+ void func2() { ... }
+ void func3() { ... }
+
+ This code will result in the functions being called in the order
+ func(), func1(), func2(), func3(); and not func(), func1(), func3(),
+ func2().
+
+
+BUGS
+ In charmode, it is not possible to receive the NUL character
+ and pass it to the mudlib: internally the NUL character has
+ magical properties.
+
+HISTORY
+ The meaning of the flag parameter was extended in 3.2.1@93.
+ The limited "stacking" of input_to()s issued from !-commands
+ was implemented in LDMud 3.2.8.
+ Since LDMud 3.2.8 the function can be given as a closure.
+ LDMud 3.2.9/3.3.125 introduced the INPUT_PROMPT flag and argument.
+ LDMud 3.2.11/3.3.593 added the INPUT_NO_TELNET flag.
+ LDMud 3.2.11/3.3.637 added the INPUT_APPEND flag.
+ LDMud 3.3 changed the handling of newline sequences in charmode
+ to verbatim passing. Earlier drivers passed an empty string
+ instead.
+ LDMud 3.3 allowed the driver to be configured to use a different
+ input escape character.
+
+SEE ALSO
+ privilege_violation(M), set_combine_charset(E),
+ query_input_pending(E), find_input_to(E), input_to_info(E),
+ remove_input_to(E), enable_telnet(E)
diff --git a/doc/efun/input_to_info b/doc/efun/input_to_info
index 7a8cb28..4586326 100644
--- a/doc/efun/input_to_info
+++ b/doc/efun/input_to_info
@@ -1,21 +1,19 @@
SYNOPSIS
mixed * input_to_info(object player)
-BESCHREIBUNG
- Liefert ein Array aller fuer <player> anhaengigen input_to()s.
- Der erste Eintrag im Array ist der aelteste anhaengige input_to()
- (derjenige, welcher als erstes gestartet wurde), der letzte
- Eintrag ist der neuste input_to().
+DESCRIPTION
+ Construct an array of all input_to's pending for this interactive
+ <player>. The first entry in the array is the least recently added
+ input_to, the last element the most recently added one.
- Jeder Eintrag im Array ist wiederum ein Array von 2 oder mehr
- Eintraegen, das folgende Elemente enthaelt:
- 0: Das Objekt (nur, wenn die Funktion ein string ist)
- 1: Die Funktion (String oder Closure)
- 2ff: Die Argumente
+ Every item in the array is itself an array of 2 or more entries:
+ 0: The object (only if the function is a string).
+ 1: The function (string or closure).
+ 2..: The argument(s).
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
+HISTORY
+ Introduced in LDMud 3.2.9.
-SIEHE AUCH
+SEE ALSO
input_to(E), find_input_to(E), remove_input_to(E),
query_input_pending(E)
diff --git a/doc/efun/interactive b/doc/efun/interactive
index f3c19f1..0734970 100644
--- a/doc/efun/interactive
+++ b/doc/efun/interactive
@@ -1,11 +1,12 @@
SYNOPSIS
int interactive()
- int interactive(object obj)
+ int interactive(object ob)
-BESCHREIBUNG
- Liefert 1 zurueck, wenn <obj> ein interaktiver User (ein Spieler)
- ist, sonst 0. Wird <obj> weggelassen, so wird this_object() verwendet.
+DESCRIPTION
+ Return non-zero if ob is an interactive user. If ob is omitted,
+ this_object() will be used. The return value is 1 if the
+ object is interactive, else 0.
-SIEHE AUCH
- query_once_interactive(E), query_ip_number(E), query_ip_name(E),
- query_idle(E)
+SEE ALSO
+ query_once_interactive(E), query_ip_number(E),
+ query_ip_name(E), query_idle(E)
diff --git a/doc/efun/interactive_info b/doc/efun/interactive_info
index f7c2877..2ac77b7 100644
--- a/doc/efun/interactive_info
+++ b/doc/efun/interactive_info
@@ -75,6 +75,17 @@
The number of seconds that the interactive object <ob> has been
idle.
+ <what> == II_NOECHO:
+ The current no-echo mode of <ob>:
+ 0: Normal echo mode
+ 1: no-echo mode was requested (INPUT_NOECHO input is pending)
+ 2: no-echo mode was acknowledged by the client (this does not
+ happen, if the mudlib handles this with the H_NOECHO hook).
+
+ <what> == II_CHARMODE:
+ Whether charmode is active for <ob>.
+ The values are similar to II_NOECHO.
+
Output Handling:
diff --git a/doc/efun/intp b/doc/efun/intp
index 49de69f..5c14516 100644
--- a/doc/efun/intp
+++ b/doc/efun/intp
@@ -1,9 +1,10 @@
SYNOPSIS
int intp(mixed arg)
-BESCHREIBUNG
- Liefert 1, wenn das Argument eine Ganzzahl (Integer) ist, sonst 0.
+DESCRIPTION
+ Return 1 if arg is an integer number.
-SIEHE AUCH
- closurep(E), floatp(E), mappingp(E), objectp(E), pointerp(E),
- referencep(E), stringp(E), bytesp(E), symbolp(E), clonep(E)
+SEE ALSO
+ bytesp(E), clonep(E), closurep(E), coroutinep(E), floatp(E),
+ lpctypep(E), lwobjectp(E), mappingp(E), objectp(E), pointerp(E),
+ referencep(E), stringp(E), structp(E), symbolp(E)
diff --git a/doc/efun/invert_bits b/doc/efun/invert_bits
index 0836df7..cf69e02 100644
--- a/doc/efun/invert_bits
+++ b/doc/efun/invert_bits
@@ -1,17 +1,21 @@
SYNOPSIS
string invert_bits(string str)
-BESCHREIBUNG
- Invertiert den Status aller Bits im Bitstring <str> und liefert den
- neuen String zurueck. Dabei bleibt die Laenge von <str>, also die
- gesamte Anzahl Bits, die gleiche.
+DESCRIPTION
+ Invert the status of all bits in bitstring <str> and return the
+ new string.
-BEISPIELE
+ Note that the total number of bits (ie the string length) stays
+ the same.
+
+EXAMPLES
string s;
- s = set_bit("", 3); s = set_bit(s, 4); s = set_bit(s, 15);
- --> s ist nun "8 ("
- invert_bits(s) --> liefert "G_W"
-SIEHE AUCH
+ s = set_bit("", 3); s = set_bit(s, 4); s = set_bit(s, 15);
+ --> s is now "8 ("
+
+ invert_bits(s) --> returns "G_W"
+
+SEE ALSO
set_bit(E), clear_bit(E), test_bit(E), last_bit(E), and_bits(E),
or_bits(E), xor_bits(E), count_bits(E), copy_bits(E)
diff --git a/doc/efun/lambda b/doc/efun/lambda
index 14a709f..913115a 100644
--- a/doc/efun/lambda
+++ b/doc/efun/lambda
@@ -1,17 +1,19 @@
SYNOPSIS
closure lambda(mixed *arr, mixed)
-BESCHREIBUNG
- Erzeugt eine Lambda Closure, entsprechend den Lamda Closures in LISP.
- Die Closure ist an das Objekt gebunden, das sie erzeugt hat, und kann
- deshalb Verweise auf globale Variablen enthalten.
+DESCRIPTION
+ Constructs a lambda closure, like lambda function in LISP.
+ The closure is bound to the creating object, and thus can contain
+ references to global variables.
- Das erste Argument ist ein Array, das die Argumente (Symbole)
- beschreibt, die der Closure bei ihrer Auswertung durch funcall()
- oder apply() uebergeben werden.
+ The first argument is an array describing the arguments
+ (symbols) passed to the closure upon evaluation by funcall()
+ or apply().
-GESCHICHTE
- Eingefuehrt in 3.2@70.
+HISTORY
+ Introduced in 3.2@70.
-SIEHE AUCH
- closures(LPC), unbound_lambda(E), apply(E), funcall(E), bind_lambda(E)
+SEE ALSO
+ closures(LPC), unbound_lambda(E), apply(E), funcall(E),
+ bind_lambda(E)
+
diff --git a/doc/efun/last_bit b/doc/efun/last_bit
index f0467c0..3936170 100644
--- a/doc/efun/last_bit
+++ b/doc/efun/last_bit
@@ -1,19 +1,21 @@
SYNOPSIS
int last_bit(string str)
-BESCHREIBUNG
- Liefert die Nummer des letzten gesetzten Bits im Bitstring <str>.
+DESCRIPTION
+ Return the number of the last set bit in bitstring <str>.
- Jedes Zeichen enthaelt 6 Bits. Also kann in jedem Zeichen ein Wert von
- 0 bis 63 gespeichert werden (2^6=64). Das erste Zeichen ist der
- Leerschlag " " mit dem Wert 0. Das erste Zeichen im String ist jenes
- mit den niedrigsten Bits (0-5).
+ Each character contains 6 bits. So you can store a value
+ between 0 and 63 in one character (2^6=64). Starting character
+ is the blank " " which has the value 0. The first character in
+ the string is the one with the lowest bits (0-5).
-BEISPIELE
+EXAMPLES
string s;
- s = set_bit("", 4); s = set_bit(s, 2);
- last_bit(s) --> liefert 4
-SIEHE AUCH
+ s = set_bit("", 4); s = set_bit(s, 2);
+
+ last_bit(s) --> returns 4
+
+SEE ALSO
set_bit(E), clear_bit(E), next_bit(E), test_bit(E), count_bits(E),
and_bits(E), or_bits(E), xor_bits(E), invert_bits(E), copy_bits(E)
diff --git a/doc/efun/last_instructions b/doc/efun/last_instructions
index 2b4b2bc..13a776a 100644
--- a/doc/efun/last_instructions
+++ b/doc/efun/last_instructions
@@ -1,28 +1,30 @@
-GESCHUETZT
SYNOPSIS
- string * last_instructions(int lenght, int verbose)
+ string * last_instructions(int length, int verbose)
-BESCHREIBUNG
- Liefert ein Array mit der "Laenge" der zuletzt ausgefuehrten
- Anweisungen. Wenn <verbose> ungleich 0 ist (standardmaessig so),
- werden auch Infos zur Zeilennummer angezeigt. Jeder String hat
- folgende Form:
+DESCRIPTION
+ Returns an array showing the 'length' last executed
+ instructions in disassembled form. If 'verbose' is non-zero
+ (the default), line number information are also included.
+ Each string is built as this:
- Opcode-Adresse: Opcode Operand Mnemonic (Stapeltiefe) Zeilennummer
+ Opcode-Address: Opcode Operand Mnemonic (Stackdepth) Linenumber
- Die Information zur Stapeltiefe besteht aus zwei Zahlen <rel>:<abs>,
- wobei <rel> der relative Stapelverbrauch der Funktion ist, <abs> der
- absolute Stapelverbrauch.
+ The Stackdepth information consists of two numbers <rel>:<abs>:
+ <rel> is the relative stack usage in this function, <abs> is the
+ absolute stack usage.
- Die Information zur Zeilennummer wird angefuegt, wenn das Flag gesetzt
- ist und eine neue Zeile im Quellcode erreicht wird. Ebenso erzeugen
- Aufrufe zwischen Objekten einen Eintrag im Resultatarray (allerdings
- nur, wenn das verbose-Flag gesetzt ist). Dieser Eintrag hat die Form:
+ The linenumber information is appended if requested and a new
+ source line is reached. Also, calls between objects produce a
- Objektname Programmname Zeilennummer.
+ Objectname Programname Linenumber
- Es gibt ein vorkonfiguriertes oberes Limit, wie viele Instruktionen
- zurueckverfolgt werden koennen.
+ entry in the resulting array (in verbose mode only).
-SIEHE AUCH
+ There is a preconfigured upper limit for the backtrace.
+
+HISTORY
+ Introduced in 3.2.1@34.
+ The absolute stack depth information was added in LDMud 3.2.8.
+
+SEE ALSO
debug_message(E)
diff --git a/doc/efun/limited b/doc/efun/limited
index 1155af1..69ce32a 100644
--- a/doc/efun/limited
+++ b/doc/efun/limited
@@ -1,4 +1,3 @@
-VORLAEUFIG, GESCHUETZT
SYNOPSIS
#include <rtlimits.h>
@@ -7,50 +6,49 @@
mixed limited(closure fun, int *limits)
mixed limited(closure fun, int *limits, mixed *args)
-BESCHREIBUNG
- limited() ruft die Funktion <fun> mit den bezeichneten Argumenten
- <args> auf und fuehrt sie mit den gegebenen Laufzeitlimitierungen aus.
+DESCRIPTION
+ Call the function <fun> with any given <args> as parameters,
+ and execute it with the given runtime limits.
- Beim Ende der Funktion <fun> werden die momentan aktiven
- Laufzeitlimitierungen wiederhergestellt. limited() liefert den
- Rueckgabewert der Closure <fun> zurueck.
+ After the function exits, the currently active limits are restored.
+ Result of the efun is the result of the closure call.
- Die Laufzeitlimitierungen koennen in zwei Formen angegeben werden:
- * als Array (wie es von query_limits() geliefert wird) oder
- * als Liste von Werten mit Tags.
- Wird limited() ohne Angabe von Limits aufgerufen, gelten die
- Laufzeitlimiten als 'unlimitiert'.
+ The runtime limits can be given in two ways: as an array (like the
+ one returned from query_limits(), or as a list of tagged values. If
+ the efun is used without any limit specification, all limits are
+ supposed to be 'unlimited'.
- Die Limitierung kennt drei spezielle Werte aus <rtlimits.h>:
- LIMIT_UNLIMITED: es gibt kein Limit
- LIMIT_KEEP: das zuletzt gesetzte Limit wird beibehalten
- LIMIT_DEFAULT: die 'globalen' Limitierungen werden verwendet
+ The limit settings recognize three special values:
+ LIMIT_UNLIMITED: the limit is deactivated
+ LIMIT_KEEP: the former setting is kept
+ LIMIT_DEFAULT: the 'global' default setting is used.
- Fuer LIMIT_COST haben folgende Spezialwerte eine Bedeutung:
- LIMIT_UNLIMITED: die Ausfuehrung kosten lediglich einen Tick
- LIMIT_KEEP: LIMIT_COST wird auf 0 gesetzt
- LIMIT_DEFAULT: LIMIT_COST wird auf -100 gesetzt
+ For LIMIT_COST, the special values have these meaning:
+ LIMIT_UNLIMITED: at maximum 1 tick is accounted
+ LIMIT_KEEP: LIMIT_COST is set to 0
+ LIMIT_DEFAULT: LIMIT_COST is set to -100
- limited() erzeugt eine Schutzverletzung ("limited", current_object,
+ The efun causes a privilege violation ("limited", current_object,
fun, limits-array).
-BEISPIELE
+EXAMPLES
limited(#'function)
- --> fuehrt die Funktion ohne Limits aus.
+ --> executes function with no limits at all
limited(#'function, ({ 200000 }), "foo")
- --> fuehrt die Funktion mit einem Eval-Kosten-Limit von 200000 Ticks
- aus. Die Funktion wird als 'function("foo")' aufgerufen.
+ --> executes function with an eval_cost limit of 200000, and
+ calls function as <function>("foo").
limited(lambda(0, ({#'function, "foo"})), LIMIT_EVAL, 200000)
- --> fuehrt die Funktion mit einem Eval-Kosten-Limit von 200000 Ticks
- aus. Die Funktion wird als 'function("foo")' aufgerufen.
+ --> executes function with an eval_cost limit of 200000, and
+ calls function as <function>("foo").
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.7.
- LDMud 3.3.563 fuehrte LIMIT_COST ein.
- LDMud 3.5.0 fuehrte LIMIT_MEMORY ein.
+HISTORY
+ Introduced in LDMud 3.2.7.
+ LDMud 3.3.563 introduced LIMIT_COST.
+ LDMud 3.3.677 introduced LIMIT_MAPPING_KEYS, LIMIT_MAPPING_SIZE.
+ LDMud 3.5.0 introduced LIMIT_MEMORY.
-SIEHE AUCH
+SEE ALSO
query_limits(E), set_limits(E)
diff --git a/doc/efun/living b/doc/efun/living
index 7434104..7f0c19a 100644
--- a/doc/efun/living
+++ b/doc/efun/living
@@ -1,13 +1,13 @@
SYNOPSIS
int living(object ob)
-BESCHREIBUNG
- Liefert 1 zurueck, wenn <ob> ein lebendiges Objekt ("living") ist.
- <ob> ist living, wenn enable_commands() aus <obj> heraus aufgerufen
- wurde. <ob> kann auch 0 sein.
+DESCRIPTION
+ Return true if ob is a living object (that is,
+ enable_commands() has been called from inside the ob).
+ ob may be 0.
-BEISPIELE
- living(this_player()); -> Dies liefert (hoffentlich) 1 zuerueck.
+EXAMPLES
+ living(this_player())
-SIEHE AUCH
+SEE ALSO
enable_commands(E)
diff --git a/doc/efun/load_name b/doc/efun/load_name
index 2afbb61..365fca2 100644
--- a/doc/efun/load_name
+++ b/doc/efun/load_name
@@ -1,48 +1,50 @@
SYNOPSIS
string load_name()
- string load_name(object|lwobject|string obj)
+ string load_name(object obj)
+ string load_name(lwobject obj)
+ string load_name(string obj)
-BESCHREIBUNG
- Die Funktion liefert den Namen, mit dem <obj> geladen wurde. <obj>
- kann direkt als normales oder leichtgewichtiges Objekt oder als String
- mit dem Namen des Objektes angegeben werden.
+DESCRIPTION
+ Return the load name for the object <obj> which may be a regular
+ or lightweight object or the name of an object.
- Wenn <obj> ein Clon oder ein leichtgewichtiges Objekt ist, liefert die
- Funktion den Namen des Blueprints.
- Wenn <obj> ein Blueprint ist, liefert die Funktion den Namen des Files,
- aus dem der Blueprint kompiliert wurde.
+ If <obj> is a clone or a lightweight object, return the
+ load_name() of <obj>'s blueprint.
+ If <obj> is a blueprint, return the filename from which the
+ blueprint was compiled.
- Wenn <obj> ueber seinen Namen angegeben wurde, aber nicht / nicht mehr
- existiert, generiert die Funktion den Namen, wie er sein muesste und
- gibt diesen zurueck. Wenn der angegebene Name ungueltig ist, liefert
- die Funktion 0.
+ If <obj> is given by name but not/no longer existing, the
+ function synthesizes the load name as it should be and returns
+ that. If the given name is illegal, the function returns 0.
- Als Spezialfall liefert die Funktion 0, wenn <ob> 0 ist.
+ As a special case, if <ob> is 0, the function returns 0.
- Fuer virtuelle Objekte liefert load_name() den originalen Ladenamen
- des Objekts, welches der virtuelle Compiler erzeugte.
+ For virtual objects this efun returns the original load_name of the
+ object created by the virtual compiler.
- Wird <obj> nicht angegeben, wird der Name fuer das momentan gueltige
- Objekt angegeben.
+ If <obj> is omitted, the name for the current object is returned.
- Im Gegensatz zum object_name() kann der load_name() nicht durch
- rename_object() oder einen VC veraendert werden. Ist ein <obj> jedoch
- einem replace_program() unterworfen, spiegelt der load_name() nicht
- mehr das effektive Verhalten des Objekts wider.
+ In contrast to the object_name(), the load name can not be changed
+ by with rename_object() or a VC. However, if an object uses
+ replace_program() the load name no longer reflects the actual
+ behaviour of an object.
-BEISPIELE
+ The returned name starts with a '/', unless the driver is running
+ in COMPAT mode.
+
+EXAMPLES
object o;
o = clone_object("/std/thing");
- write(load_name(o)); --> liefert "/std/thing" in !Compat Modus
- und "std/thing" im Compat Modus
- write(load_name("/std/thing")); --> gleich wie oben
- write(load_name("/std/thing#4n5")); --> liefert 0
+ write(load_name(o)); --> writes "/std/thing" in !compat mode
+ and "std/thing" in compat mode
+ write(load_name("/std/thing")); --> same as above
+ write(load_name("/std/thing#4n5")); --> writes 0
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.6.
- Strings als Argumente sind moeglich seit 3.2.8.
- 0 ist zulaessig seit 3.2.9.
+HISTORY
+ Introduced in LDMud 3.2.6.
+ Strings are accepted as arguments since 3.2.8.
+ 0 is accepted as argument since 3.2.9.
-SIEHE AUCH
+SEE ALSO
clone_object(E), clonep(E), object_name(E), load_object(E),
replace_program(E), program_name(E), present_clone(E)
diff --git a/doc/efun/load_object b/doc/efun/load_object
index b2c2b21..f37fa18 100644
--- a/doc/efun/load_object
+++ b/doc/efun/load_object
@@ -1,23 +1,24 @@
SYNOPSIS
- object load_object(string file)
+ object load_object(string name)
-BESCHREIBUNG
- Laedt und liefert das Objekt aus der Datei <file>. Wenn das Objekt
- bereits existiert, wird es nur zurueckgeliefert.
+DESCRIPTION
+ Load the object from the file <name> (which can not be empty) and
+ return it. If the object already exists, just return it.
- Diese Efun laedt nur Blueprints. Fuer Clone muss clone_object()
- verwendet werden.
+ This efun can be used only to load blueprints - for clones, use
+ the efun clone_object().
- Werden strikte EUIDs verlangt, muss das ladende Objekt eine EUID != 0
- haben.
+ If strict euids are enforced, the cloning object must have
+ a non-zero euid.
-BEISPIELE
- // Erneuere das Standard Player-Objekt
+EXAMPLES
+ // Update and reload the standard player object
destruct(find_object("/std/player"));
load_object("/std/player");
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.6.
+HISTORY
+ Introduced in LDMud 3.2.6.
+ LDMud 3.3.716/3.4.3 requires that the <name> is not empty.
-SIEHE AUCH
+SEE ALSO
clone_object(E)
diff --git a/doc/efun/localtime b/doc/efun/localtime
index cebc838..6c8128f 100644
--- a/doc/efun/localtime
+++ b/doc/efun/localtime
@@ -4,36 +4,35 @@
int * localtime(int clock)
int * localtime(int *uclock)
-BESCHREIBUNG
- Interpretiert das Argument <clock> als Anzahl Sekunden seit dem
- 01. Januar 1970, 00:00:00, und gibt die Zeit in Lokalzeit in einer
- sauberen Struktur zurueck. Wird <clock> nicht angegeben, wird
- standardmaessig time() verwendet.
+DESCRIPTION
+ Interpret the argument clock as number of seconds since Jan,
+ 1st, 1970, 0:00, and return the time in local time in a nice structure.
+ if <clock> is not specified, time() is used as default.
- Alternativ kann auch ein Array von zwei Zahlen als Argument angegeben
- werden. Das erste Element wird interpretiert wie <clock>, das zweite
- Argument enthaelt die vergangenen Mikrosekunden in dieser Sekunde und
- wird ignoriert.
+ Alternatively, accept an array of two ints: the first is <clock>
+ value as in the first form, the second int is the number of
+ microseconds elapsed in the current second, which is ignored.
- Das Resultat ist ein Array mit folgenden Elementen:
+ The result is an array of integers:
- int TM_SEC (0): Sekunde in der Minute (0..59)
- int TM_MIN (1): Minute in der Stunde (0..59)
- int TM_HOUR (2): Stunde des Tages (0..23)
- int TM_MDAY (3): Tag im Monat (1..31)
- int TM_MON (4): Monat des Jahres (0..11)
- int TM_YEAR (5): Jahr (z.B. 2001)
- int TM_WDAY (6): Wochentag (0..6, Sonntag = 0)
- int TM_YDAY (7): Tag im Jahr (0..365)
- inz TM_ISDST (8): TRUE: Daylight Saving Time
+ int TM_SEC (0) : Seconds (0..59)
+ int TM_MIN (1) : Minutes (0..59)
+ int TM_HOUR (2) : Hours (0..23)
+ int TM_MDAY (3) : Day of the month (1..31)
+ int TM_MON (4) : Month of the year (0..11)
+ int TM_YEAR (5) : Year (e.g. 2001)
+ int TM_WDAY (6) : Day of the week (Sunday = 0)
+ int TM_YDAY (7) : Day of the year (0..365)
+ int TM_ISDST (8) : TRUE: Daylight saving time
-BEISPIELE
- printf("Heute ist %s\n", ({ "Sonntag", "Montag", "Dienstag",
- "Mittwoch", "Donnerstag", "Freitag", "Samstag"})
- [localtime()[TM_WDAY]]);
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
+EXAMPLES
+ printf("Today is %s\n",
+ ({ "Sunday", "Monday", "Tuesday", "Wednesday",
+ "Thursday", "Friday", "Saturday" })[localtime()[TM_WDAY]]);
-SIEHE AUCH
+HISTORY
+ Introduced in LDMud 3.2.9.
+
+SEE ALSO
ctime(E), gmtime(E), time(E), utime(E)
diff --git a/doc/efun/log b/doc/efun/log
index fc8c7eb..d6ee8a6 100644
--- a/doc/efun/log
+++ b/doc/efun/log
@@ -1,11 +1,11 @@
SYNOPSIS
float log(int|float arg)
-BESCHREIBUNG
- Liefert den natuerlichen Logarithmus von <arg>.
+DESCRIPTION
+ Returns the natural logarithm of its argument.
-GESCHICHTE
- LDMud 3.2.9 fuehrte Integers als Argumente ein.
+HISTORY
+ LDMud 3.2.9 added integers as arguments.
-SIEHE AUCH
+SEE ALSO
exp(E), pow(E)
diff --git a/doc/efun/lower_case b/doc/efun/lower_case
index 1dcde99..8dfe460 100644
--- a/doc/efun/lower_case
+++ b/doc/efun/lower_case
@@ -1,12 +1,12 @@
SYNOPSIS
string lower_case(string str)
-BESCHREIBUNG
- Konvertiert alle Zeichen in <str> in Kleinbuchstaben und liefert den
- neuen String.
+DESCRIPTION
+ Convert all characters in str to lower case, and return the
+ new string.
-BEISPIELE
- lower_case("Hallo WeLT!") -> "hallo welt!"
+EXAMPLES
+ lower_case("Heya!") -> "heya!"
-SIEHE AUCH
+SEE ALSO
capitalize(E), upper_case(E)
diff --git a/doc/efun/lpctypep b/doc/efun/lpctypep
new file mode 100644
index 0000000..2f52135
--- /dev/null
+++ b/doc/efun/lpctypep
@@ -0,0 +1,13 @@
+SYNOPSIS
+ int lpctypep(mixed arg)
+
+DESCRIPTION
+ Returns 1 if the argument is an LPC type.
+
+HISTORY
+ Introduced in LDMud 3.6.7.
+
+SEE ALSO
+ bytesp(E), clonep(E), closurep(E), coroutinep(E), floatp(E), intp(E),
+ lwobjectp(E), mappingp(E), objectp(E), pointerp(E), referencep(E),
+ stringp(E), structp(E), symbolp(E)
diff --git a/doc/efun/lwobjectp b/doc/efun/lwobjectp
index f6b4b33..a2f4260 100644
--- a/doc/efun/lwobjectp
+++ b/doc/efun/lwobjectp
@@ -5,6 +5,6 @@
Return 1 if arg is a lightweight object.
SEE ALSO
- bytesp(E), clonep(E), closurep(E), floatp(E), intp(E), mappingp(E),
- objectp(E), pointerp(E), referencep(E), stringp(E), structp(E),
- symbolp(E)
+ bytesp(E), clonep(E), closurep(E), coroutinep(E), floatp(E), intp(E),
+ lpctypep(E), mappingp(E), objectp(E), pointerp(E), referencep(E),
+ stringp(E), structp(E), symbolp(E)
diff --git a/doc/efun/m_add b/doc/efun/m_add
index e7e34d1..60a4362 100644
--- a/doc/efun/m_add
+++ b/doc/efun/m_add
@@ -1,22 +1,21 @@
SYNOPSIS
- mapping m_add(mapping map, mixed key, [mixed data, ...])
+ mapping m_add(mapping map, mixed key, [mixed data...])
-BESCHREIBUNG
- Fuegt einen neuen Eintrag mit Index <key> zum Mapping <map> hinzu
- oder ersetzt diesen. Das veraenderte Mapping wird auch als Ergebnis
- zurueckgeliefert.
+DESCRIPTION
+ Add (or replace) an entry with index <key> in mapping <map>.
+ The modified mapping is also returned as result.
- Die zugehoerigen Werte fuer diesen Eintrag werden aus den weiteren
- Parametern entnommen. Fehlende Parameter werden als 0 interpretiert,
- ueberzaehlige Parameter werden ignoriert.
+ The values for the entry are taken from the <data> arguments.
+ Unassigned entry values default to 0, extraneous <data> arguments
+ are ignored.
- Der Unterschied zwischen m_add() und dem '+='-Operator besteht darin,
- dass fuer letzterem gegebenenfalls erst ein temporaeres Mapping,
- welches die hinzuzufuegenden Eintraege enthaelt, erstellt werden
- muesste, wogegen m_add() ohne ein solches auskommt.
+ The difference between m_add() and the operator += is that for
+ the latter you might need to create a temporary mapping that
+ contains the entries to add, which m_add() doesn't.
-BEISPIELE
+EXAMPLES
mapping m;
+
m = ([ "foo" ]);
m_add(m, "bar", 1) --> ([ "foo", "bar" ])
@@ -25,13 +24,12 @@
m = ([ "foo":1;2 ]);
m_add(m, "bar", 1) --> ([ "foo":1;2, "bar":1;0 ])
+ m_add(m, "baz", ({ 4, 5 })... )
+ --> ([ "foo":1;2, "bar":1;0, "baz":4;5 ])
- apply(#'m_add, m, "baz", ({ 4, 5 }))
- --> ([ "foo":1;2, "bar":1;0, "baz":4;5 ])
+HISTORY
+ Introduced in LDMud 3.2.9.
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
-
-SIEHE AUCH
+SEE ALSO
mappingp(E), mkmapping(E), m_delete(E), m_entry(E), m_indices(E),
m_values(E), sizeof(E), widthof(E)
diff --git a/doc/efun/m_allocate b/doc/efun/m_allocate
index 255f3b9..7c75530 100644
--- a/doc/efun/m_allocate
+++ b/doc/efun/m_allocate
@@ -2,45 +2,45 @@
mapping m_allocate(int size)
mapping m_allocate(int size, int width)
-BESCHREIBUNG
- Die Funktion reserviert Speicher fuer ein Mapping. <size> ist die
- Anzahl Eintraege (d.h. die Anzahl Keys), <width> ist die Anzahl
- Dateneintraege pro Key. Wird <width> nicht angegeben, werden Keys
- mit einem Datenelement erzeugt.
+DESCRIPTION
+ Reserve memory for a mapping.
- Die Funktion ist nur sinnvoll, wenn man ein Mapping erzeugt, dessen
- ungefaehre Groesse von vornherein bekannt ist, um so den Overhead
- von wiederholten Speicherallokation zu minimieren. Wenn nicht alle
- allozierten Datenelemente mit Daten bestueckt werden, werden die
- Ueberbleibsel einige Zeit spaeter bei Gelegenheit wieder freigegeben
- (s. Bemerkungen).
- m_allocate() ist auch nuetzlich, wenn ein Mapping bestimmter Breite
- erzeugt werden soll, ohne bereits die Daten zu den Keys bereit zu
- stellen.
+ <size> is the number of entries (i.e. keys) to reserve, <width> is
+ the number of data items per entry. If the optional width is
+ omitted, 1 is used as default.
- Wenn bloss ein leeres Mapping bestimmter Breite erzeugt werden soll,
- so kann folgende Notation verwendet werden:
+ This is useful only when you are going to construct a mapping
+ whose approximate size you know beforehand, to save overhead on
+ repeated memory allocations. If you don't fill in data for all the
+ allocated elements, any leftovers will be eventually freed some time
+ later (see remark below).
+ It is also useful if you want the mapping to have a certain width
+ even if you don't provide all the data items for the keys yet.
- ([ ]) : erzeugt ein leeres Mapping mit Breite 1.
- ([:<width>]) : erzeugt ein leeres Mapping der Breite <width>,
- wobei <width> eine beliebige Anweisung sein kann, die eine
- Integerzahl zurueck liefert. Tatsaechlich wird diese Notation
- als 'm_allocate(0, <width>)' kompiliert.
+ If the goal is just to create an empty mapping with a certain
+ width, the following notations can be used:
-BEISPIELE
- m_allocate(3,7) -> erzeugt ein Mapping mit 7 Werten pro Key und Platz
- fuer 3 Eintraege.
- ([:2*3]) -> entspricht m_allocate(0,6).
+ ([ ]) : creates an empty mapping of width 1.
-BEMERKUNGEN
- Ungenutzer Speicher des allozierten Mappins wird waehrend des sog.
- Kompaktierens des Mappings freigegeben. Dies passiert waehrend eines
- "data cleanups" oder einer "garbage collection". Die Zeit zwischen
- "data cleanups" ist mit configure_driver() konfigurierbar.
+ ([:width ]) : creates an empty mapping the given <width>, where
+ <width> can be any expression yielding an integer result. In
+ fact this notation is compiled as 'm_allocate(0, width)' .
-GESCHICHTE
- Umbenannt von allocate_mapping() in LDMud 3.2.6.
- Die ([:<width>]) Notation wurde in 3.2.9 eingefuehrt.
+EXAMPLES
+ m_allocate(3, 7) -> mapping with 7 values per key, and with space
+ for 3 entries.
-SIEHE AUCH
+ ([:2*3 ]) -> same as m_allocate(0, 6)
+
+REMARKS
+ Unused memory in the allocated mapping will be freed during the
+ so-called compacting of the mapping. This is done during the
+ data-cleanup or the garbage collection. The time between
+ data-cleanups is configurable by configure_driver().
+
+HISTORY
+ Renamed from 'allocate_mapping' in LDMud 3.2.6.
+ The ([:width ]) notation was introduced in LDMud 3.2.9 / 3.3.208.
+
+SEE ALSO
mappings(LPC), walk_mapping(E), get_type_info(E), m_reallocate(E)
diff --git a/doc/efun/m_contains b/doc/efun/m_contains
index d0b1e54..5b87acd 100644
--- a/doc/efun/m_contains
+++ b/doc/efun/m_contains
@@ -1,18 +1,16 @@
SYNOPSIS
- int m_contains(mixed &data1, ... , &dataN, mapping map, mixed key)
+ int m_contains(mixed &data1, ..., &dataN, map, key)
-BESCHREIBUNG
- Wenn <map> den Key <key> enthaelt, werden die entsprechenden Werte
- den Datenargumenten von <key> zugeordnet, welche per Referenz
- uebergeben werden muessen. m_contains liefert in diesem Fall 1 zurueck.
- Wenn <key> nicht in <map> enthalten ist, liefert die Funktion 0
- zurueck und die Datenargumente bleiben unveraendert.
+DESCRIPTION
+ If the mapping contains the key map, the corresponding values
+ are assigned to the data arguments, which must be passed by
+ reference, and 1 is returned. If key is not in map, 0 is
+ returned and the data args are left unchanged.
+ It is possible to use this function for a 0-value mapping, in
+ which case it has the same effect as member(E).
- Man kann diese Funktion auch fuer 0-Wert Mappings verwenden, wobei
- sie den gleichen Effekt wie member(E) hat.
+HISTORY
+ Renamed from 'mapping_contains()' in LDMud 3.2.6.
-GESCHICHTE
- Umbenannt von 'mapping_contains' in LDMud 3.2.6.
-
-SIEHE AUCH
+SEE ALSO
m_entry(E), mappings(LPC), member(E)
diff --git a/doc/efun/m_delete b/doc/efun/m_delete
index bb9d453..37a3a47 100644
--- a/doc/efun/m_delete
+++ b/doc/efun/m_delete
@@ -1,11 +1,12 @@
SYNOPSIS
mapping m_delete(mapping map, mixed key)
-BESCHREIBUNG
- Loescht den Eintrag mit dem Index <key> aus dem Mapping <map> und
- liefert das veraenderte Mapping zurueck. Wenn <map> keinen Eintag
- mit dem Index <key> enthaelt, wird nichts veraendert.
+DESCRIPTION
+ Remove the entry with index 'key' from mapping 'map'. The
+ changed mapping 'map' is also returned as result.
+ If the mapping does not have an entry with index 'key',
+ nothing is changed.
-SIEHE AUCH
+SEE ALSO
mappingp(E), mkmapping(E), m_add(E), m_indices(E), m_values(E),
sizeof(E), widthof(E)
diff --git a/doc/efun/m_entry b/doc/efun/m_entry
index 955dedf..17def93 100644
--- a/doc/efun/m_entry
+++ b/doc/efun/m_entry
@@ -1,24 +1,23 @@
SYNOPSIS
mixed * m_entry(mapping map, mixed key)
-BESCHREIBUNG
- Durchsucht das Mapping <map> nach dem Eintrag mit Index <key> und
- liefert alle Werte von <key> in einem Array zurueck.
+DESCRIPTION
+ Query the mapping <map> for the entry for <key> and return all
+ its values in one array.
- Wenn <map> keinen Eintrag mit Index <key> enthaelt, liefert
- m_entry() 0.
+ If <map> does not contain <key>, 0 is returned.
-BEISPIELE
- mapping m = ([1:"bla";-1, 2:"fasel";-2 ])
+ Note: the efun m_add() can be used to add all values for an entry
+ at once.
+
+EXAMPLES
+ mapping m = ([ 1:"foo";-1, 2:"bar";-2 ]);
+
m_entry(m, 0) -> 0
- m_entry(m, 1) -> ({"bla", -1})
+ m_entry(m, 1) -> ({ "foo", -1 })
-ANMERKUNGEN
- Mit der Efun m_add() koennen alle Werte eines Eintrages auf einmal
- addiert werden.
+HISTORY
+ Introduced in LDMud 3.2.10.
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.10.
-
-SIEHE AUCH
+SEE ALSO
m_add(E), m_contains(E), mappings(LPC), member(E)
diff --git a/doc/efun/m_indices b/doc/efun/m_indices
index b80f32c..7df25b2 100644
--- a/doc/efun/m_indices
+++ b/doc/efun/m_indices
@@ -1,9 +1,9 @@
SYNOPSIS
mixed * m_indices(mapping map)
-BESCHREIBUNG
- Liefert ein Array mit den Indizes von <map>.
+DESCRIPTION
+ Returns an array containing the indices of mapping 'map'.
-SIEHE AUCH
- mappingp(E), mkmapping(E), m_add(E), m_values(E), m_delete(E),
+SEE ALSO
+ mappingp(E), mkmapping(E), m_values(E), m_add(E), m_delete(E),
sizeof(E), widthof(E), unmkmapping(E)
diff --git a/doc/efun/m_reallocate b/doc/efun/m_reallocate
index 550e12b..c129e3f 100644
--- a/doc/efun/m_reallocate
+++ b/doc/efun/m_reallocate
@@ -1,23 +1,22 @@
SYNOPSIS
mapping m_reallocate(mapping m, int width)
-BESCHREIBUNG
- Erzeugt ein neues Mapping mit <width> Werten pro Key und fuellt das
- Mapping mit den Werten aus <m>. Wenn <m> weniger als <width> Werte
- pro Key hat, werden im neuen Mapping die restlichen Werte auf 0
- gesetzt. Wenn <m> mehr als <width> Werte pro Key hat, werden die
- ueberzaehligen Werte ignoriert.
+DESCRIPTION
+ Create a new mapping with <width> values per key and fill it
+ with the values from mapping <m>. If <m> has less than <width>
+ values per key, the extra values in the result are set to 0.
+ If <m> has more values per key, the extra values are ignored.
- Das urspruengliche Mapping <m> wird nicht veraendert.
+ The mapping <m> is not changed.
-BEISPIELE
+EXAMPLES
mapping m = ([ "foo":1;2;3, "bar":4;5;6 ])
- m_reallocate(m, 1) --> liefert ([ "foo":1, "bar:4 ])
- m_reallocate(m, 4) --> liefert ([ "foo":1;2;3;0, "bar:4;5;6;0 ])
+ m_reallocate(m, 1) --> returns ([ "foo":1, "bar:4 ])
+ m_reallocate(m, 4) --> returns ([ "foo":1;2;3;0, "bar:4;5;6;0 ])
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.6, auf Vorschlag von Tubmud.
+HISTORY
+ Introduced in LDMud 3.2.6, suggested by Tubmud.
-SIEHE AUCH
+SEE ALSO
m_allocate(E), m_values(E), widthof(E)
diff --git a/doc/efun/m_values b/doc/efun/m_values
index 153aef1..2d20f86 100644
--- a/doc/efun/m_values
+++ b/doc/efun/m_values
@@ -2,23 +2,23 @@
mixed * m_values(mapping map)
mixed * m_values(mapping map, int index)
-BESCHREIBUNG
- Liefert ein Array mit den Werten des Mappings <map>. Wenn <index>
- angegeben ist, liefert m_values() die Werte der entsprechenden Spalte,
- sonst die Werte der ersten Spalte.
+DESCRIPTION
+ Returns an array with the values of mapping 'map'.
+ If <index> is given as a number between 0 and the width of
+ the mapping, the values from the given column are returned,
+ else the values of the first column.
-BEISPIELE
- mapping m = ([ "bla":1;2;3 , "fasel":4;5;6 , "schnack":7;8;9 ]);
- m_values(m) -> liefert ({ 1 , 4 , 7 }) (u.U. permutiert)
- m_values(m, 0) -> liefert ({ 1 , 4 , 7 }) (ditto)
- m_values(m, 1) -> liefert ({ 2 , 5 , 8 }) (ditto)
+EXAMPLES
+ mapping m = ([ "foo":1;2;3, "bar":4;5;6, "baz":7;8;9 ])
+ m_values(m) --> returns ({ 1, 4, 7 }) or some permutation thereof
+ m_values(m, 0) --> returns ({ 1, 4, 7 }) (ditto)
+ m_values(m, 1) --> returns ({ 2, 8, 9 }) (ditto)
- Die genaue Reihenfolge der Werte im Ergebnisarray ist nicht
- vorhersagbar, und kann sich mit jeder Aenderung am Mapping aendern.
- Garantiert ist lediglich, dass die Ergebnisse von m_indices() und
- m_values(), wenn sie zur selben Zeit bestimmt werden, dieselbe
- Reihenfolge aufweisen.
+ Note that exact order of the values in the resulting arrays is not
+ specified, and may vary after any change to the mapping. The only
+ guarantee given is that if m_indices() and m_values() are taken at the
+ same time, the order of both results is identical.
-SIEHE AUCH
- mappingp(E), mkmapping(E), m_add(E), m_indices(E), m_delete(E),
- sizeof(E), widthof(E), unmkmapping(E)
+SEE ALSO
+ mappingp(E), mkmapping(E), m_indices(E), m_add(E), m_delete(E),
+ sizeof(E), widthof(E), unmkmapping(E).
diff --git a/doc/efun/make_shared_string b/doc/efun/make_shared_string
index b39c6f6..5236737 100644
--- a/doc/efun/make_shared_string
+++ b/doc/efun/make_shared_string
@@ -1,25 +1,19 @@
-VERALTET
+DEPRECATED
SYNOPSIS
string make_shared_string(string str)
bytes make_shared_string(bytes str)
-BESCHREIBUNG
- Fuegt <str> in die Tabelle der gemeinsam verwendeten String des Spiels
- ein.
+DESCRIPTION
+ Puts <str> in the table of shared strings of the game.
- Wenn ein String von mehreren Variablen / Objekten verwendet wird,
- spart dies Speicher. Keys von Alists und Mappings sind immer gemeinsam
- verwendete Strings.
+ If the string is used by several variables/objects this
+ saves memory. Keys of alists and mappings are always shared
+ strings.
- In LDMud 3.3 ist diese Funktion nicht laenger nuetzlich: Strings
- werden sowieso so weit wie moeglich gemeinsam verwendet, und der
- Driver wandelt untablierte Strings nach einiger Zeit automatisch in
- tablierte Strings um um
+ In LDMud 3.3, this function is no longer necessary: strings
+ are shared as much as possible anyway, and the driver automatically
+ converts untabled strings into tabled strings after some time.
-FEHLER
- Ein besseres Stringhandling im Driver sollte diese Efun ueberfluessig
- machen.
-
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.6, auf Vorschlag von Tubmud.
- Veraltet seit LDMud 3.3.
+HISTORY
+ Introduced in LDMud 3.2.6; following a suggestion from Tubmud.
+ Deprecated in LDMud 3.3.531.
diff --git a/doc/efun/map b/doc/efun/map
index 808f065..5c6c47d 100644
--- a/doc/efun/map
+++ b/doc/efun/map
@@ -7,87 +7,92 @@
mixed * map(struct arg, closure cl, mixed extra...)
mixed * map(struct arg, mapping m [, int idx])
- mapping map(mapping arg, string func, string|object ob, mixed extra...)
+ mapping map(mapping arg, string func, string|object ob
+ , mixed extra...)
mapping map(mapping arg, closure cl, mixed extra...)
string map(string arg, string func, string|object ob, mixed extra...)
string map(string arg, closure cl, mixed extra...)
string map(string arg, mapping m [, int idx])
-BESCHREIBUNG
- Ruft die Funktion <ob>-><func>() bzw. die Closure <cl> fuer jedes
- Element des Strings, Arrays, Mappings oder der Struktur <arg> auf
- und liefert ein Resultat, das aus den verschiedenen Rueckgabewerten
- erstellt wurde.
+DESCRIPTION
+ Call the function <ob>-><func>() resp. the closure <cl> for every
+ element of the string, array, struct or mapping <arg>, and return a
+ result made up from the returned values.
- Wurde <ob> nicht angegeben, oder ist es weder ein String noch ein
- Objekt, wird stattdessen this_object() verwendet.
+ If <ob> is omitted, or neither a string nor an object, it
+ defaults to this_object().
- Ist <arg> ein Array, ein String oder eine Struktur, wird die Funktion
- mit jedem Element des Arrays als erstem Parameter aufgerufen, gefolgt
- von den <extra> Argumenten. Das Resultat der Efun ist ein Array, das
- die Rueckgabewerte der Funktionsaufrufe enthaelt. Man koennte die
- Operation map() deshalb umschreiben als:
+ If <arg> is an string, array or struct, the function will be called
+ with each of the array/struct elements as first parameter, followed
+ by the <extra> arguments. The result of the efun is an array/struct
+ with all the results returned from the function calls. Thus the
+ operation could be described as:
- foreach(index) result[index] = ob->func(arg[index], extra...)
+ foreach(index) result[index] = ob->func(arg[index], extra...)
- Ist <arg> ein Array, ein String oder eine Struktur, und wurde statt
- einer Funktion ein Mapping angegeben, so liefert map() ein Array mit
- den Werten, die im Mapping an Stelle der urspruenglichen Werte stehen,
- bzw. mit den Originalwerten, wenn fuer sie kein Mappingeintrag
- existiert. Ist <idx> angegeben, so wird die entsprechende Spalte des
- Mappings verwendet. Mit anderen Worten:
+ If <arg> is an string/array/struct, and a mapping is specified
+ instead of a function, the result is an array/struct with the
+ values found in the mapping for the original values, resp. with the
+ original values for which no mapping entry exists. If a column index
+ <idx> is given, that column of the mapping is used. In other words:
- foreach(index)
- if (arg[index] ist ein Key in <arg>)
- result[index] = map[arg[index]] oder map[arg[index]]
- else
- result[index] = arg[index]
+ foreach(index)
+ if (arg[index] exists as key in map)
+ result[index] = map[arg[index]] or map[arg[index], idx]
+ else
+ result[index] = arg[index]
- Ist <arg> ein Mapping, wird die Funktion fuer jeden Key des Mappings
- als erstem Parameter und den Datenwerten (sofern vorhanden) als
- zusaetzliche Argumente aufgerufen, gefolgt von den <extra> Argumenten.
- Die <extra> Argumente duerfen keine geschuetzten Referenzen enthalten
- (wie z.B. &(i[0])). Das Ergebnis der Efun ist ein Mapping, das die
- Resultate der Funktionsaufrufe als Zuordnung zum jeweiligen Key
- enthaelt.
+ If <arg> is a string, the only allowed replacement values are
+ numbers, of which only the lower 8 bit will be considered.
- Abhaengig von der Breite des Mappings <arg>, kann die Operation
- umschrieben werden als:
- foreach (key in arg)
- switch (widthof(arg))
- case 0:
- result[key] = ob->func(key, 0, extra...)
- case 1:
- result[key] = ob->func(key, arg[key], extra...)
- else :
- result[key] = ob->func( key
- , ({ arg[key,0] ...arg[key,width-1] })
- , extra...)
+ If <arg> is a mapping, the function will be called with
+ each of the mapping keys as first, and (if existing) the
+ associated values as second parameter, followed by the <extra>
+ arguments (these must not be protected references like &(i[0]). The
+ result of the efun is a mapping of all results of the function calls,
+ stored under their corresponding key.
- Der Vorteil dieses Ansatzes ist, dass beide Arten von mehrdimensionalen
- Mappings (Mappings mit mehreren Werten pro Key und Mappings von Arrays)
- gleich behandelt werden koennen.
+ Depending on the width of the mapping <arg>, the operation can
+ be described as:
-BEISPIELE
+ foreach (key in arg)
+ switch (widthof(arg))
+ case 0:
+ result[key] = ob->func(key, 0, extra...)
+ case 1:
+ result[key] = ob->func(key, arg[key], extra...)
+ else :
+ result[key] = ob->func( key
+ , ({ arg[key,0] ...arg[key,width-1] })
+ , extra...)
+
+ The advantage of this approach is that the two types of
+ multi-dimensional mappings (mappings with multiple values
+ per key, and mappings of arrays) can be treated in the same way.
+
+ Note however that the resulting mapping always has one value
+ per key.
+
+ Historical Note: map() used with arrays behaves like map_array(),
+ but used with mappings generalises map_indices()!
+
+
+EXAMPLES
arr = ({ 1, 2, 3, 4 });
m = ([ 1:-1, 3:-3 ]);
- map(arr, #'%, 2) --> liefert ({ 1, 0, 1, 0 })
- map(arr, m) --> liefert ([ -1, 2, -3, 4 })
+ map(arr, #'%, 2) --> returns ({ 1, 0, 1, 0 })
+ map(arr, m) --> returns ({ -1, 2, -3, 4 })
-ANMERKUNGEN
- map() auf Arrays angewandt verhaelt sich wie map_array(), auf Mappings
- angewandt hingegen verhaelt es sich wie eine Verallgemeinerung von
- map_indices().
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.6, loest map_array() ab.
- LDMud 3.2.8 fuehrt neu die Moeglichkeit ein, ein Array durch ein
- Mapping zu mappen.
- LDMud 3.3.439 fuehrt map() fuer Strings ein.
- LDMud 3.3.719 fuehrt den <idx>-Parameter fuer mappen mit Mappings ein.
+HISTORY
+ Introduced in LDMud 3.2.6, obsoletes map_array().
+ LDMud 3.2.8 added the feature of mapping an array through a mapping.
+ LDMud 3.3.439 added mapping of strings.
+ LDMud 3.3.719 added the <idx> parameter for mapping through mappings.
-SIEHE AUCH
+SEE ALSO
filter(E), filter_indices(E), map_indices(E), map_objects(E)
+
diff --git a/doc/efun/map_indices b/doc/efun/map_indices
index 7aacc04..fe96419 100644
--- a/doc/efun/map_indices
+++ b/doc/efun/map_indices
@@ -1,33 +1,31 @@
-VERALTET
SYNOPSIS
- mapping map_indices(mapping m, string fun, string|object ob,
- mixed extra, ...)
- mapping map_indices(mapping m, closure cl, mixed extra, ...)
+ mapping map_indices(mapping m, string func, string|object ob, ...)
+ mapping map_indices(mapping m, closure cl, ...)
-BESCHREIBUNG
- Fuer jedes Element des Mappings wird ob->func() bzw. die Closure <cl>
- aufgerufen. Dabei wird zuerst der Key des Mappings, dann das
- Datenelement und schliesslich die <extra> Argumente uebergeben.
- Die <extra> Argumente duerfen keine geschuetzten Referenzen wie z.B.
- &(i[0]) enthaelten. Der Dateneintrag im Mapping wird durch den
- Rueckgabewert der Funktion ersetzt. <ob> kann auch der Dateiname
- eines Objektes sein.
+DESCRIPTION
+ ob->func() is called resp. cl applied to every element in the mapping,
+ with the key of the element as first argument, and then the extra args
+ that were given to map_indices (these args must not be protected
+ references like &(i[0])). The data item in the mapping is replaced by
+ the return value of the function. ob can also be a file_name of an
+ object.
- Wird <ob> nicht angegeben oder weder ein String noch ein Objekt,
- wird standardmaessig this_object() verwendet.
+ If <ob> is omitted, or neither a string nor an object, it
+ defaults to this_object().
- Verfuegt das Mapping ueber mehr als ein Datenelement pro Key, so
- wird nur das erste Element beachtet, alle andern Datenelemente
- werden ignoriert. Das Verhalten von map_indices() unterscheidet sich
- also vom Verhalten von map_array().
+ Note that if mapping m has more than one value per key, these
+ are ignored: the resulting mapping always has one value per key.
-BEISPIELE
+ Also note that the behaviour of this function is different from
+ map(<array>).
+
+EXAMPLES
m = mkmapping(users());
- m = map_indices(m, #'envrionment);
+ m = map_indices(m, #'environment);
-GESCHICHTE
- In LDMud 3.2.6 umbenannt von map_mapping() und durch map() ergaenzt.
+HISTORY
+ In LDMud 3.2.6 renamed from map_mapping() and complemented by map().
-SIEHE AUCH
+SEE ALSO
map(E), filter(E), filter_indices(E), walk_mapping(E), member(E),
m_contains(E)
diff --git a/doc/efun/map_objects b/doc/efun/map_objects
index 75952c1..fc3149c 100644
--- a/doc/efun/map_objects
+++ b/doc/efun/map_objects
@@ -3,15 +3,14 @@
mixed * map_objects(lwobject *arr, string fun, mixed extra, ...)
mixed * map_objects(string *arr, string fun, mixed extra, ...)
-BESCHREIBUNG
- map_objects() verhaelt sich aehnlich wie map(), ruft jedoch
- arr[n]->fun(extra, ...) auf. Der Rueckgabewert ersetzt das Objekt bzw.
- den Objektnamen in <arr>.
+DESCRIPTION
+ Similar to map(), but calls arr[n]->fun(extra,...). The returned value
+ replaces the object/string in returned array.
+ <arr> may contain a mixture of regular and lightweight objects and
+ object names as well.
- <arr> kann auch eine Mischung aus normalen und leichtgewichtigen
- Objekten und Objektnamen enthalten. Es ist eine beliebige Anzahl
- <extra> Argumente erlaubt, welche alle an die Funktion <fun>
- uebergeben werden. 0-Eintraege in <arr> werden ignoriert.
+ Any number of extra arguments is allowed, which are all
+ passed. 0-entries in arr are ignored.
-SIEHE AUCH
+SEE ALSO
map(E), filter(E), filter_objects(E)
diff --git a/doc/efun/mappingp b/doc/efun/mappingp
index 5ab4ed2..2442038 100644
--- a/doc/efun/mappingp
+++ b/doc/efun/mappingp
@@ -1,10 +1,12 @@
SYNOPSIS
int mappingp(mixed arg)
-BESCHREIBUNG
- Liefert 1, wenn das Argument ein Mapping ist, ansonsten 0.
+DESCRIPTION
+ Returns 1 if the argument is a mapping, or 0 if it is not.
-SIEHE AUCH
- intp(E), stringp(E), bytesp(E), objectp(E), pointerp(E),
- mkmapping(E), m_indices(E), m_values(E), m_delete(E),
- sizeof(E), widthof(E).
+SEE ALSO
+ mkmapping(E), m_indices(E), m_values(E), m_add(E), m_delete(E),
+ sizeof(E), widthof(E), bytesp(E), clonep(E), closurep(E),
+ coroutinep(E), floatp(E), intp(E), lpctypep(E), lwobjectp(E),
+ objectp(E), pointerp(E), referencep(E), stringp(E), structp(E),
+ symbolp(E)
diff --git a/doc/efun/master b/doc/efun/master
index aa14001..afd3db9 100644
--- a/doc/efun/master
+++ b/doc/efun/master
@@ -2,16 +2,15 @@
object master()
object master(int dont_load)
-BESCHREIBUNG
- Die Funktion liefert das Masterobjekt.
+DESCRIPTION
+ Returns the master object.
+
+ If <dont_load> is false, the function first makes sure that
+ the master object exists.
+ If <dont_load> is true, the function just returns the current
+ master object, or 0 if the current master has been destructed.
- Wenn <dont_load> nicht wahr ist, stellt master() zuerst sicher, dass
- das Masterobjekt auf existiert. Wenn <dont_load> wahr ist, liefert
- master() nur das Masterobjekt oder 0, falls das aktuelle Masterobjekt
- zerstoert wurde.
-
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.10.
-
-SIEHE AUCH
+HISTORY
+ Introduced in LDMud 3.2.10.
+SEE ALSO
master(M)
diff --git a/doc/efun/match_command b/doc/efun/match_command
index cd495d7..2e3cac3 100644
--- a/doc/efun/match_command
+++ b/doc/efun/match_command
@@ -1,7 +1,7 @@
SYNOPSIS
- #include <sys/commands.h>
+ #include <commands.h>
- mixed * match_command (string command, object origin)
+ mixed * match_command(string command, object origin)
DESCRIPTION
Take the command <command>, parse it, and return an array of all
diff --git a/doc/efun/max b/doc/efun/max
index bd4f870..c91d73e 100644
--- a/doc/efun/max
+++ b/doc/efun/max
@@ -1,23 +1,23 @@
SYNOPSIS
string|bytes max(string|bytes arg, ...)
- string|bytes max(string|bytes *arg)
+ string|bytes max(string|bytes *arg_array)
int|float max(int|float arg, ...)
- int|float max(int|float *arg)
+ int|float max(int|float *arg_array)
-BESCHREIBUNG
- Die Funktion liefert den groessten Wert aller <arg> und liefert ihn
- zurueck. Wird max() nur mit einem Array aufgerufen wird (das nicht
- leer sein darf), liefert die Funktion das groesste Element aus <arg>.
+DESCRIPTION
+ Determaxe the maximum value of the <arg>uments and return it.
+ If max() is called with an array (which must not be empty) as only
+ argument, it returns the maximum value of the array contents.
-BEISPIELE
- max(1) - liefert 1
- max(1, 1.1) - liefert 1.1
- max("foo", "bar") - liefert "foo"
- max( ({ "foo", "bar" }) ) - liefert "foo"
+EXAMPLES
+ max(1) - returns 1
+ max(1, 1.1) - returns 1.1
+ max("foo", "bar") - returns "foo"
+ max( ({ "foo", "bar" }) ) - returns "foo"
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
+HISTORY
+ Introduced in LDMud 3.2.9.
-SIEHE AUCH
+SEE ALSO
min(E)
diff --git a/doc/efun/md5 b/doc/efun/md5
index a559767..745bf87 100644
--- a/doc/efun/md5
+++ b/doc/efun/md5
@@ -1,38 +1,35 @@
-VERALTET
+OBSOLETE
SYNOPSIS
string md5(string arg [, int iterations])
- string md5(bytes arg [, int iterations])
+ string md5(bytes arg [, int iterations])
string md5(int * arg [, int iterations])
-BESCHREIBUNG
- Berechnet den MD5-Hashwert von <arg>.
- Das Argument kann ein String, eine Bytefolge oder ein Array von
- Zahlen sein (die als Folge von Bytes betrachtet wird, wobei
- immer nur die untersten 8 Bits Verwendung finden). Falls ein String
- uebergeben wurde, so wird dieser in eine UTF-8-Bytefolge konvertiert
- und davon der Hash berechnet.
+DESCRIPTION
+ Create and return a MD5 message digest from <arg>.
+ <arg> may be a string, a byte sequence, or an array of numbers
+ (each considered to be a byte, ignoring all but the lowest 8 bits).
+ A string is converted to a UTF-8 byte sequence of which then the
+ digest will be created.
- Das Ergebnis wird als 32-stelliger Hexadezimalwert geliefert.
+ If <iterations> is given as a number greater than 0, it is
+ the number of iterations used in the digest calculation. If omitted,
+ the driver executes just one iteration.
- Ist das <iterations> Argument eine Zahl groesser 0, berechnet der
- Driver den Digest mit diese Anzahl an Wiederholungen. Fehlt die
- Angabe, fuehrt der Driver die Digest-Berechnung einmal aus.
-
- Jede Iteration kostet 5 Evalution-Ticks.
+ The efun costs 5 ticks per iteration.
-BEISPIELE
+EXAMPLES
string s;
- s = md5("Hallo");
+ s = md5("Hello");
s = md5( ({ 'H', 'e', 'l', 'l', 'o' }) )
s = md5( ({ 'H', 'e', 'l', 'l', 'o' }), 2 )
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
- LDMud 3.2.12 fuehrte Zaehlenarrays als Argument ein, also auch
- die Anzahl der Wiederholungen.
- LDMud 3.3.717 fuehrte die Iterations-basierte Evaluationskosten ein.
- Seit LDMud 3.3.719 abgeloest durch hash().
+HISTORY
+ Introduced in LDMud 3.2.9.
+ LDMud 3.2.12 added number arrays as argument, and the number of
+ interations.
+ LDMud 3.3.717 added the iteration-based evaluation cost.
+ Since LDMud 3.3.719 obsoleted by hash().
-SIEHE AUCH
+SEE ALSO
crypt(E), md5_crypt(E), sha1(E), hash(E), hmac(E)
diff --git a/doc/efun/md5_crypt b/doc/efun/md5_crypt
index 2dffbdc..422058c 100644
--- a/doc/efun/md5_crypt
+++ b/doc/efun/md5_crypt
@@ -1,22 +1,24 @@
SYNOPSIS
string md5_crypt(string str, int seed)
string md5_crypt(string str, string seed)
- string md5_crypt(bytes str, int seed)
- string md5_crypt(bytes str, string seed)
+ string md5_crypt(bytes str, int seed)
+ string md5_crypt(bytes str, string seed)
-BESCHREIBUNG
- Verschluesselt den String <str> mit dem Schluessel <seed>.
- <seed> kann entweder ein Integer sein oder zwei Zeichen aus
- dem String <seed>. Wenn <seed> 0 ist, wird ein zufaelliger
- Schluessel erzeugt.
+DESCRIPTION
+ Crypt the string <str> the first two characters
+ from the string <seed> as a seed. If <seed> is an integer, then
+ a random seed is used.
- Das Resultat enthaelt den Schluessel als die ersten beiden Zeichen.
+ The result has the first two characters as the seed.
- Die Efun verwendet den MD5-Algorithmus, und das Resultat ist
- kompatible mit der Passwordverschluesselung des Apache Webservers.
+ The efun uses the MD5 algorithm for encryption, and the result
+ is compatible with the Apache password encryption.
- Fuer Passwortabfragen, die ohne Echo eingegeben werden koennen sollen,
- bietet input_to() ein spezielles Flag.
+ If you want to let enter password information without echo,
+ input_to() can be used with special argument.
-SIEHE AUCH
- crypt(E), md5(E), sha1(E), input_to(E)
+HISTORY
+ Introduced in LDMud 3.3
+
+SEE ALSO
+ crypt(E), input_to(E), md5(E), md5_crypt(E), hash(E), hmac(E)
diff --git a/doc/efun/member b/doc/efun/member
index 2ef5b42..918efc3 100644
--- a/doc/efun/member
+++ b/doc/efun/member
@@ -2,22 +2,20 @@
int member(mixed *array, mixed elem [, int start])
int member(string s, int elem [, int start])
int member(bytes s, int elem [, int start])
- int member(mapping map, mixed key)
+ int member(mapping m, mixed key)
-BESCHREIBUNG
- Fuer Arrays, String und Bytefolgen liefert member() den Index
- des ersten Auftretens von <elem> in <arg>. Ist <elem> nicht
- in <arg> enthalten, wird -1 zurueck gegeben.
+DESCRIPTION
+ For arrays, strings and byte sequences, returns the index of the
+ first occurance of second arg in the first arg, or -1 if none found.
+ If <start> is given and non-negative, the search starts at
+ that position. A start position beyond the end of the string
+ or array will cause the efun to return -1.
- Ist <start> als Zahl >= 0 gegeben, beginnt die Suche ab der
- angegebenen Position. Eine Startposition groesser als die
- Laenge des Strings/Arrays liefert stets das Resultat -1.
+ For mappings it checks, if key is present in mapping m and
+ returns 1 if so, 0 if key is not in m.
- Fuer Mapping prueft member(), ob <key> in <map> enthalten ist und
- liefert 1 zurueck falls ja, 0 sonst.
+HISTORY
+ LDMud 3.3.556 added the <start> parameter.
-GESCHICHTE
- LDMud 3.3.556 fuegte den <start>-Parameter hinzu.
-
-SIEHE AUCH
+SEE ALSO
rmember(E), mappings(LPC)
diff --git a/doc/efun/min b/doc/efun/min
index 3ec81a7..36922dd 100644
--- a/doc/efun/min
+++ b/doc/efun/min
@@ -1,22 +1,23 @@
SYNOPSIS
- string|bytes min(string|bytes arg, ... )
+ string|bytes min(string|bytes arg, ...)
string|bytes min(string|bytes *arg_array)
+
int|float min(int|float arg, ...)
int|float min(int|float *arg_array)
-BESCHREIBUNG
- Liefert das kleinste der Argumente <arg>. Wenn min() fuer ein
- einzelnes (nicht leeres) Array aufgerufen wird, liefert min() das
- kleinste Element im Array.
+DESCRIPTION
+ Determine the minimum value of the <arg>uments and return it.
+ If min() is called with an array (which must not be empty) as only
+ argument, it returns the minimum value of the array contents.
-BEISPIELE
- min(1) -> liefert 1
- min(1, -1.1) -> liefert -1.1
- min("bla", "fasel") -> liefert "bla"
- min( ({ "bla", "fasel" }) ) -> liefert "bla"
+EXAMPLES
+ min(1) - returns 1
+ min(1, -1.1) - returns -1.1
+ min("foo", "bar") - returns "bar"
+ min( ({ "foo", "bar" }) ) - returns "bar"
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
+HISTORY
+ Introduced in LDMud 3.2.9.
-SIEHE AUCH
+SEE ALSO
max(E)
diff --git a/doc/efun/mkdir b/doc/efun/mkdir
index 1562498..386e49a 100644
--- a/doc/efun/mkdir
+++ b/doc/efun/mkdir
@@ -1,9 +1,9 @@
SYNOPSIS
int mkdir(string path)
-BESCHREIBUNG
- Erstellt ein Verzeichnis <path> und liefert 1, wenn das Verzeichnis
- erstellt werden konnte, sonst 0.
+DESCRIPTION
+ Make a directory named path. Return 1 for success and 0 for
+ failure.
-SIEHE AUCH
+SEE ALSO
rmdir(E), rm(E), get_dir(E), file_size(E)
diff --git a/doc/efun/mkmapping b/doc/efun/mkmapping
index 477d471..5423f1c 100644
--- a/doc/efun/mkmapping
+++ b/doc/efun/mkmapping
@@ -1,30 +1,29 @@
SYNOPSIS
- mapping mkmapping(mixed *arr1, mixed *arr2, mixed *arr3, ...)
+ mapping mkmapping(mixed *arr1, mixed *arr2,...)
mapping mkmapping(struct st)
-BESCHREIBUNG
- Liefert ein Mapping mit Keys aus <arr1> und Datenelementen aus
- <arr2>, <arr3>.... Dem Key <arr1[0]> werden die Datenelemente
- <arr2[0]>, <arr3[0]>... zugeordnet. Wenn die Datenarrays
- ungleich gross sind, enthaelt das Mapping nur so viele Eintraege
- wie im kleinsten Datenarray enthalten sind.
+DESCRIPTION
+ The first form returns a mapping with indices from 'arr1' and
+ values from 'arr2'... . arr1[0] will index arr2...[0], arr1[1]
+ will index arr2...[1], etc. If the arrays are of unequal size,
+ the mapping will only contain as much elements as are in the
+ smallest array.
- Die zweite Form konvertiert die angegebene struct <st> in ein Mapping.
- Hierbei werden die Namen des jeweiligen Elementes in der struct als
- Schluessel verwendet.
+ The second form converts the given struct <st> into a mapping
+ using the struct member names as index values.
-BEISPIELE
+EXAMPLES
mkmapping( ({ 1, 2 }), ({ 10, 11 }), ({ 20, 21, 22}))
- liefert ([ 1:10;20, 2:11;21 ])
+ returns ([ 1:10;20, 2:11;21 ])
struct s { int a; int *b; int c; };
mkmapping( (<s> a: 1, b: ({ 2, 3 }), c: 3 )
- liefert ([ "a":1, "b":({2,3}), "c":3 ])
+ returns ([ "a":1, "b":({2,3}), "c":3 ])
-GESCHICHTE
- LDMud 3.3.433 ermoeglichte die Konversion von structs.
+HISTORY
+ LDMud 3.3.433 added the conversion from structs.
-SIEHE AUCH
+SEE ALSO
mappings(LPC), mappingp(E), m_indices(E), m_values(E),
m_add(E), m_delete(E), sizeof(E), widthof(E), unmkmapping(E),
to_struct(E)
diff --git a/doc/efun/mktime b/doc/efun/mktime
index 03f7913..c7e7682 100644
--- a/doc/efun/mktime
+++ b/doc/efun/mktime
@@ -3,41 +3,40 @@
int mktime(int *ts)
-BESCHREIBUNG
- Ist das Argument <ts> ein Array mit 9 Elementen (int) entsprechend
- des Rueckgabewertes von localtime(), so liefert die Funktion
- die Anzahl Sekunden seit dem 01. Januar 1970, 00:00:00 zurueck.
- Hierbei wird immer die aktuelle Zeitzone des Hostrechners zugrunde
- gelegt.
- Dies ist von Nutzen, wenn man ein Datum/Uhrzeit hat, diese aber als
- Ganzzahl-Wert speichern will oder eine Zeitdifferenz zwischen zwei
- Daten ausrechnen will.
+DESCRIPTION
+ If the argument <ts> is an array with 9 elements (int) according to
+ the result of localtime(), this function returns the number of seconds
+ passed since the epoch (00:00:00 UTC, January 1, 1970).
+ mktime() interprets the input data according to the current timezone
+ setting of the host system.
+ This can be used to store a date or time as an integer value or to
+ compute differences betweens two different dates or times.
- Das Array muss dabei so aufgebaut sein:
- int TM_SEC (0): Sekunde in der Minute (0..59)
- int TM_MIN (1): Minute in der Stunde (0..59)
- int TM_HOUR (2): Stunde des Tages (0..23)
- int TM_MDAY (3): Tag im Monat (1..31)
- int TM_MON (4): Monat des Jahres (0..11)
- int TM_YEAR (5): Jahr (z.B. 2001)
- int TM_WDAY (6): Wochentag (0..6, Sonntag = 0)
- int TM_YDAY (7): Tag im Jahr (0..365)
- inz TM_ISDST (8): Sommerzeit, Daylight Saving Time (1,0,-1)
+ The array <ts> has to have the following structure:
+ int TM_SEC (0): seconds (0..59)
+ int TM_MIN (1): minutes (0..59)
+ int TM_HOUR (2): hours (0..23)
+ int TM_MDAY (3): day of month (1..31)
+ int TM_MON (4): day of year (0..11)
+ int TM_YEAR (5): year (e.g. 2001)
+ int TM_WDAY (6): day of week (0..6, sunday = 0)
+ int TM_YDAY (7): day of year (0..365)
+ inz TM_ISDST (8): Daylight Saving Time (1,0,-1)
- TM_YDAY und TM_WDAY werden ignoriert und koennen beliebige Zahlen
- enthalten.
- TM_ISDST kann 1 (Sommerzeit), 0 (keine Sommerzeit) oder -1 sein. Bei
- -1 wird versucht, zu erraten, ob Sommerzeit fuer die angegebene Zeit
- aktiv sein sollte.
+ TM_YDAY and TM_WDAY are ignored and can contain arbitrary
+ integer values.
+ TM_ISDST can be 1 (daylight saving time in effect), 0 (DST not in
+ effect) or -1. A value of -1 causes the mktime() function to attempt
+ to divine whether daylight saving time is in effect for the specified
+ time.
-BEISPIELE
- Man hat ein Datum/Uhrzeit (z.B. Benutzereingabe), welches als
- Unix-Zeitstempel gespeichert werden soll:
- // "Mit, 24. Okt 2007, 10:48:00" entspricht folgendem Zeitstempel:
- int unixzeit = mktime(({0, 48, 09, 24, 09, 2007, 0, 01, 0}));
+EXAMPLES
+ A date and time (user input) shall be stored as unix timestamp:
+ // "Wed Oct 24 10:48:00 2007" corresponds to the returned time stamp:
+ int unixtime = mktime( ({0, 48, 09, 24, 09, 2007, 0, 01, 0}) );
-GESCHICHTE
- Eingefuehrt in LDMud 3.3.718.
+HISTORY
+ Introduced in LDMud 3.3.718.
-SIEHE AUCH
+SEE ALSO
ctime(E), gmtime(E), localtime(E), time(E), utime(E)
diff --git a/doc/efun/move_object b/doc/efun/move_object
index f8d4572..615f903 100644
--- a/doc/efun/move_object
+++ b/doc/efun/move_object
@@ -1,18 +1,18 @@
-GESCHUETZT
SYNOPSIS
void move_object(mixed item, mixed dest)
-BESCHREIBUNG
- <item> wird in die neue Umgebung <dest> bewegt. <item> und <dest>
- koennen ein object_name() oder ein Objekt sein.
+DESCRIPTION
+ The item, which can be an object_name or an object, is moved into
+ it's new environment dest, which can also be an object_name or an
+ object.
- Seit 3.2.1 ist die Funktionalitaet von move_object() direkt in der
- Mudlib enthalten und verwendet dort die M_MOVE_OBJECT0/1 Treiber Hooks.
- move_object() kann so auch eine simul-efun sein.
+ Since 3.2.1, the innards of move_object() are implemented in
+ the mudlib, using the M_MOVE_OBJECT0/1 driver hooks, and move_object()
+ might as well be an simul-efun.
- In der traditionellen Implemenierung war <item> im COMPAT-Modus auf
- das aufrufende Objekt beschraenkt.
+ The traditional implementation restricted for !compat mode
+ the <item> to the calling object only.
-SIEHE AUCH
+SEE ALSO
remove(A), init(A), transfer(E), native(C), hooks(C),
set_environment(E)
diff --git a/doc/efun/negate b/doc/efun/negate
index a496966..413ce81 100644
--- a/doc/efun/negate
+++ b/doc/efun/negate
@@ -1,6 +1,6 @@
SYNOPSIS
- int negate(int arg)
- float negate(float arg)
+ int negate(int)
+ float negate(float)
-BESCHREIBUNG
- Liefert den negativen Wert von <arg>.
+DESCRIPTION
+ Unary minus. Returns the negative argument.
diff --git a/doc/efun/net_connect b/doc/efun/net_connect
index 41c9dd9..b358718 100644
--- a/doc/efun/net_connect
+++ b/doc/efun/net_connect
@@ -2,42 +2,49 @@
#include <comm.h>
int net_connect(string host, int port)
-BESCHREIBUNG
- Oeffne eine nicht-blockierende TCP Netzverbindung zu
- <host>:<port> . Bei Erfolg wird die Verbindung zum
- aufrufenden Objekt gebunden und die lfun logon() wird in dem
- Objekt aufgerufen.
+DESCRIPTION
+ Open a non-blocking TCP network connection to <host> and
+ <port>. On success, the connection is bound to the current
+ object and the lfun logon() is called in the object.
- Resultat ist einer der folgenden Werte:
- NC_SUCCESS net_connect() erfolgreich
- NC_EUNKNOWNHOST Host-Adresse nicht ermittelbar
- NC_ENOSOCKET Fehler beim Erstellen des Sockets
- NC_ENOBIND Fehler beim Binden des Sockets
- NC_ENOCONNECT Fehler beim Verbindgen des Sockets
- (Details ueber die letzten drei Fehler lassen sich im Fehlerlog des
- Drivers ermitteln.)
- NC_ECONNREFUSED Ziel ignoriert Verbindungsversuch
- NC_EMCONN zuviele unerledigte Verbindungen im Aufbau
- (voruebergehender Fehler, spaeter probieren)
- NC_ENORESSOURCES ungenuegende Ressourcen fuer Verbindungs-
- versuch (spaeter nochmal versuchen)
+ Returns one of the following values:
+ NC_SUCCESS Success
+ NC_EUNKNOWNHOST the host address could not be resolved
+ NC_ENOSOCKET error during socket creation
+ NC_ENOBIND socket could not be bound
+ NC_ENOCONNECT socket could not be connected
+ (Details of the last three errors can be found in the driver's error
+ log.)
+ NC_ECONNREFUSED remote host not listening/refusing
+ NC_EMCONN too many pending connections (transient, try
+ again later)
+ NC_ENORESSOURCES insufficient system ressources (transient, try
+ again later)
- Ist der Driver fuer IPv6 konfiguriert, wird <host> erst als
- IPv6-Name interpretiert, und wenn das fehlschlaegt, als
- IPv4-Name.
+ If the driver is configured to support IPv6, <host> is first
+ interpreted as IPv6 hostname. If that fails, <host> is then
+ interpretd as IPv4 hostname.
- Wenn die Verbindung nicht sofort erzeugt werden kann, gibt die
- Funktion 'Erfolg' zurueck, und der Driver vollendet die
- Funktion im Hintergrund. Sollte die Verbindungsaufbau im
- Hintergrund fehlschlagen, wird logon(-1) im aktuellen Objekt
- aufgerufen.
+ If the connection can't be established immediately, the efun
+ returns 'success' and the driver will check in the background
+ for the progress of the connection. When it is established,
+ logon() will be called in the object. If the connection fails,
+ logon(-1) will be called in the object.
- Die Funktion erzeugt eine privilege violation ("net_connect",
- host, port).
+ The efun raises a privilege violation ("net_connect", host, port).
- WARNUNG: Ist <host> ein Name und keine IP, fuehrt die Funktion
- einen DNS-Aufruf durch, der den Driver fuer einige Zeit
- blockieren kann.
+BUGS
+ A non-blocking connect() doesn't imply a non-blocking
+ forward name resolution. If you provide a hostname instead
+ of an IP address to connect to, the driver will block until
+ the name is resolved. This may be an issue, depending on how
+ fast your nameserver replies. Non-blocking forward DNS
+ resolution can currently only be achieved using ERQ_LOOKUP.
-SIEHE AUCH
+HISTORY
+ First version 1992 by Snake and LynX for Nemesis.
+ Improved 1993 by Junky.
+ Added to LDMud 3.2.10.
+
+SEE ALSO
logon(A)
diff --git a/doc/efun/next_bit b/doc/efun/next_bit
index b96f539..56805aa 100644
--- a/doc/efun/next_bit
+++ b/doc/efun/next_bit
@@ -1,22 +1,21 @@
SYNOPSIS
- int next_bit(string str, int start)
- int next_bit(string str, int start, int find_cleared)
+ int next_bit (string str, int start)
+ int next_bit (string str, int start, int find_cleared)
-BESCHREIBUNG
- Liefert den Zahlenwert des naechsten Bits im Bitstring <bit> nach
- der Position <start>. Gewoehnlich ist dies das naechste gesetzte
- Bit, aber wenn <find_cleared> angegeben und nicht 0 ist, wird
- die Postion des naechsten geloeschten Bits zurueck gegeben.
+DESCRIPTION
+ Return the number of the next bit in bitstring <str> after position
+ <start>. Usually this is the next set bit, but if <find_cleared>
+ is given and not 0, the position of the next cleared bit is returned.
- Dabei ist das Finden von geloeschten Bits nach dem letzten gesetzten
- Bit auf die tatsaechliche Laenge von <str> beschraenkt.
+ Note that finding cleared bits after the last set bit is limited to
+ the actual length of <str>.
- Jedes Zeichen enthaelt 6 Bits. In jedem Zeichen kann deshalb eine
- Zahl von 0 bis 63 gespeichert werde (2^6=64). Das erste Zeichen
- ist der Leerschlag " " mit dem Wert 0. Das erste Zeichen im String
- ist jenes mit den niedrigsten Bits (0-5).
+ Each character contains 6 bits. So you can store a value
+ between 0 and 63 in one character (2^6=64). Starting character
+ is the blank " " which has the value 0. The first character in
+ the string is the one with the lowest bits (0-5).
-BEISPIELE
+EXAMPLES
string s;
int p;
@@ -25,8 +24,8 @@
for (p = -1; -1 != (p = next_bit(s, p); )
write(p+"\n");
- --> das gibt 2 und 4 aus.
+ --> will write 2 and 4
-SIEHE AUCH
+SEE ALSO
set_bit(E), clear_bit(E), test_bit(E), last_bit(E), count_bits(E),
and_bits(E), or_bits(E), xor_bits(E), invert_bits(E), copy_bits(E)
diff --git a/doc/efun/next_inventory b/doc/efun/next_inventory
index 7062ba1..5dc7733 100644
--- a/doc/efun/next_inventory
+++ b/doc/efun/next_inventory
@@ -2,13 +2,13 @@
object next_inventory()
object next_inventory(object ob)
-BESCHREIBUNG
- Liefert das naechste Objekt aus dem Inventar von <ob>. Wird <ob>
- nicht angegeben, wird this_object() verwendet.
+DESCRIPTION
+ Get next object in the same inventory as ob. If ob is not
+ given, the current object will be used.
- Diese Efun wird meistens zusammen mit first_inventory() verwendet.
- Fuer ein Beispiel siehe dort.
+ This efun is mostly used together with the efun
+ first_inventory().
-SIEHE AUCH
+SEE ALSO
first_inventory(E), all_inventory(E), environment(E),
deep_inventory(E)
diff --git a/doc/efun/notify_fail b/doc/efun/notify_fail
index b161c42..f566460 100644
--- a/doc/efun/notify_fail
+++ b/doc/efun/notify_fail
@@ -2,35 +2,37 @@
int notify_fail(string str)
int notify_fail(closure cl)
-BESCHREIBUNG
- Der String <str> wird als Kommando-Fehlermeldung anstelle des default
- "What?" gespeichert. Das Resultat ist stets 0.
+DESCRIPTION
+ Store str as the error message given instead of the default
+ message ``What ?''. The result is always 0.
- Wird eine Closure als Argument gegeben, wird sie im Fehlerfall
- (also erst wenn ein Kommando endgueltig fehlgeschlagen hat)
- ausgefuehrt und hat die Fehlermeldung als Resultat
- zurueckzugeben. Die Closure erhaelt als Argument den
- originalen Befehlsgeber; in der Regel dies ist this_player(),
- was aber vom MODIFY_CMD hook geaendert werden kann.
+ If a closure is given, it is executed to return the error
+ message string, but not before all attempts to execute the
+ commandline failed (read: not at the time of the call to
+ notify_fail()). The closure receives as argument the original
+ commandgiver; usually it is identical to this_player(), unless
+ the modify_cmd hook changed that.
- Wird notify_fail() mehr als einmal fuer ein Kommando
- aufgerufen, wird lediglich der letzte Aufruf gewertet.
- notify_fail() erkennt verschachtelte Kommandos (siehe Efun
- command()), und ein notify_fail() in einem Unterkommando
- hat keinen Einfluss auf das uebergeordnete Kommando.
+ If notify_fail() is called more than once for this command, only the
+ last call will be used. However, calls to notify_fail() in nested
+ commands have no effect on this command.
-BEISPIELE
- Verwendet man
+ The idea of this function is to give better error messages
+ instead of simply 'What ?'.
+ It is also better to use
notify_fail(message); return 0;
-
- anstelle von
-
+ instead of
write(message); return 1;
- erhalten andere Objekte ihre Chance, das Kommando
- (erfolgreich) auszufuehren.
+ Other objects will get the chance to evaluate the verb.
-SIEHE AUCH
+HISTORY
+ Returntype changed in LDMud 3.2.6 from void to int.
+ Since LDMud 3.2.7, notify-fail settings are saved over nested
+ commands, and NPCs can see their notify-fail messages.
+
+
+SEE ALSO
add_action(E), command(E), query_verb(E), query_command(E),
query_notify_fail(E), hooks(C)
diff --git a/doc/efun/object_info b/doc/efun/object_info
index 89263f0..12f2df9 100644
--- a/doc/efun/object_info
+++ b/doc/efun/object_info
@@ -1,126 +1,203 @@
-GESCHUETZT
SYNOPSIS
- #include <objectinfo.h>
+ #include <object_info.h>
- mixed * object_info(object ob, int what)
- mixed * object_info(object ob, int what, int index)
+ mixed object_info(object ob, int what)
-BESCHREIBUNG
- Liefert einige interne Informationen ueber das Objekt <ob> in Form
- eines Arrays. Das Argument <what> gibt an, welche Informationen
- geliefert werden.
+DESCRIPTION
+ Returns some internal information about object <ob>. The
+ Argument <what> determines which information is returned.
- Das Resultat ist normalerweise ein Array. Wird jedoch <index>
- spezifiziert, wird nur der Wert geliefert, der im Array an der
- Position <index> stehen wuerde.
-
- Die moeglichen Werte fuer <what> und die Indizes des gelieferten
- Arrays sind in <objectinfo.h> definiert und muessen eingebunden
- werden. Diese Definitionen koennen sich in zukuenftigen Versionen
- des Drivers aendern!
-
- <what> == OINFO_BASIC:
-
- Dieser Aufruf liefert grundlegende Informationen ueber <ob>:
- int [OIB_HEART_BEAT]: 1, wenn <ob> einen heart_beat() hat,
- sonst 0.
- int [OIB_IS_WIZARD]: 1, wenn <ob> ein Gott ist (das
- Wizard Flag gesetzt hat), sonst 0. Der
- Eintrag ist immer 0, wenn set_is_wizard()
- nicht verfuegbar ist.
- int [OIB_ENABLE_COMMANDS]: 1, wenn <ob> Kommandos geben darf, sonst 0.
- int [OIB_CLONE]: 1, wenn <ob> ein Clon ist, sonst 0.
- int [OIB_DESTRUCTED]: 1, wenn <ob> zerstoert wurde, sonst 0.
- int [OIB_SWAPPED]: 1, wenn <ob> geswapt wurde, sonst 0.
- int [OIB_ONCE_INTERACTIVE]: 1, wenn <ob> einmal interaktiv war,
- sonst 0.
- int [OIB_RESET_STATE]: 1, wenn <ob> im gleichen Zustand wie nach
- einem reset() ist, sonst 0.
- int [OIB_WILL_CLEAN_UP]: 1, wenn <ob> clean_up() aufruft, sonst 0.
- int [OIB_LAMBDA_REFERENCED]:1, wenn <ob> Lambdas beinhaltet, sonst 0.
- int [OIB_SHADOW]: 1, wenn <ob> ein Schatten uebergeworfen
- wurde, sonst 0.
- int [OIB_REPLACED]: 1, wenn das Programm von <ob> ersetzt
- wurde (mit replace_program()), sonst 0.
- int [OIB_NEXT_RESET]: Zeit bis zum naechsten Reset.
- int [OIB_TIME_OF_REF]: Zeit des letzen Aufrufs von <ob>.
- int [OIB_REF]: Anzahl Aufrufe von <ob>.
- int [OIB_GIGATICKS]: GIGATICKS und TICKS liefern die summierten
- int [OIB_TICKS]: Evalkosten von <ob>.
- int [OIB_SWAP_NUM]: Die Swap-Nummer von <ob>s Programm, oder
- -1, wenn <ob> nicht geswapt wurde.
- int [OIB_PROG_SWAPPED]: 1, wenn <ob>'s Programm geswapt wurde,
- sonst 0.
- int [OIB_VAR_SWAPPED]: 1, wenn <ob>'s Variablen geswapt wurden,
- sonst 0.
- int [OIB_NAME]: der Objektname von <ob>.
- object [OIB_NEXT_ALL]: das naechste Objekt in der Objektliste.
- object [OIB_PREV_ALL]: das vorherige Objekt in der Objektliste.
-
- <what> == OINFO_POSITION:
-
- Dieser Aufruf liefert Informationen ueber die Position von <ob> in der
- globalen Objektliste:
-
- object [OIP_NEXT]: naechstes Objekt in der Objektliste.
- object [OIP_PREV]: vorheriges Objekt in der Objektliste.
- int [OIP_POS]: die Position von <ob> in der Objektliste,
- beginnend von 0 aufwaerts.
-
- Dieser Aufruf kann aufwendig an Rechenzeit sein.
-
- <what> == OINFO_MEMORY:
-
- Dieser Aufruf liefert Informationen ueber Speichernutzung von <ob>.
-
- int [OIM_REF]: Anzahl Referenzierungen von <ob>.
- string [OIM_NAME]: Name von <ob>.
- int [OIM_PROG_SIZE]: Programmgroesse.
- int [OIM_NUM_FUNCTIONS]: Anzahl Funktionen in <ob>.
- int [OIM_SIZE_FUNCTIONS]: Speicherbedarf der Funktionen
- int [OIM_NUM_VARIABLES]: Anzahl Variablen im Programm.
- int [OIM_SIZE_VARIABLES]: Speicherbedarf der Variablen.
- int [OIM_NUM_STRINGS]: Anzahl Strings im Programm.
- int [OIM_SIZE_STRINGS]: Speicherbedarf der String-Pointer.
- int [OIM_SIZE_STRINGS_DATA]: Speicherbedarf der String-Daten,
- korrigiert um das Ausmass des Daten-
- Sharing.
- int [OIM_SIZE_STRINGS_TOTAL]: unkorrigierter Speicherbedarf der
- String-Daten.
- int [OIM_NUM_INCLUDES]: Anzahl Includefiles im Programm.
- int [OIM_NUM_INHERITED]: Anzahl inheriter Programme.
- int [OIM_SIZE_INHERITED]: Speicherbedarf der Inherits.
- int [OIM_TOTAL_SIZE]: Gesamter Speicherbedarf des Programms.
- int [OIM_DATA_SIZE]: Gesamte Speicherbedarf der Variablenwerte
- des Objekts <ob>, korrigiert um das
- Ausmass des Daten-Sharings.
- int [OIM_DATA_SIZE_TOTAL]: unkorrigierter Gesamter Speicherbedarf
- der Variablenwerte des Objekts.
- int [OIM_NO_INHERIT]: 1, wenn das Programm nicht inheritet
- werden kann.
- int [OIM_NO_CLONE]: 1, wenn das Programm / der Blueprint
- nicht geclont werden kann.
- int [OIM_NO_SHADOW]: 1, wenn dem Objekt kein Shadow
- uebergeworfen werden darf.
-
- Dieser Aufruf holt das Programm aus dem Swap, falls notwendig.
- Die OIM_SIZE_xxx-Eintraege zeigen nur den Speicherbedarf der
- Strukturen / Pointer an, nicht aber den Speicherbedarf von
- Variablenwerten, Funktionscode oder der Strings selbst.
+ It can be either a configuration option as given to
+ configure_object() or one of the following options:
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.6.
- Aenderungen in LDMud 3.2.7:
- - neues Kriterium OIB_REPLACED.
- - das Kriterium OIB_IS_WIZARD ist immer 0, wenn set_is_wizard()
- nicht verfuegbar ist.
- - das Kriterium OIB_APPROVED wurde entfernt.
- LDMud 3.2.8 fuehrte neu OIM_DATA_SIZE im Resultat von OINFO_MEMORY ein.
- LDMud 3.2.9 erweiterte OINFO_MEMORY um den Index Mechanismus,
- OIM_NUM_INCLUDES, OIM_NO_INHERIT, OIM_NO_SHADOW, OIM_NO_CLONE,
- OIM_SIZE_STRINGS_DATA, OIM_SIZE_STRINGS_TOTAL, und
- OIM_DATA_SIZE_TOTAL
-SIEHE AUCH
- debug_info(E)
+ Object Flags:
+
+ <what> == OI_ONCE_INTERACTIVE:
+ 1 if <ob> was once (or still is) interactive, 0 else.
+
+ <what> == OI_RESET_STATE:
+ 1 if <ob> is (still) reset, 0 else.
+
+ <what> == OI_WILL_CLEAN_UP:
+ 1 if <ob>'s clean_up() will be called, 0 else.
+
+ <what> == OI_LAMBDA_REFERENCED:
+ 1 if <ob> has lambdas (and there replace_program()
+ is not allowed anymore), 0 else.
+
+ <what> == OI_REPLACED:
+ 1 if the program for <ob> was replaced, 0 else.
+
+
+
+ Program Flags:
+
+ <what> == OI_NO_INHERIT:
+ 1 if the program can't be inherited.
+
+ <what> == OI_NO_CLONE:
+ 1 if the program/blueprint can't be cloned.
+
+ <what> == OI_NO_SHADOW:
+ 1 if the program's functions can't be shadowed.
+
+ <what> == OI_SHARE_VARIABLES:
+ 1 if clones of this program share their initial
+ variable values with the blueprint.
+
+
+
+ Swapping Information:
+
+ <what> == OI_SWAPPED:
+ 1 if <ob> is swapped, 0 else.
+
+ <what> == OI_PROG_SWAPPED:
+ 1 if <ob>'s program is swapped, 0 else.
+
+ <what> == OI_VAR_SWAPPED:
+ 1 if <ob>'s variables are swapped, 0 else.
+
+ <what> == OI_SWAP_NUM:
+ The swap number for <ob>s program, or -1 if not swapped.
+
+
+
+ Time Information:
+
+ <what> == OI_NEXT_RESET_TIME:
+ Time of the next reset.
+
+ <what> == OI_NEXT_CLEANUP_TIME:
+ Time of the next data cleanup.
+
+ <what> == OI_LAST_REF_TIME:
+ Time of the last call to <ob>.
+
+
+
+ Object List:
+
+ <what> == OI_OBJECT_NEXT:
+ The next object in the global object list.
+
+ <what> == OI_OBJECT_PREV:
+ The previous object in the global object list.
+
+ <what> == OI_OBJECT_POS:
+ The position of <ob> in the global object list,
+ counting from 0 up. This can be expensive to compute.
+
+
+
+ Shadows:
+
+ <what> == OI_SHADOW_NEXT:
+ The next object in the shadow list, i.e. the object
+ that is shadowing <ob>, or 0 if <ob> is not shadowed.
+
+ <what> == OI_SHADOW_PREV:
+ The previous object in the shadow list, i.e. the object
+ that <ob> is currently shadowing, or 0 if <ob> is not a shadow.
+
+ <what> == OI_SHADOW_ALL:
+ Returns an array of all objects that are currently
+ shadowing <ob>, or an empty array if <ob> is not shadowed.
+
+
+
+ Object Statistics:
+
+ <what> == OI_OBJECT_REFS:
+ The number of references to <ob>.
+
+ <what> == OI_TICKS:
+ The accumulated evaluation cost spend in <ob> modulo 1000000000.
+
+ <what> == OI_GIGATICKS:
+ The accumulated evaluation cost spend in <ob> divided by 1000000000.
+
+ <what> == OI_DATA_SIZE:
+ The total size of the values held in the object's variables,
+ scaled down according to the extend of data sharing.
+
+ <what> == OI_DATA_SIZE_TOTAL:
+ The unmodified total size of the values held in the
+ object's variables
+
+
+
+ Program Statistics:
+
+ <what> == OI_PROG_REFS:
+ The number of references to <ob>'s program.
+
+ <what> == OI_NUM_FUNCTIONS:
+ The number of functions in the program.
+
+ <what> == OI_NUM_VARIABLES:
+ The number of variables in the program.
+
+ <what> == OI_NUM_STRINGS:
+ The number of strings in the program.
+
+ <what> == OI_NUM_INHERITED:
+ The number of explicitely inherited programs.
+
+ <what> == OI_NUM_INCLUDED:
+ The number of included files in the program.
+
+ <what> == OI_SIZE_FUNCTIONS:
+ The size needed for the function structures.
+ Note that this does not include size of the function code.
+
+ <what> == OI_SIZE_VARIABLES:
+ The size needed for the variable structures.
+ Note that this does not include size of the variable data,
+ See OI_DATA_SIZE/OI_DATA_SIZE_TOTAL for that.
+
+ <what> == OI_SIZE_STRINGS:
+ The size needed for the string pointers.
+
+ <what> == OI_SIZE_STRINGS_DATA:
+ The size needed for the string values,
+ scaled down according to the extend of data sharing.
+
+ <what> == OI_SIZE_STRINGS_DATA_TOTAL:
+ The unmodified size needed for the string values.
+
+ <what> == OI_SIZE_INHERITED:
+ The size needed for the inherit structures.
+
+ <what> == OI_SIZE_INCLUDED:
+ The size needed for the include structures.
+
+ <what> == OI_PROG_SIZE:
+ The size of the program structure.
+
+ <what> == OI_PROG_SIZE_TOTAL:
+ The total size of the program.
+
+
+HISTORY
+ Introduced in LDMud 3.2.6.
+ Changes in LDMud 3.2.7:
+ - new basic result OIB_REPLACED.
+ - basic result OIB_IS_WIZARD is always 0 if set_is_wizard()
+ is not available.
+ - basic result OIB_APPROVED is gone.
+ LDMud 3.2.8 added OIM_DATA_SIZE to the result of OINFO_MEMORY.
+ LDMud 3.2.9 added the index mechanism, OIM_NUM_INCLUDES,
+ OIM_NO_INHERIT, OIM_NO_SHADOW, OIM_NO_CLONE, OIM_SIZE_STRINGS_DATA,
+ OIM_SIZE_STRINGS_TOTAL, and OIM_DATA_SIZE_TOTAL to the result
+ of OINFO_MEMORY.
+ LDMud 3.3.378 added the OIM_SHARE_VARIABLES to the result
+ of OINFO_MEMORY.
+ LDMud 3.3.654 added the OIB_NEXT_CLEANUP to the result of OINFO_BASIC.
+ LDMud 3.5.0 redesigned the whole efun.
+
+SEE ALSO
+ configure_object(E), lwobject_info(E), interactive_info(E),
+ driver_info(E)
diff --git a/doc/efun/object_name b/doc/efun/object_name
index b329ca9..b5087db 100644
--- a/doc/efun/object_name
+++ b/doc/efun/object_name
@@ -2,34 +2,36 @@
string object_name()
string object_name(object ob)
-BESCHREIBUNG
- Liefert den Namen des Objekts <ob> oder des aktuellen Objekts, wenn
- <ob> nicht angegeben wurde.
+DESCRIPTION
+ Get the name of an object <ob> or, if no argument is given, of
+ the current object.
- Als Spezialfall liefert die Funktion 0, wenn <ob> 0 ist.
+ As a special case, if <ob> is 0, the function returns 0.
- Dieser Name ist der Name, unter dem das Objekt in der mudinternen
- Objekttabelle aufgelistet ist. Der Name wird bei der Erzeugung des
- Objekts eingetragen. Fuer Blueprints entspricht der Name dem Filenamen
- (ohne die Endung .c), fuer Clones ist es der Name des Blueprints
- ergaenzt mit einer eindeutigen Nummer nach dem #. Diese Regeln gelten
- auch fuer virtuelle Objekte - die realen Namen/Typen von virtuellen
- Objekten werden nicht beruecksichtigt.
+ This name is the name under which the object is stored in the
+ muds object table. It is initialised at the creation of the
+ object such that blueprints are named after the file they are
+ compiled from (without the trailing '.c'), and clones receive
+ the name of their blueprint, extended by '#' followed by
+ a unique non-negative number. These rules also apply to
+ virtual objects - the real name/type of virtual objects
+ is ignored.
- Der Name eines Objekts kann mit rename_object() geaendert werden.
- object_name() beruecksichtigt alle diese Aenderungen.
+ The name of an object can be changed with rename_object(), and
+ object_name() will reflect any of these changes.
- Der zurueck gegebene Name beginnt immer mit '/' (absoluter Pfad),
- ausser wenn der Driver im COMPAT-Modus laeuft.
+ The returned name always begins with '/' (absolute path),
+ except when the parser runs in COMPAT mode.
-BEISPIELE
- find_object(object_name(ob)) == ob
+EXAMPLES
+ find_object(object_name(ob)) == ob
- Dies ist immer wahr fuer alle Objekte <ob>, die nicht zerstoert sind.
+ This is guaranteed to be true for all objects ob that are not
+ destructed.
-GESCHICHTE
- 0 als Argument wird seit 3.2.9 akzeptiert.
+HISTORY
+ 0 is accepted as argument since 3.2.9.
-SIEHE AUCH
+SEE ALSO
clone_object(E), load_name(E), load_object(E), find_object(E),
object_time(E), program_name(E), rename_object(E)
diff --git a/doc/efun/object_time b/doc/efun/object_time
index 3100dbc..2db6e94 100644
--- a/doc/efun/object_time
+++ b/doc/efun/object_time
@@ -2,9 +2,9 @@
int object_time()
int object_time(object ob)
-BESCHREIBUNG
- Liefert die Zeit, zu der das Objekt <ob> erstellt wurde. Wird <obj>
- nicht angegeben, wird standardmaessig this_object() verwendet.
+DESCRIPTION
+ Returns the creation time of the given object.
+ Default is for this_object(), if no arg is given.
-SIEHE AUCH
+SEE ALSO
program_time(E), program_name(E)
diff --git a/doc/efun/objectp b/doc/efun/objectp
index a007993..2633389 100644
--- a/doc/efun/objectp
+++ b/doc/efun/objectp
@@ -1,9 +1,10 @@
SYNOPSIS
int objectp(mixed arg)
-BESCHREIBUNG
- Liefert 1, wenn <arg> ein Objekt ist.
+DESCRIPTION
+ Return 1 if arg is an object.
-SIEHE AUCH
- clonep(E), lwobjectp(E), intp(E), stringp(E), bytesp(E), pointerp(E),
- symbolp(E), referencep(E), symbolp(E)
+SEE ALSO
+ bytesp(E), clonep(E), closurep(E), coroutinep(E), floatp(E), intp(E),
+ lpctypep(E), lwobjectp(E), mappingp(E), pointerp(E), referencep(E),
+ stringp(E), structp(E), symbolp(E)
diff --git a/doc/efun/or_bits b/doc/efun/or_bits
index 98a558d..fcfc59c 100644
--- a/doc/efun/or_bits
+++ b/doc/efun/or_bits
@@ -1,18 +1,13 @@
SYNOPSIS
string or_bits(string str1, string str2)
-BESCHREIBUNG
- <str1> und <str2> sind beides Bitstrings. Das Resultat von or_bits()
- ist ein Bitstring, der das binaere Oder von <str1> und <str2>
- enthaelt, d.h. ein String, in dem ein Bit gesetzt ist, wenn es
- in <str1> oder <str2> oder in beiden gesetzt ist.
+DESCRIPTION
+ <str1> and <str2> are both bitstrings. The result of the function
+ is a bitstring with the binary-or of <str1> and <str2>,
+ ie. a string in which a bit is set if the corresponding
+ bit in <str1> or <str2> (or both) is set.
- Jedes Zeichen enthaelt 6 Bits. In jedem Zeichen kann deshalb eine
- Zahl von 0 bis 63 gespeichert werde (2^6=64). Das erste Zeichen
- ist der Leerschlag " " mit dem Wert 0. Das erste Zeichen im String
- ist jenes mit den niedrigsten Bits (0-5).
-
-BEISPIELE
+EXAMPLES
string s1, s2, s3;
s1 = set_bit("", 3); s1 = set_bit(s1, 15); -> s1 is "( ("
@@ -22,6 +17,6 @@
-> s3 is now "8 (", ie. a bitstring with bits 3, 4 and 15 set.
-SIEHE AUCH
+SEE ALSO
clear_bit(E), set_bit(E), test_bit(E), next_bit(E), last_bit(E),
count_bits(E), and_bits(E), xor_bits(E), invert_bits(E), copy_bits(E)
diff --git a/doc/efun/parse_command b/doc/efun/parse_command
index 83b7731..d88e083 100644
--- a/doc/efun/parse_command
+++ b/doc/efun/parse_command
@@ -1,7 +1,7 @@
OPTIONAL
SYNOPSIS
- int parse_command (string cmd, object env, string fmt, mixed &var, ...)
- int parse_command (string cmd, object* arr, string fmt, mixed &var, ...)
+ int parse_command(string cmd, object env, string fmt, mixed &var, ...)
+ int parse_command(string cmd, object *arr, string fmt, mixed &var, ...)
DESCRIPTION
parse_command() is basically a spiffed up sscanf operating
@@ -120,10 +120,10 @@
int parse_command(string, object|object*, string, destargs...)
-EXAMPLE
+EXAMPLES
object *items;
- parse_command( "take apple",environment(this_player())
- , " 'get' / 'take' %i ",items);
+ parse_command("take apple",environment(this_player()),
+ " 'get' / 'take' %i ", items);
HISTORY
LDMud 3.3.258 removed the compat-mode parse_command().
diff --git a/doc/efun/pg_connect b/doc/efun/pg_connect
index a9d4d58..ea546bb 100644
--- a/doc/efun/pg_connect
+++ b/doc/efun/pg_connect
@@ -1,8 +1,9 @@
OPTIONAL
SYNOPSIS
- int pg_connect (string conn, string fun)
- int pg_connect (string conn, string fun, string|object obj, mixed extra, ...)
- int pg_connect (string conn, closure cl, mixed extra, ...)
+ int pg_connect(string conn, string fun)
+ int pg_connect(string conn, string fun, string|object obj,
+ mixed extra, ...)
+ int pg_connect(string conn, closure cl, mixed extra, ...)
DESCRIPTION
Open a database connection as directed by <conn>, and assign the
diff --git a/doc/efun/pg_pending b/doc/efun/pg_pending
index 46a6dcc..356911a 100644
--- a/doc/efun/pg_pending
+++ b/doc/efun/pg_pending
@@ -1,7 +1,7 @@
OPTIONAL
SYNOPSIS
- int pg_pending ()
- int pg_pending (object obj)
+ int pg_pending()
+ int pg_pending(object obj)
DESCRIPTION
Return the number of pending queries for the connection on the given
diff --git a/doc/efun/pointerp b/doc/efun/pointerp
index a6f2c2c..ee04d0b 100644
--- a/doc/efun/pointerp
+++ b/doc/efun/pointerp
@@ -1,9 +1,10 @@
SYNOPSIS
int pointerp(mixed arg)
-BESCHREIBUNG
- Liefert 1, wenn das Argument ein Feld (Array) ist, ansonsten 0.
+DESCRIPTION
+ Return 1 if arg is a pointer, i.e. an array.
-SIEHE AUCH
- closurep(E), floatp(E), mappingp(E), objectp(E), intp(E),
- referencep(E), stringp(E), symbolp(E), clonep(E)
+SEE ALSO
+ bytesp(E), clonep(E), closurep(E), coroutinep(E), floatp(E), intp(E),
+ lpctypep(E), lwobjectp(E), mappingp(E), objectp(E), referencep(E),
+ stringp(E), structp(E), symbolp(E)
diff --git a/doc/efun/pow b/doc/efun/pow
index c069690..218c8e7 100644
--- a/doc/efun/pow
+++ b/doc/efun/pow
@@ -1,16 +1,16 @@
SYNOPSIS
float pow(int|float base, int|float exp)
-BESCHREIBUNG
- Die Potenzfunktion. Sie liefert das Resultat von "<base> hoch <exp>".
+DESCRIPTION
+ The function returns the value of <base> raised to the power of <exp>.
-BEISPIELE
- pow(-2, 3) -> liefert -8.0
- pow(8, 1.0/3.0) -> liefert 2.0
+EXAMPLES
+ pow(-2, 3) - returns -8.0
+ pow(8, 1.0/3.0) - returns 2.0
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.7.
- LDMud 3.2.9 erlaubte Integer als Argumente.
+HISTORY
+ Introduced in LDMud 3.2.7.
+ LDMud 3.2.9 added integers as arguments.
-SIEHE AUCH
+SEE ALSO
exp(E), log(E)
diff --git a/doc/efun/present b/doc/efun/present
index 2a9d0be..7c9592a 100644
--- a/doc/efun/present
+++ b/doc/efun/present
@@ -7,71 +7,64 @@
object present(object ob)
object present(object ob, object env)
-BESCHREIBUNG
- Wenn ein Objekt mit der Id <str> sich im Inventar oder in der Umgebung
- von this_object() befindet, wird es zurueck geliefert.
+DESCRIPTION
+ This efun checks if an object is present in a given environment.
+ The object is identified by id <str> or by an object <ob>. This
+ latter form of the efun can be used as a fast way to test for the
+ presence of a known object.
+
+ When searching objects by id, the efun by default returns the first
+ object found matching the id. In order to search for other than the
+ first object, a number can be specified either directly as the
+ argument <n>, or implicetely inside the <str> in the form "<id>
+ <n>".
- Ist das Argument <n> gegeben, wird das n-te Objekt mit Namen <id>
- zurueck geliefert. Das heisst, der Driver fuehrt fuer alle Objekte
- im Inventar und in der Umgebung von this_object() die Funktion
- id(str) aus, bis ein Treffer erzielt wird (wenn ueberhaupt).
+ By default, the efun searches first in the inventory of
+ this_object(), then in its environment. However, if <env> is given,
+ the efun searches just inside <env>.
- Ist <n> nicht gegeben, aber <str> hat die Form "<id> <n>" , wird
- ebenfalls das n-te Objekt mit Namen <id> zurueckgeliefert.
+ When searching both inventory and environment of this_object(),
+ the numbering is applied linear over both spaces (see examples).
- <str> kann auch ein Objekt (anstatt einer Id) sein, was den Test
- schneller und einfacher macht.
+ The driver identifies objects by calling the lfun id() in each
+ object.
- Das Argument <env> ist optional. <env> gibt das Objekt an, in welchem
- nach <str> gesucht wird. Nur das Inventory von <env> wird durchsucht,
- nicht jedoch dessen Umgebung.
-
-ANMERKUNGEN
- Wenn die efun sowohl in this_object() als auch dessen Umgebung
- sucht, werden, soweit es die Numerierung betrifft, die beiden
- Umgebungen zusammenhaengend betrachtet.
-
-BEISPIELE
+EXAMPLES
present("chest");
- --> findet das erste 'chest' Objekt
+ --> returns the first 'chest' object in this object.
- present("chest 2");
- --> findet das zweite 'chest' Objekt
+ present("chest 2")
+ --> returns the second 'chest' object in this object.
- present("chest 2", 1);
- --> findet das erste 'chest 2' Objekt
+ present("chest 2", 1)
+ --> returns the first 'chest 2' object in this object.
- Wenn sich eine "chest" im this_object() befindet, und zwei
- ausserhalb:
- present("chest", 1) -> findet die chest im Objekt
- present("chest", 2) -> findet die erste chest ausserhalb
- present("chest", 3) -> findet die zweite chest ausserhalb
+ Assume there is one "chest" inside the current object, and
+ two in its environment:
+ present("chest", 1) -> returns the chest inside
+ present("chest", 2) -> returns the first chest outside
+ present("chest", 3) -> returns the second chest outside
- Wenn ein Objekt die Forum "<id> <n>" in Verbindung mit einem selbst
- ueber add_action() gesetzten Verb unterstuetzen soll (damit z. B.
- "oeffne Kiste 3" funktioniert), kann das folgendermassen geloest
- werden:
+ A typical 2.4.5-implementation of the "do <id> <n>" command style
+ is:
- void init() { add_action("oeffne_kiste", "oeffne"); }
+ void init() { add_action("open_chest", "open"); }
- int oeffne_kiste(string str)
- {
- if(present(str) != this_object() )
- {
- return 0; /* nicht diese Kiste */
- ...
- }
+ int open_chest (string str) {
+ if (present (str) != this_object ())
+ return 0; /* Not this chest */
+ ...
}
-GESCHICHTE
- LDMud 3.2.11/3.3.610 fuehrte die (str, n)-Form ein.
- LDMud 3.3.713 aenderte die Numerierung wenn sowohl Inventory
- als auch Umgebung durchsucht werden. In der vorherigen
- Implementierung wurde eine Numerierung auf beiden Umgebungen
- einzeln angewandt, was zur Folge hatte, dass niedere Objekte
- in der aeusseren Umgebung nicht gefunden werden koennten, da
- sie von den Objekten in Inneren verdeckt wurden.
-SIEHE AUCH
- move_object(E), environment(E), this_object(E), present_clone(E),
+HISTORY
+ LDMud 3.2.11/3.3.610 introduced the (str, n) argument form.
+ LDMud 3.3.713 modified the <n> search behaviour so that the
+ numbering is applied over both inventory and environment
+ together. Before, the numbering was individual in each
+ space, leading to situations where low-numbered objects in the
+ environment were hidden by those in the inventory.
+
+SEE ALSO
+ move_object(E), environment(E), this_object(E), present_clone(E)
id(A), init(A)
diff --git a/doc/efun/present_clone b/doc/efun/present_clone
index e061237..59ecd29 100644
--- a/doc/efun/present_clone
+++ b/doc/efun/present_clone
@@ -1,4 +1,4 @@
-VORLAEUFIG
+PRELIMINARY
SYNOPSIS
object present_clone(string str)
object present_clone(string str, int n)
@@ -10,26 +10,26 @@
object present_clone(object obj, object env)
object present_clone(object obj, object env, int n)
-BESCHREIBUNG
- Diese Efun durchsucht das Inventar von <env> nach einem Objekt mit
- einem bestimmten Blueprint. Wird <env> nicht angegeben, wird in
- this_object() gesucht. Der Blueprint kann entweder mit seinem Namen
- <str> angegeben oder als Blueprint des Objekts <obj> werden. Gesucht
- wird in beiden Faellen aufgrund von load_name().
- Wird <n> angegeben, wird das <n>. Objekt in <env> gesucht, ansonsten
- das 1. in <env>.
- Wird kein passendes Objekt gefunden, wird 0 zurueckgegeben.
- Fuer Driver im Plain Modus beginnt der Name in jedem Fall mit '/', im
- Compat Modus nicht.
+DESCRIPTION
+ This efun searches the inventory of object <env> (default is
+ this_object()) for an object with a specific blueprint.
+ The blueprint can be specified either by name <str>, or as the same
+ blueprint as of object <obj>. The matching criteria in both cases is
+ the load_name().
+ If <n> is given, the <n>th object in <env> is returned (if present),
+ otherwise the first object matching <str> or <obj>.
+ If no object in <env> matches the criteria, 0 is returned.
-BEISPIELE
- Angenommen, das Objekt <env> enthalte die Objekte /obj/money#8,
- /std/weapon#9, /std/weapon#12 und /obj/key in der angegeben
- Reihenfolge.
+ For plain driver this name starts with a '/', for COMPAT mode
+ drivers it doesn't.
+
+EXAMPLES
+ Assume that object 'env' contains the objects /obj/money#8,
+ /std/weapon#9, /std/weapon#12 and /obj/key in the given order.
+--------------------------------------------------+---------------+
- | Funktion | Liefert |
+ | Function call | returns |
+--------------------------------------------------+---------------+
| present_clone("/obj/money", env) | /obj/money#8 |
| present_clone("/std/weapon#12", env) | /std/weapon#9 |
@@ -39,15 +39,13 @@
| present_clone("/std/weapon#12", env, 3) | 0 |
+--------------------------------------------------+---------------+
- Fuer Driver im Compat Modus liefert die Funktion keine '/' am Anfang.
+REMARKS
+ Note that in contrast to present(), this efun never searches
+ in the environment of <env>.
-ANMERKUNGEN
- Im Unterschied zu present() sucht present_clone() niemals in der
- Umgebung von <env>.
+HISTORY
+ Introduced in 3.2.7.
+ Searching for the <n>th object was added in 3.3.718.
-GESCHICHTE
- Eingefuehrt in 3.2.7.
- Die Suche nach dem <n>-ten Objekt wurde in 3.3.718 ergaenzt.
-
-SIEHE AUCH
+SEE ALSO
load_name(E), present(E)
diff --git a/doc/efun/previous_object b/doc/efun/previous_object
index 2b22080..bf28d5c 100644
--- a/doc/efun/previous_object
+++ b/doc/efun/previous_object
@@ -2,46 +2,44 @@
object|lwobject previous_object()
object|lwobject previous_object(int i)
-BESCHREIBUNG
- Liefert einen Pointer auf das letzte Objekt, das einen Aufruf (mittels
- call_other(), funcall() etc.) auf das aktuelle Objekt this_object()
- gemacht hat. Wenn dieses aufrufende Objekt inzwischen zerstoert wurde,
- liefert previous_object() 0.
+DESCRIPTION
+ Returns an object pointer to the object that did a call (call_other(),
+ funcall(), etc) to the current object, if any. If that object is
+ destructed, the function returns 0.
- Wird das Argument <i> angegeben, so verfolgt previous_object() den
- Aufruf <i> Stufen zurueck. Zum Beispiel liefert previous_object(1) das
- aufrufende Objekt des aufrufenden Objekts. Fuer <i> muss gelten:
- 0 <= i < call_stack_depth(). Ein Wert <i> < 0 liefert das erste
- aufrufende Object zurueck.
+ If the optional arg is given, the call_other()s are followed
+ back i times (i.e. previous_object(1) returns the caller of
+ the caller): 0 <= i < caller_stack_depth(). If <i> is less than 0, the
+ first previous object is returned.
- Es gibt einen wichtigen Spezialfall: in Funktionen, die vom Gamedriver
- auf Grund eines externen Ereignises aufgerufen wurden (zum Beispiel
- Kommandos, die mit add_action() definiert wurden), liefert
- previous_object() den Wert von this_object(), previous_object(0)
- hingegen 0.
+ There is an important special case: in functions called by
+ the gamedriver in reaction to some external event (e.g. commands
+ added by add_action), previous_object() will return this_object(),
+ but previous_object(0) will return 0.
-BEISPIELE
- int sicherheitscheck() {
- object|lwobject prev;
- if (!(prev=previous_object()));
- else if (getuid(prev) != getuid(this_object()));
- else if (geteuid(prev) != geteuid(this_object()));
- else return 1;
- return 0;
+EXAMPLES
+ int security() {
+ object|lwobject prev;
+ if (!(prev=previous_object()));
+ else if (getuid(prev) != getuid(this_object()));
+ else if (geteuid(prev) != geteuid(this_object()));
+ else return 1;
+ return 0;
}
- void sensible_funktion() {
- if (!sicherheitscheck())
+ void highly_sensible_func() {
+ if (!security())
return;
...
}
- Diese Funktion zeigt, wie man ueberpruefen kann, ob der letzte Aufruf
- einer Funktion im aktuellen Objekt sicher war, oder ob die
- Verarbeitung abgebrochen werden sollte.
+ This example shows how we can check if the last call to a
+ function of the current object is secure or if we should abort
+ execution.
-FEHLER
- Werte von <i> < 0 werden wie <i> == 0 behandelt - dies ist historisch.
+BUGS
+ Values of i < 0 are treated as if i == 0 was passed - this is
+ historic.
-SIEHE AUCH
- call_other(E), this_object(E), this_player(E), caller_stack(E),
- caller_stack_depth(E), extern_call(E)
+SEE ALSO
+ call_other(E), this_object(E), this_player(E),
+ caller_stack(E), caller_stack_depth(E), extern_call(E)
diff --git a/doc/efun/printf b/doc/efun/printf
index f0e1eda..8aea7fd 100644
--- a/doc/efun/printf
+++ b/doc/efun/printf
@@ -1,9 +1,9 @@
SYNOPSIS
void printf(string format, ...)
-BESCHREIBUNG
- Eine Mischung aus sprintf() und write(). Gibt void zurueck und den
- String an den Benutzer aus.
+DESCRIPTION
+ A cross between sprintf() and write(). Returns void and prints
+ the result string to the user.
-SIEHE AUCH
+SEE ALSO
sprintf(E), write(E), terminal_colour(E)
diff --git a/doc/efun/process_string b/doc/efun/process_string
index 8f43053..2e023ba 100644
--- a/doc/efun/process_string
+++ b/doc/efun/process_string
@@ -2,42 +2,46 @@
SYNOPSIS
string process_string(string str)
-BESCHREIBUNG
- Durchsucht den String <str> nach "value by function call", das
- heisst nach @@, gefolgt von einem impliziten Funktionsaufruf. Siehe
- auch "value_by_function_call" im Prinzipien-Teil der Enzy.
+DESCRIPTION
+ Searches string str for occurrences of a "value by function
+ call", which is an implicit function call surrounded by @@. See
+ "value_by_function_call" in the principles section.
- Der Wert sollte eine String in dieser Form enthalten:
+ The value should contain a string like this:
@@function[:filename][|arg|arg]@@
- <function> muss einen String zurueckliefern, sonst wird der zu
- verarbeitende String unveraendert zurueck geliefert.
+ <function> must return a string or else the string which should be
+ processed will be returned unchanged.
- process_string() fuehrt keine Rekursion ueber zurueck gelieferte
- Werte durch: wenn eine Funktion wiederum eine implizite Funktion
- zurueckliefert, wird diese zweite Funktion nicht mehr verarbeitet.
+ process_string() does not recurse over returned
+ replacement values. If a function returns another function
+ description, that description will not be replaced.
- Sowohl <filename> wie auch die Argumente <arg> sind optional.
+ Both the filename and the args are optional.
-BEISPIELE
+ Consecutive function calls can be written adjacent:
+
+ @@function1@@function2@@
+
+EXAMPLES
string foo(string str) {
- return "ab"+str+"ef";
+ return "ab"+str+"ef";
}
-
void func() {
- write(process_string("@@foo|cd@@"+"\n");
+ write(process_string("@@foo|cd@@")+"\n");
}
- func() gibt jetzt an den Benutzer den String "abcdef" aus.
+ The function func() will print out the string "abcdef".
-FEHLER
- Die Verwendung von process_string() kann massive Sicherheitsprobleme
- verursachen.
+BUGS
+ Using process_string() can lead to severe security problems.
-GESCHICHTE
- Wegen der Sicherheitsprobleme ist process_string() seit 3.2.1@34
- optional.
+HISTORY
+ Because of the security problems, process_string() is an
+ optional efun since 3.2.1@34
+ LDMud 3.3.160 removed the undocumented 'feature' that a function call
+ declaration could be terminated by a space. In turn this now allows
+ the use of arguments with spaces.
-SIEHE AUCH
+SEE ALSO
notify_fail(E), closures(LPC), get_bb_uid(M)
-
diff --git a/doc/efun/program_name b/doc/efun/program_name
index 80cb4ab..bdd55d4 100644
--- a/doc/efun/program_name
+++ b/doc/efun/program_name
@@ -2,37 +2,32 @@
string program_name()
string program_name(object|lwobject obj)
-BESCHREIBUNG
- Liefert den Name des Programms, aus dem <obj> kompiliert wurde.
- Wenn <obj> nicht angegeben wird, wird standardmaessig this_object()
- verwendet.
+DESCRIPTION
+ Returns the name of the program of <obj>, resp. the name of the
+ program of the current object if <obj> is omitted.
- Der Name ist fuer Clones der Name des Files, aus dem der Blueprint
- kompiliert wurde. Der Name wechselt, wenn ein Objekt sein Programm
- durch replace_program() aendert.
+ The returned name is usually the name from which the blueprint
+ of <obj> was compiled (the 'load name'), but changes if an object
+ replaces its programs with the efun replace_program().
- Fuer den Spezialfall, dass <obj> als 0 uebergeben wird, liefert
- program_name() 0 zurueck.
+ As a special case, if <ob> is passed as 0, the function will
+ return 0.
- Der Name endet immer mit '.c'. Er beginnt mit einem '/', wenn der
- Driver sich nicht im Compat Modus befindet.
+ The name always ends in '.c'. It starts with a '/' unless the
+ driver is running in COMPAT mode.
-BEISPIELE
+ CAVEAT: This efun swaps in the program if it is swapped out.
+
+EXAMPLES
object o;
- o = clone_object("/std/dings");
- write(program_name(o));
+ o = clone_object("/std/thing");
+ write(program_name(o)); --> writes "/std/thing.c" in !compat mode
+ and "std/thing.c" in compat mode
- liefert:
- --> "/std/dings.c", wenn der Driver nicht im Compat Modus laeuft.
- --> "std/dings.c", wenn der Driver im Compat Modus laeuft.
+HISTORY
+ Introduced in LDMud 3.2.6.
+ LDMud 3.2.9 allowed a 0 argument.
-ANMERKUNGEN
- Die Efun swapt das Programm ein, wenn dieses ausgelagert ist.
-
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.6.
- Seit 3.2.9 ist das Argument 0 erlaubt.
-
-SIEHE AUCH
+SEE ALSO
clone_object(E), clonep(E), load_name(E), load_object(E),
object_name(E), replace_program(E)
diff --git a/doc/efun/program_time b/doc/efun/program_time
index e7da010..5af4d9b 100644
--- a/doc/efun/program_time
+++ b/doc/efun/program_time
@@ -1,14 +1,13 @@
SYNOPSIS
int program_time()
- int program_time(object|lwobject obj)
+ int program_time(object|lwobject ob)
-BESCHREIBUNG
- Gibt den Zeitpunkt an, zu dem das Objekt <obj> (bzw. this_object(),
- wenn nichts angegeben wurde) erzeugt, d.h. kompiliert wurde.
+DESCRIPTION
+ Returns the creation (compilation) time of the object's
+ program. Default is this_object(), if no arg is given.
-ANMERKUNGEN
- Diese Efun swapt das Programm zurueck ins Objekt, wenn es ausgelagert
- war.
+ CAVEAT: If the objects program is swapped out, this efun
+ swaps it back in.
-SIEHE AUCH
+SEE ALSO
object_time(E), program_name(E)
diff --git a/doc/efun/query_actions b/doc/efun/query_actions
index 688ddc3..59e9c44 100644
--- a/doc/efun/query_actions
+++ b/doc/efun/query_actions
@@ -2,37 +2,32 @@
#include <commands.h>
#include <sent.h>
- mixed * query_actions(object|string ob, mixed mask_or_verb)
+ mixed * query_actions(object ob, mixed mask_or_verb)
-BESCHREIBUNG
- Das erste Argument von query_actions() ist entweder ein Objekt
- oder der Dateiname eines Objekts. Das zweite Argument muss
- entweder eine Bitmaske (ein Integer) oder ein String sein.
+DESCRIPTION
+ query_actions takes either an object or a filename as first
+ argument and a bitmask (int) or string as a second argument.
+ If the second argument is a string, query_actions() will return
+ an array containing information (see below) on the verb or
+ zero if the living object "ob" cannot use the verb. If the
+ second argument is a bitmask, query_actions() will return a
+ flat array containing information on all verbs added to ob.
+ The second argument is optional (default is QA_VERB).
+ QA_VERB ( 1): the verb
+ QA_TYPE ( 2): type
+ QA_SHORT_VERB ( 4): short_verb
+ QA_OBJECT ( 8): object
+ QA_FUNCTION (16): function
- Ist das zweite Argument ein String, liefert query_actions() ein
- Array mit Informationen ueber das Verb oder 0 zurueck, wenn
- das lebendige Objekt <ob> das Verb nicht verwenden kann.
+ "type" is one of the values defined in <sent.h>
+ (which is provided with the parser source).
- Wenn das zweite Argument ein Integer ist, liefert query_actions()
- ein flaches Array mir den Informationen entsprechend der Bitmaske
- zu allen Verben von <ob>.
+ SENT_PLAIN added with add_action (fun, cmd);
+ SENT_SHORT_VERB added with add_action (fun, cmd, AA_SHORT);
+ SENT_NO_SPACE added with add_action (fun, AA_NOSPACE);
+ SENT_MARKER internal, won't be in the returned array
+ negative value: The verb given by the player has to match only
+ the leading -<value> characters of the action's verb.
- QA_VERB ( 1): das Verb,
- QA_TYPE ( 2): der Typ,
- QA_SHORT_VERB ( 4): das short_verb,
- QA_OBJECT ( 8): das Objekt,
- QA_FUNCTION (16): die Funktion.
-
- Der Typ ist ein Wert wie in <sent.h> definiert, der mit dem
- Driver-Quellcode geliefert wird.
-
- SENT_PLAIN durch add_action(fun, cmd) hinzugefuegt
- SENT_SHORT_VERB durch add_action(fun, cmd, 1) hinzugefuegt
- SENT_NO_SPACE durch add_action(fun); add_xverb(cmd);
- SENT_NO_VERB nur eine Funktion mit add_action(fun), ohne Verb
- SENT_MARKER intern, ist nicht im Array enthalten
- negativer Wert das Verb muss nur in den ersten -<wert> Zeichen
- uebereinstimmen.
-
-SIEHE AUCH
+SEE ALSO
add_action(E), init(A)
diff --git a/doc/efun/query_command b/doc/efun/query_command
index e42e4da..dc7b6c0 100644
--- a/doc/efun/query_command
+++ b/doc/efun/query_command
@@ -1,33 +1,29 @@
SYNOPSIS
- string query_command()
+ string query_command(void)
-BESCHREIBUNG
- Liefert den Text des aktuellen Kommandos oder 0, wenn keines
- ausgefuehrt wird.
+DESCRIPTION
+ Give the text of the current command, or 0 if not executing
+ from a command.
- Der Text entspricht dem, was der Parser "sieht", also nachdem
- modify_command() ausgefuehrt und nachfolgende Leerzeichen
- abgeschnitten wurden.
+ The text is the command as seen by the parser, ie. after
+ modify_command and after stripping trailing spaces.
- query_command() liefert 0, wenn es von einer Funktion gestartet
- wurde, die wiederum von einem call_out() oder dem heart_beat()
- aufgerufen wurde. Auch Kommandos, die beim Userlogin aufgerufen
- werden, liefern 0.
+ query_command() returns 0 when invoked by a function which was started
+ by a call_out or the heart beat. Also when a user logs in
+ query_command() returns 0.
-BEISPIELE
+EXAMPLES
void init() {
- ...
- add_action("sing","sing");
- ...
+ ...
+ add_action("sing","sing");
+ ...
}
-
int sing(string str) {
- write("Dein Kommando war:"+query_command()+"\n");
- return 1;
+ write("Your command was:"+query_command()+"\n");
+ return 1;
}
- Jedesmal, wenn jemand "sing blafasel" eingibt, liefert das Programm
- "Dein Kommando war: sing blafasel".
+ When ever you type "sing ..." you get "Your command was: sing ...".
-SIEHE AUCH
+SEE ALSO
add_action(E), query_verb(E)
diff --git a/doc/efun/query_notify_fail b/doc/efun/query_notify_fail
index ef3a521..79c65aa 100644
--- a/doc/efun/query_notify_fail
+++ b/doc/efun/query_notify_fail
@@ -2,17 +2,19 @@
mixed query_notify_fail()
mixed query_notify_fail(int flag)
-BESCHREIBUNG
- Wenn <flag> nicht angegeben oder 0 ist, liefert die Funktion den String
- oder die Closure, die zuletzt als Fehlermeldung fuer ein Kommando
- gesetzt wurde (mit notify_fail()).
+DESCRIPTION
+ If <flag> is not given or 0: return the string or closure which
+ was last set as error message for this command (with notify_fail()).
- Wurde keine Meldung gesetzt, wird 0 geliefert.
+ If <flag> is given and 1: return the object which issued the last
+ notify_fail().
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.7.
- LDMud 3.2.8 fuegte den Paramter <flag> hinzu.
+ If nothing was set yet, return 0.
-SIEHE AUCH
+HISTORY
+ Introduced in LDMud 3.2.7.
+ LDMud 3.2.8 added the <flag> parameter.
+
+SEE ALSO
add_action(E), query_verb(E), query_command(E), notify_fail(E),
hooks(C)
diff --git a/doc/efun/query_verb b/doc/efun/query_verb
index 2890174..ca8a086 100644
--- a/doc/efun/query_verb
+++ b/doc/efun/query_verb
@@ -1,42 +1,41 @@
SYNOPSIS
- string query_verb()
+ string query_verb(void)
string query_verb(int flag)
-BESCHREIBUNG
- Liefert das Verb des aktuellen Kommandos oder 0, wenn kein Kommando
- bearbeitet wird. Wenn <flag> nicht angegeben oder 0 ist, wird das Verb
- wie vom User eingegeben geliefert (das ist das erste Wort der
- Inputzeile des Spielers, bis zum (aber ohne) den ersten Leerschlag /
- Zeilenumbruch). Wenn <flag> nicht 0 ist, wird das Verb entsprechend
- der add_action() zurueck gegeben.
+DESCRIPTION
+ Return the verb of the current command, of 0 if not executing from
+ a command. If <flag> is 0 or not given, the verb as given by the user
+ is returned (this is the first word from the line input by the player,
+ up to but not including the first space or lineend). If <flag> is
+ non-0, the verb as specified in the add_action() statement is returned.
-BEISPIELE
+EXAMPLES
void init() {
- ...
- add_action("sing","singe");
- add_action("sing","jodel", 1);
- ...
+ ...
+ add_action("sing","sing");
+ add_action("sing","chant", 1);
+ ...
}
-
int sing(string str) {
- write("Das Kommando war:"+query_verb()+(str ? str : "")+"\n");
- write("Das Verb war:"+query_verb(1)+(str ? str : "")+"\n");
+ write("Your command was: "+query_verb()+(str ? str : "")+"\n");
+ write("The action verb was: "+query_verb(1)+(str ? str : "")+"\n");
+ return 1;
}
- Das Kommando "sing blafasel" liefert:
- Das Kommando war: sing
- Das Verb war: sing
+ The command 'sing ...' will print:
+ Your command was: sing
+ The action verb was: sing
- Das Kommando "jodel blafasel" liefert:
- Das Kommando war: jodel
- Das Verb war: jodel
+ The command 'chant ...' will print:
+ Your command was: chant
+ The action verb was: chant
- Das Kommando "jodele blafasel" liefert:
- Das Kommando war: jodele
- Das Verb war: jodel
+ The command 'chantit ...' will print:
+ Your command was: chantit
+ The action verb was: chant
-GESCHICHTE
- LDMud 3.2.9. fuehrte das optionale Argument <flag> ein.
+HISTORY
+ LDMud 3.2.9 added the optional flag argument.
-SIEHE AUCH
+SEE ALSO
add_action(E), query_command(E)
diff --git a/doc/efun/quote b/doc/efun/quote
index 926d71f..689947b 100644
--- a/doc/efun/quote
+++ b/doc/efun/quote
@@ -1,16 +1,16 @@
SYNOPSIS
- mixed quote(mixed arg)
+ mixed quote(mixed)
-BESCHREIBUNG
- Konvertiert ein Array zu einem quoted Array und Strings zu Symbolen.
- Symbole und quoted Arrays werden erneut gequoted.
+DESCRIPTION
+ Converts arrays to quoted arrays and strings to symbols.
+ Symbols and quoted arrays get quoted once more.
-BEISPIELE
+EXAMPLES
quote("foo") -> 'foo
quote(({1,2,3})) -> '({1,2,3})
-GESCHICHTE
- Eingefuehrt in 3.2@70.
+HISTORY
+ Introduced in 3.2@70
-SIEHE AUCH
- sympolp(E), unquote(E)
+SEE ALSO
+ symbolp(E), unquote(E)
diff --git a/doc/efun/raise_error b/doc/efun/raise_error
index e063420..fc25c00 100644
--- a/doc/efun/raise_error
+++ b/doc/efun/raise_error
@@ -1,18 +1,16 @@
SYNOPSIS
void raise_error(string arg)
-BESCHREIBUNG
- Bricht die Ausfuehrung des laufenden Programms ab. Wenn das Programm
- durch catch() aufgerufen wurde, liefert dieses catch() <arg> als
- Fehlercode, sonst wird <arg> als Fehlermeldung ausgegeben.
+DESCRIPTION
+ Abort execution. If the current program execution was
+ initiated by catch(), that catch expression will return arg as
+ error code, else the arg will printed as error message.
+
+ This is very similar to throw(), but while throw() is intended to be
+ called inside catch(), raise_error() can be called anywhere.
+ Furthermore, raise_error() includes the complete error handling
+ with generation of a stack backtrace, making it a very expensive
+ function.
- raise_error() gleicht in der Funktion throw(), aber waehrend throw()
- aus catch() heraus aufgerufen werden soll, kann raise_error() von
- ueberall her aufgerufen werden.
-
- Da raise_error() sich wie andere 'echte' Laufzeitfehler verhaelt,
- einschliesslich der Erzeugung eines Stack Backtraces, ist diese
- Funktion sehr zeitintensiv.
-
-SIEHE AUCH
+SEE ALSO
catch(E), throw(E)
diff --git a/doc/efun/random b/doc/efun/random
index d3f876f..a744312 100644
--- a/doc/efun/random
+++ b/doc/efun/random
@@ -1,16 +1,15 @@
SYNOPSIS
int random(int n)
-BESCHREIBUNG
- Liefert eine Zufallszahl im Bereich [0 .. n-1].
+DESCRIPTION
+ Returns a number in the random range [0 .. n-1].
- Dieser Zufallszahlgenerator liefert eine gleichmaessige Verteilung von
- Zahlen ueber einen grossen Bereich, ohne Wiederholung von Sequenzen
- waehrend einer langen Zeit. Der Nachteil dieser (wuenschenswerten)
- Qualitaeten ist, dass wenn viele Zahlen in einem kleinen Bereich in
- kurzer Zeit generiert werden, einige Zahlen sehr viel haeufiger
- auftreten als andere.
+ The random number generator is proven to deliver an equal distribution
+ of numbers over a big range, with no repetition of number sequences
+ for a long time. The downside of these (desirable) qualities is that
+ when generating numbers in a small range over short time, certain
+ numbers will appear far more often than others.
- Die einzige Loesung hierzu ist eine spezielle simul_efun, die geeignete
- Schritte unternimmt, um eine gleichmaessige Verteilung ueber kleine
- Bereiche in kurzen Zeitraeumen zu erreichen.
+ The only solution is the implementation of a special simul_efun which
+ takes special steps to implement an equal distribution over small
+ ranges and short times.
diff --git a/doc/efun/read_bytes b/doc/efun/read_bytes
index c42109c..0a3c228 100644
--- a/doc/efun/read_bytes
+++ b/doc/efun/read_bytes
@@ -1,19 +1,23 @@
SYNOPSIS
- bytes read_bytes(string file, int start, int anzahl)
+ bytes read_bytes(string file, int start, int number)
-BESCHREIBUNG
- Liest eine bestimmte Anzahl Bytes aus dem File <file>. Wenn <start>
- nicht angegeben oder 0 ist, wird das File von Beginn weg gelesen,
- sonst vom Byte mit der Nummer <start>. Wenn <start> negativ ist,
- werden die Bytes vom Ende des Files her gezaehlt. <anzahl> ist die
- Anzahl Bytes, die gelesen werden sollen. Werte von 0 oder negative
- Werte sind zwar moeglich, aber wenig sinnvoll.
+DESCRIPTION
+ Reads a given amount of bytes from file.
+ If <start> is not given or 0, the file is read from the
+ beginning, else from the <start>th byte on. If <start> is
+ negative, it is counted from the end of the file. If this
+ would extend beyond the beginning of the file, it is read
+ from the beginning.
+ <number> is the number of bytes to read. 0 or negative values
+ are possible, but not useful.
+ If <start> would be beyond the end of the file, 0 is returned
+ instead of a string.
- Wenn <start> ausserhalb der Groesse des Files liegt, liefert
- read_byte() anstelle eines Strings 0 zurueck.
+ The maximum bytes being read per call is LIMIT_BYTE (see
+ query_limits()).
- Die max. Anzahl einzulesender Bytes pro Aufruf dieser Funktion
- betraegt LIMIT_BYTE (s. query_limits()).
+HISTORY
+ LDMud 3.6.5 accepts start offsets before the beginning of the file.
-SIEHE AUCH
+SEE ALSO
read_file(E), write_bytes(E), write_file(E)
diff --git a/doc/efun/read_file b/doc/efun/read_file
index 3c58ec1..a05fa1c 100644
--- a/doc/efun/read_file
+++ b/doc/efun/read_file
@@ -1,26 +1,27 @@
SYNOPSIS
- string read_file(string file, int start, int anzahl, string encoding)
+ string read_file(string file, int start, int number, string encoding)
-BESCHREIBUNG
- Liest Zeilen aus einem File <file>. Wenn <start> angegeben ist und
- nicht 0, wird von Beginn der Zeile <start> an gelesen; ist <start> 0
- oder nicht angegeben, wird vom Beginn des Files gelesen.
+DESCRIPTION
+ Reads lines from file.
+ If <start> is not given or 0, the file is read from the
+ beginning, else the efun starts reading at the beginning of line
+ <start>.
- Wenn <anzahl> nicht angegeben oder 0 ist, wird das gesamte File
- gelesen, sonst nur <anzahl> Zeilen.
+ If <number> is not given or 0, the whole file is read, else
+ just the given amount of lines.
- Mit <encoding> kann man den Zeichensatz spezifieren, der beim
- Lesen der Datei angewandt werden soll. Falls er nicht angeben oder
- 0 ist, so wird der Hook H_FILE_ENCODING verwendet.
+ <encoding> denotes the encoding to be used for decoding the file.
+ If it is not given or 0, the H_FILE_ENCODING driver hook will
+ be used.
- Wenn <start> ausserhalb der Groesse des Files liegt, liefert
- read_file() anstelle eines Strings 0 zurueck.
+ If <start> would be outside the actual size of the file, 0 is
+ returned instead of a string.
- Die max. Anzahl einzulesender Bytes (nicht Zeilen!) pro Aufruf dieser
- Funktion betraegt LIMIT_FILE (s. query_limits()).
+ The maximum number of characters (not lines!) being read per
+ call is LIMIT_FILE (see query_limits()).
-GESCHICHTE
- LDMud 3.6.0 fuegte den <encoding>-Parameter hinzu.
+HISTORY
+ LDMud 3.6.0 added the <encoding> parameter.
-SIEHE AUCH
+SEE ALSO
read_bytes(E), write_file(E), hooks(C)
diff --git a/doc/efun/referencep b/doc/efun/referencep
index fa4bdda..96fbc26 100644
--- a/doc/efun/referencep
+++ b/doc/efun/referencep
@@ -1,13 +1,14 @@
SYNOPSIS
int referencep(mixed arg)
-BESCHREIBUNG
- Liefert 1, wenn das Argument an die aktuelle Funktion per Referenz
- uebergeben wurde, ansonsten 0.
+DESCRIPTION
+ returns true if arg was passed by reference to the current
+ function, instead of the usual call-by-value.
- Man beachte, dass das Argument als Referenz an referencep()
- uebergeben werden muss, z. B. referencep(&x).
+ Note that arg has to be passed by reference to the efun,
+ a.g. referencep(&x).
-SIEHE AUCH
- bytesp(E), closurep(E), floatp(E), mappingp(E), objectp(E), intp(E),
- pointerp(E), stringp(E), symbolp(E), clonep(E), references(LPC)
+SEE ALSO
+ references(LPC), bytesp(E), clonep(E), closurep(E), coroutinep(E),
+ floatp(E), intp(E), lpctypep(E), lwobjectp(E), mappingp(E),
+ objectp(E), pointerp(E), stringp(E), structp(E), symbolp(E)
diff --git a/doc/efun/regexp b/doc/efun/regexp
index c8f8910..9dc0fed 100644
--- a/doc/efun/regexp
+++ b/doc/efun/regexp
@@ -1,62 +1,40 @@
SYNOPSIS
+ #include <regexp.h>
+
string * regexp(string *list, string pattern)
+ string * regexp(string *list, string pattern, int opt)
-BESCHREIBUNG
- Liefert ein neues Array mit all jenen Strings aus list zurueck,
- welche auf das Muster pattern passen. Diese Funktion verwendet
- dieselbe Syntax fuer regulaere Ausdruecke wie ed():
+DESCRIPTION
+ Match the pattern <pattern> (interpreted according to <opt> if
+ given) against all strings in list, and return a new array with all
+ strings that matched.
- . Passt auf jedes beliebige Zeichen.
+ If there is an error in the regular expression, a runtime
+ error will be raised.
- ^ Passt auf den Beginn einer Zeichenkette.
-
- $ Passt auf das Ende einer Zeichenkette.
-
- \< Passt auf das Beginn eines Wortes.
-
- \> Passt auf das Ende eines Wortes.
-
- \B Passt auf eine leere Zeichenkette an einem Wortrand
- (sollte aehnlich wie das Symbol zur Emacs-Kompatibilitaet in
- GNU egrep sein), seit 3.2@249
-
- x|y Passt entweder auf den regulaeren Ausdruck x oder y.
-
- () Verwendet den eingeschlossenen regulaeren Ausdruck wie einen
- 'simplen' Ausdruck.
-
- x* Der regulaere Ausdruck x passt beliebig oft (0 oder mehr).
-
- x+ Der regulaere Ausdruck x passt mindestens einmal (1 oder mehr).
-
- [..] Passt auf jedes in den Klammern eingeschlossenes Zeichen.
-
- [^ ..] Passt auf jedes Zeichen, welches nicht in den Klammern
- eingeschlossen ist. Das .. ist durch einzelne Zeichen oder
- Bereiche von Zeichen zu ersten:
- [abc] Passt auf a, b oder c.
- [ab0-9] Passt auf a, b, c oder eine beliebige Ziffer.
- [^a-z] Passt auf keinen klein geschriebenen Buchstaben.
-
- \c Passt auf das Zeichen c, selbst wenn es eines der Sonderzeichen ist.
-
- Wenn es einen Fehler im regulaeren Ausdruck gibt, wird ein
- Laufzeitfehler ausgeloest.
-
-BEISPIELE
+EXAMPLES
string strs;
- if (strs = regexp(({ "Bitte helfen sie mir, Sir John." }),
- "\\<helfen\\>.*\\<mir\\>")) {
- if (sizeof(strs)
- write("Es passt.\n");
+ string pattern;
+
+ if (regexp_package() == RE_PCRE)
+ pattern = "\\<help\\>.*\\<me\\>";
+ else
+ pattern = "\\bhelp\\b.*\\bme\\b";
+
+ if (strs = regexp(({"please, help me Sir John."}), pattern)) {
+ if (sizeof(strs)
+ write("It matches.\n");
}
- Der regulaere Ausdruck wird den uebergebenen String (welcher in
- einem Array verpackt wurde) daraufhin ueberpruefen, ob
- sowas wie "helfen ... mir" darin vorkommt.
+ The regular expression will test the given string (which is
+ packed into an array) if there is something like "help ... me"
+ inside of it.
-GESCHICHTE
- LDMud 3.2.9 fuegte das Sonderzeichen '+' hinzu.
+HISTORY
+ LDMud 3.3 added the optional <opt> argument.
+ Since 3.5.0 a error is raised if RE_PCRE is specified in <opt>, but
+ the driver lacks PCRE support.
-SIEHE AUCH
- regexplode(E), regreplace(E), sscanf(E)
+SEE ALSO
+ regexplode(E), regmatch(E), regreplace(E), regexp_package(E), sscanf(E),
+ regexp(C)
diff --git a/doc/efun/regexp_package b/doc/efun/regexp_package
index 8b8d29f..ae5ccaa 100644
--- a/doc/efun/regexp_package
+++ b/doc/efun/regexp_package
@@ -19,7 +19,7 @@
If there is an error in the regular expression, a runtime
error will be raised.
-EXAMPLE
+EXAMPLES
string strs;
string pattern;
@@ -28,12 +28,9 @@
else
pattern = "\\bhelp\\b.*\\bme\\b";
- if (strs = regexp( ({"please, help me Sir John."}),
- , pattern
- ))
- {
- if (sizeof(strs)
- write("It matches.\n");
+ if (strs = regexp(({"please, help me Sir John."}), pattern)) {
+ if (sizeof(strs)
+ write("It matches.\n");
}
The regular expression will test the given string (which is
diff --git a/doc/efun/regexplode b/doc/efun/regexplode
index 17970bc..ca67db8 100644
--- a/doc/efun/regexplode
+++ b/doc/efun/regexplode
@@ -1,13 +1,30 @@
SYNOPSIS
+ #include <regexp.h>
+
string * regexplode(string text, string pattern)
+ string * regexplode(string text, string pattern, int opt)
-BESCHREIBUNG
- regexplode() verhaelt sich aehnlich wie explode(), akzeptiert aber
- auch regulaere Ausdruecke als Trennzeichen. Im Ergebnisarray ist
- jedes zweite Element ein Trennzeichen.
+DESCRIPTION
+ This function is similar to explode but accepts a regular
+ expression <pattern> as delimiter (interpreted according to <opt>
+ if given).
-GESCHICHTE
- Eingefuehrt in 3.2@61.
+ If flag RE_OMIT_DELIM is not set in <opt>, then every second element
+ in the result vector will be the text that matched the delimiter.
+ If the flag is set, then the result vector will contain only
+ the text between the delimiters.
-SIEHE AUCH
- explode(E), regexp(E), regreplace(E)
+EXAMPLES
+ regexplode("abcdef", "cde") -> ({ "ab", "cde", "f" })
+ regexplode("abcdef", "cde", RE_OMIT_DELIM) -> ({ "ab", "f" })
+
+HISTORY
+ Introduced in 3.2@61.
+ LDMud 3.3 added the optional <opt> argument and the RE_OMIT_DELIM
+ flag.
+ Since 3.5.0 a error is raised if RE_PCRE is specified in <opt>, but
+ the driver lacks PCRE support.
+
+SEE ALSO
+ explode(E), regexp(E), regmatch(E), regreplace(E),
+ regexp_package(E), regexp(C)
diff --git a/doc/efun/regmatch b/doc/efun/regmatch
index dbb73f5..b29588c 100644
--- a/doc/efun/regmatch
+++ b/doc/efun/regmatch
@@ -1,11 +1,11 @@
SYNOPSIS
#include <regexp.h>
- string regmatch (string text, string pattern)
- string regmatch (string text, string pattern, int opt)
- string regmatch (string text, string pattern, int opt, int start)
- string *regmatch (string text, string pattern, int opt)
- string *regmatch (string text, string pattern, int opt, int start)
+ string regmatch(string text, string pattern)
+ string regmatch(string text, string pattern, int opt)
+ string regmatch(string text, string pattern, int opt, int start)
+ string * regmatch(string text, string pattern, int opt)
+ string * regmatch(string text, string pattern, int opt, int start)
DESCRIPTION
Match the string <txt> against <pattern> (interpreted according
@@ -30,7 +30,8 @@
new index is usually equal the length of the match, but at least one
higher than the original start index.
-EXAMPLE
+
+EXAMPLES
regmatch("abcdefcdf", "cd") -> "cd"
regmatch("abcdefcdf", "cd(e)") -> "cde"
@@ -41,6 +42,8 @@
Introduced in LDMud 3.3.198.
Modified in 3.3.214 to return 0 for non-matches, and to take and
return a start position.
+ Since 3.5.0 a error is raised if RE_PCRE is specified in <opt>, but
+ the driver lacks PCRE support.
SEE ALSO
regexplode(E), regreplace(E), regexp(E), regexp_package(E), regexp(C)
diff --git a/doc/efun/regreplace b/doc/efun/regreplace
index e0e7cf3..912e864 100644
--- a/doc/efun/regreplace
+++ b/doc/efun/regreplace
@@ -1,51 +1,61 @@
-SYNOPSIS
- string regreplace(string txt, string pattern,
- string|closure replacepattern, int flags)
-
-BESCHREIBUNG
- Die Funktion durchsucht den String txt nach einem Vorkommen
- des regulaeren Ausdrucks pattern, und ersetzt ihn durch
- den String replacepattern. (replacepattern kann auch eine Closure
- sein. Sie bekommt als argument den passenden Substring und muss
- den Ersatzstring zurueckliefern.)
-
- Im replacestring kann man via '&' auf den zum Suchausdruck
- passenden Teilstring im Original zugreifen. Mit \n (wobei n
- eine Ganzzahl ist) kann man auf den n-ten Unterausdruck
- des regulaeren Ausdrucks zugreifen. Um "&" oder "\\1" als
- Ersetzung zu erreichen, muss "\\&" bzw "\\\\1" verwendet werden.
-
- Beim Flag bestimmt ein gesetztes Bit 0, dass der Ausdruck so oft
- wie vorhanden ersetzt wird, sonst nur das erste Auftreten.
- Bit 1 bestimmt, ob der regulaere Ausdruck 'ed' oder 'sed' kompatibel
- ist (Bit geloescht) oder 'ex' kompatibel (gesetzt).
-
- Die Funktion wirkt wie s/pattern/replacepattern/flags in
- Editoren wie vi oder sed. Sie ist besonders gut geeignet um
- variable Strings zu ersetzen, im Gegensatz zu regexplode, wo
- man den String nur nach einem regulaeren Ausdruck zerlegen kann.
-
-BEISPIELE
- string msgin;
-
- /* Sucht nach 'teilt Dir mit: ' und schliesst den nachfolgenden
- ** Text mit <underline> und </underline> ein; bei jedem Auftreten.
- */
- msgin = regreplace(msgin, "teilt Dir mit: (.*)",
- "teilt Dir mit: <underline>\\1</underline>", 1);
-
- /* Ersetzt die <underline> html-Tags durch die vt100
- ** Escape-Sequenzen fuer Unterstreichung
- */
- txt = regreplace(txt, "<underline>", "<ESC>[5m", 1);
-
- /* Ersetzt das Wort HOUSE in Kleinbuchstaben. */
- txt = regreplace(txt, "HOUSE",
- function string (string s) {return lower_case(s);},
- 1);
-
-AUTOR
- Marcus@TAPPMud schrieb die Original-efun (und die englische Manpage).
-
-SIEHE AUCH
- regexp(E), regexplode(E), sscanf(E)
+SYNOPSIS
+ #include <regexp.h>
+
+ string regreplace(string txt, string pattern,
+ closure|string replacepattern, int flags)
+
+DESCRIPTION
+ This function looks through txt looking for the regular
+ expression pattern. If it finds it, it replaces it by the
+ replacepattern.
+
+ The replacepattern can be a constant string, or a closure taking
+ the matched substring and the position at which it was found
+ as arguments and returning the replacement pattern string.
+
+ The flag is a bitmask of the usual regexp options. Additionally
+ the efun recognizes RE_GLOBAL: if set, the search and replace
+ is repeated as often as the pattern matches.
+
+ The function returns the modified string (or the original if it
+ wasn't modified).
+
+ The function behaves like the s/pattern/replacepattern/flags
+ in editors as ed/vi or sed. The power of this function lies in
+ replacing variable strings (as opposed to regexplode, where
+ you can explode by regular expression, but not implode...)
+
+
+EXAMPLES
+ string msgin;
+
+ /* Checks msgin for the string 'tells you: ' and all following
+ * characters and encloses those characters by <underline>
+ * and </underline>. global.
+ */
+ msgin = regreplace(msgin, "tells you: (.*)",
+ "tells you: <underline>\\1</underline>", 1);
+
+ /* replaces all <underline> html tags by the vt100 escape
+ * sequence for underline.
+ */
+ txt = regreplace(txt, "<underline>", "<ESC>[5m", 1);
+
+ /* Put the word HOUSE into lower case. */
+ txt = regreplace(txt, "HOUSE",
+ function string (string s) {return lower_case(s);},
+ 1);
+
+
+HISTORY
+ Introduced in 3.2.1@125.
+ The use of a closure as replacepattern was introduced in
+ LDMud 3.2.9.
+
+AUTHOR
+ Marcus@TAPPMud contributed the original idea for the efun and the
+ man page.
+
+SEE ALSO
+ regexp(E), regexplode(E), regmatch(E), regexp_package(E),
+ sscanf(E), trim(E), regexp(C)
diff --git a/doc/efun/remove_action b/doc/efun/remove_action
index 8dee7bf..2a86d5a 100644
--- a/doc/efun/remove_action
+++ b/doc/efun/remove_action
@@ -1,23 +1,19 @@
SYNOPSIS
int remove_action(int|string verb)
- int remove_action(int|string verb, object obj)
+ int remove_action(int|string verb, object ob)
-BESCHREIBUNG
- Wenn <verb> ein String ist: entferne das erste im Objekt <obj> durch
- add_action() definierte Kommando <verb>. Wenn <obj> nicht
- angegeben wird, wird standardmaessig this_player() verwendet.
- Gib 1 zurueck, wenn ein Kommando gefunden und entfernt wurde,
- sonst 0.
+DESCRIPTION
+ If <verb> is a string: remove the first action defined by the current
+ object with the given <verb> from <ob> (default is this_player()).
+ Return 1 if the action was found and removed, and 0 else.
- Wenn <verb> ein Integer ist: wenn verb nicht 0 ist, entferne alle
- durch das Objekt <obj> definierten Kommandos. Wenn <obj> nicht
- angegeben wird, wird standardmaessig this_player() verwendet. Gibt
- die Anzahl der entfernten Kommandos zurueck.
+ If <verb> is a number: if non-0, remove all actions defined by
+ the current object from <ob> (default is this_player()).
+ Return the number of actions removed.
-GESCHICHTE
- Eingefuehrt seit 3.2.1.
- LDMud 3.2.10 fuehrte zusaetzlich die Moeglichkeit ein, alle Kommandos
- auf einmal zu entfernen.
+HISTORY
+ Introduced in 3.2.1.
+ LDMud 3.2.10 added the ability to remove all actions.
-SIEHE AUCH
+SEE ALSO
add_action(E), move_object(E)
diff --git a/doc/efun/remove_call_out b/doc/efun/remove_call_out
index 38f0795..96426fa 100644
--- a/doc/efun/remove_call_out
+++ b/doc/efun/remove_call_out
@@ -2,35 +2,21 @@
int remove_call_out(string fun)
int remove_call_out(closure fun)
-BESCHREIBUNG
- Entfernt den naechsten anhaengigen call_out() auf die Funktion <fun>
- im aktuellen Objekt bzw. den naechsten anhaengigen call_out() auf
- die Closure <fun>. Die verbleibende Zeit wird zurueck geliefert.
+DESCRIPTION
+ Remove next pending call-out for function <fun> in the current
+ object, resp. the next pending call-out for closure <fun>.
+ The time left is returned.
- Wenn es keine anhaengigen call_out()s auf <fun> gibt, wird -1
- zurueckgeliefert.
+ -1 is returned if there were no call-outs pending to this
+ function.
-BEISPIELE
- Um alle call_out()s auf MeineFunktion() zu entfernen:
+EXAMPLES
+ To remove every pending call-out to MyTimer() :
- while (remove_call_out("MeineFunktion") != -1); /* wiederhole */
+ while (remove_call_out("MyTimer") != -1) /* continue */ ;
-FEHLER
- Das Entfernen von call_out()s auf Closures funktioniert nur, wenn der
- exakt gleiche Wert fuer die Closure verwendet wird.
+HISTORY
+ Removing a call_out to a closure was introduced in 3.2.1@45.
- Das funktioniert:
- closure cl = symbol_function("main", obj);
- call_out(cl, 2);
- remove_call_out(cl);
-
- Das funktioniert nicht:
- call_out(symbol_function("main", obj), 2);
- remove_call_out(symbol_function("main", obj));
-
-GESCHICHTE
- Das Entfernen eines call_out()s auf eine Closure wurde in 3.2.1@45
- eingefuehrt.
-
-SIEHE AUCH
+SEE ALSO
call_out(E), call_out_info(E), find_call_out(E)
diff --git a/doc/efun/remove_input_to b/doc/efun/remove_input_to
index 3bbbcea..a443529 100644
--- a/doc/efun/remove_input_to
+++ b/doc/efun/remove_input_to
@@ -3,36 +3,31 @@
int remove_input_to(object player, string fun)
int remove_input_to(object player, closure fun)
int remove_input_to(object player, object|lwobject fun)
- int remove_input_to(object player, object|lwobject obj, string fun)
+ int remove_input_to(object player, object|lwobject ob, string fun)
-BESCHREIBUNG
- Entfernt ein anhaengiges input_to() aus dem interaktiven Playerobjekt.
- Wenn <fun> nicht angegeben ist, wird der zuletzt aufgerufen input_to()
- entfernt.
+DESCRIPTION
+ Remove a pending input_to from the interactive <player> object.
+ If the optional <fun> is not given, the most recently added input_to
+ is removed.
- Wurde <fun> angegeben, entfernt remove_input_to das neueste auf <fun>
- aufgerufene input_to. Je nach der Definition von <fun> wird nach
- unterschiedlichen Kriterien gesucht:
- - <fun> ist ein String: gesucht wird nach dem Funktionsnamen
- - <fun> ist ein Objekt: gesucht wird nach dem Objekt, in dem
- input_to() aufgerufen wurde
- - <fun> ist eine Closure: gesucht wird nach der Closure, die
- input_to() enthaelt
- - <obj> und <fun> wurden angegeben: es wird nach Objekt und
- Funktionsname gesucht. Beide muessen uebereinstimmen.
+ If the optional <fun> is given, the efun tries to find and remove the
+ most recently added input_to matching the <fun> argument:
+ - <fun> is a string: the input_to functionname has to match
+ - <fun> is an object: the object the input_to function is bound to
+ has to match
+ - <fun> is a closure: the input_to closure has to match.
+ - <ob> and <fun> are given: both the object and the functionname
+ have to match
- remove_input_to() liefert 1 bei Erfolg, sonst 0 (es wurde kein
- input_to() gefunden, das Objekt ist nicht interaktiv oder es gibt
- kein haengiges input_to() auf dem Objekt).
+ Return 1 on success, or 0 on failure (no input_to found, object is
+ not interactive or has no input_to pending).
-BEISPIELE
- Entfernt alle anhaengigen input_to()s des aktuellen Spielers,
- falls vorhanden:
- while (remove_input_to(this_interactive()));
+EXAMPLES
+ Remove all pending input_to from the current user, if any.
+ while (remove_input_to(this_interactive())) ;
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9 / 3.3.119.
+HISTORY
+ Introduced in LDMud 3.2.9 / 3.3.119.
-SIEHE AUCH
- input_to(E), find_input_to(E), input_to_info(E),
- query_input_pending(E)
+SEE ALSO
+ input_to(E), find_input_to(E), input_to_info(E), query_input_pending(E)
diff --git a/doc/efun/remove_interactive b/doc/efun/remove_interactive
index 269bac3..0d6d200 100644
--- a/doc/efun/remove_interactive
+++ b/doc/efun/remove_interactive
@@ -1,14 +1,13 @@
SYNOPSIS
- void remove_interactive(object obj)
+ void remove_interactive(object ob)
-BESCHREIBUNG
- Schliesst die Verbindung zum interaktiven Objekt <obj>.
+DESCRIPTION
+ Close the connection to the interactive object ob.
- Waehrend der Ausfuehrung der LPC Anweisung ist das Objekt intern als
- 'about to be closed' ('wird geschlossen') markiert. Das heisst, dass
- der Output an stdout umgeleitet wird, waehrend die eigentliche
- Netzwerkverbindung bestehen bleibt, bis die LPC-Anweisung vollstaendig
- abgearbeitet wurde.
+ For the time of the LPC execution, the object is only marked
+ internally as 'about to be closed', meaning that while all
+ output will be redirected to stdout, the actual network connection
+ will continue to exist until the LPC execution ends.
-SIEHE AUCH
+SEE ALSO
connect(M), logon(A), disconnect(M)
diff --git a/doc/efun/rename b/doc/efun/rename
index 39c083d..fda6c6e 100644
--- a/doc/efun/rename
+++ b/doc/efun/rename
@@ -1,25 +1,26 @@
SYNOPSIS
int rename(string from, string to)
-BESCHREIBUNG
- Die Efun rename() verschiebt <from> nach <to>. Wenn <from> ein File
- ist, kann <to> entweder ein andere File oder ein Verzeichnis sein.
- Wenn <from> ein Verzeichnis ist, muss <to> auch ein Verzeichnis sein.
- Wenn in diesem Fall <to> existiert und ein Verzeichnis ist, wird
- <from> in <to> verschoben und behaelt seinen Namen.
+DESCRIPTION
- <from> umzubenennen erfordert Schreibrechte auf <from>.
+ The efun rename() will move from to the new name to. If from
+ is a file, then to may be either a file or a directory. If
+ from is a directory, then to has to be a directory. If to
+ exists and is a directory, then from will be placed in that
+ directory and keep its original name.
- Unterverzeichnisse (Verzeichnisse in Verzeichnissen) koennen nur auf
- Maschinen umbenannt werden, die unter System V laufen, d.h. es ist
- nicht moeglich, diese in ein anderes Verzeichnis zu verschieben. Das
- Verschieben von Verzeichnissen von einem Filesystem zum andreren ist
- unter keinem System moeglich.
+ You must have write permission for from to rename the file.
- Bei Erfolg liefert rename() 0, bei Fehlschlag einen Wert ungleich 0.
+ It is only possible to change name of a directory within a
+ directory on machines running System V, i.e. it is not
+ possible to move to another directory. It is not possible to
+ move a directory across filesystems on any system.
-BEISPIELE
+ On successfull completion rename() will return 0. If any error
+ occurs, a non-zero value is returned.
+
+EXAMPLES
rename("/players/wizard/obj.c", "/players/wizard/newobj.c");
-SIEHE AUCH
+SEE ALSO
copy_file(E), mkdir(E), rmdir(E), rm(E)
diff --git a/doc/efun/rename_object b/doc/efun/rename_object
index bbde744..45a777e 100644
--- a/doc/efun/rename_object
+++ b/doc/efun/rename_object
@@ -1,14 +1,13 @@
-GESCHUETZT
SYNOPSIS
- void rename_object(object obj, string neuer_name)
+ void rename_object(object ob, string new_name)
-BESCHREIBUNG
- Gibt dem Objekt <obj> einen neuen Namen <neuer_name> und verursacht
- eine Schutzverletzung (einen Fehler). <neuer_name> darf kein #
- enthalten, ausser am Ende, um Verwirrung mit Clones zu vermeiden.
+DESCRIPTION
+ Give the object <ob> a new object name <new_name>. Causes a privilege
+ violation. The new name must not contain a # character, except
+ at the end, to avoid confusion with clone numbers.
-GESCHICHTE
- Eingefuehrt in 3.2@55.
+HISTORY
+ Introduced in 3.2@55.
-SIEHE AUCH
- creator(E), object_name(E), load_name(E)
+SEE ALSO
+ creator(E), object_name(E), load_name(E).
diff --git a/doc/efun/replace_program b/doc/efun/replace_program
index 98cc305..39f8e88 100644
--- a/doc/efun/replace_program
+++ b/doc/efun/replace_program
@@ -2,40 +2,35 @@
void replace_program()
void replace_program(string program)
-BESCHREIBUNG
- Ersetzt ein Programm mit dem geerbten Programm (inherit) <program>.
- Das Argument <program> kann weggelassen werden, wenn nur ein Programm
- geerbt wird. In diesem Fall waehlt der Treiber automatisch dieses eine
- geerbte Programm.
+DESCRIPTION
+ Substitutes a program with the inherited program <program>. If
+ the object inherits only one program, the argument may be omitted
+ and the efun will automatically select the one inherited program.
- Diese Efun ist nuetzlich, wenn es um Leistung und Speicherverbrauch
- des Treibers geht. Ein Programm, welches keine zusaetzlichen Variablen
- oder Funktionen braucht (ausser waehrend der Erstellung), kann
- replace_program() aufrufen, um die Trefferquote des Treibers auf den
- Funktionen-Caches zu erhoehen. Dies verringert die Anzahl Programme
- im System.
+ This efun is useful if you consider the performance and memory
+ consumption of the driver. A program which doesn't need any additional
+ variables and functions (except during creation) can call
+ replace_program() to increase the function-cache hit-rate of the
+ driver which decreases with the number of programs in the system.
- Raeume sind ein gutes Beispiel fuer die Anwendung dieser Funktion, da
- viele Raeume nur aus einem Inherit und einer Konfigurationsfunktion
- bestehen. Jedes Objekt kann replace_program() aufrufen, verliert dabei
- jedoch alle Variablen und Funktionen, die nicht im geerbten Programm
- definiert sind.
+ Rooms are a good example for the application of this function, as many
+ rooms just consist of an inherit statement and the configure function.
+ Any object can call replace_program() but looses all extra variables
+ and functions which are not defined by the inherited program.
- Wenn replace_program() angewendet wird, werden Shadows vom Objekt
- entfernt, in dem replace_program() stattfindet. Dies ist so seit
- 3.2@166.
+ When replace_program() takes effect, shadowing is stopped on
+ the object since 3.2@166.
- Es ist nicht moeglich, replace_program() aufzurufen, wenn es an das
- Objekt gebundene (Lambda-) Closures gibt. Hingegen ist es moeglich,
- zuerst das Programm des Objekts zu ersetzen und dann Lambdaclosures
- daran zu binden.
+ It is not possible to replace the program of an object after (lambda)
+ closures have been bound to it. It is of course possible to first
+ replace the program and then bind lambda closures to it.
- Das Ersetzen des Programms findet erst statt, wenn das Objekt
- vollstaendig abgearbeitet wurde, nicht schon beim Aufruf der Funktion
- replace_program(). Das kann dazu fuehren, dass Closures auf inzwischen
- verschwundene Lfuns des Objekts referenzieren. Das stellt allerdings
- kein Problem dar, solange diese Referenzen nicht ausgefuehrt werden.
+ The program replacement does not take place with the call to the efun,
+ but is merely scheduled to be carried out at the end of the backend
+ cycle. This may cause closures to have references to then vanished
+ lfuns of the object. This poses no problem as long as these references
+ are never executed after they became invalid.
-GESCHICHTE
- LDMud 3.2.9 liess zu, dass das Argument <program> weggelassen wird,
- wenn nur ein Inherit existiert.
+HISTORY
+ LDMud 3.2.9 allowed to omit the argument if only one inherit
+ exists.
diff --git a/doc/efun/restore_object b/doc/efun/restore_object
index 3103e7d..8eb7720 100644
--- a/doc/efun/restore_object
+++ b/doc/efun/restore_object
@@ -2,47 +2,44 @@
int restore_object(string name)
int restore_object(string str)
-BESCHREIBUNG
- Laedt Werte von Variablen fuer das aktuelle Objekt aus der Datei
- <name> oder direkt aus dem String <str>.
+DESCRIPTION
+ Restore values of variables for current object from the file <name>,
+ or directly from the string <str>.
- Um direkt aus einem String Variablen laden zu koennen, muss dieser
- mit der typischen Zeile "#x:y" beginnen. Strings, die von der Efun
- save_object() erzeugt wurden, beginnen so.
+ To restore directly from a string <str>, the string must begin
+ with the typical line "#x:y" as it is created by the save_object()
+ efun.
- Wenn Variablen aus einer Datei geladen werden, kann <name> mit .c
- enden. Diese Dateiendung wird vom Treiber entfernt. Das Masterobjekt
- fuegt vermutlich dem Dateinamen ein .o hinzu. Die Gueltigkeit des
- Dateinamens wird mit der Funktion check_valid_path() automatisch
- ueberprueft.
+ When restoring from a file, the name may end in ".c" which is stripped
+ off by the parser. The master object will probably append a .o to the
+ <name>. The validity of the filename is checked with a call to
+ check_valid_path().
- Die Funktion gibt 1 zurueck, wenn die Variablen erfolgreich geladen
- wurden und 0, wenn es nichts zu laden gab.
+ Return 1 on success, 0 if there was nothing to restore.
- Variablen mit dem Typenvermerk nosave werden nicht geladen, zum
- Beispiel nosave int xxx;
+ Variables that has the type modifer 'nosave' will not be restored.
+ Example: nosave int xxx;
- Clousers aus Lfuns, Variablne und simul_efuns werden nur geladen,
- wenn sie gefunden werden. Falls nicht, werden sie mit dem Wert '0'
- geladen.
+ Lfun, variable and simul_efun closures are restored only if they
+ can be found (this excludes closures of private lfuns as well) - if
+ not, they are restored as value '0'.
- Wenn Vererbung verwendet wird, kann es vorkommen, dass mehrere
- Variablen mit dem gleichen Namen an unterschiedlichen Orten vorkommen
- und deshalb in der Speicherdatei mehrmals auftreten. Beim Laden der
- Variablen werden sie in Reihenfolge ihres Auftretens im Vererbungsbaum
- geladen. Ein geeignetes Vorgehen ist die Verwendung von Verbose und
- einzigartigen Namen bei nicht-statischen Variablen. So wird auch das
- manuelle Lesen oder Editieren des Savefiles einfacher.
+ If inheritance is used, then it might be possible that a
+ variable will exist with the same name in more than one place,
+ and thus appear in the save file multiple times. When
+ restoring, the variables are restored in the order they are
+ found in the inheritance tree. A good practice is to have
+ verbose and unique name on non-static variables, which also
+ will make it more easy to read or patch the save file
+ manually.
-GESCHICHTE
- Das direkte Laden aus einem String wurde in LDMud 3.2.8 eingefuehrt,
- wird aber moeglicherweise in Zukunft in eine separate Efun
- ausgelagert.
- LDMud 3.2.9 ergaenzte die Funktion um die Moeglichkeit,
- NonLambda-Closures, Symbole und gequotete Arrays zu laden,
- indem ein neues Format fuer das Savefile verwendet wird.
- LDMud 3.5.0 unterstuetzt das Einlesen von Formatversion 2 mit hoeherer
- Praezision der Gleitkommazahlen.
+HISTORY
+ Restoring directly from a string was added in LDMud 3.2.8 and
+ may be moved in future into a separate efun.
+ LDMud 3.2.9 added the restoring of non-lambda closures, symbols,
+ and quoted arrays, using a new savefile format version.
+ LDMud 3.5.0 added the possibility to restore version 2 with its higher
+ float precision and version 3 with lvalue references.
-SIEHE AUCH
+SEE ALSO
save_object(E), restore_value(E), valid_read(M)
diff --git a/doc/efun/restore_value b/doc/efun/restore_value
index 773613a..3a0319f 100644
--- a/doc/efun/restore_value
+++ b/doc/efun/restore_value
@@ -1,23 +1,21 @@
SYNOPSIS
mixed restore_value(string str)
-BESCHREIBUNG
- Wandelt die String-Entsprechung <str> eines Wertes zurueck in den Wert
- selbst und gibt diesen Wert zurueck. <str> ist ein String, wie er von
- save_value() erzeugt wird.
-
- Die Spezifikation des Speicherformates '#x:y' ist optional. Allerdings
- nimmt der Driver in diesem Fall das aelteste Format (Version 0) an.
- In neu gespeicherten Werten sollte die Formatspezifikation daher nicht
- als optional angesehen werden.
+DESCRIPTION
+ Decode the string representation <str> of a value back into the value
+ itself and return it. <str> is a string as generated by save_value().
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.8.
- Mit LDMud 3.2.9 kam das Laden von Non-Lambda Closures, Symbolen und
- gequoteten Arrays hinzu, wozu ein neues Format fuer die Speicherdatei
- verwendet wird.
- LDMud 3.5.0 unterstuetzt das Einlesen von Formatversion 2 mit hoeherer
- Praezision der Gleitkommazahlen.
-
-SIEHE AUCH
+ The '#x:y' version specification of the saveformat is optional,
+ however the driver will assume the old format version 0 in this case.
+ It is strongly recommended to regard the version specification as
+ non-optional in newly saved values.
+
+HISTORY
+ Introduced in LDMud 3.2.8.
+ LDMud 3.2.9 added the restoring of non-lambda closures, symbols,
+ and quoted arrays, using a new savefile format version.
+ LDMud 3.5.0 added the possibility to restore version 2 with its higher
+ float precision.
+
+SEE ALSO
save_value(E), restore_object(E), save_object(E)
diff --git a/doc/efun/reverse b/doc/efun/reverse
index af81403..89b9bd6 100644
--- a/doc/efun/reverse
+++ b/doc/efun/reverse
@@ -1,32 +1,32 @@
SYNOPSIS
- int reverse (int arg)
- string reverse (string arg)
- bytes reverse (bytes arg)
- mixed * reverse (mixed * arg)
- mixed * reverse (mixed * & arg)
+ int reverse(int arg)
+ string reverse(string arg)
+ bytes reverse(bytes arg)
+ mixed * reverse(mixed * arg)
+ mixed * reverse(mixed * & arg)
-BESCHREIBUNG
- Kehrt die Reihenfolge des Inhaltes eines Arrays, Strings oder
- Bytefolge <arg> um und liefert den neuen Wert als Resultat.
- Ist <arg> eine Zahl, wird die Reihenfolge der Bits in <arg> umgekehrt.
+DESCRIPTION
+ Reverse the content of array, string or byte sequence <arg> and
+ return the result. If <arg> is an integer, the bits in the
+ integer are reversed.
- Wenn in der Referenz-Variante verwendet, wird das Argumentarray selber
- invertiert und auch zurueckgegeben.
+ If called in the reference variant, the argument array itself
+ is reversed and then returned.
-BEISPIELE
- reverse (0x306a) - gibt 0x560c0000 zurueck
+EXAMPLES
+ reverse(0x306a) - returns 0x560c0000
- reverse ("test") - gibt "tset" zurueck
+ reverse("test") - returns "tset"
- mixed * a = ({ 1, 2 });
- reverse(a) - gibt ({ 2, 1 }) zurueck, a bleibt unveraendert.
- reverse(&a) - gibt ({ 2, 1 }) zurueck, a ist nun ({ 2, 1 })
+ mixed * arr = ({ 1, 2 });
+ reverse(arr) - returns ({ 2, 1 }), leaves arr unchanged.
+ reverse(&arr) - returns ({ 2, 1 }), sets arr to ({ 2, 1 })
-FEHLER
- Referenz-Teilarrays wie reverse(&(a[1..2])) werden nicht unterstuetzt.
+BUGS
+ Reference ranges like reverse(&(a[1..2])) are not supported.
-GESCHICHTE
- Eingefuehrt in LDMud 3.3.529.
- LDMud 3.3.532 fuegte die Bitumkehr von Zahlen ein.
+HISTORY
+ Introduced in LDMud 3.3.529.
+ LDMud 3.3.532 added the reversal of bits in an integer.
-SIEHE AUCH
+SEE ALSO
diff --git a/doc/efun/rm b/doc/efun/rm
index cc4e5cf..be1e067 100644
--- a/doc/efun/rm
+++ b/doc/efun/rm
@@ -1,9 +1,8 @@
SYNOPSIS
int rm(string file)
-BESCHREIBUNG
- Loescht die Datei <file>. Gibt 0 zurueck, wenn etwas nicht geklappt
- hat, 1 bei Erfolg.
+DESCRIPTION
+ Remove the file. Returns 0 for failure and 1 for success.
-SIEHE AUCH
+SEE ALSO
mkdir(E), rmdir(E), rename(E)
diff --git a/doc/efun/rmdir b/doc/efun/rmdir
index 93c7a37..748d034 100644
--- a/doc/efun/rmdir
+++ b/doc/efun/rmdir
@@ -1,8 +1,8 @@
SYNOPSIS
int rmdir(string dir)
-BESCHREIBUNG
- Loescht das Verzeichnis <dir>. Liefert 1 bei Erfolg, 0 bei Misserfolg.
+DESCRIPTION
+ Remove directory dir. Return 1 on success, 0 on failure.
-SIEHE AUCH
+SEE ALSO
mkdir(E), rm(E), rename(E)
diff --git a/doc/efun/rmember b/doc/efun/rmember
index 5709efe..cd3b22b 100644
--- a/doc/efun/rmember
+++ b/doc/efun/rmember
@@ -1,21 +1,17 @@
SYNOPSIS
int rmember(mixed *array, mixed elem [, int start])
- int rmember(string str, int elem [, int start])
- int rmember(bytes str, int elem [, int start])
+ int rmember(string s, int elem [, int start])
+ int rmember(bytes s, int elem [, int start])
-BESCHREIBUNG
- Liefert fuer Arrays, Strings und Bytefolgen den Index des letzten
- Auftretens des Arguments <elem> im Array <*array>, im String bzw.
- in der Bytefolge <str>. Wenn <elem> nicht gefunden wird, liefert
- die Funktion -1 zurueck.
+DESCRIPTION
+ Returns the index of the last occurance of second arg
+ in the first arg, or -1 if none found.
+ If <start> is given and non-negative, the search starts at
+ that position.
- Ist <start> als Zahl >= 0 gegeben, beginnt die Suche ab der
- angegebenen Position. Eine Startposition groesser als die
- Laenge des Strings/Arrays liefert stets das Resultat -1.
+HISTORY
+ Introduced in LDMud 3.2.10.
+ LDMud 3.3.556 added the <start> parameter.
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.10.
- LDMud 3.3.556 fuegte den <start>-Parameter hinzu.
-
-SIEHE AUCH
+SEE ALSO
member(E)
diff --git a/doc/efun/rusage b/doc/efun/rusage
index 4de6179..5c268fe 100644
--- a/doc/efun/rusage
+++ b/doc/efun/rusage
@@ -1,18 +1,17 @@
OPTIONAL
SYNOPSIS
- int * rusage()
+ int * rusage(void)
-BESCHREIBUNG
- Liefert ein Array mit Informationen ueber den momentanen
- Systemzustand; Benutzungsstatistiken, wie sie vom Unix-Kommando
- getrusage(2) generiert werden, namentlich:
- utime, stime, maxrss, rus.ru_ixrss, rus.ru_idrss, rus.ru_isrss,
- rus.ru_minflt, rus.ru_majflt, rus.ru_nswap, rus.ru_inblock,
- rus.ru_oublock, rus.ru_msgsnd, rus.ru_msgrcv, rus.ru_nsignals,
- rus.ru_nvcsw, rus.ru_nivcsw
+DESCRIPTION
+ Return an array with current system resource usage statistics,
+ as returned by the getrusage(2) of Unix.
+ namely: utime, stime, maxrss, rus.ru_ixrss, rus.ru_idrss,
+ rus.ru_isrss, rus.ru_minflt, rus.ru_majflt, rus.ru_nswap,
+ rus.ru_inblock, rus.ru_oublock, rus.ru_msgsnd,
+ rus.ru_msgrcv, rus.ru_nsignals, rus.ru_nvcsw,
+ rus.ru_nivcsw
-ANMERKUNGEN
- Diese Funktion ist optional.
+ This function is optional.
-SIEHE AUCH
- sys/resource.h(Unix)
+SEE ALSO
+ <sys/resource.h>(Unix)
diff --git a/doc/efun/save_object b/doc/efun/save_object
index 2ec83b2..cb17764 100644
--- a/doc/efun/save_object
+++ b/doc/efun/save_object
@@ -2,48 +2,46 @@
int save_object(string name [, int format])
string save_object([int format])
-BESCHREIBUNG
- Codiert die speicherbaren Variablen des aktuellen Objekts in einen
- String.
+DESCRIPTION
+ Encode the saveable variables of the current object into a string.
- In der ersten Form wir der String in die Datei <name> geschrieben. Eine
- Endung ".c" in <name> wird entfernt, dafuer kann eine Endung ".o"
- durch das Masterobjekt angefuegt werden, waehrend der Ueberpruefung
- durch valid_read(). Die Efun save_object() liefert 0, wenn die
- Speicherdatei erfolgreich erstellt wurde, sonst eine Zahl ungleich 0,
- wenn ein nicht schwerwiegendee Fehler aufgetreten ist (die Datei
- konnte nicht geschrieben werden oder das aktuelle Objekt wurde
- inzwischen zerstoert).
+ In the first form, the string is written to the file <name>.
+ A suffix ".c" will be stripped from the name, the suffix ".o"
+ may be added by the master object during the check in
+ valid_read(). Result is 0 if the save file could be created,
+ and non-zero on a non-fatal error (file could not be written,
+ or current object is destructed).
- In der zweiten Form wird der String direkt zurueck gegeben. Wenn das
- Objekt zerstoert wurde, wird 0 zurueck gegeben. In beiden Faellen kann
- durch das optionale Argument <format> das Format der Speicherdatei
- angegeben werden:
+ In the second form the string is returned directly. If the
+ object is destructed, the result is 0.
- -1: das normale Format des Treibers (Standard)
- 0: das Originalformat nach Amylaar's LPMud und LDMud <=3.2.8
- 1: LDMud >= 3.2.9: Non-Lambda Closures, Symbole und gequotete
- Arrays koennen gespeichert werden
- 2: LDMUd >= 3.5.0: Gleitkommazahlen werden in einem neuen Format
- geschrieben, welches kompakter ist die Gleitkommazahlen aus
- 3.5.x verlustfrei speichern kann.
-
- Es wird empfohlen, die Angabe des Formats wegzulassen oder in Version
- 2 (oder hoeher) zu speichern.
+ In both forms, the optional <format> argument determines the
+ format of the savefile to be written:
- Eine Variable wird als 'speicherbar' betrachtet, wenn sie nicht als
- 'nosave' oder 'static' deklariert ist.
+ -1: use the driver's native format (default).
+ 0: original format, used by Amylaar LPMud and LDMud <= 3.2.8 .
+ 1: LDMud >= 3.2.9: non-lambda closures, symbols, quoted arrays
+ can be saved.
+ 2: LDMud >= 3.5.0: floats are stored in a different way, which is
+ more compact and can store the new float losslessly.
+ 3: LDMud >= 3.5.0: can also save lvalues references (without it,
+ the plain rvalue will be saved).
-GESCHICHTE
- Seit LDMud 3.2.8 liefert save_object() einen fixen Wert bei Erfolg.
- Das direkte Abspeichern in einen String wurde in LDMud 3.2.8
- eingefuehrt, wird aber in Zukunft eventuell in eine separate Efun
- umgezogen.
- LDMud 3.2.9 ergaenzte die Funktion um das Speichern von Non-Lambda
- Closures, Symbolen und gequoteten Arrays. Dazu wurde ein neues
- Format fuer die Speicherdatei eingefuehrt.
- LDMud 3.2.10 fuehrte das Argument <format> ein.
- LDMud 3.5.0 fuehrte Formatversion 2 ein.
+ It is recommended to use version 3 or higher.
-SIEHE AUCH
+ A variable is considered 'saveable' if it is not declared
+ as 'nosave' or 'static'.
+
+ Only lfuns bound to the current object can be saved.
+
+HISTORY
+ Since LDMud 3.2.8, save_object() returns a success value.
+ The direct encoding into a string was added in LDMud 3.2.8, but
+ may be moved into a different efun in future.
+ LDMud 3.2.9 added the saving of non-lambda closures, symbols,
+ and quoted arrays, using the new savefile format version 1.
+ LDMud 3.2.10 added the <format> argument.
+ LDMud 3.5.0 added savefile format version 2 and 3.
+
+SEE ALSO
restore_object(E), save_value(E)
diff --git a/doc/efun/save_value b/doc/efun/save_value
index 11de053..c1df37d 100644
--- a/doc/efun/save_value
+++ b/doc/efun/save_value
@@ -1,39 +1,37 @@
SYNOPSIS
- string save_value(mixed wert)
- string save_value(mixed wert, int format)
+ string save_value(mixed value)
+ string save_value(mixed value, int format)
-BESCHREIBUNG
- Schreibt <wert> in einen String, der sich mit restore_value()
- auswerten laesst. Der String wird zurueck gegeben.
+DESCRIPTION
+ Encode the <value> into a string suitable for restoration with
+ restore_value() and return it.
- Das optionale Argument <format> bestimmt das Format des Strings:
+ The optional <format> argument determines the format of the savefile
+ to be written:
- -1: das normale Format des Treibers (Standard)
- 0: das Originalformat nach Amylaar's LPMud und LDMud <=3.2.8
- 1: LDMud >= 3.2.9: Non-Lambda Closures, Symbole und gequotete
- Arrays koennen gespeichert werden
- 2: LDMUd >= 3.5.0: Gleitkommazahlen werden in einem neuen Format
- geschrieben, welches kompakter ist die Gleitkommazahlen aus
- 3.5.x verlustfrei speichern kann.
+ -1: use the driver's native format (default).
+ 0: original format, used by Amylaar LPMud and LDMud <= 3.2.8 .
+ 1: LDMud >= 3.2.9: no-lambda closures, symbols, quoted arrays
+ can be saved.
+ 2: LDMUd >= 3.5.0: floats are stored in a different way, which is
+ more compact and can store the new floats losslessly.
+
+ It is recommended to use version 2 or higher.
+
+ The created string consists of two lines, each terminated with
+ a newline character: the first line describes the format used to
+ save the value in the '#x:y' notation; the second line is the
+ representation of the value itself.
+
+ The format of the encoded value and of the format line matches
+ the format used by save_object() and restore_object().
+
+HISTORY
+ Introduced in LDMud 3.2.8.
+ LDMud 3.2.9 added the saving of non-lambda closures, symbols,
+ and quoted arrays, using the new savefile format version 1.
+ LDMud 3.2.10 added the <format> argument.
+ LDMud 3.5.0 added savefile format version 2.
- Es wird empfohlen, die Angabe des Formats wegzulassen oder in Version
- 2 (oder hoeher) zu speichern.
-
- Der erzeugte String besteht aus zwei Zeilen, die jeweils mit einem
- Zeilenumbruch enden. Die erste Zeile beschreibt das Format, in dem der
- Wert gespeichert wird, in der '#x:y'-Schreibweise. Die zweite Zeile
- stellt den eigentlichen Wert da.
-
- Das Format zum Schreiben des Wertes in den String entspricht dem von
- save_object() und restore_object() verwendeten Format.
-
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.8.
- LDMud 3.2.9. ergaenzte die Funktion um die Moeglichkeit, Non-Lambda
- Closures, Symbole und gequotete Arrays zu speichern. Dazu wurde
- ein neues Format fuer den String eingefuehrt.
- LDMud 3.2.10 fuehrte das Argument <format> ein.
- LDMud 3.5.0 fuehrte Formatversion 2 ein.
-
-SIEHE AUCH
+SEE ALSO
restore_value(E), restore_object(E), save_object(E)
diff --git a/doc/efun/say b/doc/efun/say
index cbb7819..ed4b3ec 100644
--- a/doc/efun/say
+++ b/doc/efun/say
@@ -7,92 +7,78 @@
void say(mixed *|mapping|struct|object|lwobject msg, object exclude)
void say(mixed *|mapping|struct|object|lwobject msg, object *excludes)
-BESCHREIBUNG
- Es bestehen zwei Hauptanwendungen fuer say():
+DESCRIPTION
+ There are two major modes of calling:
- Wenn das erste Argument ein String <str> ist, wird er an alle
- lebendigen Objekte im aktuellen Raum gesendet, ausser zum Objekt,
- das die Funktion aufgerufen hat.
+ If the first argument is a string <str>, it will be send to
+ all livings in the current room except to the initiator.
- Wenn das erste Argument ein nicht-String <msg> ist, wird die Lfun
- catch_msg() in allen lebendigen Objekt im Raum aufgerufen, ausser im
- Objekt, das say() aufgerufen hat. Der Wert <msg> wird als erstes
- Argument an catch_msg() uebergeben, das aufrufende Objekt als zweites
- Argument.
+ If the first argument is an array/mapping/struct/object <msg>, the
+ lfun catch_msg() of all living objects except the initiator will be
+ called.
+ This <msg> will be given as first argument to the lfun, and
+ the initiating object as the second.
+ CAVEAT: If the lfun catch_msg() modifies the content of <msg>, all
+ subsequent objects will receive the modified <msg>.
- MERKE: Wenn die Lfun catch_msg() den Wert <msg> veraendert, erhalten
- alle nachfolgenden Objekte das veraenderte <msg>.
+ By specifying a second argument to the efun one can exclude
+ more objects than just the initiator. If the second argument
+ is a single object <exclude>, both the given object and the
+ initiator are excluded from the call. If the second argument
+ is an array <excludes>, all objects and just the objects in
+ this array are excluded from the call.
- Wird der Efun say() ein zweites Argument angegeben, kann man andere
- Objekte als nur das aufrufende Objekt ausschliessen. Wenn das zweite
- Argument ein einzelnes Objekt <exclude> ist, werden das aufrufende
- Objekt und <exclude> von der Meldung ausgeschlossen. Wenn das zweite
- Argument ein Array <excludes> ist, werden alle Objekte aus dieser
- Liste zusaetzlich zum aufrufenden Objekt als Empfaenger von say()
- ausgeschlossen.
+ The 'initiator' is determined according to these rules:
+ - if the say() is called from within a living object, this
+ becomes the initiator
+ - if the say() is called from within a dead object as result
+ of a user action (i.e. this_player() is valid), this_player()
+ becomes the initiator.
+ - Else the object calling the say() becomes the initiator.
- Das aufrufende Objekt wird nach folgenden Regeln bestimmt:
- - Wenn say() aus einem lebendigen Objekt aufgerufen wird, gilt
- dieses als das aufrufende Objekt.
- - Wenn say() aus einem nicht-lebendigen Objekt als Resultat einer
- Handlung eines Benutzers aufgerufen wird (das heisst,
- this_player() ist gueltig), gilt this_player() als aufrufendes
- Objekt.
- - In allen anderen Faellen gilt das Objekt, das say() aufgerufen
- hat, als aufrufendes Objekt.
-
-BEISPIELE
- Folgende Aufrufe sind gleich, wenn sie aus einem nicht lebendigen
- Objekt aufgerufen werden:
-
- say("Hi!\n");
- say("Hi!\n", this_player());
-
- Das folgende Beispiel zeigt, wie say() zusammen mit catch_tell()
- funktioniert. Das zweite Objekt darf nicht lebendig sein, sodass
- write() an den aktuellen Benutzer geht.
-
- Objekt 1 (living):
- void catch_tell(string str)
- {
- write("Empfangen: "+str+"\n");
- }
-
- Objekt 2 (nicht living):
- void func()
- {
- ...
- say("HiHo!\n");
- ...
- }
-
- Ein etwas komplexeres Beispiel zeigt das Zusammenspiel von say()
- und catch_msg(). Auch hier wird ein nicht-lebendiges Objekt
- verwendet, das die Nachricht ausgibt, sodass das 'wer' in
- catch_msg() auf den aktuellen Benutzer zeigt.
+EXAMPLES
+ say("Hi!\n");
+ say("Hi!\n", this_player());
+ Both calls are equal when called by a not living object.
Object 1 (living):
- void catch_msg(mixed *arr, object who) {
- int i;
- if (!arr) return;
- for (i=0;i<sizeof(arr);i++)
- tell_object(who, (stringp(arr[i]) ? arr[i] : "-/-")+"\n");
- }
+ void catch_tell(string str) {
+ write("Received: "+str+"\n");
+ }
+ Object 2 (not living):
+ void func() {
+ ...
+ say("HiHo!\n");
+ ...
+ }
- Object 2 (nicht living):
- void func() {
- ...
- say(({ "Hello", "there!" }));
- ...
- }
+ This examples shows how say() together with catch_tell()
+ works. The 2nd object must not be living so the write() will
+ go to the current user.
-ANMERKUNGEN
- Wenn die Lfun catch_msg() den Wert <msg> veraendert, erhalten alle
- nachfolgenden Objekte das veraenderte <msg>.
-GESCHICHTE
- LDMud 3.3.686 erlaubt die Verwendung eines mapping/struct/object als
- zweites Argument.
+ Object 1 (living):
+ void catch_msg(mixed *arr, object who) {
+ int i;
+ if(!arr) return;
+ for(i=0; i<sizeof(arr); i++)
+ tell_object(who, (stringp(arr[i]) ? arr[i] : "-/-")+"\n");
+ }
+ Object 2 (not living):
+ void func() {
+ ...
+ say( ({ "Hello", "there!" }) );
+ ...
+ }
-SIEHE AUCH
+ This is a bit complex example to demonstrate how say() and
+ catch_msg() works. Here we also use a non living object to
+ send the message so the who in catch_msg() will be the current
+ user.
+
+HISTORY
+ LDMud 3.3.686 added the use of a mapping/struct/object as second
+ argument.
+
+SEE ALSO
write(E), tell_object(E), tell_room(E)
diff --git a/doc/efun/send_erq b/doc/efun/send_erq
index fd1d521..85ff4ab 100644
--- a/doc/efun/send_erq
+++ b/doc/efun/send_erq
@@ -1,31 +1,37 @@
-GESCHUETZT
SYNOPSIS
#include <erq.h>
- int send_erq(int request, bytes|int *data, closure callback)
+ int send_erq(int request, bytes|int * data, closure callback)
-BESCHREIBUNG
- Eine Anfrage vom Typ <request> (standardmaessig 0) wird mit Inhalt
- <data> word an den ERQ gesandt. Wenn <callback> angegeben ist,
- wird diese Closure aufgerufen, wenn eine Antwort vom ERQ eintrifft
- (ein Status Code), vorausgesetzt die Antwort enthaelt ausreichend
- Daten, um damit zu arbeiten:
+DESCRIPTION
+ A request of given type (<request>, default is 0), equipped
+ with the given <data>, is sent to the erq. If <callback> is
+ set to a closure, it will be called when the response from the
+ erq (a status code) arrives, if the response carries enough data to
+ work on.
- void <closure>(int *response_data, int len);
+ <request> can be one of the request codes defined in <erq.h>.
+ The binary flag ERQ_CB_STRING defines whether the <callback>
+ closure expects the returned data packed into an array of
+ integers or as a string.
- <data> kann entweder eine Bytefolge oder ein Array von Integers sein,
- wobei im zweiten Fall die Zahlen als Bytes interpretiert werden.
- Die unterschiedlichen Anfragen sind in <erq.h> definiert.
+ <data> may be a byte sequence, or an array of integers which are
+ then interpreted as bytes.
- Die Funktion liefert 0 zurueck, wenn das Senden fehlgeschlagen ist,
- etwas anderes sost.
+ <callback>, if set, is a closure of either these forms:
- Die Funktion verursacht eine Schutzverletzung "erq".
+ !ERQ_CB_STRING: void <closure>(int *response_data, int len)
+ ERQ_CB_STRING: void <closure>(string response_data)
-GESCHICHTE
- Eingefuehrt in 3.2.1@61.
- Geschuetzt in 3.2.1@84.
- LDMud 3.3.318 fuehrte das ERQ_CB_STRING-Flag ein.
+ The result returned from the efun is 0 on failure to send the
+ data, or non-zero on a successful send.
-SIEHE AUCH
+ The function causes a privilege violation "erq".
+
+HISTORY
+ Introduced in 3.2.1@61.
+ Made a privileged function in 3.2.1@84
+ LDMud 3.3.318 introduced the ERQ_CB_STRING flag.
+
+SEE ALSO
attach_erq_demon(E), erq(C)
diff --git a/doc/efun/send_udp b/doc/efun/send_udp
index dd5d2bc..f508dd6 100644
--- a/doc/efun/send_udp
+++ b/doc/efun/send_udp
@@ -1,39 +1,26 @@
-GESCHUETZT
SYNOPSIS
int send_udp(string host, int port, bytes message)
- int send_udp(string host, int port, int *message)
+ int send_udp(string host, int port, int * message)
-BESCHREIBUNG
- Sendet die Nachricht <message> als UDP Paket an den angegebenen Host
- bzw. Port.
+DESCRIPTION
+ Sends the <message> in an UDP packet to the given host and port
+ number.
- Die Efun verursacht eine Schutzverletzung. Wenn USE_DEPRECATED gesetzt
- ist, wird zuerst send_imp() ausgeloest, anschliessend - wenn send_imp()
- fehlschlaegt - send_udp(). Wenn USE_DEPRECATED nicht gesetzt ist,
- wird nur send_udp() ausgeloest.
+ The efun causes the privilege violation ("send_udp").
- Die Funktion liefert 1 bei Erfolg, sonst 0.
+ Returns 1 on success, 0 on failure.
- MERKE: auf manchen Systemen wird ein fehlgeschlagener Versuch von
- send_udp() nicht registriert, bis das naechste send_udp() aufgerufen
- wird. Das spaetere send_udp() kann in diesem Fall 0 zurueck liefern,
- obwohl es erfolgreich war.
+ Note: On some machines a failed send_udp() will not be registered
+ until the next send_udp() - the latter one might return '0' even
+ if itself was successful.
-FEHLER
- Ist <host> ein qualifizierter Hostname (anstelle einer IP Adresse),
- blockiert die Ausfuehrung fuer die Dauer der Namensaufloesung.
+BUGS
+ If the <host> is given as a fully qualified name (instead of
+ an IP address), the execution will block until the name is resolved.
-ANMERKUNGEN
- Auf manchen Systemen wird ein fehlgeschlagener Versuch von send_udp()
- nicht registriert, bis das naechste send_udp() aufgerufen wird.
- Das spaetere send_udp() kann in diesem Fall 0 zurueckliefern, obwohl
- es erfolgreich war.
+HISTORY
+ LDMud 3.2.9 renamed this efun from send_imp(), and also changed the
+ privilege violation string and the apply names.
-GESCHICHTE
- LDMud 3.2.9 benannte diese Efun von send_imp() und veraenderte auch
- die Schutzverletzung (bzw. die entsprechende Fehlermeldung) und
- die Apply Namen. Die alte Version ist verfuegbar, wenn im
- Treiber USE_DEPRECATED gesetzt ist.
-
-SIEHE AUCH
+SEE ALSO
query_udp_port(E), receive_udp(M)
diff --git a/doc/efun/set_bit b/doc/efun/set_bit
index 758bdc6..8935b4f 100644
--- a/doc/efun/set_bit
+++ b/doc/efun/set_bit
@@ -1,30 +1,30 @@
SYNOPSIS
string set_bit(string str, int n)
-BESCHREIBUNG
- Liefert einen neuen String, bei dem das Bit <n> in <str> gesetzt
- ist. Dabei wird der urspruengliche String <str> nicht veraendert.
+DESCRIPTION
+ Return the new string where bit n is set in string str. Note
+ that the old string str is not modified.
- Jedes Zeichen enthaelt 6 Bits. In jedem Zeichen kann deshalb eine
- Zahl von 0 bis 63 gespeichert werde (2^6=64). Das erste Zeichen
- ist der Leerschlag " " mit dem Wert 0. Das erste Zeichen im String
- ist jenes mit den niedrigsten Bits (0-5).
+ Each character contains 6 bits. So you can store a value
+ between 0 and 63 in one character (2^6=64). Starting character
+ is the blank " " which has the value 0. The first charcter in
+ the string is the one with the lowest bits (0-5).
- Der neue String wird automatisch verlaengert, falls noetig.
+ The new string will automatically be extended if needed.
-BEISPIELE
+EXAMPLES
string s;
s=set_bit("?",5);
- Weil "?" einen Wert von 31 hat, ist das 6. Bit nicht gesetzt. Wird
- es gesetzt, so ergibt sich "_". Der String s enthaelt nun also "_".
+ Because "?" has a value of 31 the variable s will now contain
+ the character "_" which is equal to 63 (31+2^5=63).
string s;
s=set_bit("78",3);
s=set_bit(s,8);
- s enthaelt nun "?<".
+ s will now contain the string "?<".
-SIEHE AUCH
+SEE ALSO
clear_bit(E), last_bit(E), next_bit(E), test_bit(E), count_bits(E),
and_bits(E), or_bits(E), xor_bits(E), invert_bits(E), copy_bits(E)
diff --git a/doc/efun/set_driver_hook b/doc/efun/set_driver_hook
index 5489120..0a6f67b 100644
--- a/doc/efun/set_driver_hook
+++ b/doc/efun/set_driver_hook
@@ -1,11 +1,13 @@
SYNOPSIS
+ #include <driver_hook.h>
+
void set_driver_hook(int what, closure arg)
void set_driver_hook(int what, string arg)
- void set_driver_hook(int what, string * arg)
+ void set_driver_hook(int what, string *arg)
DESCRIPTION
This privileged efun sets the driver hook 'what' (values are
- defined in /sys/driver_hook.h) to 'arg'.
+ defined in <driver_hook.h>) to 'arg'.
The exact meanings and types of 'arg' depend of the hook set.
To remove a hook, set 'arg' to 0.
@@ -30,6 +32,14 @@
closure), function name.
Optional hooks for creation/reset/clean up-actions.
+ H_CREATE_LWOBJECT
+ H_CREATE_LWOBJECT_COPY
+ H_CREATE_LWOBJECT_RESTORE
+ arg: lambda closure, function name.
+ Optional hooks for creation of lightweight objects
+ with new_lwobject(), copy()/deep_copy() resp.
+ restore_value()/restore_object().
+
H_DEFAULT_METHOD
arg: lambda closure, lfun closure, function name.
Optional hook for default method implementation.
@@ -73,6 +83,17 @@
Optional hook to specify a string to be included before the
source of every compiled LPC object.
+ H_AUTO_INCLUDE_EXPRESSION
+ H_AUTO_INCLUDE_BLOCK
+ arg: closure, string
+ Optional hook specifying a string to be prepended before
+ the string of a compile_string() call.
+
+ H_FILE_ENCODING
+ arg: lambda closure, lfun closure, string
+ Optonal hook specifying the name of the encoding to be used
+ for decoding a file (default: "ascii").
+
H_TELNET_NEG
arg: lambda closure, lfun closure, string.
Optional hook to specifiy how to perform a single telnet
@@ -88,11 +109,16 @@
Optional hook to notify the mudlib about the termination of
the erq demon.
+ H_MSG_DISCARDED
+ arg: lambda closure, lfun closure, string
+ Optional hook to specify a message or take other measures
+ when a message had to be discarded.
+
See hooks(C) for a detailed discussion.
HISTORY
Introduced in 3.2.1@1 as efun309(), renamed to
- set_driver_hook() in 3.2.1@13
+ set_driver_hook() in 3.2.1@13.
SEE ALSO
hooks(C)
diff --git a/doc/efun/set_environment b/doc/efun/set_environment
index 507a46d..4703b26 100644
--- a/doc/efun/set_environment
+++ b/doc/efun/set_environment
@@ -1,18 +1,17 @@
-GESCHUETZT
SYNOPSIS
- void set_environment(objet was, object env)
+ void set_environment(object item, object env)
-BESCHREIBUNG
- Das Objekt <was> wird in die Umgebung <env> bewegt, welche auch 0
- sein kann. Diese Efun wird im move_object() Hook verwendet. Sie macht
- nichts, ausser das Objekt <was> zu bewegen - kein Aufruf von init()
- oder sonstiges.
+DESCRIPTION
+ The item is moved into its new environment env, which may be 0.
+ This efun is to be used in the move_object() hook, as it does
+ nothing else than moving the item - no calls to init() or such.
- Sprich: nicht in eigenen Objekten verwenden!
+ Don't use it in your own objects!
-GESCHICHTE
- Eingefuehrt in 3.2.1.@1 als 'efun308()'.
- In 3.2.6 umbenannt zu 'set_environment()'.
+HISTORY
+ Introduced in 3.2.1@1 as 'efun308()', renamed to 'set_environment()'
+ in 3.2.6.
-SIEHE AUCH
- remove(A), init(A), move_object(E), transfer(E), hooks(C), native(C)
+SEE ALSO
+ remove(A), init(A), move_object(E), transfer(E), hooks(C),
+ native(C)
diff --git a/doc/efun/set_extra_wizinfo b/doc/efun/set_extra_wizinfo
index d676e00..b94dd9b 100644
--- a/doc/efun/set_extra_wizinfo
+++ b/doc/efun/set_extra_wizinfo
@@ -1,26 +1,24 @@
-GESCHUETZT
SYNOPSIS
void set_extra_wizinfo(object wiz, mixed extra)
void set_extra_wizinfo(lwobject wiz, mixed extra)
void set_extra_wizinfo(string wiz, mixed extra)
void set_extra_wizinfo(int wiz, mixed extra)
-BESCHREIBUNG
- Setzt den Wert <extra> als Eintrag im 'Extra' Feld in der Wizlist fuer
- den Gott <wiz>.
+DESCRIPTION
+ Set the value <extra> as the 'extra' information for the wizlist
+ entry of <wiz>.
- Ist <wiz> ein normales oder leichtgewichtiges Objekt, so wird der
- Eintrag vom Erzeuger des Objekts (also dessen UID) verwendet.
- Ist <wiz> ein String (ein Erzeuger bzw. eine UID), bezeichnet dieser
- den Eintrag, dem <extra> zugewiesen wird.
- Ist <wiz> 0, wird <extra> im Standardeintrag der Wizlist gesetzt.
- Diese Funktion kann man verwenden, um Daten fuer die gesamte Laufzeit
- des Treibers bis zum naechsten Shutdown zu speichern, zum Beispiel den
- Zeitpunkt des letzten Reboot.
+ If <wiz> is a regular or lightweight object, the entry of its
+ creator (uid) is used.
+ If <wiz> is a string (a creator aka uid), it names the entry
+ to use.
+ If <wiz> is the number 0, the data is set in the default wizlist
+ entry. It can be used to store data for the lifetime of this
+ driver run, like the time of the last reboot.
- Das Argument <extra> kann jeden Wert enthalten.
+ The <extra> argument may be any value.
- Die Funktion verursacht eine Schutzverletzung.
+ The function causes a privilege violation.
-SIEHE AUCH
+SEE ALSO
get_extra_wizinfo(E), set_extra_wizinfo_size(E), wizlist_info(E)
diff --git a/doc/efun/set_next_reset b/doc/efun/set_next_reset
index 20961ea..a3d660e 100644
--- a/doc/efun/set_next_reset
+++ b/doc/efun/set_next_reset
@@ -1,26 +1,24 @@
SYNOPSIS
int set_next_reset(int delay)
-BESCHREIBUNG
- Weist den Gamedriver an, im Objekt nicht vor Ablauf von <delay>
- Sekunden einen Reset durchzufuehren. Wird fuer <delay> ein negativer
- Wert angegeben, wird nie ein Reset im Objekt durchgefuehrt (sinnvoll
- fuer Blueprints). Wird fuer <delay> 0 angegeben, wird die
- Reset-Zeit des Objekts nicht veraendert.
+DESCRIPTION
+ Instruct the gamedriver to reset this object not earlier than
+ in <delay> seconds. If a negative value is given as delay, the object
+ will never reset (useful for blueprints). If 0 is given, the
+ object's reset time is not changed.
- Die Funktion gibt die verbleibende Zeit bis zum naechsten Reset
- zurueck, bevor <delay> gesetzt wurde. Der Wert kann auch negativ
- sein, wenn der Reset ueberfaellig war.
+ Result is the former delay to the objects next reset (which can be
+ negative if the reset was overdue).
- Merke: die tatsaechliche Zeit, wann der Reset im Objekt
- durchgefuehrt wird, haengt davon ab, ob das Objekt nach Ablauf
- von <delay> verwendet wird.
+ Note that the actual time the reset occurs depends on when
+ the object will be used after the given time delay.
-BEISPIELE
- set_next_reset(15*60); Der naechste Reset erfolgt nach
- fruehestens 15 Minuten.
- set_next_reset(0); Gibt die verbleibende Zeit zum naechsten
- Reset zurueck.
+EXAMPLES
+ set_next_reset(15*60); // Next reset in 15 Minutes or later
+ set_next_reset(0) --> just returns the time until the
+ next reset.
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.6, angepasst von Morgengrauen.
+HISTORY
+ Introduced in LDMud 3.2.6, adapted from Morgengrauen.
+
+SEE ALSO
diff --git a/doc/efun/set_this_object b/doc/efun/set_this_object
index 1aa0c6a..2af7e1d 100644
--- a/doc/efun/set_this_object
+++ b/doc/efun/set_this_object
@@ -1,60 +1,56 @@
-GESCHUETZT
SYNOPSIS
- void set_this_object(object|lwobject objekt-an-stelle-von-originalobjekt)
+ void set_this_object(object|lwobject object_to_pretend_to_be)
-BESCHREIBUNG
- Dies ist eine geschuetzte Funktion, die nur vom Master-Objekt und im
- Simul-Efun-Objekt genutzt werden darf. Bei sonstiger Benutzung
- erzeugt diese Funktion einen Fehler.
+DESCRIPTION
+ This is a privileged function, only to be used in the master
+ object or in the simul_efun object.
- Die Funktion aendert das Resultat von this_object() in der laufenden
- Funktion, ebenso das Resultat von previous_object() in Funktionen in
- anderen Objekten, die einen call_other() Aufruf machen.
+ It changes the result of this_object() in the using function,
+ and the result of previous_object() in functions called in
+ other objects by call_other()/apply()/funcall(). Its effect will
+ remain till there is a return of an external function call, or
+ another call of set_this_object(). While executing code in the
+ master object's program or the primary simul_efun object's
+ program, set_this_object() is granted even if this_object() is
+ altered by set_this_object(). This does not apply to functions
+ inherited from other programs.
- Der Effekt von set_this_object() bleibt bestehen, bis ein externer
- Funktionsaufruf abgeschlossen ist oder bis zu einem erneuten Aufruf
- von set_this_object(). Waehrend der Ausfuehrung von Code im
- Master-Objekt oder im Simul-Efun-Objekt ist set_this_object()
- garantiert, auch wenn this_object() durch set_this_object()
- veraendert wird. Die gilt nicht fuer Funktionen, die aus anderen
- Programmen geerbt werden.
+ Use it with extreme care to avoid inconsistencies. After a
+ call of set_this_object(), some LPC-constructs might behave in
+ an odd manner, or even crash the system. In particular, using
+ global variables or calling local functions (except by
+ call_other) is illegal and actively prevented.
- Diese Funktion darf nur mit hoechster Sorgfalt verwendet werden, um
- Inkonsistenzen zu vermeiden. Nach einem Aufruf von set_this_object()
- koennen sich gewisse LPC-Konstrukte merkwuerdig verhalten oder gar
- das System zum Absturz bringen. Insbesondere die Verwendung von
- globalen Variablen oder der Aufruf von lokalen Funktionen (ausser
- durch call_other()) ist unzulaessig und wird aktiv verhindert.
+ Allowed are call_other(), map functions, access of local variables
+ (which might hold array pointers to a global array), simple arithmetic
+ and the assignment operators.
- Erlaubt sind call_other(), map(), der Zugriff auf lokale Variablen
- (die auch Pointers auf globale Arrays enthalten duerfen), einfache
- Arithmetik und der Zuweisungs-Operator.
+BUGS
+ It is currently not possible to directly restore the original
+ current object. So instead of writing
-FEHLER
- Es ist momentan nicht moeglich, das originale gueltige Objekt wieder
- herzustellen. Anstelle von:
+ object me = this_object();
+ set_this_object(that);
+ <some code>
+ set_this_object(me);
+ <more code>
- object ich = this_object();
- set_this_object(dings);
- <irgendwelcher Code>
- set_this_object(ich);
- <mehr Code>
+ one has to use a workaround:
- muss das ueber einen Umweg geloest werden:
+ private void doit (object that) {
+ set_this_object(that);
+ <some code>
+ }
- private void tuwas(object dings) {
- set_this_object(dings);
- <irgendwelcher code>
- }
+ funcall(#'doit, that);
+ <more code>
- funcall(#'tuwas, dings);
- <mehr Code>
+ Some people would consider this a feature.
- Manche Leute bezeichnen das als Feature.
+HISTORY
+ LDMud 3.2.10 actively prevents references to global variables
+ and function calls by address while set_this_object() is in
+ effect.
-GESCHICHTE
- LDMud 3.2.10 verhindert aktiv die Referenz auf globale Variablen und
- Funktionsaufrufe nach Adresse, waehrend set_this_object() gilt.
-
-SIEHE AUCH
+SEE ALSO
this_object(E), set_this_player(E)
diff --git a/doc/efun/set_this_player b/doc/efun/set_this_player
index 91b4124..a83d350 100644
--- a/doc/efun/set_this_player
+++ b/doc/efun/set_this_player
@@ -1,20 +1,18 @@
-GESCHUETZT
SYNOPSIS
void set_this_player(object ob)
-BESCHREIBUNG
- Aendert den momentanen Kommandogeber zu <ob>. Dabei kann <ob> auch
- 0 sein, wenn der aktuelle Kommandogeber 'deaktiviert' werden soll.
+DESCRIPTION
+ Change the current command giver to <ob>. <ob> may be 0 if
+ you want to 'deactivate' the current command giver.
- Diese Funktion ist nicht geschuetzt und sollte deshalb von einer
- simul_efun ueberlagert werden, die die Efun entweder komplett
- abschaltet, oder mindestens gewisse Sicherheitschecks durchfuehrt.
- Es ist sonst einfach, die Sicherheit eines Muds mit Hilfe dieser
- Efun zu untergraben.
+ This efun is not privileged, therefore it should be redefined
+ by a nomask simul_efun which then either completely disables
+ the efun or at least performs some security checks.
+ It is easy to undermine a mudlibs security using this efun.
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.1.
- LDMud 3.2.6 fuehrte die 0 als moeglichen Parameter ein.
+HISTORY
+ Introduced in 3.2.1.
+ LDMud 3.2.6 added the value 0 as acceptable parameter.
-SIEHE AUCH
+SEE ALSO
set_this_object(E), this_player(E)
diff --git a/doc/efun/sgn b/doc/efun/sgn
index 938ecf6..ee1e1f4 100644
--- a/doc/efun/sgn
+++ b/doc/efun/sgn
@@ -1,8 +1,8 @@
SYNOPSIS
int sgn(int|float arg)
-BESCHREIBUNG
- Liefert das Vorzeichen des Argumentes.
+DESCRIPTION
+ Return the sign of the argument.
arg sgn(arg)
--------------
@@ -10,8 +10,8 @@
0 0
< 0 -1
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
+HISTORY
+ Introduced in LDMud 3.2.9.
-SIEHE AUCH
+SEE ALSO
abs(E)
diff --git a/doc/efun/sha1 b/doc/efun/sha1
index 4fe4f06..a8ad455 100644
--- a/doc/efun/sha1
+++ b/doc/efun/sha1
@@ -1,33 +1,34 @@
+OBSOLETE
SYNOPSIS
- string sha1(string arg [, int iterations])
- string sha1(bytes arg [, int iterations])
- string sha1(int * arg [, int iterations])
+ string sha1(string arg [, int iterations ])
+ string sha1(bytes arg [, int iterations ])
+ string sha1(int * arg [, int iterations ])
-BESCHREIBUNG
- Berechnet den SHA1-Hashwert von <arg>.
- Das Argument kann ein String, eine Bytefolge oder ein Array von
- Zahlen sein (die als Folge von Bytes betrachtet wird, wobei
- immer nur die untersten 8 Bits Verwendung finden). Falls ein String
- uebergeben wurde, so wird dieser in eine UTF-8-Bytefolge konvertiert
- und davon der Hash berechnet.
+DESCRIPTION
+ Create and return a SHA1 message digest from <arg>.
+ <arg> may be a string, a byte sequence, or an array of numbers
+ (each considered to be a byte, ignoring all but the lowest 8 bits).
+ A string is converted to a UTF-8 byte sequence of which then the
+ digest will be created.
- Ist das <iterations> Argument eine Zahl groesser 0, berechnet der
- Driver den Digest mit diese Anzahl an Wiederholungen. Fehlt die
- Angabe, fuehrt der Driver die Digest-Berechnung einmal aus.
-
- Jede Iteration kostet 5 Evalution-Ticks.
+ If <iterations> is given as a number greater than 0, it is
+ the number of iterations used in the digest calculation. If omitted,
+ the driver executes just one iteration.
-BEISPIELE
+ The efun costs 5 ticks per iteration.
+
+EXAMPLES
string s;
s = sha1("Hello");
s = sha1( ({ 'H', 'e', 'l', 'l', 'o' })
-GESCHICHTE
- Eingefuehrt in LDMud 3.3.523.
- LDMud 3.3.712 fuehrte Zaehlenarrays als Argument ein.
- LDMud 3.3.717 fuehrte die Iterations-basierte Evaluationskosten ein.
- Seit LDMud 3.3.719 abgeloest durch hash().
+HISTORY
+ Introduced in LDMud 3.3.523.
+ LDMud 3.3.712 added number arrays as argument, and the number
+ of iterations.
+ LDMud 3.3.717 added the iteration-based evaluation cost.
+ Since LDMud 3.3.719 obsoleted by hash().
-SIEHE AUCH
- crypt(E), md5(E)
+SEE ALSO
+ crypt(E), md5(E), md5_crypt(E), hash(E), hmac(E)
diff --git a/doc/efun/shadow b/doc/efun/shadow
index 16ab11e..bf8d156 100644
--- a/doc/efun/shadow
+++ b/doc/efun/shadow
@@ -1,46 +1,44 @@
SYNOPSIS
- object shadow(object obj, int flag)
+ int shadow(object ob)
-BESCHREIBUNG
- Damit wird das aktuelle Objekt dem Objekt <obj> als Shadow
- uebergeworfen. Bei Erfolg liefert es 1, sonst 0 zurueck.
+DESCRIPTION
+ The current object will become a shadow of ob. This efun
+ returns 1 on success, 0 otherwise.
- Das aufrufende Objekt muss vom Master-Objekt die Erlaubnis haben,
- als Shadow zu wirken. Normalerweise kann einem Objekt, das
- query_prevent_shadow() == 1 zurueck liefert, kein Shadow
- uebergeworfen werden. In diesem Fall liefert shadow() 0 zurueck,
- sonst das Objekt, dem der Shadow uebergeworfen wurde.
+ The calling object must be permitted by the master object to
+ do the shadowing. In most installations, an object that
+ defines the function query_prevent_shadow() to return 1
+ can't be shadowed, and the shadow() function will return 0
+ instead of ob.
- shadow() schlaeft fehl, wenn:
- - der Shadow vesucht, eine "nomask" definierte Funktion zu
- ueberlagern,
- - wenn im Praeprozessor #pragma no_shadow gesetzt ist,
- - wenn das aufrufende Objekt bereits ein Shadow ist,
- - wenn das aufrufende Objekt selbst einen Shadow uebergeworfen hat,
- - wenn das aufrufende Objekt ueber ein Environment verfuegt,
- - wenn das Zielobjekt <obj> selbst ein Shadow ist.
+ shadow() also fails if the calling object tries to shadow
+ a function that was defined as ``nomask'', if the program was
+ compiled with the #pragma no_shadow, or if the calling
+ object is already shadowing, is being shadowed, or has an
+ environment. Also the target ob must not be shadowing
+ something else.
- Wenn ein Objekt A einem Objekt B als Shadow uebergeworfen wird,
- werden alle call_other() Aufrufe fuer B an A umgeleitet. Wenn A die
- Funktion, die von call_other() aufgerufen wird, nicht definiert hat,
- wird der Aufruf an B weitergeleitet. Es gibt also nur ein Objekt,
- welches call_other() Aufrufe fuer B machen kann: das Objekt A. Nicht
- einmal das Objekt B kann einen call_other() auf sich selbst machen.
- Hingegen werden alle normalen (internen) Funktionsaufrufe innerhalb
- von B werden wie gewohnt innerhalb von B bearbeitet.
+ If an object A shadows an object B then all call_other() to B
+ will be redirected to A. If object A has not defined the
+ function, then the call will be passed to B. There is only on
+ object that can call functions in B with call_other(), and
+ that is A. Not even object B can call_other() itself. All
+ normal (internal) function calls inside B will however remain
+ internal to B.
-BEISPIELE
- Mit drei Objekten a.c, b.c und c.c:
+EXAMPLES
+ With the three objects a.c, b.c and c.c
- --- a.c ---
- void fun() {
+ --- a.c ---
+ int fun() {
debug_message(sprintf("%O [a] fun()\n", this_object()));
}
+
void fun3() {
debug_message(sprintf("%O [a] fun3()\n", this_object()));
}
- --- b.c ---
+ --- b.c ---
int fun() {
debug_message(sprintf("%O [b] fun()\n", this_object()));
find_object("a")->fun();
@@ -53,7 +51,7 @@
void do_shadow(object target) { shadow(target, 1); }
- --- c.c ---
+ --- c.c ---
int fun() {
debug_message(sprintf("%O [c] fun()\n", this_object()));
find_object("a")->fun();
@@ -63,7 +61,7 @@
}
void do_shadow(object target) { shadow(target, 1); }
- Es wird nun folgender Code aufgerufen:
+ code like the following
object a, b, c;
@@ -81,39 +79,39 @@
debug_message("--- b->fun2() ---\n");
b->fun2();
- Das ergibt diesen Output:
+ produces this output:
- --- a->fun() ---
+ --- a->fun() ---
/c [c] fun()
/b [b] fun()
/a [a] fun()
- --- b->fun() ---
+ --- b->fun() ---
/c [c] fun()
/b [b] fun()
/a [a] fun()
- --- c->fun() ---
+ --- c->fun() ---
/c [c] fun()
/b [b] fun()
/a [a] fun()
- --- b->fun2() ---
+ --- b->fun2() ---
/b [b] fun2()
/a [a] fun3()
/c [c] fun3()
- Merke: der erste Aufruf in b::fun2() findet zuerst c::fun3()!
- Der Grund ist, dass fuer Aufrufe aus b fuer a der Treiber
- annimmt, dass alle Shadows vor c schon ihre Chance hatten. Der
- zweite Aufruf hingegen ergeht an b selbst, das der Treiber als
- vom Shadow c ueberlagert erkennt.
+ Note that the first call in b::fun2() find c::fun3()! Reason is that
+ for calls originating from b to a the driver assumes that all
+ shadows beyond c already had their chance. The second call however
+ was to b itself, which the gamedriver recognized as being shadowed
+ by c.
-GESCHICHTE
- Bis 3.2.1@46 fuehrte die Zerstoerung eines Objekts, dem ein Shadow
- uebergeworfen war, auch zur Zerstoerung aller seiner Shadows.
- Seit 3.2.1@47 ueberleben Shadows die Zerstoerung des Objektes, dem
- sie uebergeworfen sind (ausser, die wird von prepare_destruct()
- manuell erledigt).
- Seit LDMud 3.2.8 koenne sich Objekte dank #pragma no_shadow gezielt
- davor schuetzen, einen Shadow uebergeworfen zu bekommen.
+HISTORY
+ Up to 3.2.1@46, destructing a shadowed object also destructs
+ all shadows. Since 3.2.1@47, shadows may survive the
+ destruction of the shadowee (unless the prepare_destruct() in
+ the master object destructs them manually).
-SIEHE AUCH
+ Since LDMud 3.2.8, programs may protect themselves from being
+ shadowed with the #pragma no_shadow.
+
+SEE ALSO
query_shadowing(E), unshadow(E), query_allow_shadow(M)
diff --git a/doc/efun/shutdown b/doc/efun/shutdown
index 03e7ec5..ecd3ae9 100644
--- a/doc/efun/shutdown
+++ b/doc/efun/shutdown
@@ -2,22 +2,20 @@
void shutdown()
void shutdown(int exit_code)
-BESCHREIBUNG
- Faehrt das Mud herunter. Diese Funktion darf nie verwendet werden!
- Wenn das Mud heruntergefahren werden muss, so hat dies ueber den
- Shutdownbefehl zu erfolgen.
+DESCRIPTION
+ Shutdown the mud, setting the process result code to
+ <exit_code>, or 0 if not given.
- Ist ein <exit_code> Argument gegeben, wird sein Wert als der
- Unix-Resultatwert verwendet; andernfalls wird 0 verwendet.
+ Never use this efun. Instead if you have a need to shutdown
+ the mud use the shutdown command. You may be asking yourself,
+ if you're not supposed to use it why is it here? Sorry, I
+ cannot answer that. Its top secret.
- Man fragt sich nun vielleicht, wozu es dann diese Funktion gibt,
- wenn man sie nicht verwenden darf. Sorry, das darf hier nicht
- bekannt gegeben werden. Streng geheim.
+ The efun causes a privilege violation.
- Diese efun ist privilegiert.
+HISTORY
+ LDMud 3.2.11 introduced the exit code.
+ LDMud 3.5.0 made the efun privileged.
-GESCHICHTE
- LDMud 3.2.11 fuehrte das 'exit_code' Argument ein.
- LDMud 3.5.0 machte die efun privilegiert.
-SIEHE AUCH
+SEE ALSO
break_point(E), swap(E), privilege_violation(M)
diff --git a/doc/efun/sin b/doc/efun/sin
index cf8f981..38a70b8 100644
--- a/doc/efun/sin
+++ b/doc/efun/sin
@@ -1,11 +1,11 @@
SYNOPSIS
float sin(int|float)
-BESCHREIBUNG
- Liefert den Sinus des Argumentes.
+DESCRIPTION
+ Returns the sinus of the argument.
-GESCHICHTE
- LDMud 3.2.9: Ganzzahlen (Integers) als Argument hinzugefuegt.
+HISTORY
+ LDMud 3.2.9 added integers as arguments.
-SIEHE AUCH
+SEE ALSO
asin(E), cos(E), acos(E), tan(E), atan(E), atan2(E)
diff --git a/doc/efun/sizeof b/doc/efun/sizeof
index 247d834..9df18d8 100644
--- a/doc/efun/sizeof
+++ b/doc/efun/sizeof
@@ -5,25 +5,24 @@
int sizeof(mapping val)
int sizeof(struct xxx val)
-BESCHREIBUNG
- Liefert die Anzahl Elemente in einem Array <val>, die Anzahl
- Zeichen in einem String <val>, die Anzahl an Bytes in der
- Bytefolge <val> oder die Anzal Keys in einem Mapping <val>.
+DESCRIPTION
+ Returns the number of elements of an array or struct, the number of
+ characters in a string, number of bytes in a byte sequence, or the
+ number of keys in a mapping.
- Als Spezialfall kann <val> auch 0 sein. In diesem Fall liefert die
- Funktion 0 zurueck.
+ As a special case, the number 0 can be passed, and the function
+ will return 0.
- Falls im Spiel Objekte zerstoert wurde, seit das Mapping zuletzt auf
- zerstoerte Keys geprueft wurde, muss es zuerst auf zerstoerte Objekte
- in Keys geprueft werden. In diesem Fall steigt die Laufzeit mit der
- Anzahl der Keys im Mapping (O(n)).
- Anderenfalls ist die Laufzeit unabhaengig der Anzahl der Schluessel
- (O(1)).
+ If there were any objects destroyed in the game since the mapping was
+ last checked for destructed keys, the mapping() needs to be checked
+ for destructed objects in keys first. In that case, the runtime
+ increases linear with the number of keys in the mapping (O(n)).
+ Otherwise the runtime is independent of the mappings size (O(1)).
-GESCHICHTE
- LDMud 3.2.9 fuehrte Strings als moegliche Argumente ein.
- LDMud 3.3 fuehrte Structs als moegliche Argumente ein.
+HISTORY
+ LDMud 3.2.9 added strings to the possible parameters.
+ LDMud 3.3 added support for structs.
-SIEHE AUCH
+SEE ALSO
strlen(E), allocate(E), pointerp(E), mappingp(E), m_allocate(E),
- widthof(E)
+ widthof(E), text_width(E)
diff --git a/doc/efun/sl_close b/doc/efun/sl_close
index 753948d..984efc9 100644
--- a/doc/efun/sl_close
+++ b/doc/efun/sl_close
@@ -2,16 +2,15 @@
SYNOPSIS
void sl_close()
-BESCHREIBUNG
- Schliesst die SQLite-Datenbank, welche vom aktuellen Objekt
- geoeffnet wurde.
+DESCRIPTION
+ Closes the SQLite database that is associated with the
+ current object.
- Diese Funktion ist nur verfuegbar, wenn der Driver mit SQLite-
- Unterstuetzung compiliert wurde. In diesem Fall ist das Makro
- __SQLITE__ definiert.
+ The function is available only if the driver is compiled with
+ SQLite support. In that case, __SQLITE__ is defined.
-GESCHICHTE
- Eingefuehrt in LDMud 3.3.713.
+HISTORY
+ Added in LDMud 3.3.713.
-SIEHE AUCH
+SEE ALSO
sl_open(E), sl_exec(E), sl_insert_id(E)
diff --git a/doc/efun/sl_exec b/doc/efun/sl_exec
index 406c741..28f5c41 100644
--- a/doc/efun/sl_exec
+++ b/doc/efun/sl_exec
@@ -2,28 +2,27 @@
SYNOPSIS
mixed * sl_exec(string statement, ...)
-BESCHREIBUNG
- Fuehrt den SQL-Befehl <statement> in der aktuell geoeffneten
- SQLite-Datenbank aus. Dieser SQL-Befehl kann Wildcards wie '?'
- nd '?nnn', wobei 'nnn' eine Zahl ist, enthalten. Diese Wildcards
- koennen als weitere Parameter an sl_exec uebergeben werden.
- Mit '?nnn' kann direkt die Nummer eines bestimmten Parameters
- angegeben werden, der erste Parameter hat die Nummer 1.
+DESCRIPTION
+ Executes the SQL statement <statement> for the current
+ SQLite database. The SQL statement may contain wildcards like
+ '?' and '?nnn', where 'nnn' is an integer. These wildcards
+ can be given as further parameters to sl_exec. With '?nnn'
+ the number of a specific parameter can be given, the first
+ parameter has number 1.
- Falls der SQL-Befehl Daten zurueckliefert, liefert sl_exec ein
- Array aus den einzelnen Zeilen (welche wieder Arrays der einzelnen
- Felder sind) zurueck.
+ If the statement returns data, sl_exec returns an array
+ with each row (which is itself an array of columns) as
+ an element.
- Pragma-Befehle erzeugen eine privilege_violation ("sqlite_pragma",
- ob, name, wert). Wird das Privileg verneint, wird ein Fehler
- ausgeloest.
+ Pragma statements raise a privilege_violation ("sqlite_pragma",
+ ob, name, value). If the privilege is denied, an error is
+ thrown.
- Diese Funktion ist nur verfuegbar, wenn der Driver mit SQLite-
- Unterstuetzung compiliert wurde. In diesem Fall ist das Makro
- __SQLITE__ definiert.
+ The function is available only if the driver is compiled with
+ SQLite support. In that case, __SQLITE__ is defined.
-GESCHICHTE
- Eingefuehrt in LDMud 3.3.713.
+HISTORY
+ Added in LDMud 3.3.713.
-SIEHE AUCH
+SEE ALSO
sl_open(E), sl_insert_id(E), sl_close(E)
diff --git a/doc/efun/sl_insert_id b/doc/efun/sl_insert_id
index a425cef..49c1fb8 100644
--- a/doc/efun/sl_insert_id
+++ b/doc/efun/sl_insert_id
@@ -2,17 +2,16 @@
SYNOPSIS
int sl_insert_id()
-BESCHREIBUNG
- Nachdem eine Zeile in eine Tabelle mit einer AUTO_INCREMENT-Spalte
- eingefuegt wurde, kann man mit dieser Funktion den (neuen) Wert
- dieses AUTO_INCREMENT-Feldes der eingefuegten Zeile abfragen.
+DESCRIPTION
+ After inserting a line into a table with an AUTO_INCREMENT field,
+ this efun can be used to return the (new) value of the AUTO_INCREMENT
+ field.
- Diese Funktion ist nur verfuegbar, wenn der Driver mit SQLite-
- Unterstuetzung compiliert wurde. In diesem Fall ist das Makro
- __SQLITE__ definiert.
+ The function is available only if the driver is compiled with
+ SQLite support. In that case, __SQLITE__ is defined.
-GESCHICHTE
- Eingefuehrt in LDMud 3.3.713.
+HISTORY
+ Added in LDMud 3.3.713.
-SIEHE AUCH
+SEE ALSO
sl_open(E), sl_exec(E), sl_close(E)
diff --git a/doc/efun/sl_open b/doc/efun/sl_open
index b54685d..5fd01bf 100644
--- a/doc/efun/sl_open
+++ b/doc/efun/sl_open
@@ -2,19 +2,17 @@
SYNOPSIS
int sl_open(string filename)
-BESCHREIBUNG
- Oeffnet die Datei <filename> als SQLite-Datenbank. Falls
- sie noch nicht existiert, wird sie erstellt. Es ist nur
- eine geoeffnete Datenbank pro Objekt erlaubt. Im Erfolgsfalle
- liefert diese Funktion 1 zurueck, anderenfalls wird
- normalerweise ein Fehler ausgeloest.
+DESCRIPTION
+ Opens the file <filename> for use as a SQLite database.
+ If the file doesn't exists it will be created.
+ Only one open file per object is allowed. On success this
+ function returns 1, otherwise usually an error is thrown.
- Diese Funktion ist nur verfuegbar, wenn der Driver mit SQLite-
- Unterstuetzung compiliert wurde. In diesem Fall ist das Makro
- __SQLITE__ definiert.
+ The function is available only if the driver is compiled with
+ SQLite support. In that case, __SQLITE__ is defined.
-GESCHICHTE
- Eingefuehrt in LDMud 3.3.713.
+HISTORY
+ Added in LDMud 3.3.713.
-SIEHE AUCH
+SEE ALSO
sl_exec(E), sl_insert_id(E), sl_close(E)
diff --git a/doc/efun/snoop b/doc/efun/snoop
index bda2cd5..7428ca2 100644
--- a/doc/efun/snoop
+++ b/doc/efun/snoop
@@ -1,22 +1,25 @@
-GESCHUETZT
SYNOPSIS
- int snoop(object snooper)
- int snoop(object snooper, object snoopee)
+ object snoop(object snooper)
+ object snoop(object snooper, object snoopee)
-BESCHREIBUNG
- Beginnt die Beobachtung des Objekts <snoopee> durch <snooper>. Wenn
- <snoopee> nicht angegeben wird, werden alle Beobachtungen von
- <snooper> beendet.
+DESCRIPTION
+ Starts a snoop from 'snooper' on 'snoopee', or if 'snoopee' is not
+ given, terminates any snoop from 'snooper'.
- Die Funktion liefert 1 bei Erfolg, -1 wenn eine Schleife entstehen
- wuerde und 0 fuer alle anderen Fehler.
+ Return <snoopee> on success, or 0 for a failure (including snooping
+ loops).
- Die Beobachtung wird mit dem Master-Objekt auf Gueltigkeit geprueft.
- Es wird auch ein Fehler verursacht, wenn eine Beobachtung zu einer
- Rekursion fuehren wuerde.
+ The snoop is checked with the master object for validity. It
+ will also fail if a snoop would result in a recursive snoop
+ action.
-ANMERKUNGEN
- Diese Funktion ist geschuetzt.
+ <snooper> can be an interactive player, or an object. If it is
+ an interactive player, the snooped text is prepended with a
+ '%' and send directly to the players connection. If <snooper>
+ is an object, the snooped text is sent in two calls to the
+ object's catch_tell() lfun: the first call passes just the
+ "%" (plus the prompt if the object changed it), the second the
+ actual text.
-SIEHE AUCH
- query_snoop(E)
+SEE ALSO
+ query_snoop(E), catch_tell(A)
diff --git a/doc/efun/sort_array b/doc/efun/sort_array
index 3316a0c..65c861e 100644
--- a/doc/efun/sort_array
+++ b/doc/efun/sort_array
@@ -1,74 +1,71 @@
SYNOPSIS
mixed * sort_array(mixed *arr, string wrong_order)
mixed * sort_array(mixed *arr, string wrong_order, object|string ob)
- mixed * sort_array(mixed *arr, string wrong_order, object|string ob,
- mixed extra...)
+ mixed * sort_array(mixed *arr, string wrong_order, object|string ob
+ , mixed extra...)
mixed * sort_array(mixed *arr, closure cl)
mixed * sort_array(mixed *arr, closure cl, mixed extra...)
-BESCHREIBUNG
- Sortiert das Array <arr> entweder nach der Ordnungsfunktion
- <ob->wrong_order(a, b)> oder nach der Closure cl.
+DESCRIPTION
+ Sort the copy either by the ordering function ob->wrong_order(a, b),
+ or by the closure expression <cl>.
- Normalerweise wird zuerst eine flache Kopie des Arrays <arr> erstellt
- und die sortierte Kopie als Ergebnis zurueckgeliefert. Wird <arr>
- jedoch als Referenz uebergeben, wird keine implizite Kopie erstellt
- und das Originalarray sortiert.
+ Usually a shallow copy of <arr> is made first and the sorted copy is
+ returned as result. However, if <arr> is given as a reference, no copy
+ will be made and <arr> will be sorted in-place.
- Wenn das Argument <arr> 0 ist, ist das Resultat der Funktion auch 0.
+ If the <arr> argument equals 0, the result is also 0.
- <ob> ist das Objekt, in dem die Ordnungsfunktion <wrong_order()>
- aufgerufen wird. <ob> kann das Objekt als solches enthalten, oder
- einen String mit dem Objektnamen. Wird <ob> nicht angegeben, oder
- enthaelt es weder einen String noch ein Objekt, wird stattdessen
- this_object() verwendet.
+ <ob> is the object in which the ordering function is called
+ and may be given as object or by its filename. If <ob> is omitted
+ or neither a string nor an object, it defaults to this_object().
- Die Elemente von <arr> werden paarweise an die Ordnungsfunktion
- <wrong_order()> als Argumente uebergeben, gefolgt von den <extra>
- Argumenten, falls vorhanden. Die Ordnungsfunktion <wrong_order> sollte
- eine positve Zahl liefern, wenn die paarweisen Elemente in der
- falschen Reihenfolge waren, 0 oder eine negative Zahl sonst.
+ The elements from the array to be sorted are passed in pairs to
+ the function <wrong_order> as arguments, followed by the <extra>
+ arguments if any.
-BEISPIELE
- Um folgendes Array in aufsteigender Reihenfolge zu ordnen:
+ The function should return a positive number if the elements
+ are in the wrong order. It should return 0 or a negative
+ number if the elements are in the correct order.
- arr = ({ 3, 8, 1, 3 })
+EXAMPLES
+ To sort an array
- wird als Ordnungsfunktion ist_groesser() verwendet:
+ arr = ({ 3, 8, 1, 3 })
- int ist_groesser(int a, int b) {
- return a > b;
- }
+ in ascending order with the help of the ordering function
- Folgende Aufrufe von sort_array() sind alle aequivalent:
+ int is_greater (int a, int b) {
+ return a > b;
+ }
- arr = sort_array(arr, "ist_groesser", this_object())
- arr = sort_array(arr, "ist_groesser")
- arr = sort_array(arr, #'ist_groesser)
- arr = sort_array(arr, #'>) //dies ist die bevorzugte Variante :-)
- arr = sort_array(arr, lambda(({'a, 'b}), ({#'>, 'a, 'b})))
+ the following uses of sort_array() are equivalent:
- Soll direkt das Original <arr> statt einer impliziten Kopie sortiert
- werden:
+ arr = sort_array(arr, "is_greater", this_object())
+ arr = sort_array(arr, "is_greater")
+ arr = sort_array(arr, #'is_greater)
+ arr = sort_array(arr, #'>) (this is the preferred variant :-)
+ arr = sort_array(arr, lambda(({'a, 'b}), ({#'>, 'a, 'b})))
- sort_array(&arr, #'>)
+ If no implicit shallow copy of <arr> should be made, pass <arr> as
+ reference:
- Etwas komplizierter ist es, folgendes Array aufsteigend nach dem
- zweiten Argument jedes Teilarrays zu ordnen:
+ sort_array(&arr, #'>)
- arr = ({ ({ "foo", 3 }), ({ "quux", 1 }), ... })
+ A more complicated example is to sort the array
- Dafuer muss die Ordnungsfunktion folgende Form annehmen:
+ arr = ({ ({ "foo", 3 }), ({ "quux", 1 }), ... })
- int ist_groesser(mixed *a, mixed *b) {
- return a[1] > b[1];
- }
+ in ascending order by the second element of each subarray.
+ For this, the ordering function should be like
-GESCHICHTE
- LDMud 3.2.8 fuehrte die Moeglichkeit ein, zusaetzliche Argumente
- <extra> zu uebergeben.
- LDMud 3.3.720 unterstuetzt die Uebergabe von <arr> als Referenz und
- sortiert das Original statt einer impliziten flachen Kopie.
+ int is_greater (mixed *a, mixed *b) {
+ return a[1] > b[1];
+ }
-SIEHE AUCH
+HISTORY
+ LDMud 3.2.8 added the support of extra arguments.
+ LDMud 3.3.720 added the support of references to sort in-place.
+
+SEE ALSO
transpose_array(E), filter(E), map(E), alists(LPC)
diff --git a/doc/efun/sprintf b/doc/efun/sprintf
index 41a7c0e..cd74317 100644
--- a/doc/efun/sprintf
+++ b/doc/efun/sprintf
@@ -1,147 +1,191 @@
SYNOPSIS
string sprintf(string fmt, ...)
-BESCHREIBUNG
- Mit dieser Funktion kann man auf einfache Weise aus dem Inhalt
- von Variablen einen String bauen; und dies effektiver als
- mit der ueblichen "Du hast "+anzahl+" Punkt(e)"-Methode.
+DESCRIPTION
+ Most of the characters in the format string (FMT) get passed
+ straight through to the output (ie: printed or put in the
+ return string), to format the arguments into the string it is
+ necessary to include an argument format string (AFS) in the
+ FMT. An AFS is a series of characters starting with a percent
+ sign "%" and terminated with a argument type specifier.
+ To include a "%" sign in the output, it is necessary to include a
+ double percent sign "%%". The sequence "%^" will output "%^" again.
- Die Funktion bekommt als erstes Argument einen Formatstring fmt,
- der Informationen darueber enthaelt, wie die weiteren beliebigen
- Argumente in den Ergebnisstring eingebaut werden sollen.
- Die meisten Zeichen gelangen vom Formatstring unveraendert in
- den Ausgabestring. Die Regeln zum Einbau eines Arguments werden
- immer mit '%' eingeleitet. Moechte man ein '%' in die Ausgabe
- bringen, so muss man im Formatstring "%%" verwenden.
+ Valid argument type specifiers are:
+ "s" : the argument is a string.
+ "d" : the argument is an integer to be included in decimal
+ representation.
+ "i" : same as "d".
+ "b" : the argument is an integer to be included in binary
+ representation.
+ "o" : the argument is an integer to be included in octal
+ representation.
+ "x" : the argument is an integer to be included in hexadecimal
+ representation.
+ "X" : as "x" except letters are capitalised.
+ "e","E","f","g","G" : the argument is a float to be included in
+ decimal representation; see examples for details
+ "c" : the argument is an int to included as a character
+ "O" : the argument is an LPC datatype to be printed in an arbituary
+ format, this is for debugging purposes.
+ If the argument is an object then the function
+ printf_obj_name() on the master object is called with the
+ object as a parameter, the string returned is included in
+ brackets at the end of object file name.
+ If 0 is returned then nothing is appended after the file name.
+ "Q" Like "O", except that special characters in strings are
+ printed in LPC notation.
- Ein einfaches Beispiel ist erg=sprintf("%s %d", str, i);
- '%' leitet einen Argumentformatstring (AFS) ein. Das 's' schliesst
- ihn ab und besagt, dass ein String eingebaut werden soll. Das
- folgende Leerzeichen wird unveraendert uebernommen. '%' leitet
- wieder einen neuen Formatstring ein, wobei 'd' eine Ganzzahl
- bezeichnet (eine Variable von Typ int).
- Dies ist ein allerdings nur ein sehr einfaches Beispiel.
+ Between the percent sign and the argument type specifier in
+ the AFS, the following modifiers can be included to specify
+ the formatting information. Order is not important unless
+ otherwise specified. "n" is used to specify a integer, which
+ can be a "*" in which case the next argument is used as the
+ number.
- Jeder Argumentformatstring kennzeichnet also, auf welche Art
- ein Argument in das Ergebnis eingebaut werden soll. Der erste
- AFS ist fuer das zweite Argument der Funktion, der zweite AFS
- fuer das dritte Argument u.s.w. (das erste Argument der Funktion
- ist ja der Formatstring selbst).
+ Modifiers:
+ n specifies the field size. If the size is prepended with
+ a 0, the argument is printed with leading zeroes.
+ "."n specifies the precision, for simple (not columns or tables)
+ strings specifies the truncation length.
+ ":"n n specifies both the field size _and_ the presision, if n is
+ prepended by a zero then the pad string is set to "0".
+ "'X'" the pad string is set to the char(s) between the single
+ quotes, if the field size is also prepended with a zero then
+ which ever is specified last will overrule.
+ NOTE: to include "'" in the pad string, you must use "\\'"
+ (as the backslash has to be escaped past the interpreter),
+ similarly, to include "\" requires "\\\\".
+ " " pad positive integers with a space.
+ "+" pad positive integers with a plus sign.
+ "-" left aligned within field size.
+ NB: std (s)printf() defaults to right alignment, which is
+ unnatural in the context of a mainly string based language
+ but has been retained for "compatibility" ;)
+ "|" centered within field size.
+ "$" justified to field size. Ignored unless the type specifier
+ is 's'.
+ "=" column mode. Ignored unless the argument type specifier is 's'.
+ Field size must be specified, if precision is specified then
+ it specifies the width for the string to be wordwrapped in, if
+ not then the field size is. The field size specifies the width
+ of the column and has the effect that the last line of the
+ column is padded with spaces to achieve this length.
+ "#" For strings: table mode.
+ Field size must be specified, if precision is
+ specified then it specifies the number of columns in
+ the table, otherwise the number is "optimally"
+ generated (as few lines and columns as possible).
+ Table mode is passed a list of backslash-n separated
+ 'words' which are put in a format similar to that of
+ ls.
+ For %O/%Q: compact output.
+ "@" the argument is an array. the corresponding AFS (minus all
+ "@") is applied to each element of the array.
- Jeder AFS beginnt mit einem '%' und endet mit einem der
- folgenden Zeichen (Argumenttyp-Kennzeichner):
- Zeichen Argumenttyp Bemerkung
- 's' string
- 'c' integer als ASCII-Zeichen
- 'd' 'i' integer Dezimalschreibweise
- 'o' integer Oktalschreibweise
- 'b' 'B' integer Binaerschreibweise
- 'x' 'X' integer Hexadezimalschreibweise
- 'e' 'E' float Exponentialschreibweise
- 'f' 'F' float Gleitkommadarstellung
- 'g' 'G' float Gleitkommadarstellung
- 'O' mixed Gibt fuer Debugging alles irgendwie
- lesbar aus, auch Arrays und Mappings
- 'Q' mixed Wie 'O', gibt jedoch Sonderzeichen in
- Strings in der LPC-Notation aus
-
- Zwischen dem '%' und dem Argumenttyp-Kennzeichner kann man
- noch mehrere Modifikatoren setzen, die das Verhalten
- beeinflussen.
- Hier eine Uebersicht. n steht hier fuer eine Ganzzahl, also
- zum Beispiel "12".
- Modifikator Bedeutung
- n Minimale Stringlaenge, die fuer dieses Argument
- verwendet werden soll. Fehlende Zeichen werden mit
- einem Fuellzeichen aufgefuellt. Beginnt n mit einer
- '0' (etwa "08") so ist das Fuellzeichen '0' sonst
- ist es per Default ' '. (sogenannte 'Feldbreite')
- .n Bei Ganzzahlen die Maxanzahl der Stellen, bei Gleit-
- kommazahlen die Maximalzahl der Nachkommastellen.
- Bei (einfachen) Strings die Maximallaenge.
- :n Ist dasselbe wie n.n - setzt also beide Werte auf
- dieselbe Zahl.
- 'X' Als Fuellzeichen wird X genutzt. X koennen dabei
- auch mehrere Zeichen sein, etwa fuehrt '-=' zu
- Fuellungen der Art "-=-=-=-=". Um mit Hochkommas
- zu fuellen ist '\\'' anzugeben. Rueckwaerts-
- schraegstrich entsprechend mit '\\\\'.
- <Space> Vor positive Zahlen wird ein Leerzeichen gefuegt.
- + Vor positive Zahlen wird ein '+' gefuegt.
- - Der Wert wird linksbuendig in das fuer dieses Argument
- vorgesehene Feld eingefuegt (Standard ist rechts-
- buendig). Bei Strings wird meistens diese Ausrichtung
- die sinnvollste sein.
- | Der Wert wird zentriert in das Feld eingefuegt.
- (Siehe Modifikator n, Feldbreite)
- $ Blocksatz. Benoetigt eine Feldbreite, funktioniert nur
- bei Strings (auch im Spaltenmodus).
- = Spaltenmodus (siehe unten).
- # Fuer Strings: Tabellenmodus (siehe unten).
- Fuer '%O'/'%Q': kompakte Ausgabe.
- @ Arraymodus (siehe unten).
- * Ein Stern kann immer dort eingesetzt werden, wo
- hier weiter oben ein n fuer eine Ganzzahl steht.
- Der Wert der Zahl muss dann als weiterer Parameter
- an die Funktion uebergeben werden.
+ When the formatting of an element results in several output lines
+ (column or table mode) and no explicit pad strings has been
+ defined, then the efun removes any padding whitespace before
+ the newlines of all but the last line. However, if an explicit
+ pad string has been given, even if it is the simple ' ', then
+ the padding will not be removed.
-BEISPIELE
- Mit den bis jetzt erwaehnten Moeglichkeiten kann man zB machen:
- sprintf("%d (dec) == %o (octal) == %x (hex)", 20, 20, 20);
- => "20 (dec) == 24 (octal) == 14 (hex)"
+EXAMPLES
+ sprintf("decimal=%d, octal=%o, hexadecimal=%x\n", 7, 7, 7);
- sprintf("Du drehst den Knopf um %.3f Umdrehungen", 12.3456);
- => "Du drehst den Knopf um 12.345 Umdrehungen"
+ sprintf("array=%O\n", ({1, 2, 3}));
+ this will return the following:
+ ({ /* sizeof() == 3 */
+ 1,
+ 2,
+ 3
+ })
+ An array will be printed recursively and each element of the
+ array will be indented. Can also be used as a debugging tool.
- sprintf("Du liest %|'*':9s", "Fiona");
- => "Du liest **Fiona**"
+ sprintf("%-*#s\n", 80, implode(get_dir("~/."), "\n"));
- sprintf("Auf dem Zettelstueck steht: %-.*s...", 7, "Hallo Du da");
- => "Auf dem Zettelstueck steht: Hallo D...
+ sprintf("foo") // returns "foo"
-ERWEITERTE MODI
- Mit dem Modifikatoren = # und @ stehen maechtige Werkzeuge zur
- Verfuegung. Mit ein wenig Ueberlegung kann man sich oft viele
- Zeilen Code ersparen.
- Arraymodus (@):
- sprintf("%@s", arr_of_string);
- Der Argumentformatstring (allerdings ohne das @) wird sooft
- hintereinandergereiht, wieviele Elemente das Array hat.
- Jeder AFS wird dann fuer ein Element des Arrays benutzt.
- sprintf("%@s", ({"aaa","bbb"})) ist somit dasselbe wie
- sprintf("%s%s", "aaa", "bbb"). Allerdings passt es sich
- immer an die Elementzahl der uebergebenden Arrays an.
- Dies ist nuetzlich um Ergebnisse von map() oder aehnlich
- auszugeben.
- sprintf("%@s", map_objects(all_inventory(), "short"));
- Der Argumenttyp-Kennzeichner muss hierbei immer dem Typen
- eines Elementes des Arrays entsprechen.
- Spaltenmodus (=):
- Diese Funktion bricht Text um. Die Feldbreite muss angegeben
- werden. Wird neben der Feldbreite auch eine maximale String-
- laenge angegeben, so wird die letztere fuer die Breite des
- Umbrechens verwendet, die Feldbreite wird mit Fuellzeichen
- aufgefuellt.
- sprintf("%=-20s", str); bricht den String str 'wordwrap'end
- auf 20 Zeichen Laenge um. sprintf("%=-*s", len, str);
- ist schon eine einfache break_string() Variante.
- Tabellenmodus (#):
- Diese Funktion gibt Strings tabellenartig aus. Die Teilstrings
- muessen mit \n getrennt als ein String als Argument uebergeben
- werden. Die Feldbreite muss angegeben werden und bezeichnet
- die (maximale) Gesamtbreite der Tabelle.
- Die Anzahl der Spalten der Tabelle wird moeglichst optimal
- bestimmt, und ist fuer alle Spalten gleich. Wird ein
- Wert als 'Praezision' angegeben, so ist dies die Anzahl von
- Spalten, die verwendet werden soll.
- sprintf("%#30.4s", str) erzeugt eine Tabelle, die maximal
- 30 Zeichen breit ist und 4 Spalten enthaelt.
- sprintf("%#30s", str) legt die Spaltenzahl dynamisch anhand
- der Einzelstringlaengen fest, so dass der laengste String
- noch genau in die Tabelle passt.
- Wenn string* worte die in die Tabelle einzubettenden Worte
- enthaelt, so muss str=implode(worte,"\n") sein.
+ sprintf("%s","foo") // returns "foo"
+ sprintf("%7s","foo") // returns " foo"
+ sprintf("%-7s","foo") // returns "foo "
+ sprintf("%|7s","foo") // returns " foo "
+ sprintf("%7'.'s","foo") // returns "....foo"
+ sprintf("%-7'+-'s","foo") // returns "foo+-+-"
+ sprintf("%|9'-+'s","foo") // returns "-+-foo-+-"
+ sprintf("%3s","foobarbloh") // returns "foobarbloh"
+ sprintf("%3.6s","foobarbloh") // returns "foobar"
+ sprintf("%6.3s","foobarbloh") // returns " foo"
+ sprintf("%:6s","foobarbloh") // returns "foobar"
+ sprintf("%:3s","foobarbloh") // returns "foo"
+ sprintf("%*.*s",-7,2,"foobarbloh") // returns "fo "
-SIEHE AUCH
- printf(E)
+ sprintf("%=12s","this is a very long sentence\n")
+ // returns " this is a\n"
+ // " very long\n"
+ // " sentence\n"
+ sprintf("%=-12s","this is a very long sentence\n")
+ // returns "this is a\n"
+ // "very long\n"
+ // "sentence\n"
+ sprintf("%=|12s","this is a very long sentence\n")
+ // returns " this is a\n"
+ // " very long\n"
+ // " sentence\n"
+ sprintf("%=10.6s","this is a very long sentence\n")
+ // returns " this\n"
+ // " is a\n"
+ // " very\n"
+ // " long\n"
+ // " senten\n"
+ // " ce\n"
+ sprintf("%#-40.3s\n",
+ "one\ntwo\nthree\nfour\nfive\nsix\nseven\neight\nnine\nten\n")
+ // returns "one five nine\n"
+ // "two six ten\n"
+ // "three seven \n"
+ // "four eight \n"
+ sprintf("%#-40s\n",
+ "one\ntwo\nthree\nfour\nfive\nsix\nseven\neight\nnine\nten\n")
+ // returns "one three five seven nine\n"
+ // "two four six eight ten\n"
+
+ sprintf("%@-5s",({"foo","bar","bloh"})) // returns "foo bar bloh "
+
+ sprintf("%d",123) // returns "123"
+ sprintf("%7d",123) // returns " 123"
+ sprintf("%-7d",123) // returns "123 "
+ sprintf("%d/%d",123,-123) // returns "123/-123"
+ sprintf("% d/% d",123,-123) // returns " 123/-123"
+ sprintf("%+d/%+d",123,-123) // returns "+123/-123"
+ sprintf("%+5d/%5d",123,123) // returns " +123/ 123"
+ sprintf("%|6d",123) // returns " 123 "
+ sprintf("%|10d",123) // returns " 123 "
+ sprintf("%|10d%3s",123,"foo") // returns " 123 foo"
+
+ sprintf("%o",16) // returns "20"
+ sprintf("%'0'3o",8) // returns "010"
+
+ sprintf("%x",123) // returns "7b"
+ sprintf("%X",123) // returns "7B"
+
+ sprintf("%f",123.5) // returns "124"
+ sprintf("%8.3f",123.5) // returns " 123.500"
+ sprintf("%E",123.5) // returns "1E+02"
+ sprintf("%12.4e",123.5) // returns " 1.2350e+02"
+ sprintf("%g",123.5) // returns "1e+02"
+ sprintf("%8.3G",123.5) // returns " 124"
+ sprintf("%8.6g",123.5) // returns " 123.5"
+
+HISTORY
+ LDMud 3.2.9 added the "%^" sequence for compatibility with
+ terminal_colour(), added the "%Q" sequence, clarified the meaning of
+ leading 0s in the field size modifier, clarified the interaction
+ between the padding and newlines, and added the '$' formatter for
+ justified printing of strings.
+ LDMud 3.2.10 added modifier '#' for '%O'/'%Q' and the datatype '%b'.
+
+SEE ALSO
+ printf(E), terminal_colour(E)
diff --git a/doc/efun/sqrt b/doc/efun/sqrt
index d1bccdd..83d5c67 100644
--- a/doc/efun/sqrt
+++ b/doc/efun/sqrt
@@ -1,9 +1,8 @@
SYNOPSIS
- float sqrt(int value)
- float sqrt(floag value)
+ float sqrt(int|float)
-BESCHREIBUNG
- Liefert die Quadratwurzel von <value>.
+DESCRIPTION
+ Returns the square root of the argument.
-GESCHICHTE
- LDMud 3.2.9 fuehrte integer als moegliche Argumente ein.
+HISTORY
+ LDMud 3.2.9 added integers as arguments.
diff --git a/doc/efun/sscanf b/doc/efun/sscanf
index 4344d0e..da96bfe 100644
--- a/doc/efun/sscanf
+++ b/doc/efun/sscanf
@@ -1,81 +1,78 @@
SYNOPSIS
int sscanf(string str, string fmt, mixed var1, mixed var2, ...)
-BESCHREIBUNG
- Wertet einen String <str> unter Beruecksichtigung des Formats
- <fmt>. <fmt> kann Strings beinhalten, die durch %d und %s getrennt
- werden. Jedes %d und %s entspricht einer der Variablen <var1>,
- <var2> etc.
+DESCRIPTION
+ Parse a string str using the format fmt. fmt can contain
+ strings seperated by %d and %s. Every %d and %s corresponds to
+ one of var1, var2, ... .
- Die Operatoren im Format-String <fmt> haben eines der folgenden
- Formate:
+ The match operators in the format string have one of these
+ formats:
+ %[+][!|~][<size>[.<minmatch>]]<type>
- %[+][!|~][<size>[.<minmatch>]]<type>
+ <type> may be:
+ d: matches any number.
+ D: matches any number.
+ U: matches any unsigned number.
+ s: matches any string.
+ %: matches the % character.
+ t: matches whitespace (spaces and tab characters), but does
+ not store them (the simple ' ' matches just spaces and
+ can't be given a size specification).
- <type> kann folgendes sein:
- d: meldet eine Zahl
- D: meldet eine Zahl
- U:
- s: meldet eine Zeichenkette
- %: meldet das %-Zeichen
- t: meldet Whitespaces (also Leerschlaege und Tabulatoren),
- speichert diese aber nicht.
+ <size> is the expected field size, <minmatch> the demanded
+ minimal match length (defaults are 0 for strings and 1 for
+ numbers). Each of these both may be specified numerically, or
+ as '*' - then the value of the variable at the current place
+ in the argument list is used.
- <size> ist die erwartete Feldgroesse, <minmatch> die verlangte
- minimale Laenge fuer einen Treffer (Standardwerte sind 0 fuer
- Strings und 1 fuer Nummern). Sowohl <size> als auch <minmatch> kann
- entweder numerisch oder mit '*' angegeben werden - im zweiten Fall
- wird die gueltige Variable in der Liste der Argumente benutzt.
+ Specifying + will require that the characters after the field
+ match as well, or the match will be deemed unsuccessful (the variable
+ might still get assigned, though).
- Wird + angegeben, muessen die Zeichen nach dem Feld ebenfalls
- matchen. Ist dies nicht der Fall, wird das Feld als Misserfolg
- betrachted (auch wenn der Wert bereits an die zugehoerige Variable
- zugewiesen wurde).
+ Specifying ! will perform the match, but neither store the
+ result nor count the match.
- Wird ! angegeben, wird zwar die Suche durchgefuehrt, aber Treffer
- werden weder gespeichert noch gezaehlt. Mit ~ als Argument wird
- zwar die Suche durchgefuehrt und die Treffer gezaehlt, das Resultat
- wird aber nicht gespeichert.
+ Specifying ~ will perform and count the match, but not store
+ the result.
- Wenn %s nicht am Ende von <fmt> steht, wird nur ein Treffer
- registriert, wenn auch der nachfolgende String bzw. das
- nachfolgende Format gefunden wird. Weiter unten gibt es dazu
- ein Beispiel.
+ If the %s specifier is not at the end of the format string,
+ it is matched only if the following character(s) or format
+ is found, too. See below for an example.
- Der Unterschied zwischen %d und %D %U ist, dass letzteres ein
- unmittelbar vorausgehendes %s so bald als moeglich abbricht,
- waehrend ersteres zuerst versucht, einen moeglichst grossen Treffer
- fuer %s zu erzielen. Trotzdem ueberspringt %D/%U keine Whitespaces,
- dazu muss %.0t%D gesetzt werden.
+ The difference between %d and %D/%U is that the latter will abort
+ an immediately preceeding %s as soon as possible, whereas the
+ former will attempt to make largest match to %s first.
+ %D/%U will still not skip whitespace, use %.0t%D to skip optional
+ whitespace.
- Wenn eine Zahl erkannt wird, welche ausserhalb des Zahlenbereiches
- von Integers ist, so wird dies nicht als Treffer betrachtet.
+ If a number is matched that exceeds the numerical limits of
+ integers the match is deemed unsuccessful.
- Zurueck gegeben wird die Anzahl Treffer.
+ The number of matched arguments will be returned.
- Die Funktion sscanf() ist insofern ein Spezialfall, als dass
- Argumente automatisch nach Referenz uebergeben werden.
+ The function sscanf is special, in that arguments are passed
+ by reference automatically.
-BEISPIELE
+EXAMPLES
string who, what;
- if (sscanf("wirf frisbee zu rex",
- "wirf %s zu %s", what, who) != 2)
- write("Usage: Wirf <what> zu <who>\n");
- else
- write("Du wirfst einen "+what+" zu "+who+" um auf dich "
- "aufmerksam zu machen.\n");
+ if (sscanf("throw frisbee to rover",
+ "throw %s to %s", what, who) != 2)
+ write("Usage: throw <what> to <who>\n");
+ else
+ write("You throw a "+what+" to "+who+" to get his attention.\n");
sscanf("ab", "%s%s", who, what)
- ==> liefert 2, who = "", what = "ab"
+ ==> result 2, who = "", what = "ab"
sscanf("ab", "%s %s", who, what)
- ==> liefert 0, who = 0, what = 0
+ ==> result 0, who = 0, what = 0
sscanf("ab ", "%s %s", who, what)
- ==> liefert 2, who = "ab", what = ""
+ ==> result 2, who = "ab", what = ""
-GESCHICHTE
- LDMud 3.3.713/3.2.13 fuehrte den '+'-Modifizierer ein.
+HISTORY
+ LDMud 3.3.713/3.2.13 introduced the '+' specifier.
-SIEHE AUCH
+SEE ALSO
explode(E), regexp(E)
diff --git a/doc/efun/strftime b/doc/efun/strftime
index d437bcd..635e5c8 100644
--- a/doc/efun/strftime
+++ b/doc/efun/strftime
@@ -5,114 +5,117 @@
string strftime(string fmt, int clock)
string strftime(string fmt, int clock, int localized)
-BESCHREIBUNG
- Gibt, aehnliche wie ctime(), eine Zeit als formatierten String zurueck.
- Hierbei kann ein String mit div. Platzhaltern vom Benutzer angegeben
- werden (s.u.). Wird kein String angegeben, wird "%c" als Formatstring
- benutzt.
+DESCRIPTION
+ The function strftime() formats the given time in <clock> as a formatted
+ string, similar to ctime(). Unlike ctime(), strftime() accepts a format
+ string with placeholders for the different elements. The format string
+ consists of zero or more conversion specifiers (see below) and ordinary
+ characters. Ordinary charaecters are just copied to the result. A
+ conversion specifier starts with a percent sign ('%'). If no format
+ string is given, a default of "%c" will be used.
- Das Argument <clock> wird als Anzahl Sekunden seit dem 01.01.1970, 00:00
- Uhr interpretiert. Wenn <clock> nicht angegeben wird, wird time()
- verwendet.
+ The argument <clock> is the number of seconds since the epoch (00:00:00
+ UTC, January 1, 1970), as returned by time/mktime(). If <clock> is not
+ given, the current result of time() will be used.
- Das Argument <localized> gibt an, ob die Ausgabe englisch (das sog.
- klassische "C" locale) oder in der jeweiligen Landessprache (z.B.
- deutsch) erfolgen soll. Hierbei haengt die Sprache allerdings von den auf
- dem Mudrechner gesetzten Umgebungsvariablen LC_TIME oder LC_ALL ab, sie
- kann nicht selber gewaehlt werden. Wird kein <localized> angegeben, wird
- 1 verwendet, was einer Ausgabe in Landessprache entspricht.
- 0: Ausgabe im klassischen "C" locale (english)
- 1: Ausgabe in Landessprache des Mudrechners.
+ The argument <localized> specifies, whether the result will be in english
+ (the classic "C" locale) or in the language configured on the host
+ computer (e.g. german). The language has to be configured with the
+ environment variables LC_TIME or LC_ALL (please ask your admins). If
+ <localized> is not given, the default is 1.
+ 0: use classic "C" locale (english)
+ 1: use current locale on the host computer (national representation).
-ANMERKUNGEN
- Der zurueckgebene Ergebnisstring ist max. 511 Zeichen lang.
+REMARKS:
+ The resulting string is at most 511 character long.
-PLATZHALTER
- Diese Funktion versteht alle Platzhalter, die die Funktion strftime() aus
- der C-Standardbibliothek versteht. Momentan sind dies:
- %a Der abgekuerzte Wochentag abhaengig von der momentanen Locale.
- %A Der gesamte Wochentag abhaengig von der momentanen Locale.
- %b Der abgekuerzte Monatsname abhaengig von der momentanen Locale.
- %B Der volle Monatsname abhaengig von der momentanen Locale.
- %c Das bevorzugte Datums- und Uhrzeit-Repraesentation laut Einstel-
- lungen der momentanen Locale.
- %C Das Jahrhundert als zweistellige Zahl.
- %d Der Tag im Monat als Dezimalzahl (01 - 31).
- %D Aequivalent zu %m/%d/%y. (US-amerikanisches Format. In anderen
- Laendern ist %d/%m/%y durchaus ueblich . In internationalem Kon-
- text ist dieses Format daher mehrdeutig und sollte nicht verwen-
- det werden.)
- %e Wie %d, der Tag im Monat als Dezimalzahl, aber eine fuehrende
- Null ist durch ein Leerzeichen ersetzt.
- %E Modifikator: Alternatives Format benutzen, s.u.
- %g Wie %G, aber ohne das Jahrhundert, also mit zweistelligem Jahr
- (00-99).
- %G Das Jahr laut ISO 8601 mit dem Jahrhundert als Dezimalzahl. Das
- vierstellige Jahr, das zu ISO-Wochennummer (siehe %V) passt. Es
- hat dasselbe Format und denselben Wert wie %y, nur dass, wenn
- die ISO-Wochennummer zum vorhergehenden oder naechsten Jahr
- gehoert, dieses Jahr stattdessen benutzt wird.
- %h Aequivalent zu %b.
- %H Die Stunde im 24h-Format als Ganzzahl (00 - 23).
- %I Die Stunde im 12h-Format als Ganzzahl (01 - 12).
- %j Der Tag im Jahr als Ganzzahl (001 - 366).
- %k Die Stunde im 24h-Format als Ganzzahl (0 - 23); einzelne Ziffern
- haben ein vorangestelltes Leerzeichen. (Siehe %H.)
- %l Die Stunde im 12h-Format als Ganzzahl (0 - 12); einzelne Ziffern
- haben ein vorangestelltes Leerzeichen. (Siehe %I.)
- %m Der Monat als Ganzzahl (01 - 12).
- %M Die Minute als Ganzzahl (00 - 59).
- %n Ein Zeilenvorschub.
- %p Entweder 'AM' oder 'PM', je nach der uebergebenen Uhrzeit, oder
- die zugehoerigen Zeichenketten in der momentanen Locale. Mittag
- erhaelt 'PM', Mitternacht 'AM'.
- %P Wie %p, aber in Kleinbuchstaben.
- %r Zeit in AM/PM-Notation; in der POSIX-Locale ist das Aequivalent
- zu '%I:%M:%S %p'.
- %R Zeit in 24h-Notation (%H:%M). (SU) Fuer eine Version mit Sekunden
- siehe %T.
- %s Die Zahl der Sekunden seit der Epoche, also seit 1970-01-01
- 00:00:00 UTC.
- %S Die Sekunde als Ganzzahl (00 - 61).
- %t Ein Tabulatorzeichen.
- %T Zeit in 24h-Notation (%H:%M:%S).
- %u Der Tag der Woche als Zahl von 1 bis 7, mit Montag als 1. Siehe
- auch %w.
- %U Die Wochennummer des aktuellen Jahres als Ganzzahl von 00 bis
- 53, beginnend mit dem ersten Sonntag als erster Tag der ersten
- Woche. Siehe auch %V und %W.
- %V Die Wochennummer nach ISO 8601:1988 als Dezimalzahl von 01 bis
- 53, wobei Woche 1 die erste Woche ist, die wenigstens 4 Tage im
- laufenden Jahr hat, mit Montag als dem ersten Tag der Woche.
- Siehe auch %U und %W.
- %w Der Tag der Woche als Zahl von 0 bis 6, mit Sonntag als 0.
- Siehe auch %u.
- %W Die Wochennummer des aktuellen Jahres als Ganzzahl von 00 bis
- 53, beginnend mit dem ersten Montag als erster Tag der ersten
- Woche.
- %x Die bevorzugte Datums-Repraesentation ohne die Zeit in der momen-
- tanen Locale.
- %X Die bevorzugte Uhrzeit-Repraesentation ohne das Datum in der
- momentanen Locale.
- %y Das Jahr als Ganzzahl ohne das Jahrhundert (00 - 99).
- %Y Das Jahr als Ganzzahl mit dem Jahrhundert.
- %z Die Zeitzone als Stundendifferenz zu GMT. Benoetigt, um
- RFC822-konforme Datumsangaben zu erhalten (mit '%a, %d %b %Y
- %H:%M:%S %z').
- %Z Die Zeitzone oder der Name oder die Abkuerzung.
- %+ Datum und Zeit im Format von date(1).
- %% Das Zeichen '%'.
-
-FEHLER
- Es gibt keinen Platzhalter fuer die Mondphase.
+CONVERSION SPECIFIERS:
+ This function accepts all conversion specifiers, which the function
+ strftime() from the C library accepts. Currently these are:
-BEISPIELE
- write(strftime("Heute ist %A, der %d. %B %Y.\n"))
- ergibt z.B.
- "Heute ist Montag, der 24. September 2007.\n"
+ %A is replaced by national representation of the full weekday name.
+ %a is replaced by national representation of the abbreviated weekday
+ name.
+ %B is replaced by national representation of the full month name.
+ %b is replaced by national representation of the abbreviated month name.
+ %C is replaced by (year / 100) as decimal number; single digits are
+ preceded by a zero.
+ %c is replaced by national representation of time and date.
+ %D is equivalent to ``%m/%d/%y''.
+ %d is replaced by the day of the month as a decimal number (01-31).
+ %E* %O*
+ POSIX locale extensions. The sequences %Ec %EC %Ex %EX %Ey %EY %Od
+ %Oe %OH %OI %Om %OM %OS %Ou %OU %OV %Ow %OW %Oy are supposed to
+ provide alternate representations.
+ Additionally %OB implemented to represent alternative
+ months names (used standalone, without day mentioned).
+ %e is replaced by the day of month as a decimal number (1-31); single
+ digits are preceded by a blank.
+ %F is equivalent to ``%Y-%m-%d''.
+ %G is replaced by a year as a decimal number with century. This year
+ is the one that contains the greater part of the week (Monday as
+ the first day of the week).
+ %g is replaced by the same year as in ``%G'', but as a decimal number
+ without century (00-99).
+ %H is replaced by the hour (24-hour clock) as a decimal number (00-23).
+ %h the same as %b.
+ %I is replaced by the hour (12-hour clock) as a decimal number (01-12).
+ %j is replaced by the day of the year as a decimal number (001-366).
+ %k is replaced by the hour (24-hour clock) as a decimal number (0-23);
+ single digits are preceded by a blank.
+ %l is replaced by the hour (12-hour clock) as a decimal number (1-12);
+ single digits are preceded by a blank.
+ %M is replaced by the minute as a decimal number (00-59).
+ %m is replaced by the month as a decimal number (01-12).
+ %n is replaced by a newline.
+ %O* the same as %E*.
+ %p is replaced by national representation of either "ante meridiem" or
+ "post meridiem" as appropriate.
+ %R is equivalent to ``%H:%M''.
+ %r is equivalent to ``%I:%M:%S %p''.
+ %S is replaced by the second as a decimal number (00-60).
+ %s is replaced by the number of seconds since the Epoch, UTC (see
+ mktime(3)).
+ %T is equivalent to ``%H:%M:%S''.
+ %t is replaced by a tab.
+ %U is replaced by the week number of the year (Sunday as the
+ first day of the week) as a decimal number (00-53).
+ %u is replaced by the weekday (Monday as the first day of
+ the week) as a decimal number (1-7).
+ %V is replaced by the week number of the year (Monday as the
+ first day of the week) as a decimal number (01-53). If the week
+ containing January 1st has four or more days in the new year,
+ then it is week 1; otherwise it is the last week of the previous
+ year, and the next week is week 1.
+ %v is equivalent to ``%e-%b-%Y''.
+ %W is replaced by the week number of the year (Monday as the
+ first day of the week) as a decimal number (00-53).
+ %w is replaced by the weekday (Sunday as the first day of the week)
+ as a decimal number (0-6).
+ %X is replaced by national representation of the time.
+ %x is replaced by national representation of the date.
+ %Y is replaced by the year with century as a decimal number.
+ %y is replaced by the year without century as a decimal number (00-99).
+ %Z is replaced by the time zone name.
+ %z is replaced by the time zone offset from UTC; a leading plus sign
+ stands for east of UTC, a minus sign for west of UTC, hours and
+ minutes follow with two digits each and no delimiter between
+ them (common form for RFC 822 date headers).
+ %+ is replaced by national representation of the date and time
+ (the format is similar to that produced by date(1)).
+ %% is replaced by `%'.
+
-GESCHICHTE
- Eingefuehrt in LDMud 3.3.718.
+BUGS
+ There is no conversion specification for the phase of the moon.
-SIEHE AUCH
+EXAMPLES
+ write(strftime("Today is %A, %d. %B %Y.\n"))
+ results in "Today is Monday, 24. September 2007.\n"
+
+HISTORY
+ Introduced in LDMud 3.3.718.
+
+SEE ALSO
ctime(E), gmtime(E), localtime(E), mktime(E), time(E), utime(E)
+
diff --git a/doc/efun/stringp b/doc/efun/stringp
index d67c090..50e399e 100644
--- a/doc/efun/stringp
+++ b/doc/efun/stringp
@@ -1,10 +1,10 @@
SYNOPSIS
int stringp(mixed arg)
-BESCHREIBUNG
- Liefert 1, wenn das Argument eine Zeichenkette (String) ist,
- ansonsten 0.
+DESCRIPTION
+ Return 1 if arg is a string.
-SIEHE AUCH
- bytesp(E), closurep(E), floatp(E), mappingp(E), objectp(E),
- intp(E), referencep(E), pointerp(E), symbolp(E), clonep(E)
+SEE ALSO
+ bytesp(E), clonep(E), closurep(E), coroutinep(E), floatp(E), intp(E),
+ lpctypep(E), lwobjectp(E), mappingp(E), objectp(E), pointerp(E),
+ referencep(E), structp(E), symbolp(E)
diff --git a/doc/efun/strrstr b/doc/efun/strrstr
index 8e39b79..113702a 100644
--- a/doc/efun/strrstr
+++ b/doc/efun/strrstr
@@ -1,27 +1,25 @@
SYNOPSIS
- int strrstr(string str, string muster)
- int strrstr(string str, string muster, int pos)
- int strrstr(bytes str, bytes muster)
- int strrstr(bytes str, bytes muster, int pos)
+ int strrstr(string str, string str2)
+ int strrstr(string str, string str2, int pos)
+ int strrstr(bytes str, bytes str2)
+ int strrstr(bytes str, bytes str2, int pos)
-BESCHREIBUNG:
- Liefert den Index des ersten Auftretens von <muster> im String <str>,
- ausgehend von der Position <pos> her rueckwaerts gesucht. Wird <pos>
- nicht angegeben, wird als Standard -1 gesetzt, was dem Ende von <str>
- entspricht. Mit anderen Worten: die Funktion liefert den Index des
- letzten Auftretens von <muster> vor <pos>.
+DESCRIPTION
+ Returns the index of the first occurance of <str2> in <str> searching
+ from position <pos> (default: -1 == string end) on backward.
+ In other words: the index of the last occurance of <str2> before
+ the given position <pos>.
- Der Index, der zurueck gegeben wird, ist relativ zum Beginn des
- Strings <str>.
+ The returned index is relativ to the beginning of the string.
- Wenn <muster> nicht in <str> gefunden wird, wird -1 zurueck gegeben.
+ If <str2> is not found in <str>, -1 is returned.
- Wenn <pos> negativ ist, bezeichnet <pos> den Index vom Ende des
- Strings aus gezaehlt. Dabei wird die Suche aber dennoch rueckwaerts
- im String <str> durchgefuehrt.
+ If <pos> is negativ, it designates the start position relative
+ to the end of the string (the search will still proceed towards
+ the beginning of the string).
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.10.
+HISTORY
+ Introduced in LDMud 3.2.10.
-SIEHE AUCH
+SEE ALSO
strstr(E), strlen(E), sscanf(E), sprintf(E), explode(E)
diff --git a/doc/efun/strstr b/doc/efun/strstr
index 2d93006..12b61b0 100644
--- a/doc/efun/strstr
+++ b/doc/efun/strstr
@@ -1,19 +1,19 @@
SYNOPSIS
- int strstr(string str, string muster)
- int strstr(string str, string muster, int pos)
- int strstr(bytes str, bytes muster)
- int strstr(bytes str, bytes muster, int pos)
+ int strstr(string str, string str2)
+ int strstr(string str, string str2, int pos)
+ int strstr(bytes str, bytes str2)
+ int strstr(bytes str, bytes str2, int pos)
-BESCHREIBUNG
- Liefert den Index des ersten Auftretens von <muster> in <str>,
- ausgehend von der Position <pos>, wobei in <str> vorwaerts gesucht
- wird. Wird <pos> nicht angegeben, wird als Standardwert 0 gesetzt,
- also vom Beginn von <str> her gesucht.
+DESCRIPTION
+ Returns the index of <str2> in <str> searching from position <pos>
+ on forward.
- Wenn <muster> nicht gefunden wird, wird -1 zurueckgeliefert.
+ The returned index is relativ to the beginning of the string.
+ If <str2> is not found in <str>, -1 is returned.
- Wenn <pos> negativ ist, bezeichnet <pos> die Startposition der Suche
- relativ zum Ende von <str>, es wird aber weiterhin vorwaerts gesucht.
+ If <pos> is negativ, it designates the start position relative
+ to the end of the string (the search will still proceed towards
+ the end of the string).
-SIEHE AUCH
+SEE ALSO
strrstr(E), strlen(E), sscanf(E), sprintf(E), explode(E)
diff --git a/doc/efun/struct_info b/doc/efun/struct_info
index 4d4cd0b..82c6093 100644
--- a/doc/efun/struct_info
+++ b/doc/efun/struct_info
@@ -2,7 +2,7 @@
#include <struct_info.h>
#include <lpctypes.h>
- mixed * struct_info (struct st, int what)
+ mixed * struct_info(struct st, int what)
DESCRIPTION
Return information about the structure of struct <st> in an array.
@@ -26,8 +26,8 @@
string [SI_PROG_NAME]: the name of program defining the struct
string [SI_PROG_ID]: the id of the program defining the struct
mixed [SI_BASE]: 0, or the base struct information
- mixed* [SI_MEMBER+0]: the first member information
- mixed* [SI_MEMBER+n]: the last member information
+ mixed *[SI_MEMBER+0]: the first member information
+ mixed *[SI_MEMBER+n]: the last member information
The member information entries are arrays themselves with
these elements:
diff --git a/doc/efun/structp b/doc/efun/structp
index 0b1668d..9a97fae 100644
--- a/doc/efun/structp
+++ b/doc/efun/structp
@@ -8,6 +8,6 @@
Introducted in LDMud 3.3.273.
SEE ALSO
- baseof(E), closurep(E), floatp(E), mappingp(E), objectp(E),
- intp(E), referencep(E), pointerp(E), stringp(E), symbolp(E),
- clonep(E)
+ baseof(E), bytesp(E), clonep(E), closurep(E), coroutinep(E),
+ floatp(E), intp(E), lpctypep(E), lwobjectp(E), mappingp(E),
+ objectp(E), pointerp(E), referencep(E), stringp(E), symbolp(E)
diff --git a/doc/efun/swap b/doc/efun/swap
index 0851fbd..750e24c 100644
--- a/doc/efun/swap
+++ b/doc/efun/swap
@@ -1,19 +1,18 @@
OPTIONAL
SYNOPSIS
- void swap(object obj, int flags)
+ void swap(object obj, int flags = 0)
-BESCHREIBUNG
- Lagert ein Objekt aus. Diese Efun ist nur fuer systeminternes
- Debugging und kann einen Absturz verursachen.
+DESCRIPTION
+ Swap out an object. This efun is only used for system internal
+ debugging and can cause a crash.
- <flags> kann angegeben werden, um festzulegen, welcher Teil von <obj>
- ausgelagert werden soll. Es ist eine Bitmaske aus folgenden:
+ <flags> can be given to specify which parts of <obj> to swap.
+ It is a bitmask of the following:
- 1: Programm auslagern
- 2: Variablen auslagern
+ 1: Swap program
+ 2: Swap variables
- Standardmaessig (auch wenn 0 angegeben wurde) wird beides (3)
- ausgelagert.
+ The default (also when 0 given) is both (3).
-GESCHICHTE
- LDMud 3.6.4 fuehrte den zweiten Parameter ein.
+HISTORY
+ LDMud 3.6.4 introduced the second argument.
diff --git a/doc/efun/symbol_function b/doc/efun/symbol_function
index 7178f93..177fdac 100644
--- a/doc/efun/symbol_function
+++ b/doc/efun/symbol_function
@@ -1,35 +1,30 @@
SYNOPSIS
closure symbol_function(symbol arg)
closure symbol_function(string arg)
- closure symbol_function(string arg, object|lwobject|string obj)
+ closure symbol_function(string arg, object|lwobject|string ob)
-BESCHREIBUNG
- Erzeugt eine Lfun-, Efun- oder Operator-Closure aus <arg>, wobei
- <arg> entweder ein string oder ein symbol sein muss. Fuer
- Lfun-Closures gibt <obj> an, zu welchem Objekt die Lfun gehoert,
- entweder angegeben durch das Objekt selbst (bzw. einen pointer
- darauf) oder durch den Objektnamen als String. Wenn ein String
- angegeben wird, wird das Objekt beim Aufruf geladen.
+DESCRIPTION
+ Constructs a lfun closure, efun closure or operator closure
+ from the first arg (string or symbol). For lfuns, the second
+ arg is the object that the lfun belongs to, specified by
+ the object itself or by its name (the object will be loaded
+ in the second case)
- Wenn die Closure fuer eine Lfun in einem anderen als dem momentanen
- Objekt erzeugt wird, ergibt dies eine "alien lfun closure". Solche
- Closures sind an das Objekt gebunden, das symbol_function()
- aufgerufen hat (dieses Objekt wird von to_object() geliefert),
- obwohl der eigentliche Code in einem anderen Objekt steht (das mit
- get_type_info() gefunden werden kann).
+ If the closure is created for an lfun in an object other than
+ the current object, the result is an 'alien lfun closure'. Such
+ closures are bound to the object executing the symbol_function()
+ (this is what to_object() will return), even though the actual
+ code is in that other object (which get_type_info() will return).
- Als "private" deklarierte Funktionen koennen auf diese Weise nie
- aufgerufen werden, "static" und "protected" deklarierte Lfuns nur
- dann, wenn <obj> das gueltige Objekt ist.
+ Private lfuns can never be accessed this way, static and
+ protected lfuns only if <ob> is the current object.
-BEISPIELE
- symbol_function("efun::users");
- --> ergibt: #'users
- symbol_function("QueryProp", other_obj);
- --> ergibt: other_obj->QueryProp()
+EXAMPLES
+ symbol_function("efun::users") -> #'users
+ symbol_function("QueryProp", other_obj) -> other_obj->QueryProp()
-GESCHICHTE
- Eingefuehrt in 3.2@70.
+HISTORY
+ Introduced in 3.2@70.
-SIEHE AUCH
+SEE ALSO
lambda(E), quote(E)
diff --git a/doc/efun/symbol_variable b/doc/efun/symbol_variable
index 9a6089a..18b8765 100644
--- a/doc/efun/symbol_variable
+++ b/doc/efun/symbol_variable
@@ -3,27 +3,26 @@
closure symbol_variable(symbol arg)
closure symbol_variable(int arg)
-BESCHREIBUNG
- Erzeugt eine Identifier (Lfun) Closure aus der globalen Variablen
- <arg> des gueltigen Objekts. Die Variable kann angegeben werden
- als Symbol, mit ihrem Namen oder durch die ordinale Nummer in der
- Variablentabelle des Objekts.
+DESCRIPTION
+ Constructs an identifier (lfun) closure from the global
+ variable arg of the current program. The variable may be given as a
+ symbol, by name or by its ordinal number in the objects
+ variable table.
+ If there is no such variable, or if it is not visible outside
+ the object, 0 is returned.
- Wenn keine solche Variable existiert oder sie von aussen nicht
- sichtbar ist, wird 0 zurueck geliefert.
+ If the argument is an integer, and the variable is inherited
+ and private in the inherited object (i.e. hidden), then a
+ privilege violation will occur.
- Wenn <arg> ein Integer ist und sich auf eine geerbte Variable
- bezieht, die im geerbten Objekt "private" deklariert ist (d.h.
- versteckt), fuehrt dies zu einer Schutzverletzung.
-
-BEISPIELE
+EXAMPLES
int base;
int var;
- symbol_variable("var"); ergibt: #'<this_object>->var
- symbol_variable(0); ergibt: #'<this_object>->base
+ symbol_variable("var") -> #'<this_object>->var
+ symbol_variable(0) -> #'<this_object>->base
-GESCHICHTE
- Eingefuehrt in 3.2.1@8.
+HISTORY
+ Enabled since 3.2.1@8.
-SIEHE AUCH
+SEE ALSO
lambda(E), quote(E), symbol_function(E)
diff --git a/doc/efun/symbolp b/doc/efun/symbolp
index d3eec65..66ee03a 100644
--- a/doc/efun/symbolp
+++ b/doc/efun/symbolp
@@ -1,14 +1,16 @@
SYNOPSIS
int symbolp(mixed arg)
-BESCHREIBUNG
- Liefert 1, wenn das Argument ein Symbol ist, ansonsten 0.
+DESCRIPTION
+ Returns true, if arg is a symbol.
-BEISPIELE
- symbolp('foo) liefert 1.
+EXAMPLES
+ symbolp('foo) returns 1.
-GESCHICHTE
- Eingefuehrt in 3.2@70.
+HISTORY
+ Introduced in 3.2@70
-SIEHE AUCH
- intp(E), quote(E)
+SEE ALSO
+ quote(E), bytesp(E), clonep(E), closurep(E), coroutinep(E),
+ floatp(E), intp(E), lpctypep(E), lwobjectp(E), mappingp(E),
+ objectp(E), pointerp(E), referencep(E), stringp(E), structp(E)
diff --git a/doc/efun/tan b/doc/efun/tan
index 695522a..f141a97 100644
--- a/doc/efun/tan
+++ b/doc/efun/tan
@@ -1,11 +1,11 @@
SYNOPSIS
float tan(int|float)
-BESCHREIBUNG
- Liefert den Tangens des Argumentes.
+DESCRIPTION
+ Returns the tangent of the argument.
-GESCHICHTE
- LDMud 3.2.9: Ganzzahlen (Integers) als Argument hinzugefuegt.
+HISTORY
+ LDMud 3.2.9 added integers as arguments.
-SIEHE AUCH
+SEE ALSO
sin(E), asin(E), cos(E), acos(E), atan(E), atan2(E)
diff --git a/doc/efun/tell_object b/doc/efun/tell_object
index 207672e..6b6d5c9 100644
--- a/doc/efun/tell_object
+++ b/doc/efun/tell_object
@@ -1,49 +1,46 @@
SYNOPSIS
- void tell_object(object|string obj, string str)
- void tell_object(object|string obj,
+ void tell_object(object|string ob, string str)
+ void tell_object(object|string ob,
mixed *|mapping|struct|object|lwobject msg)
-BESCHREIBUNG
- Sendet einen Nachricht an das Objekt <obj> (das auch durch seinen
- Namen angegeben werden kann).
+DESCRIPTION
+ Send a message str to object ob (which is looked up and if necessary
+ loaded if given by name).
+
+ If the second argument is a string, the message will be printed
+ to <ob> if it is an interactive user, otherwise it will be passed to
+ the lfun catch_tell() of the target living.
- Ist die Nachricht ein String, wird der Text an interaktive Objekte
- direkt ausgegeben, fuer andere Objekte wird die lfun catch_tell()
- aufgerufen.
+ If the second argument is an array/mapping/struct/object, it will be
+ passed to the lfun catch_msg() in the target.
- Ist die Nachricht ein anderer Typ, wird die lfun catch_msg() im
- Empfaenger aufgerufen.
+EXAMPLES
+ object who;
+ who=find_player("wessex");
+ tell_object(who, "Hi!\n");
-BEISPIELE
- Dies gibt ein einfaches "Hi!" an den Spieler Thomas aus:
+ Just tell Wessex a simple "Hi!".
- object wer;
- wer = find_player("thomas");
- tell_object(wer, "Hi!\n");
- Ein Beispiel mit zwei Objekten, das zeigt, wie das Zusammenspiel von
- catch_tell() und tell_object() ablaueft. Objekt1 ist ein Lebewesen
- mit Namen "Dummymonster", Objekt2 verteilt die Meldung:
+ Object 1 (living with the name "dummymonster"):
+ void catch_tell(string str) {
+ write("Received: "+str+"\n");
+ }
+ Object 2:
+ void func() {
+ object who;
+ who=find_living("dummymonster");
+ tell_object(who, "Follow me, mortal one!\n");
+ ...
+ }
- Objekt1:
- void catch_tell(string str)
- {
- wirte("Erhaltener Text: "+str+"\n");
- }
+ This examples shows how tell_object() together with
+ catch_tell() works.
- Objekt2:
- void fun()
- {
- object wer;
- wer = find_living("dummymonster");
- tell_object(wer, "Folge mir, Sterblicher!\n");
- ...
- }
+HISTORY
+ LDMud 3.2.11 introduced the 'mixed *' form for symmetry reasons.
+ LDMud 3.3.686 added the use of a mapping/struct/object as second
+ argument.
-GESCHICHTE
- LDMud 3.2.11 fuehrte die Arrayform aus Symmetriegruenden ein.
- LDMud 3.3.686 erlaubt die Verwendung eines mapping/struct/object als
- zweites Argument.
-
-SIEHE AUCH
+SEE ALSO
write(E), say(E), catch_tell(A), catch_msg(A)
diff --git a/doc/efun/tell_room b/doc/efun/tell_room
index 6692643..28f18d2 100644
--- a/doc/efun/tell_room
+++ b/doc/efun/tell_room
@@ -1,50 +1,49 @@
SYNOPSIS
- void tell_room(string|object obj, string str)
- void tell_room(string|object obj, string str, object *exclude)
+ void tell_room(string|object ob, string str)
+ void tell_room(string|object ob, string str, object *exclude)
- void tell_room(string|object obj,
+ void tell_room(string|object ob,
mixed *|mapping|struct|object|lwobject msg)
- void tell_room(string|object obj,
+ void tell_room(string|object ob,
mixed *|mapping|struct|object|lwobject msg,
object *exclude)
-BESCHREIBUNG
- Gibt einen Text <str> an den Raum <obj> aus. <obj> kann auch der
- Name des Raumes als String sein. Wenn das Objekt, das die Meldung
- erhaelt, nicht ein interaktives Objekt (also kein User) ist, wird
- im Empfaenger die Funktion catch_tell() mit dem Text als Argument
- aufgerufen. Falls ein Lebewesen die Funktion catch_tell() definiert,
- wird der Text hier ausgewertet und nicht an den User ausgegeben.
- Wenn das Empfaengerobjekt mit seinem Namen angegeben ist, sucht der
- Driver das Objekt unter diesem Namen und laedt es, falls notwendig.
- Wenn das Array <*exclude> angegeben ist, wird der Text an die
- Objekte in <*exclude> nicht ausgegeben.
+DESCRIPTION
+ Send a message <str> to all living objects in the room ob. ob
+ can also be the name of the room given as a string. If a
+ receiving object is not a interactive user the lfun
+ catch_tell() of the object will be invoked with the message as
+ argument. If living objects define catch_tell(), the string
+ will also be sent to that instead of being written to the
+ user. If the object is given as its filename, the driver
+ looks up the object under that name, loading it if necessary.
+ If array *exclude is given, all objects contained in
+ *exclude are excluded from the message str.
- Wenn das zweite Argument ein nicht-String ist, wird in allen
- Lebewesen, die den Text erhalten, catch_msg() aufgerufen (statt
- catch_tell()).
+ If the second arg is an array/mapping/struct/object, catch_msg() will
+ be called in all listening livings.
-BEISPIELE
- An alle Lebewesen im Raum soll ein simples "Hi!" gesendet werden:
+EXAMPLES
+ tell_object(environment(this_player()), "Hi!\n");
- tell_object(environment(this_player()), "Hi!\n");
+ Just send a simple "Hi!" to all livings in the current.
- Folgendes Beispiel zeigt, wie tell_room() zusammen mit catch_tell()
- funktioniert.
+ Object 1 (living):
+ void catch_tell(string str) {
+ write("Received: "+str+"\n");
+ }
+ Object 2:
+ void func() {
+ ...
+ tell_room(environment(this_player()), "HiHo!\n");
+ ...
+ }
- Objekt1 (ein Lebewesen):
- void catch_tell(string str) {
- write("Empfangen: "+str+"\n");
- }
+ This examples shows how tell_room() together with catch_tell() works.
- Objekt2:
- void fun() {
- tell_room(environment(this_player()), "Hallo Welt!\n");
- }
+HISTORY
+ LDMud 3.3.686 added the use of a mapping/struct/object as second
+ argument.
-GESCHICHTE
- LDMud 3.3.686 erlaubt die Verwendung eines mapping/struct/object als
- zweites Argument.
-
-SIEHE AUCH
+SEE ALSO
write(E), say(E), tell_object(E), catch_tell(A), catch_msg(A)
diff --git a/doc/efun/terminal_colour b/doc/efun/terminal_colour
index 4d51a33..13976a2 100644
--- a/doc/efun/terminal_colour
+++ b/doc/efun/terminal_colour
@@ -1,67 +1,64 @@
SYNOPSIS
- varargs string terminal_colour(string str,
- null | mapping | closure map,
+ varargs string terminal_colour(string str, null|mapping|closure map,
int wrap, int indent)
-BESCHREIBUNG
- Ist <map> ein Wert ungleich 0, ersetzt diese Efun alle Farb-
- Definitionen der Form "%^KEY%^" (siehe unten fuer Details) im
- String <str> und ersetzt sie durch die entsprechenden Werte aus dem
- unter <map> angegebenen Farbschluessel.
- Ist <map> ein Mapping, muessen die Eintraege das Format
- "KEY" : "wert" haben; Eintraege, die keine Strings enthalten,
- werden ignoriert. Einzige Ausnahme dazu: enthaelt <map> einen
- Eintrag der Form 0:wert, wird dieser fuer alle Farbdefinitionen
- verwendet, die keinem anderen Schluessel zugeordnet werden koennen.
- <wert> kann in diesem Fall ein String oder eine Closure sein. Handelt
- es sich um eine Closure, erhaelt diese den <KEY> als Argument und
- muss einen String zurueck liefern, der <KEY> ersetzt.
+DESCRIPTION
+ If <map> is given as a non-0 value, this efun expands all
+ colour-defines of the form "%^KEY%^" (see below for details) from the
+ input-string and replaces them by the apropriate values found
+ for the color-key specified by <map>.
- Ist <map> eine Closure, wird diese mit den Farbdefinitionen <KEY>
- als Argument aufgerufen und muss einen String zurueck liefern, der
- die <KEY>s ersetzt.
+ If <map> is a mapping, the entries queries have the
+ format "KEY" : "value", non-string contents are ignored with one
+ exception: if the mapping contains an entry 0:value, it is used
+ for all otherwise unrecognized keys. The value in this case can be
+ a string, or a closure. If it is a closure, it takes the key as
+ argument and has to return the replacement string.
- Die speziellen Schluessel "%^%^" und "%%^^" werden immer durch das
- Literal "%^" ersetzt.
+ If <map> is given as a closure, it is called with the KEYs to
+ replace, and has to return the replacement string.
- Die Parameter <wrap> und <indent> sind optional. Ist nur <wrap>
- angegeben, wird <str> in der Spalte <wrap> umgebrochen. Ist
- zusaetzlich <indent> angegeben, werden alle umgebrochenen Zeilen
- um <indent> Spalten eingerueckt.
+ The special keys "%^%^" and "%%^^" are always replaced with the
+ literal "%^".
- Der Zeilenumbruch ignoriert die Laenge der Farbmakros und ihrer
- Inhalte. Er bricht <str> anhand der Laenge der uebrigen Zeichen
- um, ist also farb-neutral.
+ The parameters wrap and indent are both optional, if only wrap is
+ given then the str will be linewrapped at the column given with
+ wrap. If indent is given too, then all wrapped lines will be
+ indented with the number of blanks specified with indent.
- Ist <map> als 0 angegeben, fuehrt die Efun kein Suchen und Ersetzen
- von Farbdefinitionen durch. Die Funktionalitaet von Zeilenumbruch
- und Einrueckung bleiben erhalten, wenn gewuenscht. Auf diese Weise
- dupliziert terminal_colour() die Funktion von sprintf("%-=s") und
- wirkt als einfache Zeilenumbruch Funktion.
+ The wrapper itself ignores the length of the color macros and that
+ what they contain, it wraps the string based on the length of the
+ other chars inside. Therefore it is color-aware.
+
+ If <map> is given as 0, the efun does no colour-define detection
+ and replacement at all, but still does linewrapping and indentation
+ if requested. This way terminal_colour() doubles as a simple
+ line wrapping function, duplicating the functionality also
+ provided by sprintf("%-=s").
- ERKENNEN VON FARBDEFINITIONEN
+ KEY RECOGNITION STRATEGY
- Wie bereits erwaehnt, werden die speziellen Schluessel "%^%^" und
- "%%^^" durch das Literal "%^" ersetzt und spielen im Weiteren
- keine Rolle.
+ As mentioned above, the special keys "%^%^" and "%%^^" are always
+ replaced with the literal "%^" and play no role in the following
+ considerations.
- Fuer den Eingabestring wird das folgende Format vorausgesetzt:
+ The input string is supposed to follow this syntax:
- text { '%^' colorkey '%^' text } [ '%^' colorkey ]
+ text { '%^' colorkey '%^' text } [ '%^' colorkey ]
- Oder in Worten: die Efun trennt den String bei jedem '%^', das
- sie antrifft und behandelt anschliessend jeden zweiten Teilstring
- als Farbschluessel.
+ or in words: the efun splits up the string at every '%^' it finds
+ and then treats every second substring as color key.
- Merke: dieses Verhalten unterscheidet sich von der Behandlung des
- Eingabestrings unter MudOS. Dort lautet die Syntax:
- key_oder_text { '%^' key_oder_text }
+ Note that this is different from the way MudOS treats the
+ input string. MudOS uses this syntax:
- Oder in Worten: die MudOS Efun trennt den String bei jedem '%^'
- und versucht dann jeden Teilstring als Farbschluessel zu behandeln.
- Dieses Verhalten laesst sich auch unter LPC erreichen:
+ key_or_text { '%^' key_or_text }
+
+ or in words: the MudOS efun splits the string at every '%^' and
+ then tries to treat every substring as color key. One can achieve
+ the MudOS behaviour with this LPC function:
string mudos_terminal_colour(string str, mapping ext, int w, int i) {
return terminal_colour("%^"+implode(explode(str, "%^")-({""})
@@ -69,8 +66,7 @@
, ext, w, i);
}
-
-BEISPIELE
+EXAMPLES
mapping trans;
string str;
@@ -78,49 +74,43 @@
str = terminal_colour( "%^GREEN%^ and %^RED%^ and %^BLUE%^", trans );
- Dies fuehrt zu str == "ansi-green and and BLUE".
+ This will result in str == "ansi-green and and BLUE"
- "%^GREEN^%" wird ersetzt durch "ansi-green", weil <trans> das so
- definiert,
- "%^RED%^" wird aus <str> entfernt, weil es mit "" ersetzt wird, und
- "%^BLUE%^" wird um die "%^" verkuert, weil der Eintrag zu BLUE in
- <trans> keinen gueltigen Wert enthaelt (d.h. kein String ist). Das
- selbe wuerde passieren, wenn <str> "%^DEFINE%^" enthalten wuerde,
- zu dem es keinen Eintrag in <trans> gibt.
+ %^GREEN%^ is expanded to ansi-green because trans defines that,
+ %^RED%^ is stripped because trans defines that as "" and
+ %^BLUE%^ gets the %^'s removed because the contents of trans are
+ not valid (i.e. no string). The same would happen to %^DEFINES%^
+ where the key is not found inside the trans mapping.
- Merke: um direkt benachbarte Schluessel zu ersetzen, soll die
- Efun wie folgt verwendet werden:
+ Caveat: to replace adjacent keys, use the efun like this:
str = terminal_colour( "%^GREEN%^%^RED%^", trans );
- Eine Eingabe der Form
+ A command like
str = terminal_colour( "%^GREEN%^RED%^", trans );
- fuehrt zum logischen, aber vielleicht unerwarteten Ergebnis
- "ansi-greenRED".
+ will return the logical but sometimes unexpected "ansi-greenRED".
- Einige Worte zum Zeilenumbruch:
+ Some words about wrapping:
- Ein String, der ohne Einrueckung umgebrochen wird (<indent> ist 0),
- sieht so aus:
+ a string wrapped without indent would look like this:
- "dies ist die erste Zeile\nund dies ist die zweite Zeile"
+ "this is the first line\nand this is the second line"
- Ein String, der mit <indent> 3 umgebrochen wird, sieht so aus:
+ a string wrapped with indent 3 would look like:
- "dies ist die erste Zeile\n und dies ist die zweite Zeile"
+ "this is the first line\n and this is the indented second one"
-GESCHICHTE
- Die Idee fuer diese Efun und die erste Implementierung stammen
- aus MudOS; die Strategie fuer das Erkennen von Schluesseln
- (eingeschlossen die pure Zeilenumbruch Funktion) wurde in
- LDMud 3.2.8 geglaettet.
- LDMud 3.2.9 fuegte die Verwendung von Closures zur Definition
- von Farbschluesseln hinzu. Es erklaerte zudem offiziell das
- Verhalten betreffen "%%^^" aus Gruenden besserer Kompatibilitaet
- mit MudOS.
+HISTORY
+ Efun idea and initial implementation taken from MudOS; the key
+ recognition strategy (including pure wrapping mode) was straightened
+ out in LDMud 3.2.8.
+ LDMud 3.2.9/3.3.58 added the use of closures to specify the colour
+ mappings.
+ LDMud 3.2.9/3.3.102 officialized the "%%^^" replacement pattern for
+ better MudOS compatibility.
-SIEHE AUCH
+SEE ALSO
sprintf(E)
diff --git a/doc/efun/test_bit b/doc/efun/test_bit
index d493357..c6e134e 100644
--- a/doc/efun/test_bit
+++ b/doc/efun/test_bit
@@ -1,21 +1,24 @@
SYNOPSIS
int test_bit(string str, int n)
-BESCHREIBUNG
- Gibt 0 oder 1 des <n>-ten Bits im String <str> zurueck.
+DESCRIPTION
+ Return 0 or 1 of bit n was set in string str.
- Jedes Zeichen besteht aus 6 Bits. Jedem Zeichen ist also ein Wert
- zwischen 0 und 63 zugeordnet (weil 2^6=64). Das erste Zeichen ist der
- Leerschlag " " mit dem Wert 0 (keines der Bits ist gesetzt). Das
- erste Zeichen im String ist dasjenige mit den niedrigsten Bits (0-5).
+ Each character contains 6 bits. So you can store a value
+ between 0 and 63 in one character (2^6=64). Starting character
+ is the blank " " which has the value 0. The first character in
+ the string is the one with the lowest bits (0-5).
-BEISPIELE
- test_bit("_", 5); Liefert 1, weil "_" das 63. Zeichen ist und
- deshalb das 5. Bit gesetzt hat.
+EXAMPLES
+ test_bit("_",5);
- test_bit(" ", 3); Liefert 0, weil " " das 0. Zeichen ist und deshalb
- kein Bit gesetzt hat.
+ Returns 1 because "_" stands for the number 63 and therefore
+ the 6th bit is set.
-SIEHE AUCH
+ test_bit(" ",3);
+
+ Returns 0 because " " stands for 0 and no bit is set.
+
+SEE ALSO
set_bit(E), clear_bit(E), last_bit(E), next_bit(E), count_bits(E),
and_bits(E), or_bits(E), xor_bits(E), invert_bits(E), copy_bits(E)
diff --git a/doc/efun/this_coroutine b/doc/efun/this_coroutine
new file mode 100644
index 0000000..1c57e26
--- /dev/null
+++ b/doc/efun/this_coroutine
@@ -0,0 +1,12 @@
+SYNOPSIS
+ coroutine this_coroutine()
+
+DESCRIPTION
+ Returns the innermost coroutine in the caller stack.
+ Returns 0 if there is no coroutine.
+
+HISTORY
+ Coroutines were introduced in LDMud 3.6.5.
+
+SEE ALSO
+ coroutines(LPC), call_coroutine(E)
diff --git a/doc/efun/this_interactive b/doc/efun/this_interactive
index 2b872df..14ddd6b 100644
--- a/doc/efun/this_interactive
+++ b/doc/efun/this_interactive
@@ -1,9 +1,9 @@
SYNOPSIS
- object this_interactive()
+ object this_interactive(void)
-BESCHREIBUNG
- Die Funktion gibt das momentane interaktive Objekt zurueck, falls
- vorhanden, also dasjenige, welches "die Entertaste gedrueckt hat".
+DESCRIPTION
+ this_interactive() returns the current interactive object, if
+ any, i.e. the one who "hit the RETURN key".
-SIEHE AUCH
+SEE ALSO
this_player(E), previous_object(E), interactive(E), living(E)
diff --git a/doc/efun/this_object b/doc/efun/this_object
index 39b9fcb..e9e9327 100644
--- a/doc/efun/this_object
+++ b/doc/efun/this_object
@@ -1,10 +1,10 @@
SYNOPSIS
- object|lwobject this_object()
+ object|lwobject this_object(void)
-BESCHREIBUNG
- Liefert den Objektpointer auf dieses Objekt. Der Pointer darf nicht
- mit dem internen Namen des Objekts verwechselt werden, welcher von
- id() verwendet wird.
+DESCRIPTION
+ Return the object pointer for this object. This is not to be
+ confused with the internal name of an object, which is used by
+ the id() function.
-SIEHE AUCH
+SEE ALSO
this_player(E), previous_object(E), object_name(E), find_object(E)
diff --git a/doc/efun/this_player b/doc/efun/this_player
index 4017a64..bd57ca0 100644
--- a/doc/efun/this_player
+++ b/doc/efun/this_player
@@ -1,17 +1,17 @@
SYNOPSIS
- object this_player()
+ object this_player(void)
-BESCHREIBUNG
- Liefert den momentanen Kommandogeber. Das kann ein interaktiver
- Bentzer oder ein lebendiges Objekt sein, zum Beispiel ein NPC.
+DESCRIPTION
+ Return the current command giver. This can be an interactive
+ user or a living object like a npc.
- Wenn die Funktion innerhalb von heart_beat() eines nicht
- lebendigen Objekts aufgerufen wird, wird 0 zurueck gegeben.
+ If called from inside the heart_beat() of a not living object
+ 0 will be returned.
-BEISPIELE
- if (this_player() != this_interactive()) {
- write("Hey, jemand zwingt uns, Kommandos auszufuehren!\n");
- }
+EXAMPLES
+ if (this_player() != this_interactive())
+ write("Hey, somebody must have forced us to do a
+ command!\n");
-SIEHE AUCH
+SEE ALSO
this_object(E), previous_object(E), interactive(E), living(E)
diff --git a/doc/efun/throw b/doc/efun/throw
index d0b518e..0140dc4 100644
--- a/doc/efun/throw
+++ b/doc/efun/throw
@@ -1,16 +1,17 @@
SYNOPSIS
void throw(mixed arg)
-BESCHREIBUNG
- Bricht die Programmverarbeitung ab. Wenn die Verarbeitung mit catch()
- gestartet wurde, gibt dieses catch() <arg> als Fehlermeldung aus.
+DESCRIPTION
+ Abort execution. If the current program execution was
+ initiated by catch(), that catch expression will
+ return arg as error code.
- Der Aufruf von throw() ohne vorheriges catch() macht keinen Sinn und
- erzeugt einen "throw without catch" Fehler.
+ Calling throw() without previous catch() does not make sense
+ and will result in an ``throw without catch'' error.
-BEISPIELE
- catch(throw("Verarbeitung abgebrochen!"));
- Das macht nichts als "Verarbeitung abgebrochen!" auszugeben.
+EXAMPLES
+ catch(throw("aborting execution"));
+ This will just print the string "aborting execution".
-SIEHE AUCH
+SEE ALSO
catch(E), raise_error(E)
diff --git a/doc/efun/time b/doc/efun/time
index d9e9ed2..ab3ffb7 100644
--- a/doc/efun/time
+++ b/doc/efun/time
@@ -1,21 +1,20 @@
SYNOPSIS
int time()
-BESCHREIBUNG
- Liefert die Anzahl Sekunden, die seit dem 01. Januar 1970,
- 00:00:00 GMT verstrichen sind.
+DESCRIPTION
+ Return number of seconds ellapsed since 1. Jan 1970, 0.0:0 GMT
- Die Zeitangabe basiert auf der Systemzeit des Hosts; der Driver
- stellt jedoch sicher, dass das Resultat von time() monoton ansteigt
- (also immer nur zu hoeheren Werten wechselt).
+ The time is based on the time provided by the host system, however,
+ the driver makes sure that the result of time() is monotonically
+ increasing (ie. changes only to bigger numbers).
- Das Resultat von time() veraendert sich nicht waehrend dem Abarbeiten
- eines Kommandos.
+ The result of time() does not change during the course of a command
+ execution.
-BEISPIELE
- Um das aktuelle Datum und die aktuelle Zeit anzuzeigen:
+EXAMPLES
+ write(ctime(time())+"\n");
- write(ctime(time())+"\n");
+ Print out the current date and time.
-SIEHE AUCH
+SEE ALSO
ctime(E), gmtime(E), localtime(E), utime(E)
diff --git a/doc/efun/tls_check_certificate b/doc/efun/tls_check_certificate
index f8afc8e..16127c5 100644
--- a/doc/efun/tls_check_certificate
+++ b/doc/efun/tls_check_certificate
@@ -1,7 +1,7 @@
PRELIMINARY
SYNOPSIS
- mixed *tls_check_certificate(object obj);
- mixed *tls_check_certificate(object obj, int extra);
+ mixed * tls_check_certificate(object obj)
+ mixed * tls_check_certificate(object obj, int extra)
DESCRIPTION
tls_check_certificate() checks the certificate of the secured
@@ -13,29 +13,26 @@
error is thrown.
Otherwise, the result is an array with these values:
- int [0] : Result code of SSL_get_verify_result (see man 1 verify
- subsection DIAGNOSTICS for possible values)
- array [1] : array with 3*n entries of extra x509 data.
- structure is:
- 3*i : numerical form of object name,
- e.g. "2.5.4.3"
- 3*i + 1: long or short name if available,
- e.g. "commonName"
- 3*i + 2: value
- array [2] : if extra is set:
- array with 3*n entries of x509 extension data
- data structure is:
- 3*i : numerical form of extension name
- 3*i + 1: long or short name of extension
- name if available
- 3*i + 2: array of strings with the data
- structure of [1]
+ int [0] : Result code of SSL_get_verify_result (see 'man 1 verify',
+ subsection DIAGNOSTICS for possible values)
+ array [1] : array with 3*n entries of extra x509 data.
+ structure is:
+ 3*i : numerical form of object name,
+ e.g. "2.5.4.3"
+ 3*i + 1: long or short name if available,
+ e.g. "commonName"
+ 3*i + 2: value
+ array [2] : if extra is set:
+ array with 3*n entries of x509 extension data
+ data structure is:
+ 3*i : numerical form of extension name
+ 3*i + 1: long or short name of extension
+ name if available
+ 3*i + 2: array of strings with the data
+ structure of [1]
- Note: a x509 certificate can have more than one object with
- the same name
-
-BUGS
- Not supported when using GnuTLS.
+ Note: An X509 certificate can have more than one object with
+ the same name.
HISTORY
Introduced in LDMud 3.3.672/3.2.11.
diff --git a/doc/efun/tls_init_connection b/doc/efun/tls_init_connection
index e33afae..e36bbac 100644
--- a/doc/efun/tls_init_connection
+++ b/doc/efun/tls_init_connection
@@ -1,7 +1,8 @@
PRELIMINARY
SYNOPSIS
int tls_init_connection(object ob)
- int tls_init_connection(object ob, string fun, string|object fob, mixed extra...)
+ int tls_init_connection(object ob, string fun, string|object fob,
+ mixed extra...)
int tls_init_connection(object ob, closure fun, mixed extra...)
DESCRIPTION
diff --git a/doc/efun/tls_query_connection_info b/doc/efun/tls_query_connection_info
index 32aeef7..5db0b84 100644
--- a/doc/efun/tls_query_connection_info
+++ b/doc/efun/tls_query_connection_info
@@ -1,7 +1,8 @@
PRELIMINARY
SYNOPSIS
- #include <sys/ tls.h>
- int *tls_query_connection_info (object ob)
+ #include <tls.h>
+
+ int * tls_query_connection_info(object ob)
DESCRIPTION
If <ob> does not have a TLS connection or if the connection
diff --git a/doc/efun/tls_refresh_certs b/doc/efun/tls_refresh_certs
index c8364c5..995b6e4 100644
--- a/doc/efun/tls_refresh_certs
+++ b/doc/efun/tls_refresh_certs
@@ -5,8 +5,13 @@
DESCRIPTION
Reload the certificates and certificate revocation information.
-BUGS
- Not supported when using GnuTLS.
+ If there are no key and certificate files to be found, this efun
+ will keep the current keys and certificates, to keep TLS working.
+ CAs and CRLs are cleared and reloaded in any case.
+
+ Note that when using GnuTLS a call to tls_refresh_certs()
+ while a connection is in the middle of a TLS handshake might
+ result in a wrong key to be used.
HISTORY
Introduced in LDMud 3.3.714/3.2.15.
diff --git a/doc/efun/to_array b/doc/efun/to_array
index afc91c1..8f30a7f 100644
--- a/doc/efun/to_array
+++ b/doc/efun/to_array
@@ -1,29 +1,37 @@
SYNOPSIS
- mixed * to_array(string arg)
- mixed * to_array(bytes arg)
- mixed * to_array(symbol arg)
- mixed * to_array(quotedarray arr)
- mixed * to_array(mixed *arg)
- mixed * to_array(struct arg)
+ mixed * to_array(string)
+ mixed * to_array(bytes)
+ mixed * to_array(symbol)
+ mixed * to_array(quotedarray)
+ mixed * to_array(mixed *)
+ mixed * to_array(struct)
+ mixed * to_array(lpctype)
(int*)<value>
-BESCHREIBUNG
- Strings und Symbole werden umgewandelt in ein Integer-Array, das aus
- den Zeichen von <arg> besteht, wobei 0 == '\0' als letzes Zeichen
- im Array gespeichert wird.
+DESCRIPTION
+ Strings and symbols are converted to an int array that
+ consists of the args characters. Note that the string "12" will be
+ converted to the array ({ 33, 34 }), and not ({ 33, 34, 0 }) (the
+ LDMud versions prior to 3.3 returned the latter array).
- Bytefolgen werden in ein Array dieser Bytes konvertiert.
+ Byte sequences are converted into an array of these bytes.
- Gequotete Arrays werden "entquotet", und Arrays bleiben, wie sie sind.
+ Quoted arrays are ``dequoted'', and arrays are left as they
+ are.
-FEHLER
- Die Cast-Schreibweise funktioniert nur, wenn der genaue Wert von
- <value> zum Zeitpunkt der Kompilierung bekannt ist. Dies wird
- nicht geaendert werden, da die Funktionsform verwendet werden kann.
+ Structs are converted into a normal array.
-GESCHICHTE
- LDMud 3.3.250 fuegte den Support von structs hinzu.
+ Union lpc types are split into their union member types
+ (in no particular order).
-SIEHE AUCH
- to_int(E), to_string(E)
+BUGS
+ The cast notation only works if the precise type of <value>
+ is known at compile-time. This will not be fixed - use the
+ function form instead.
+
+HISTORY
+ LDMud 3.3.250 added structs to the accepted data types.
+
+SEE ALSO
+ to_int(E), to_string(E), to_struct(E)
diff --git a/doc/efun/to_float b/doc/efun/to_float
index 2d6f8d6..1717bae 100644
--- a/doc/efun/to_float
+++ b/doc/efun/to_float
@@ -1,19 +1,19 @@
SYNOPSIS
- float to_float(int arg)
- float to_float(string arg)
- float to_float(float arg)
+ float to_float(int)
+ float to_float(string)
+ float to_float(float)
(float)<value>
-BESCHREIBUNG
- Integers werden zu Floats erweitert, Strings werden in Floats
- konvertiert bis zum ersten Zeichen, das nicht mehr zum Float
- gehoert. Floats werden direkt zurueck gegeben.
+DESCRIPTION
+ Ints are expanded to floats, strings are converted up to the
+ first character that doesnt belong into a float.
+ Floats are just returned.
-FEHLER
- Die Cast-Schreibweise funktioniert nur, wenn der genaue Wert von
- <value> zum Zeitpunkt der Kompilierung bekannt ist. Dies wird nicht
- geaendert werden, da die Funktionsform verwendet werden kann.
+BUGS
+ The cast notation only works if the precise type of <value>
+ is known at compile-time. This will not be fixed - use the
+ function form instead.
-SIEHE AUCH
+SEE ALSO
to_string(E), to_int(E), sscanf(E)
diff --git a/doc/efun/to_int b/doc/efun/to_int
index 75c1992..a3a98ee 100644
--- a/doc/efun/to_int
+++ b/doc/efun/to_int
@@ -1,32 +1,33 @@
SYNOPSIS
- int to_int(string arg)
- int to_int(float arg)
- int to_int(int arg)
- int to_int(closure arg)
+ int to_int(string)
+ int to_int(float)
+ int to_int(int)
+ int to_int(closure)
(int)<value>
-BESCHREIBUNG
- Bei Floats werden die Nachkommastellen abgeschnitten, Strings mit
- Ziffern am Anfang werden bis zum ersten Nicht-Ziffern-Zeichen in
- Integers umgewandelt. Lfun-Closures werden in ihren Funktionsindex
- konvertiert, Variablen-Closures in ihren Variablenindex. Integers
- werden unveraendert zurueck gegeben.
+DESCRIPTION
+ Floats are truncated to integer values, strings with leadings
+ digits are converted to integers up to the first non-digit.
+ lfun-closures are converted into their function index (not adjusted
+ for inheritance), variable closure are converted into their variable
+ index.
+ Integers are just returned.
- Bezueglich Floats ist es wichtig, Rundungseffekte zu beachten:
- to_int(3.1*10.0) ergibt nicht 31, sondern 30, weil intern das
- Resultat der Multiplikation 30.999999 ergibt.
-
- Diese Funktion unterstuetzt die Basisprefixe '0x', '0o' und '0b'.
+ Regarding floats, it is important to keep rounding effects
+ in mind: to_int(3.1*10.0) does not return 31, but instead 30,
+ because internally the result of the multiplication is 30.999999.
-FEHLER
- Die Cast-Schreibweise funktioniert nur, wenn der genaue Wert von
- <value> zum Zeitpunkt der Kompilierung bekannt ist. Dies wird
- nicht geaendert werden, da die Funktionsform verwendet werden kann.
+ The function supports the '0x', '0o' and '0b' base prefixes.
-GESCHICHTE
- Eingefuehrt in 3.2.1@2.
- LDMud 3.2.11 fuehrte die Basisprefixe ein.
+BUGS
+ The cast notation only works if the precise type of <value>
+ is known at compile-time. This will not be fixed - use the
+ function form instead.
-SIEHE AUCH
+HISTORY
+ Introduced in 3.2.1@2.
+ LDMud 3.2.11/3.3.611 added support for the base prefixes.
+
+SEE ALSO
to_string(E), sscanf(E)
diff --git a/doc/efun/to_lpctype b/doc/efun/to_lpctype
new file mode 100644
index 0000000..dc681c7
--- /dev/null
+++ b/doc/efun/to_lpctype
@@ -0,0 +1,12 @@
+SYNOPSIS
+ lpctype to_lpctype(string type)
+
+DESCRIPTION
+ Interprets the given string as an lpc type. This efun basically
+ returns the same type as the [<type>] literal.
+
+HISTORY
+ Introduced in LDMud 3.6.7.
+
+SEE ALSO
+ to_string(E), lpctypes(LPC)
diff --git a/doc/efun/to_object b/doc/efun/to_object
index 1ca88da..1eba674 100644
--- a/doc/efun/to_object
+++ b/doc/efun/to_object
@@ -5,25 +5,23 @@
(object)<value>
-BESCHREIBUNG
- Das Argument <arg> wird in ein Objekt umgewandelt, wenn dies
- moeglich ist.
+DESCRIPTION
+ The argument is converted into an object, if possible.
- Fuer Strings wird das Objekt mit entsprechendem object_name(<arg>)
- zurueck gelierfert, oder 0, wenn es kein entsprechendes Objekt gibt.
- Dies entspricht find_object().
+ For strings, the object with a matching object_name() is
+ returned, or 0 if there is none, as find_object() does.
- Fuer (gebundene!) Closures wird das Objekt zurueck gegeben, das die
- Closure enthaelt. Fuer "Alien Lfun Closures" ist das das Objekt, das
- die Closure erzeugt hat, nicht das Objekt, in dem die Lfun definiert
- ist.
+ For (bound!) closures, the object holding the closure is
+ returned (for 'alien lfun closures' this is the object which
+ created the closure, not the object the lfun is defined in).
- Objekte und die Zahl 0 werden unveraendert zurueck gegeben.
+ Objects and the number 0 return themselves.
-FEHLER
- Die Cast-Schreibweise funktioniert nur, wenn der genaue Wert von
- <value> zum Zeitpunkt der Kompilierung bekannt ist. Dies wird nicht
- geaendert werden, da die Funktionsform verwendet werden kann.
+BUGS
+ The cast notation only works if the precise type of <value>
+ is known at compile-time. This will not be fixed - use the
+ function form instead.
-SIEHE AUCH
- find_object(E), to_array(E), to_int(E), to_string(E), get_type_info(E)
+SEE ALSO
+ find_object(E), to_array(E), to_int(E), to_string(E),
+ get_type_info(E)
diff --git a/doc/efun/to_string b/doc/efun/to_string
index 1d23ef6..89afa37 100644
--- a/doc/efun/to_string
+++ b/doc/efun/to_string
@@ -1,29 +1,29 @@
SYNOPSIS
- string to_string(mixed arg)
+ string to_string(mixed)
-BESCHREIBUNG
- <arg> wird in einen String umgewandelt. Das klappt mit Werten vom Typ
- int, float, object, array, struct, symbol, string oder closure.
+ (string)<value>
- Closures werden in einen passenden Namen umgewandelt (vorwiegend fuer
- Debugging-Zwecke geeignet).
+DESCRIPTION
+ The argument is converted to a string. Works with int, float,
+ object, arrays, structs, symbols, strings and closures.
-ANMERKUNGEN
- Arrays werden als "explodete" Strings betrachtet, also Arrays von
- Zeichencodes. Sie werden bis zur ersten 0 oder bis zum ersten
- nicht-numerischen Eintrag "implodet", je nachdem, was zuerst eintritt.
+ Converts closures and structs into an appropriate name (this
+ has mostly debugging purposes).
- Das bedeutet, dass to_string( ({ 49, 50 }) ); "12" liefert, und nicht
- "({ 49, 50 })"
+ CAVEAT: Arrays are considered exploded strings, ie. arrays of
+ Unicode codepoints (i.e. each number is one Unicode character),
+ and are 'imploded' up to the first non-number entry, whatever
+ comes first. That means that to_string(({ 49, 50 })) will return
+ "12" and not "({ 49, 50 })".
-FEHLER
- Die Cast-Schreibweise funktioniert nur, wenn der genaue Wert von
- <value> zum Zeitpunkt der Kompilierung bekannt ist. Dies wird nicht
- geaendert werden, da die Funktionsform verwendet werden kann.
+BUGS
+ The cast notation only works if the precise type of <value>
+ is known at compile-time. This will not be fixed - use the
+ function form instead.
-GESCHICHTE
- LDMud 3.2.8 laesst Lambdaclosures als gueltige Datentypen zu.
- LDMud 3.3.250 laesst structs als gueltige Datentypen zu.
+HISTORY
+ LDMud 3.2.8 adds lambda closures to the accepted data types.
+ LDMud 3.3.250 adds structs to the accepted data types.
-SIEHE AUCH
+SEE ALSO
to_array(E), to_int(E), to_object(E), to_struct(E), sprintf(E)
diff --git a/doc/efun/to_type b/doc/efun/to_type
new file mode 100644
index 0000000..dc93eb1
--- /dev/null
+++ b/doc/efun/to_type
@@ -0,0 +1,58 @@
+SYNOPSIS
+ mixed to_type(mixed value, lpctype type)
+ mixed to_type(mixed value, lpctype type, struct to_type_options options)
+
+DESCRIPTION
+ Converts <value> to <type>. This efun will apply any type conversions
+ recursively to make <value> conform to <type>. The following
+ conversions are available:
+
+ source type target types
+ ------------- ----------------------------------------
+ array (int) string, bytes
+ array (mixed) quoted array, struct, mapping
+ bytes string, int*
+ closure object, lwobject, int, string
+ coroutine string
+ int float, string
+ float int, string
+ lpctype lpctype*, mapping, string
+ lwobject string
+ mapping struct, mixed*
+ object string
+ quoted array mixed*
+ string symbol, int, float, lpctype, object, bytes, int*
+ struct struct, mapping, mixed*, string
+ symbol string, int*
+
+ If multiple conversions are possible (e.g. to_type("10", <int|int*>)
+ the conversion will be selected in order as given in the table above.
+ If multiple array or struct types are given, the order is undefined.
+ Conversions, where elements (e.g. from an array, mapping or struct)
+ need to be discarded, are not considered.
+
+ Optionally the function accepts a struct with additional options.
+ All entries in this struct are optional. These are the members:
+
+ source_encoding:
+ The encoding (given as string) for conversion from bytes to
+ string. If not given, such a conversion will not be performed.
+
+ target_encoding:
+ The encoding (given as string) for conversion from string to
+ bytes. If not given, such a conversion will not be performed.
+
+ keep_zero:
+ If set (integer != 0) a zero will not be converted. If unset,
+ a zero will be converted to string or float if requested,
+ for all other types it will stay zero.
+
+EXAMPLES
+ to_type(({ "10", "20" }), [int*]) -> ({ 10, 20 })
+
+HISTORY
+ Introduced in LDMud 3.6.8.
+
+SEE ALSO
+ to_array(E), to_bytes(E), to_float(E), to_int(E), to_lpctype(E),
+ to_object(E), to_string(E), to_struct(E), to_text(E)
diff --git a/doc/efun/trace b/doc/efun/trace
index 330fcf1..829d8a1 100644
--- a/doc/efun/trace
+++ b/doc/efun/trace
@@ -1,54 +1,57 @@
-GESCHUETZT
SYNOPSIS
#include <trace.h>
int trace(int traceflags)
-BESCHREIBUNG
- Setzt die Trace Flags und liefert die alten Trace Flags zurueck.
- Wenn Tracing eingeschaltet ist, wird waehrend der Ausfuehrung eine
- Menge Informationen ausgegeben. Zu viel Output kann die Verbindung
- lahm legen oder sogar den ganzen Treiber zum Absturz bringen.
+DESCRIPTION
+ Sets the trace flags and returns the old trace flags. When
+ tracing is on, a lot of information is printed during
+ execution and too much output can crash your connection or
+ even the whole driver.
- Tracing erfolgt auf einer Pro-Verbindung-Basis: jeder interaktive (!)
- User kann sein eigenes Tracelevel und -praefix festlegen. Jeder
- erhaelt nur den Traceoutput fuer den Code, der waehrend der
- Auswertung eines vom User eingegeben Kommandos ausgefuehrt wird.
+ Tracing is done on a per-connection basis: each interactive(!)
+ user may specifiy their own tracelevel and -prefix. Each gets the
+ traceoutput for just the code executed during the evaluation
+ of the commands he entered.
- Die Trace-Bits (aus <trace.h>) sind:
+ The trace bits are:
- TRACE_NOTHING ( 0): Beendet das Tracing
- TRACE_CALL ( 1): Tracet alle Aufrufe von Lfuns
- TRACE_CALL_OTHER ( 2): Tracet alle call_other() Aufrufe
- TRACE_RETURN ( 4): Tracet Resultate von Funktionen
- TRACE_ARGS ( 8): Gibt Argumente und Resultate von
- Funktionen aus
- TRACE_EXEC ( 16): Tracet alle ausgefuehrten Anweisungen
- TRACE_HEART_BEAT ( 32): Tracet den Heartbeat Code
- TRACE_APPLY ( 64): Tracet Treiber-Applies
- TRACE_OBJNAME (128): Gibt den Namen des Objektes aus
+ TRACE_NOTHING ( 0): stop tracing.
- TRACE_EXEC und TRACE_HEART_BEAT sollten nicht verwendet werden, weil
- sie massiven Output verursachen. TRACE_OBJNAME sollte nicht verwendet
- werden, wenn bekannt ist, welches Objekt getracet wird.
+ TRACE_CALL ( 1): trace all calls to lfuns.
+ TRACE_CALL_OTHER ( 2): trace call_others()s.
+ TRACE_RETURN ( 4): trace function returns.
+ TRACE_ARGS ( 8): print function arguments and results.
+ TRACE_EXEC ( 16): trace all executed instructions.
+ TRACE_HEART_BEAT ( 32): trace heartbeat code.
+ TRACE_APPLY ( 64): trace driver applies.
+ TRACE_OBJNAME (128): print the object names.
- Die Master-Lfun valid_trace() wird mit ("trace", traceflags)
- aufgerufen, um die Erlaubnis fuer die Nutzung von trace() zu erhalten.
+ TRACE_EXEC and TRACE_HEART_BEAT should be avoided as they cause
+ massive output! TRACE_OBJNAME should be avoided when you know
+ what you trace.
-BEISPIELE
+ The master-lfun valid_trace() is called with ("trace", traceflags)
+ as argument to verify the use of this efun.
+
+
+EXAMPLES
object obj;
string prefix;
- obj = find_player("thomas");
- prefix = object_name(obj); /* z.B. /std/player#69 */
- prefix = prefix[1..]; /* entfernt den fuehrenden "/" */
+ obj = find_player("wessex");
+ prefix = object_name(obj);
+ prefix = prefix[1..]; /* cut off the leading "/" */
traceprefix(prefix);
- /* Von hier an wird nur Code im Objekt std/player#69 getracet */
+ /* From here on, only code in the object "std/player#69"
+ * will be traced.
+ */
trace(TRACE_CALL|TRACE_CALL_OTHER|TRACE_RETURN|TRACE_ARGS);
...
trace(TRACE_NOTHING);
-GESCHICHTE
- LDMud 3.2.9 uebergibt auch <traceflags> an valid_trace().
+HISTORY
+ LDMud 3.2.9 passes the <traceflags> argument to the valid_trace()
+ apply as well.
-SIEHE AUCH
+SEE ALSO
traceprefix(E)
diff --git a/doc/efun/traceprefix b/doc/efun/traceprefix
index 24802ef..3b0595c 100644
--- a/doc/efun/traceprefix
+++ b/doc/efun/traceprefix
@@ -1,38 +1,37 @@
-GESCHUETZT
SYNOPSIS
+ #include <trace.h>
+
string traceprefix(string prefix)
string traceprefix(int dummy)
-BESCHREIBUNG
- Wenn die Funktion mit einem String als Argument aufgerufen wird,
- werden nur Objekte getracet, deren Name mit diesem String
- uebereinstimmt. Der String <prefix> darf am Anfang keinen "/"
- enthalten, weil Objektnamen intern ohne diesen "/" am Anfang
- gespeichert werden. Wird traceprefix() mit einer Zahl als Argument
- aufgerufen, wird traceprefix ignoriert und alle Objekte werden
- getracet.
+DESCRIPTION
+ If called with a string, only objects matching this prefix will
+ be traced. The string must not contain a leading "/" because
+ the object names are stored internally without it. If called
+ with a number, the traceprefix will be ignored and all objects
+ will be traced. Returns the last traceprefix or 0 if there
+ wasn't any.
- Die Funktion liefert das alte Praefix zurueck oder 0, wenn keines
- gefunden wurde.
+ The master-lfun valid_trace() is called with ("traceprefix", prefix)
+ as arguments to verify the use of this efun.
- Die Master-Lfun valid_trace() wird mit ("traceprefix", prefix)
- aufgerufen, um die Erlaubnis fuer die Benutzung dieser Funktion zu
- erhalten.
-
-BEISPIELE
+EXAMPLES
object obj;
string prefix;
- obj=find_player("thomas");
- prefix = object_name(obj); /* z.B. /std/player#69 */
- prefix = prefix[1..]; /* entfernt den fuehrenden "/" */
+ obj = find_player("wessex");
+ prefix = object_name(obj);
+ prefix = prefix[1..]; /* cut off the leading "/" */
traceprefix(prefix);
- /* Von hier an wird nur Code im Objekt std/player#69 getracet */
- trace(TRACE_CALL|TRACE_CALL_OTHER|TRACE_RETURN|TRACE_ARGS);
+ /* From here on, only code in the object "std/player#69"
+ * will be traced.
+ */
+ trace(TRACE_CALL | TRACE_CALL_OTHER | TRACE_RETURN | TRACE_ARGS);
...
trace(TRACE_NOTHING);
-GESCHICHTE
- Ab LDMud 3.2.9 wird das Argument <prefix> an valid_trace() uebergeben.
+HISTORY
+ LDMud 3.2.9 passes the <prefix> argument to the valid_trace()
+ apply as well.
-SIEHE AUCH
+SEE ALSO
trace(E)
diff --git a/doc/efun/transfer b/doc/efun/transfer
new file mode 100644
index 0000000..206df24
--- /dev/null
+++ b/doc/efun/transfer
@@ -0,0 +1,116 @@
+DEPRECATED
+SYNOPSIS
+ int transfer(object item, object dest)
+
+DESCRIPTION
+ This efun is for backward compatibility only. It is only
+ available in compat mode.
+
+ Move the object "item" to the object "dest". All kinds of
+ tests are done, and a number is returned specifying the
+ result:
+
+ 0: Success.
+ 1: To heavy for destination.
+ 2: Can't be dropped.
+ 3: Can't take it out of it's container.
+ 4: The object can't be inserted into bags etc.
+ 5: The destination doesn't allow insertions of objects.
+ 6: The object can't be picked up.
+
+ If an object is transfered to a newly created object, make
+ sure that the new object first is transfered to it's
+ destination.
+
+ The efun calls add_weight(), drop(), get(), prevent_insert(),
+ add_weight(), and can_put_and_get() where needed.
+
+REPLACEMENT
+ This efun can easily be replaced with a simul_efun:
+
+ /*--------------------------------------------------------*/
+ int transfer(object item, object dest)
+ {
+ int weight;
+ object from;
+
+ efun::set_this_object(previous_object());
+
+ weight = item->query_weight();
+ if (!item)
+ return 3;
+
+ from = environment(item);
+ if (from)
+ {
+ /*
+ * If the original place of the object is a living object,
+ * then we must call drop() to check that the object can be
+ * dropped.
+ */
+ if (living(from))
+ {
+ if (item->drop() || !item)
+ return 2;
+ }
+ /*
+ * If 'from' is not a room and not a player, check that we may
+ * remove things out of it.
+ */
+ else if (environment(from))
+ {
+ if (!from->can_put_and_get() || !from)
+ return 3;
+ }
+ }
+
+ /*
+ * If the destination is not a room, and not a player,
+ * Then we must test 'prevent_insert', and 'can_put_and_get'.
+ */
+ if (environment(dest) && !living(dest))
+ {
+ if (item->prevent_insert())
+ return 4;
+ if (!dest->can_put_and_get() || !dest)
+ return 5;
+ }
+
+ if (living(dest))
+ {
+ if (!item->get() || !item)
+ return 6;
+ }
+
+ /*
+ * If it is not a room, correct the total weight in the
+ * destination.
+ */
+ if (environment(dest) && weight)
+ {
+ if (!dest->add_weight(weight) || !dest)
+ return 1;
+ }
+
+ /*
+ * If it is not a room, correct the weight in the 'from' object.
+ */
+ if (from && environment(from) && weight)
+ {
+ from->add_weight(-weight);
+ }
+
+ move_object(item, dest);
+
+ return 0;
+ }
+ /*--------------------------------------------------------*/
+
+
+HISTORY
+ Deprecated in LDMud 3.3; available only when compiled with
+ USE_DEPRECATED.
+
+SEE ALSO
+ move_object(E), drop(A), get(A), prevent_insert(A),
+ can_put_and_get(A), add_weight(A)
diff --git a/doc/efun/transpose_array b/doc/efun/transpose_array
index 58654c1..8ae3af7 100644
--- a/doc/efun/transpose_array
+++ b/doc/efun/transpose_array
@@ -1,23 +1,22 @@
SYNOPSIS
mixed * transpose_array(mixed *arr)
-BESCHREIBUNG
- Transponiert das Array <arr>.
+DESCRIPTION
+ transpose_array(({ ({1,2,3}), ({a,b,c}) }))
+ == ({ ({1,a}), ({2,b}), ({3,c}) })
- transpose_array( ({ ({1,2,3}) , ({a,b,c}) }) )
- ergibt: ({ ({1,a}), ({2,b}), ({3,c}) })
+ transpose_array() applied to an alist results in an array of
+ ({ key, data }) pairs, useful if you want to use sort_array()
+ or filter() on the alist.
- Wird transpose_array() auf eine Alist angewendet, ergibt das ein
- Array von ({ key, data }) in Paaren. Das ist praktisch, wenn
- sort_array() oder filter() auf die Alist angewendet werden soll.
+EXAMPLES
+ sort_array(transpose_array(({ m_indices(map), m_values(map) })),
+ lambda(({ 'a, 'b }),
+ ({ #'<, ({ #'[, 'a, 0 }),
+ ({ #'[, 'b, 0}) }) )
-BEISPIELE
- sort_array(transpose_array( ({m_indices(map), m_values(map) }) ),
- lambda( ({'a, 'b}),
- ({#'<, ({ #'[, 'a, 0}),
- ({ #'[, 'b, 0}) }) ));
- Dieses Gebilde liefert das Mapping 'map' als Array von ({key, data })
- Paaren, sortiert nach den Keys.
+ The given mapping 'map' is returned as an array of
+ ({ key, data }) pairs, sorted by the keys.
-SIEHE AUCH
+SEE ALSO
alists(LPC), sort_array(E)
diff --git a/doc/efun/trim b/doc/efun/trim
index d5c58fa..c14e6c0 100644
--- a/doc/efun/trim
+++ b/doc/efun/trim
@@ -1,33 +1,31 @@
SYNOPSIS
#include <strings.h>
- string trim(string str)
- string trim(string str, int where)
- string trim(string str, int where, string char)
+ string trim(string s)
+ string trim(string s, int where)
+ string trim(string s, int where, int ch)
+ string trim(string s, int where, string ch)
-BESCHREIBUNG
- Entfernt alle vorausgehenden und abschliessenden Zeichen <char> in
- einem String <str> und gibt den neuen String zurueck.
+DESCRIPTION
+ Remove all leading and trailing characters <ch> from the string
+ <s> and return the new string.
- <char> kann entweder ein oder mehrere Zeichen sein. Wird <char> nicht
- angegeben, wird standardmaessig der Leerschlag " \t" genutzt.
+ <ch> may be given as a single character, or a string of characters.
+ If <ch> is not given, it defaults to the whitespace " \t".
- Mit <where> kann angegeben werden, wo Zeichen entfernt werden:
+ <where> can be used to modify where the characters are removed:
- TRIM_LEFT (1): entfernt alle vorausgehenden
- Zeichen <char>
- TRIM_RIGHT (2): entfernt alle abschliessenden
- Zeichen <char>
- TRIM_BOTH (3 oder 0): entfernt sowohl vorausgehende als auch
- abschliessende Zeichen <char>
+ TRIM_LEFT (1): remove the leading characters
+ TRIM_RIGHT (2): remove the trailing characters
+ TRIM_BOTH (3 or 0): remove both leading and trailing characters
-BEISPIELE
- trim(" 1234 "); ergibt: "1234"
- trim(" 1234 ", TRIM_RIGHT); ergibt: " 1234"
- trim(" 1234 ", TRIM_BOTH, " 1"); ergibt: "234"
+EXAMPLES
+ trim(" 1234 ") --> "1234"
+ trim(" 1234 ", TRIM_RIGHT) --> " 1234"
+ trim(" 1234 ", TRIM_BOTH, " 1") --> "234"
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.7.
+HISTORY
+ Introduced in LDMud 3.2.7.
-SIEHE AUCH
+SEE ALSO
regreplace(E)
diff --git a/doc/efun/typeof b/doc/efun/typeof
index b4716b0..888080b 100644
--- a/doc/efun/typeof
+++ b/doc/efun/typeof
@@ -1,15 +1,17 @@
SYNOPSIS
#include <lpctypes.h>
- int typeof(mixed arg)
+ int typeof(mixed)
-BESCHREIBUNG
- Gibt einen Code fuer den Typ des Arguments <arg>. Die Typen sind
- definiert in <lpctypes.h>.
+DESCRIPTION
+ Returns a code for the type of the argument, as defined in
+ <lpctypes.h>.
-GESCHICHTE
- Eingefuehrt in 3.2@63.
+HISTORY
+ Introduced in 3.2@63.
-SIEHE AUCH
- get_type_info(E), intp(E), objectp(E), floatp(E), pointerp(E),
- closurep(E), symbolp(E), stringp(E), bytesp(E), mappingp(E)
+SEE ALSO
+ get_type_info(E), bytesp(E), clonep(E), closurep(E), coroutinep(E),
+ floatp(E), intp(E), lpctypep(E), lwobjectp(E), mappingp(E),
+ objectp(E), pointerp(E), referencep(E), stringp(E), structp(E),
+ symbolp(E)
diff --git a/doc/efun/unbound_lambda b/doc/efun/unbound_lambda
index 79926e1..eaf715d 100644
--- a/doc/efun/unbound_lambda
+++ b/doc/efun/unbound_lambda
@@ -1,30 +1,24 @@
SYNOPSIS
- closure unbound_lambda(mixed *arg, mixed code)
+ closure unbound_lambda(mixed *args, mixed)
-BESCHREIBUNG
- Erzeugt eine Lambda-Closure, die nicht an ein Objekt gebunden ist,
- entsprechend einer Lambda-Funktion in LISP.
+DESCRIPTION
+ Constructs a lambda closure that is not bound to an object,
+ like lambda function in LISP.
+ The closure cannot contain references to global variables, and
+ all lfun closures are inserted as is, since there is no native
+ object for this closure. You need to bind it before it can be
+ called. Ordinary objects can only bind to themselves, binding
+ to other objects causes a privilege violation(). The point is
+ that previous_object for calls done from inside the closure
+ will reflect the object doing bind_lambda(), and all object /
+ uid based security will also refer to this object.
- Die Closure kann keine Referenz zu globalen Variablen enthalten.
- Lfun-Closures werden unveraendert in die Closure eingebunden, da es
- kein Ursprungsobjekt fuer diese Closure gibt.
+ The first argument is an array describing the arguments
+ (symbols) passed to the closure upon evaluation by funcall()
+ or apply(), the second arg forms the code of the closure.
- Bevor die Closure aufgerufen werden kann, muss sie an ein Objekt
- gebunden werden. Normale Objekte koennen Closures nur an sich selbst
- binden, das Binden an andere Objekte erzeugt eine Schutzverletzung.
+HISTORY
+ Introduced in 3.2@82.
- Der Punkt ist, dass previous_object() fuer Aufrufe innerhalb der
- Closure auf das Objekt zeigt, das bind_lambda() aufgerufen hat, und
- alle objekt- oder uid-basierten Sicherheitschecks beziehen sich
- auf jenes Objekt.
-
- Das erste Argument <*arg> ist ein Array, das die Argumente (Symbole)
- enthaelt, die an die Closure uebergeben werden, wenn diese mit
- funcall() oder apply() ausgewertet wird. Das zweite Argument <code>
- enthaelt den Code der Closure.
-
-GESCHICHTE
- Eingefuehrt in 3.2@82.
-
-SIEHE AUCH
+SEE ALSO
closures(LPC), lambda(E), apply(E), funcall(E), bind_lambda(E)
diff --git a/doc/efun/unique_array b/doc/efun/unique_array
index 72da0b0..b1c649c 100644
--- a/doc/efun/unique_array
+++ b/doc/efun/unique_array
@@ -1,47 +1,48 @@
SYNOPSIS
- <object|lwobject>** unique_array(<object|lwobject> *obj
- , string|closure fun)
- <object|lwobject>** unique_array(<object|lwobject> *obj
- , string|closure fun, mixed skip)
- <object|lwobject>** unique_array(<object|lwobject> *obj
- , string|closure fun, mixed extra...
- , mixed skip)
+ <object|lwobject>** unique_array(<object|lwobject> *obarr
+ , string|closure fun)
+ <object|lwobject>** unique_array(<object|lwobject> *obarr
+ , string|closure fun, mixed skip)
+ <object|lwobject>** unique_array(<object|lwobject> *obarr
+ , string|closure fun, mixed extra...
+ , mixed skip)
-BESCHREIBUNG
- Gruppiert alle Objekte aus <*obj>, fuer die die Funktion <fun>
- den gleichen Wert liefert. Wenn <*obj> etwas anderes als Objekte
- enthaelt, werden diese ignoriert.
+DESCRIPTION
+ Groups objects together for which the separator function returns the
+ same value. obarr should be an array of objects, other types are
+ ignored.
- Ist die Funktion mit Namen angegeben, wird sie in jedem Objekt
- in <*obj> einmal aufgerufen. Wurden <extra> Argumente
- gegeben, werden diese an die Funktion bei jedem Aufruf als
- Parameter uebergeben.
-
- Ist die Funktion als Closure angegeben, wird sie fuer jedes Objekt
- in <*obj> einmal aufgerufen, wobei das Objekt als erstes Argument
- uebergeben wird, gefolgt von etwaiigen <extra> Argumenten.
-
- Wird ein Argument <skip> angegeben (bei Verwendung von <extra>
- Argumenten muss dies geschehen), und entspricht <skip> dem
- Resultat von <separator> fuer ein Element aus <*obj>, so wird
- dieses Element nicht in das Resultat von unique_array()
- uebernommen.
+ If the separator function is defined by name, it is searched and
+ called in the objects from <obarr>. If <extra> arguments are given,
+ they are passed to the function as arguments.
- Das Resultat von unique_array() hat die Form:
+ If the separator function is defined as a closure, it will be passed
+ the objects from <obarr> as first argument, with the <extra> arguments
+ (if any) passed following.
+
+ If the <skip> argument is given (it is required when <extra> arguments
+ are to be used), and the return value from the separator function call
+ matches this value, the object in question will _not_ be included in
+ the returned array. Default value for <skip> is the number 0.
- ({ ({same1:1, same1:2, ... same1:n}),
- ({same2:1, same2:2, ... same2:n}),
- ({samem:1, samem:2, ... samem:n}) })
+ The returned array is an array of arrays of objects in the form:
-BEISPIELE
- Um ein Array von Arrays zu erhalten, das alle Benutzer, nach Level
- gruppiert, enthaelt:
+ ({ ({ Same1:1, Same1:2, ... Same1:N }),
+ ({ Same2:1, Same2:2, ... Same2:N }),
+ ....
+ ({ SameM:1, SameM:2, ... SameM:N }) })
- mixed *arr;
- arr = unique_array(users(), "_query_level", -1);
+EXAMPLES
+ mixed *arr;
+ arr=unique_array(users(), "_query_level", -1);
- Goetter haben einen Level von -1. Sie werden nicht in arr aufgenommen,
- weil <skip> == -1.
+ This will return an array of arrays holding all user objects
+ grouped together by their user levels. Wizards have a user
+ level of -1 so they will not appear in the the returned array.
-SIEHE AUCH
+HISTORY
+ LDMud 3.3 added the possibility to call closures, and to
+ pass extra arguments to the separator function.
+
+SEE ALSO
filter(E), map(E)
diff --git a/doc/efun/unmkmapping b/doc/efun/unmkmapping
index 6eedb60..a537f82 100644
--- a/doc/efun/unmkmapping
+++ b/doc/efun/unmkmapping
@@ -1,27 +1,30 @@
SYNOPSIS
mixed * unmkmapping(mapping map)
-BESCHREIBUNG
- Wandelt das Mapping <map> in ein Array von Arrays aus, das alle Keys
- und Werte von <map> enthaelt und gibt dieses Array zurueck.
+DESCRIPTION
+ Take mapping <map> and return an array of arrays with the keys
+ and values from the mapping.
- Das Resultat von unmkmapping() hat die Form ({ keys[], data0[],
- data1[] ... }), wobei keys[] ein Array aller Keys ist, data0[] ein
- Array mit allen Werten aus der ersten Spalte, data1[] ein Array mit
- allen Werten aus der zweiten Spalte etc. Das heisst, dass die
- Werte von key[x] in data0[x], data1[x] usw. gespeichert sind.
+ The return array has the form ({ keys[], data0[], data1[], ... }),
+ with keys[] being the array of all keys, data0[] the array of
+ all values in the first column, data1[] the array of all values
+ in the second column, etc. In particular, the data for key[x]
+ is stored in data0[x], data1[x], etc.
- unmkmapping() ist die Umkehrfunktion von mkmapping(), sodass gilt:
+ unmkmapping() is inverse to mkmapping(), so that
apply(#'mkmapping, unmkmapping(m)) == m
-BEISPIELE
+ holds.
+
+EXAMPLES
mapping m = ([ 1:10;20, 2:11;21 ]);
- unmkmapping(m) ergibt: ({ ({1, 2}) , ({10, 11}) , ({20, 21}) })
+ unmkmapping(m)
+ --> returns ({ ({1, 2}), ({ 10, 11 }), ({ 20, 21 }) })
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.6.
+HISTORY
+ Introduced in LDMud 3.2.6.
-SIEHE AUCH
- mappings(LPC), mappingp(E), m_indices(E), m_values(E), m_delete(E),
- sizeof(E), widthof(E).
+SEE ALSO
+ mappings(LPC), mappingp(E), m_indices(E), m_values(E),
+ m_delete(E), sizeof(E), widthof(E).
diff --git a/doc/efun/unquote b/doc/efun/unquote
index 9e8fad0..38628c4 100644
--- a/doc/efun/unquote
+++ b/doc/efun/unquote
@@ -1,17 +1,17 @@
SYNOPSIS
- quoted_array unquote(quoted_array arr)
- string|symbol unquote(symbol sym)
+ quoted_array unquote(quoted_array)
+ string|symbol unquote(symbol)
-BESCHREIBUNG
- Entfernt ein Quote von einem gequoteten Array oder Symbol. Wenn das
- letzte Quote von einem Symbol entfernt wird, entsteht ein String.
+DESCRIPTION
+ Removes a quote from quoted arrays and symbols. When the
+ last quote from a symbol is removed, the result is a string.
-BEISPIELE
- unquote('foo); ergibt: "foo"
- unquote( '({1,2,3}) ); ergibt: ({1,2,3})
+EXAMPLES
+ unquote('foo) -> "foo"
+ unquote( '({1,2,3}) ) -> ({1,2,3})
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
+HISTORY
+ Introduced in LDMud 3.2.9 .
-SIEHE AUCH
+SEE ALSO
quote(E), symbolp(E)
diff --git a/doc/efun/unshadow b/doc/efun/unshadow
index 0131a71..3d70bf4 100644
--- a/doc/efun/unshadow
+++ b/doc/efun/unshadow
@@ -1,10 +1,9 @@
SYNOPSIS
- void unshadow()
+ void unshadow(void)
-BESCHREIBUNG
- Das aufrufende Objekt wird als Shadow von allen anderen Objekten
- entfernt, denen es uebergeworfen war. Wenn dem aufrufenden Objekt
- selbst ein Shadow uebergeworfen war, wird dieser entfernt.
+DESCRIPTION
+ The calling object stops shadowing any other object.
+ If the calling object is being shadowed, that is also stopped.
-SIEHE AUCH
+SEE ALSO
shadow(E), query_shadowing(E)
diff --git a/doc/efun/upper_case b/doc/efun/upper_case
index a63eef0..b553ad2 100644
--- a/doc/efun/upper_case
+++ b/doc/efun/upper_case
@@ -1,12 +1,12 @@
SYNOPSIS
string upper_case(string str)
-BESCHREIBUNG
- Wandelt alle Zeichen in <str> in Grossbuchstaben um und gibt das
- Resultat zurueck.
+DESCRIPTION
+ Convert all characters in str to upper case, and return the
+ new string.
-BEISPIELE
- upper_case("Heya!") ergibt: "HEYA!"
+EXAMPLES
+ upper_case("Heya!") -> "HEYA!"
-SIEHE AUCH
+SEE ALSO
capitalize(E), lower_case(E)
diff --git a/doc/efun/users b/doc/efun/users
index 05ec115..bc5da96 100644
--- a/doc/efun/users
+++ b/doc/efun/users
@@ -1,5 +1,5 @@
SYNOPSIS
- object * object users()
+ object * users(void)
-BESCHREIBUNG
- Liefert ein Array, das alle interaktiven Benutzer enthaelt.
+DESCRIPTION
+ Return an array containing all interactive users.
diff --git a/doc/efun/utime b/doc/efun/utime
index 1566019..7f10e33 100644
--- a/doc/efun/utime
+++ b/doc/efun/utime
@@ -1,22 +1,21 @@
SYNOPSIS
int * utime()
-BESCHREIBUNG
- Liefert ein Array der Zeit, die seit dem 01. Januar 1970,
- 00:00:00 GMT vergangen ist, mit einer Genauigkeit in Mikrosekunden
- (0.000001 Sekunden).
+DESCRIPTION
+ Return the time since 1. Jan 1970, 00:00:00 GMT in microsecond
+ precision.
- Zurueck gegeben wird ein Array der Form:
- int[0]: Anzahl Sekunden seit Beginn der Zeitrechnung
- int[1]: Anzahl Mikrosekunden innerhalb der aktuellen Sekunde
+ Return is an array:
+ int[0]: number of seconds elapsed
+ int[1]: number of microseconds within the current second.
-BEISPIELE
+EXAMPLES
write(ctime(utime())+"\n");
- Gibt das aktuelle Datum und Zeit zurueck.
+ Print out the current date and time.
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.9.
+HISTORY
+ Introduced in LDMud 3.2.9.
-SIEHE AUCH
+SEE ALSO
ctime(E), gmtime(E), localtime(E), time(E)
diff --git a/doc/efun/variable_exists b/doc/efun/variable_exists
index 682490e..d940c41 100644
--- a/doc/efun/variable_exists
+++ b/doc/efun/variable_exists
@@ -1,29 +1,29 @@
SYNOPSIS
#include <functionlist.h>
- string variable_exists(string str [, int flags])
- string variable_exists(string str, object|lwobject obj [, int flags])
+ string variable_exists(string str)
+ string variable_exists(string str, int flags)
+ string variable_exists(string str, object|lwobject ob)
+ string variable_exists(string str, object|lwobject ob, int flags)
-BESCHREIBUNG
- Sucht eine Varialbe <str> in this_object() oder (falls angegeben)
- im Objekt <obj>.
+DESCRIPTION
+ Look up a variable <str> in the current object, respectively
+ in the object <ob>.
- Das Resultat ist der Name des Programms, in dem die Variable definiert
- ist. Das kann entweder object_name(obj) sein oder der Name eines
- geerbten Programms. Wenn sich der Treiber nicht im Compat-Modus
- befindet, beginnt der zurueck gelieferte Name immer mit '/'.
+ The result is the name of the program the variable is defined
+ in. This can be either object_name(ob), or the name of an
+ inherited program. If !compat mode, the returned name always
+ begins with a '/'.
- Wird <flags> NAME_HIDDEN gesetzt, so liefert variable_exists() auch
- Informationen ueber Variablen vom Typ "static" und "protected" in
- anderen Objekten. Es ist nicht moeglich, Informationen ueber "private"
- deklarierte Variablen zu erhalten.
+ If <flags> can be passed as NAME_HIDDEN to return information
+ about static and protected variables in other objects. It is
+ not possible to return information about private variables.
- Wird die Variable nicht gefunden (weil sie nicht existiert oder weil
- sie fuer das aufrufende Objekt nicht sichtbar sind), wird 0 zurueck
- geliefert.
+ If the variable cannot be found (because it doesn't exist or
+ it is not visible to the caller), the result is 0.
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.10.
+HISTORY
+ Introduced in LDMud 3.2.10.
-SIEHE AUCH
+SEE ALSO
function_exists(E), variable_list(E)
diff --git a/doc/efun/variable_list b/doc/efun/variable_list
index c57822f..0991f9c 100644
--- a/doc/efun/variable_list
+++ b/doc/efun/variable_list
@@ -1,59 +1,57 @@
-GESCHUETZT
-SYNOPSIS
+NAME
#include <functionlist.h>
#include <lpctypes.h>
- mixed *variable_list(object|lwobject obj,
- int flags = RETURN_FUNCTION_NAME)
+ mixed * variable_list(object ob|lwobject, int flags)
-BESCHREIBUNG
- Liefert ein Array mit Informationen ueber die Variablen von <obj>.
- Fuer jede Variable werden 1 bis 4 Werte in diesem Array gespeichert,
- abhaengig von <flags>. Die Resultate werden in dieser Reihenfolge
- im Array abgespeichert:
- - der Name der Variablen
- - die Flags der Variablen (siehe weiter unten)
- - der Rueckgabetyp (gemaess <lpctypes.h>)
- - der Wert der Variablen
+DESCRIPTION
+ Return an array with information about <ob>s variables. For
+ every variable, 1 to 3 values (depending on <flags>) are
+ stored in the result array conveying in this order:
+ - the name of the variable
+ - the variable flags (see below)
+ - the return type (listed in <lpctypes.h>)
+ - the value of the variable
- <obj> kann als Objekt oder als Dateinamen uebergeben werden. Im
- zweiten Fall versucht variable_list() nicht, das Objekt vor der
- Verarbeitung zu laden.
+ <ob> may be given as true object or as a filename. In the latter
+ case, the efun does not try to load the object before proceeding.
- Wenn <obj> nicht das aufrufende Objekt ist und der Wert der Variablen
- abgefragt wird, erzeugt dies eine Schutzverletzung ("variable_list",
- <obj>).
+ If <ob> is not the current object and the value of the variable is
+ requested, a privilege_violation ("variable_list", <ob>) occurs.
- Mit <flags> wird festgelegt, welche Informationen ueber welche
- Variablen abgefragt werden. Folgende Flags aus <functionlist.h>
- koennen mit binaerem Oder kombiniert werden:
+ <flags> determines both which information is returned for every
+ variable, and which variables should be considered at all.
+ Its value is created by bin-or'ing together following flags from
+ <functionlist.h>:
- Auswahl der gesammelten Information:
- RETURN_FUNCTION_NAME liefert den Namen der Variablen
- RETURN_FUNCTION_FLAGS liefert die Flags der Variablen (s. unten)
- RETURN_FUNCTION_TYPE liefert den Rueckgabetyp
- RETURN_VARIABLE_VALUE liefert den Wert der Variablen
+ Control of returned information:
+ RETURN_FUNCTION_NAME include the variable name
+ RETURN_FUNCTION_FLAGS include the variable flags
+ RETURN_FUNCTION_TYPE include the variable type as an integer
+ RETURN_FUNCTION_LPCTYPE include the variable type as an lpctype
+ RETURN_VARIABLE_VALUE include the variable value
- Auswahl der Variablen, die ausgewertet werden:
- NAME_INHERITED schliesst geerbte Variablen aus
- TYPE_MOD_STATIC schliesst "static" deklarierte Variablen aus
- TYPE_MOD_NOSAVE schliesst "nosave" deklarierte Variablen aus
- TYPE_MOD_PRIVATE schliesst "private" deklarierte Variablen aus
- TYPE_MOD_PROTECTED schliesst "protected" deklarierte Variablen
- aus
- NAME_HIDDEN enthaelt Variablen, die geerbt wurden.
+ Control of listed variables:
+ NAME_INHERITED don't list if defined by inheritance
+ TYPE_MOD_STATIC ==
+ TYPE_MOD_NOSAVE don't list if nosave ('static') variable
+ TYPE_MOD_PRIVATE don't list if private
+ TYPE_MOD_PROTECTED don't list if protected
+ NAME_HIDDEN don't list if not visible through inheritance
- Die Flags der Variablen koennen die Auswahl-Flags enthalten und
- zusaeztlich folgende Werte:
- TYPE_MOD_VIRTUAL die Variable wurde virtuell geerbt
- TYPE_MOD_NO_MASGK die Variable ist "nomask" deklariert
- TYPE_MOD_PUBLIC die Variable ist "public" deklariert
+ The 'flags' information consists of the bin-or of the list control
+ flags given above, plus the following:
- All diese Flags sind in <functionlist.h>, die Rueckgabewerte in
- <lpctypes.h> definiert.
+ TYPE_MOD_VIRTUAL variable is inherited virtually
+ TYPE_MOD_NO_MASK variable is nomask
+ TYPE_MOD_PUBLIC variable is public
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.10.
+ All these flags are defined in <functionlist.h>, the
+ return types are defined in <lpctypes.h>.
-SIEHE AUCH
+HISTORY
+ Introduced in LDMud 3.2.10.
+ LDMud 3.6.7 introduced RETURN_FUNCTION_LPCTYPE.
+
+SEE ALSO
inherit_list(E), functionlist(E), variable_exists(E)
diff --git a/doc/efun/walk_mapping b/doc/efun/walk_mapping
index 3dad60c..1d36812 100644
--- a/doc/efun/walk_mapping
+++ b/doc/efun/walk_mapping
@@ -1,24 +1,22 @@
SYNOPSIS
- void walk_mapping(mapping map, string fun, mixed extra, ...)
- void walk_mapping(mapping map, string fun, string|object obj,
- mixed extra, ...)
- void walk_mapping(mapping map, closures cl, mixed extra, ...)
+ void walk_mapping(mapping m, string func, mixed extra,...)
+ void walk_mapping(mapping m, string func, string|object ob
+ , mixed extra,...)
+ void walk_mapping(mapping m, closure cl, mixed extra,...)
-BESCHREIBUNG
- Ruft obj->fun(key, &value1, ... &valueN, extra, ...) fuer jeden Key
- im Mapping <map> auf bzw. wendet die Closure <cl> auf jeden Key
- im Mapping <map> an. Dies Keys werden als Wert uebergeben, die Values
- als Referenz, entsprechend koennen sie in der Funktion veraendert
- werden.
+DESCRIPTION
+ Calls ob->func(key, &value1, ..., &valueN, extra,...) resp. applies
+ the closure to every entry in the mapping. The keys are passed
+ by value, the values are passed by reference and can be
+ changed in the function.
- Es kann eine beliebige Anzahl zusaetzlicher Argumente <extra>
- uebergeben werden.
+ Any number of extra arguments is accepted and passed.
- Wird <obj> weggelassen oder enthaelt es weder einen String noch ein
- Objekt, wird standardmaessig this_object() verwendet.
+ If <ob> is omitted, or neither a string nor an object, it
+ defaults to this_object().
-GESCHICHTE
- Eingefuehrt in LDMud 3.2@61.
+HISTORY
+ Introduced in 3.2@61
-SIEHE AUCH
+SEE ALSO
map(E), filter(E)
diff --git a/doc/efun/widthof b/doc/efun/widthof
index 6312d3d..a16fa14 100644
--- a/doc/efun/widthof
+++ b/doc/efun/widthof
@@ -1,16 +1,17 @@
SYNOPSIS
int widthof(mapping map)
-BESCHREIBUNG
- Liefert die Anzahl Values pro Key im Mapping <map>. Wenn <map> 0 ist,
- ist das Resultat 0.
+DESCRIPTION
+ Returns the number of values per key of mapping <map>.
+ If <map> is 0, the result is 0.
-BEISPIELE
- mapping map = (["foo" : 1;2]);
- widthof(map) ergibt 2.
+EXAMPLES
+ mapping m = ([ "foo": 1;2 ]);
+ widthof(m) --> returns 2
-GESCHICHTE
- Eingefuehrt in LDMud 3.2.6.
+HISTORY
+ Introduced in LDMud 3.2.6.
-SIEHE AUCH
- sizeof(E), mkmapping(E), m_reallocate(E), m_values(E), unmkmapping(E)
+SEE ALSO
+ sizeof(E), mkmapping(E), m_reallocate(E), m_values(E),
+ unmkmapping(E)
diff --git a/doc/efun/wizlist_info b/doc/efun/wizlist_info
index 91c1bae..674ec9a 100644
--- a/doc/efun/wizlist_info
+++ b/doc/efun/wizlist_info
@@ -1,39 +1,38 @@
-GESCHUETZT
SYNOPSIS
#include <wizlist.h>
mixed * wizlist_info()
-BESCHREIBUNG
- Liefert ein Array mit Eintraegen aus der Wizlist (der internen
- Goetterliste). Die Benutzung muss durch das Masterobjekt erlaubt
- werden.
+DESCRIPTION
+ Returns an array with the interesting entries of the wizlist.
+ Needs to be privileged by the master object.
- Das Resultat ist ein Array mit einem Eintrag fuer jeden Gott (uid).
- Jeder Eintrag enthaelt wiederum ein Array mit folgenden Elementen:
+ The result is an array with one entry for every wizard (uid).
+ Every entry is an array itself:
- string w[WL_NAME] Name des Gottes
- int w[WL_COMMANDS] Gewichtete Anzahl Kommandos, die von
- Objekten dieses Gottes ausgefuehrt
- wurden
- int w[WL_COSTE] Gewichtete Summe der Eval-Kosten
- int w[WL_GIGACOST] Gewichtete Summe der Eval-Kosten
- int W[WL_TOTAL_COST] Totale Summe der Eval-Kosten
- int w[WL_TOTAL_GIGACOST] Totale Summe der Eval-Kosten
- int w[WL_HEART_BEAT] Gewichtete Anzahl der heat_beat()s
- int w[WL_CALL_OUT] Reserviert fuer call_out()s
- (bisher nicht implementiert)
- int w[WL_ARRAY_TOTAL] Totale Groesse aller Arrays in
- Elementen
- mixed w[WL_EXTRA] Die eigentliche Wizlist-Info
+ string w[WL_NAME] = Name of the wizard.
+ int w[WL_COMMANDS] = Weighted number of commands execute by
+ objects of this wizard.
+ int w[WL_COST],
+ int w[WL_GIGACOST] = Weighted sum of eval_costs.
+ int w[WL_TOTAL_COST],
+ int w[WL_TOTAL_GIGACOST] = Total sum of eval_costs.
+ int w[WL_HEART_BEATS] = Weighted count of heart_beats.
+ int w[WL_CALL_OUT] = Reserved for call_out() (unused yet).
+ int w[WL_ARRAY_TOTAL] = Total size of arrays in elements.
+ int w[WL_MAPPING_TOTAL] = Total size of mappings in elements.
+ int w[WL_STRUCT_TOTAL] = Total size of structs in elements.
+ mixed w[WL_EXTRA] = Extra wizlist-info if set.
- Die "gewichteten" Werte verfallen pro Stunde um 10%.
+ The 'weighted' entries decay every hour by 10%.
-GESCHICHTE
- LDMud 3.2.10 trennte das alte WL_EVAL_COST in WL_COST und WL_GIGACOST,
- um laengeren Uptimes gerecht zu werden. Ausserdem wurde
- WL_TOTAL_COST und WL_TOTAL_GIGACOST eingefuehrt.
+HISTORY
+ LDMud 3.2.10 split the old WL_EVAL_COST into WL_COST and WL_GIGACOST
+ to accomodate for longer uptimes, and introduced
+ WL_TOTAL_COST/WL_TOTAL_GIGACOST.
+ LDMud 3.3.174 added WL_MAPPING_TOTAL.
+ LDMud 3.3.? added WL_STRUCT_TOTAL.
-SIEHE AUCH
- privilege_violation(M), set_extra_wizinfo_size(E),
+SEE ALSO
+ privilege_violation(M), set_extra_wizinfo_size(E)
get_extra_wizinfo(E), set_extra_wizinfo(E)
diff --git a/doc/efun/write b/doc/efun/write
index 276e35d..7e3af94 100644
--- a/doc/efun/write
+++ b/doc/efun/write
@@ -1,32 +1,36 @@
-VERALTET
SYNOPSIS
void write(mixed msg)
-BESCHREIBUNG
- Gibt etwas an den aktuellen Benutzer aus. Was genau ausgegeben wird,
- haengt vom Typ der Meldung <msg> ab.
+DESCRIPTION
+ Write out something to the current user. What exactly will
+ be printed in the end depends of the type of msg.
- Folgende Ausgaben erfolgen abhaengig vom Typ von <msg>:
- String oder Zahl <msg> wird ausgegeben
- Objekt "OBJ("+object_name((object)msg)+")"
- Array "<ARRAY>"
- Mapping "<MAPPING>"
- Closure "<CLOSURE>"
+ If it is a string or a number then just prints it out.
- Wenn write() von einem Kommando eines Lebewesens aufgerufen wird,
- dieses Lebewesen aber nicht interaktiv ist, und <msg> einen String
- enthaelt, wird im Lebewesen die Lfun catch_tell() mit <msg> als
- Argument aufgerufen.
+ If it is an object then the object will be printed in the
+ form: "OBJ("+object_name((object)mix)+")"
-BEISPIELE
+ If it is an array just "<ARRAY>" will be printed.
+ If it is a mapping just "<MAPPING>" will be printed.
+ If it is a closure just "<CLOSURE>" will be printed.
+
+ If the write() function is invoked by a command of an living
+ but not interactive object and the given argument is a string
+ then the lfun catch_tell() of the living will be invoked with
+ the message as argument.
+
+EXAMPLES
write("Hello world!\n");
- Dies gibt den String an den Benutzer aus.
+
+ Just print out a string.
write(this_player());
- Dies erzeugt etwas wie: "OBJ(/std/player#1234)".
- write( ({"blubb"}) );
- Dies erzeugt "<ARRAY>".
+ This will print out something like "OBJ(std/player#1234)".
-SIEHE AUCH
+ write( ({ "blub" }) );
+
+ Will print out "<ARRAY>".
+
+SEE ALSO
say(E), tell_object(E), tell_room(E), catch_tell(A)
diff --git a/doc/efun/write_bytes b/doc/efun/write_bytes
index b8b6b0a..2308b77 100644
--- a/doc/efun/write_bytes
+++ b/doc/efun/write_bytes
@@ -1,15 +1,15 @@
SYNOPSIS
int write_bytes(string file, int start, bytes str)
-BESCHREIBUNG
- Schreibt die Bytefolge <str> ins File <file> und ueberschreibt dabei die
- alten Bytes ab Position <start>. Wenn <start> eine negative Zahl ist,
- werden die Zeichen vom Ende von <file> an gezaehlt. write_bytes()
- liefert 1 bei Erfolg, 0 bei Misserfolg.
+DESCRIPTION
+ Write string str to file file by overwriting the old bytes at
+ position start. If start is a negative value then it will be
+ counted from the end of the file. The file will not be
+ appended, instead the function will be aborted. Returns 1 for
+ success 0 for failure during execution.
-ANMERKUNGEN
- Seit Version 3.2@232 ist write_bytes() in der Lage, Zeichen
- aus <str> ans File <file> anzuhaengen.
+ Note: since version 3.2@232, write_bytes() is able to append
+ to the file.
-SIEHE AUCH
+SEE ALSO
save_object(E), write_file(E)
diff --git a/doc/efun/write_file b/doc/efun/write_file
index f268eb4..a33ea87 100644
--- a/doc/efun/write_file
+++ b/doc/efun/write_file
@@ -3,21 +3,21 @@
int write_file(string file, string str, int flags)
int write_file(string file, string str, int flags, string encoding)
-BESCHREIBUNG
- Haengt den String <str> an die Datei <file> an. Liefert 1 bei Erfolg,
- 0 bei Misserfolg.
+DESCRIPTION
+ Append the string <str> to the file <file>. Returns 1 for success
+ and 0 if any failure occurred.
- If <flags> = 1, dann wird die Datei vor dem eigentlichen
- Schreiben geloescht; das 'anhaengen' wird so effektiv ein
- 'ueberschreiben'. Defaultwert fuer <flags> ist 0.
+ If <flags> is 1, the file is removed first; thus making the
+ 'append' effectively an 'overwrite'. Default for <flags> is 0.
- Mit <encoding> kann man den Zeichensatz angeben, welcher beim Schreiben
- in die Datei verwendet werden soll. Falls er nicht angegeben oder 0 ist,
- so wird der Hook H_FILE_ENCODING verwendet.
+ <encoding> denotes the encoding to be used for saving the string
+ in the file. If it is not given or 0, the H_FILE_ENCODING driver
+ hook will be used.
-GESCHICHTE
- LDMud 3.6.0 fuegte den <encoding>-Parameter hinzu.
+HISTORY
+ LDMud 3.3.523 added the <flags> parameter.
+ LDMud 3.6.0 added the <encoding> parameter.
-SIEHE AUCH
+SEE ALSO
file_size(E), write_bytes(E), write_file(E), read_file(E),
- read_bytes(E), rm(E), hooks(C)
+ read_bytes(E), rm(E), get_dir(E), hooks(C)
diff --git a/doc/efun/xml_generate b/doc/efun/xml_generate
index d210d5e..5502f9c 100644
--- a/doc/efun/xml_generate
+++ b/doc/efun/xml_generate
@@ -5,74 +5,72 @@
string xml_generate(mixed *xml)
-BESCHREIBUNG
- Wandelt das uebergebene <xml>-Array in einen XML-konformen String um,
- sofern moeglich. Der <xml>-Parameter muss folgende Struktur haben:
+DESCRIPTION
+ Converts the given <xml> array into an XML conform string, if
+ possible. The <xml> argument array must have the following structure.
- Er muss Tag-Arrays mit folgenden drei Elementen enthalten:
+ It must contain tag arrays of three elements, with the following
+ indices:
string XML_TAG_NAME
- Der Name des XML-Tags.
+ The name of the XML tag.
mapping XML_TAG_ATTRIBUTES
- Alle Attribute dieses XML-Tags als ein Mapping mit dem
- jeweiligen Attributnamen als Schluessel und den Attributwert
- als der dazugehoerige String.
-
- Falls ein XML-Tag keine Attribute enthaelt, so ist dieses
- Element 0.
+ All attributes given to the XML tag as mapping where the key
+ is the attribute name and the value is its string value.
+
+ If the xml tag does not contain any attributes, this element
+ is set 0:
mixed * XML_TAG_CONTENTS
- Der Inhalt des XML-Tags als ein Array. Dieses Array kann
- entweder Strings (reine Zeichendaten) oder Arrays
- als weitere Tags enthalten, welche wiederum diese
- drei Elemente besitzen.
-
- Falls das XML-Tag nichts enthaelt, so ist dieses Element 0.
+ The contents of this xml tag as array. This array may
+ contain either strings, or arrays of sub-tags again with
+ three elements (see example)
- Falls der uebergebe Parameter nicht diese Struktur besitzt, so wird
- eine Fehlermeldung ausgegeben. Ansonsten ist ein gueltiger XML-String
- das Resultat.
+ If the xml tag does not contain anything, the element is
+ set 0.
- Diese Funktion ist nur verfuegbar, wenn der Driver mit Iksemel-
- Unterstuetzung compiliert wurde. In diesem Fall ist das Makro
- __XML_DOM__ definiert.
+ In case the parameter does not follow these rules, errors are raised.
+ The method returns a valid XML string otherwise.
+
+ The function is available only if the driver is compiled with Iksemel
+ support. In that case, __XML_DOM__ is defined.
-BEISPIELE
+EXAMPLES
xml_generate(({ "abc", 0, 0 })) -> "<abc/>"
xml_generate(({ "abc", ([ "xyz" : "cde" ]), 0 })) -> "<abc xyz="cde"/>"
- mixed* xml = ({ "buch"
- , ([ "sprache" : "deutsch" ])
- , ({ ({ "titel"
+ mixed *xml = ({ "book"
+ , ([ "language" : "common" ])
+ , ({ ({ "title"
, 0
- , ({ "Dies ist der Titel" })
+ , ({ "This is a title" })
})
- , ({ "kapitel"
+ , ({ "chapter"
, 0
- , ({ "Dies ist ein Kapitel" })
+ , ({ "This is a chapter" })
})
- , ({ "kapitel"
+ , ({ "chapter"
, 0
- , ({ "Das soll "
+ , ({ "We want "
, ({ "b"
, 0
- , ({ "fettgedruckt" })
+ , ({ "bold" })
})
- , " sein."
+ , "here"
})
})
})
})
xml_generate(xml)
- -> "<buch sprache="deutsch"><titel>Dies ist der Titel</titel>"
- "<kapitel>Dies ist ein Kapitel</kapitel><kapitel>Das soll "
- "<b>fettgedruckt</b> sein.</kapitel></buch>"
+ -> "<book language="common"><title>This is the title</title>"
+ "<chapter>This is a chapter</chapter><chapter>We want "
+ "<b>bold</b> here.</chapter></book>"
-GESCHICHTE
- Eingefuehrt in LDMud 3.3.718.
+HISTORY
+ Added in LDMud 3.3.718.
-SIEHE AUCH
+SEE ALSO
xml_parse(E)
diff --git a/doc/efun/xml_parse b/doc/efun/xml_parse
index 130063b..8c243fc 100644
--- a/doc/efun/xml_parse
+++ b/doc/efun/xml_parse
@@ -3,77 +3,75 @@
SYNOPSIS
#include <xml.h>
- mixed* xml_parse(string xml)
+ mixed * xml_parse(string xml)
-BESCHREIBUNG
- Parst den angegebenen String <xml> als XML. Der String darf nur ein
- einziges Root-Tag enthalten, weitere Root-Tags werden ignoriert.
+DESCRIPTION
+ Parses the given string <xml> as a XML conform string. The string must
+ have only one root tag, subsequent root tags are ignored.
- Falls der String XML-konform war, so wird ein Array mit drei Elementen
- zurueckgegeben, dessen Elemente folgendermassen definiert sind:
+ If the xml string is correct, an array is of three elements is
+ returned, where as the following indices are defined:
string XML_TAG_NAME
- Der Name des XML-Tags.
+ The name of the XML tag.
mapping XML_TAG_ATTRIBUTES
- Alle Attribute dieses XML-Tags als ein Mapping mit dem
- jeweiligen Attributnamen als Schluessel und den Attributwert
- als der dazugehoerige String.
-
- Falls ein XML-Tag keine Attribute enthaelt, so ist dieses
- Element 0.
+ All attributes given to the XML tag as mapping where the key
+ is the attribute name and the value is its string value.
+
+ If the xml tag does not contain any attributes, this element
+ is set 0.
mixed * XML_TAG_CONTENTS
- Der Inhalt des XML-Tags als ein Array. Dieses Array kann
- entweder Strings (reine Zeichendaten) oder Arrays
- als weitere Tags enthalten, welche wiederum diese
- drei Elemente besitzen.
-
- Falls das XML-Tag nichts enthaelt, so ist dieses Element 0.
+ The contents of this xml tag as array. This array may
+ contain either strings, or arrays of sub-tags again with
+ three elements (see example)
- Falls der XML-String nicht wohlgeformt ist oder falls nicht genug
- Speicher zur Verfuegung steht, wird eine Fehlermeldung ausgegeben.
+ If the xml tag does not contain anything, the element is
+ set 0.
- Diese Funktion ist nur verfuegbar, wenn der Driver mit Iksemel-
- Unterstuetzung compiliert wurde. In diesem Fall ist das Makro
- __XML_DOM__ definiert.
+ If the XML string is not well formed, or there is not enough memory to
+ parse the whole XML structure into the array an error is raised.
+
+ The function is available only if the driver is compiled with Iksemel
+ support. In that case, __XML_DOM__ is defined.
-BEISPIELE
+EXAMPLES
xml_parse("<abc/>") -> ({ "abc", 0, 0 })
xml_parse("<abc xyz="cde"/>") -> ({ "abc", ([ "xyz" : "cde" ]), 0 })
- xml_parse("<buch sprache="deutsch">" +
- " <titel>Dies ist der Titel</titel>" +
- " <kapitel>Dies ist ein Kapitel</kapitel>" +
- " <kapitel>Das soll <b>fettgedruckt</b> sein.</kapitel>" +
- "</buch>")
+ xml_parse("<book language="common">" +
+ " <title>This is the title</title>" +
+ " <chapter>This is a chapter</chapter>" +
+ " <chapter>We want <b>bold</b> here.</chapter>" +
+ "</book>")
- -> ({ "buch"
- , ([ "sprache" : "deutsch" ])
- , ({ ({ "titel"
+ -> ({ "book"
+ , ([ "language" : "common" ])
+ , ({ ({ "title"
, 0
- , ({ "Dies ist der Titel" })
+ , ({ "This is a title" })
})
- , ({ "kapitel"
+ , ({ "chapter"
, 0
- , ({ "Dies ist ein Kapitel" })
+ , ({ "This is a chapter" })
})
- , ({ "kapitel"
+ , ({ "chapter"
, 0
- , ({ "Dies soll "
+ , ({ "We want "
, ({ "b"
, 0
- , ({ "fettgedruckt" })
+ , ({ "bold" })
})
- , "sein."
+ , "here"
})
})
})
})
-GESCHICHTE
- Eingefuehrt in LDMud 3.3.718.
+HISTORY
+ Added in LDMud 3.3.718.
-SIEHE AUCH
+SEE ALSO
xml_generate(E)
diff --git a/doc/efun/xor_bits b/doc/efun/xor_bits
index 885afa8..66d9fb3 100644
--- a/doc/efun/xor_bits
+++ b/doc/efun/xor_bits
@@ -1,19 +1,22 @@
SYNOPSIS
string xor_bits(string str1, string str2)
-BESCHREIBUNG
- <str1> und <str2> sind beiden Bitstrings. Das Resultat von xor_bits()
- ist ein Bitstring mit dem binaeren XOR von <str1> und <str2>, also
- ein String, in dem ein Bit nur gesetzt ist, wenn es entweder in <str1>
- oder in <str2> vorkommt, nicht aber in beiden.
+DESCRIPTION
+ <str1> and <str2> are both bitstrings. The result of the function
+ is a bitstring with the binary-xor of <str1> and <str2>,
+ ie. a string in which a bit is set only if the corresponding
+ bits in either <str1> or <str2> (but not both) is set.
-BEISPIELE
+EXAMPLES
string s1, s2, s3;
- s1 = set_bit("", 3); s1 = set_bit(s1, 15); -> s1 ist "( ("
- s2 = set_bit("", 3); s2 = set_bit(s2, 4); -> s2 ist "8"
- s3 = xor_bits(s1, s2);
- -> s3 ist "0 (", es sind also das 4. und das 15. Bit gesetzt.
-SIEHE AUCH
- clear_bit(E), set_bit(E), test_bit(E), next_bit(E), last_bit(E)
+ s1 = set_bit("", 3); s1 = set_bit(s1, 15); -> s1 is "( ("
+ s2 = set_bit("", 3); s2 = set_bit(s2, 4); -> s2 is "8"
+
+ s3 = xor_bits(s1, s2);
+
+ -> s3 is now "0 (", ie. a bitstring with bits 4 and 15 set.
+
+SEE ALSO
+ clear_bit(E), set_bit(E), test_bit(E), next_bit(E), last_bit(E),
count_bits(E), and_bits(E), or_bits(E), invert_bits(E), copy_bits(E)