Update der Doku fuer 3.6.4 + LWO
... aus den Driversourcen 3.6.4 + LWO
Change-Id: I9226bb373436d5b05828f89c7da26df39aa45af7
diff --git a/doc/efun/bind_lambda b/doc/efun/bind_lambda
index ddd2ada..96e70af 100644
--- a/doc/efun/bind_lambda
+++ b/doc/efun/bind_lambda
@@ -1,5 +1,5 @@
SYNOPSIS
- closure bind_lambda(closure cl, object ob)
+ closure bind_lambda(closure cl, object|lwobject ob)
BESCHREIBUNG
Bindet eine ungebundene Lambda-Closure (die von unbound_lambda()
diff --git a/doc/efun/blueprint b/doc/efun/blueprint
index 11459fe..78c4f0a 100644
--- a/doc/efun/blueprint
+++ b/doc/efun/blueprint
@@ -1,7 +1,7 @@
VORLAEUFIG
SYNOPSIS
object blueprint()
- object blueprint(string|object ob)
+ object blueprint(string|object|lwobject ob)
BESCHREIBUNG
Die Efun liefert den Blueprint fuer das angegeben Objekt <ob> oder
diff --git a/doc/efun/call_resolved b/doc/efun/call_resolved
index 26e9d28..2b101df 100644
--- a/doc/efun/call_resolved
+++ b/doc/efun/call_resolved
@@ -1,5 +1,6 @@
SYNOPSIS
int call_resolved(mixed result, object ob, string func, mixed arg,...)
+ int* call_resolved(mixed* result, object* ob, string func, mixed arg,...)
BESCHREIBUNG
Die Funktion ist aehnlich zu call_other(). Wenn obj->func() definiert
@@ -14,7 +15,19 @@
das Objekt mit diesem Namen nicht gefunden oder geladen werden kann,
tritt ein Fehler auf.
+ 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.
+
+GESCHICHTE
+ LDMud 3.6.2 fuegte die Aufrufe von Arrays hinzu.
+
SIEHE AUCH
- call_other(E), call_direct(E), call_direct_resolved(E),
- create(A), pragma(LPC), extern_call(E), function_exists(E),
- functions(LPC), map_objects(E)
+ 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/caller_stack b/doc/efun/caller_stack
index 98b3e24..a08c8d1 100644
--- a/doc/efun/caller_stack
+++ b/doc/efun/caller_stack
@@ -1,6 +1,6 @@
SYNOPSIS
- object * caller_stack()
- object * caller_stack(int add_interactive)
+ <object|lwobject>* caller_stack()
+ <object|lwobject>* caller_stack(int add_interactive)
BESCHREIBUNG
Liefert ein Array der previous_object(), die einen call_other() auf
diff --git a/doc/efun/configure_lwobject b/doc/efun/configure_lwobject
new file mode 100644
index 0000000..2acfb41
--- /dev/null
+++ b/doc/efun/configure_lwobject
@@ -0,0 +1,33 @@
+SYNOPSIS
+ #include <configuration.h>
+
+ void configure_lwobject(lwobject lwob, int what, mixed data)
+
+DESCRIPTION
+ Sets the option <what> to the value <data> on the object <lwob>
+ or the default for all lightweight objects if <lwob> is 0.
+
+ If the first argument <lwob> is not this_object(), the privilege
+ violation ("configure_lwobject", this_object(), lwob, what, data)
+ occurs.
+
+ As <what>, the following arguments are accepted:
+
+ <what> == LC_EUID
+ Set effective uid to <data>. <data> must be a string or 0.
+ This call will always trigger a privilege violation check,
+ even if <lwob> is this_object().
+
+ If strict euid usage is enforced, lightweight objects with
+ euid 0 cannot load or clone other objects or do any file
+ operations.
+
+
+ The current values for these options can be queried using
+ lwobject_info().
+
+HISTORY
+ Introduced in LDMud 3.6.5.
+
+SEE ALSO
+ lwobject_info(E), configure_object(E), configure_driver(E)
diff --git a/doc/efun/creator b/doc/efun/creator
new file mode 100644
index 0000000..93bc69b
--- /dev/null
+++ b/doc/efun/creator
@@ -0,0 +1,13 @@
+SYNOPSIS
+ string creator(object|lwobject ob)
+
+BESCHREIBUNG
+ Diese Funktion ist nur im COMPAT-Modus verfuegbar.
+
+ Resultat is der Name des Erzeugers des Objektes. Dies kann ein
+ Wizard sein, oder eine Domain.
+
+ Default fuer <ob> ist this_object().
+
+SIEHE AUCH
+ getuid(E), native(C), uids(C)
diff --git a/doc/efun/efun b/doc/efun/efun
index 1b52273..2e9ae6a 100644
--- a/doc/efun/efun
+++ b/doc/efun/efun
@@ -14,15 +14,14 @@
Es steht dem Mud-Betreiber frei, diese Efuns zu deaktivieren.
- assoc()
break_point()
db_*()
- insert_alist()
- intersect_alist()
+ pg_*()
+ sl_*()
parse_command()
process_string()
rusage()
- set_is_wizard()
+ swap()
transfer()
tls_available()
tls_check_certificate()
@@ -34,6 +33,8 @@
tls_refresh_certs()
xml_generate()
xml_parse()
+ json_serialize()
+ json_parse()
- 'Vorlaeufig'
diff --git a/doc/efun/filter_objects b/doc/efun/filter_objects
index 87c96f6..e895818 100644
--- a/doc/efun/filter_objects
+++ b/doc/efun/filter_objects
@@ -1,5 +1,6 @@
SYNOPSIS
- object * filter_objects(object *arr, string fun, mixed extra, ...)
+ <object|lwobject> * filter_objects(<object|lwobject> *arr,
+ string fun, mixed extra, ...)
BESCHREIBUNG
Diese Efun ist aehnlich wie filter(), es wird aber
diff --git a/doc/efun/find_input_to b/doc/efun/find_input_to
index 163637a..e499452 100644
--- a/doc/efun/find_input_to
+++ b/doc/efun/find_input_to
@@ -1,8 +1,8 @@
SYNOPSIS
int find_input_to(object player, string fun)
int find_input_to(object player, closure fun)
- int find_input_to(object player, object fun)
- int find_input_to(object player, object ob, string fun)
+ 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
diff --git a/doc/efun/function_exists b/doc/efun/function_exists
index c521360..2c7f03a 100644
--- a/doc/efun/function_exists
+++ b/doc/efun/function_exists
@@ -3,8 +3,8 @@
mixed function_exists(string str)
mixed function_exists(string str, int flags)
- mixed function_exists(string str, object ob)
- mixed function_exists(string str, object ob, int flags)
+ 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
diff --git a/doc/efun/functionlist b/doc/efun/functionlist
index 63ecdc1..2845648 100644
--- a/doc/efun/functionlist
+++ b/doc/efun/functionlist
@@ -3,7 +3,7 @@
#include <functionlist.h>
#include <lpctypes.h>
- mixed * functionlist(object ob, int flags)
+ mixed * functionlist(object|lwobject|string ob, int flags)
BESCHREIBUNG
Liefert ein Array mit Informationen zu den Lfuns von <ob>. Fuer jede
@@ -14,8 +14,9 @@
- den Rueckgabetyp (aufgelistet in <lpctypes.h>)
- die Anzahl Argumente, die die Funktion akzeptiert.
- <ob> kann als echtes Objekt oder als Objektname uebergeben werden. Im
- zweiten Fall versucht die Efun nicht, das Objekt vorher zu laden.
+ <ob> kann als normales oder leichtgewichtiges Objekt oder als
+ Objektname uebergeben werden. Im zweiten Fall versucht die Efun
+ nicht, das Objekt vorher zu laden.
<flags> bestimmt sowohl, welche Informationen im Ergebnis gesammelt
werden, als auch, fuer welche Funktionen die Pruefung durchgefuehrt
diff --git a/doc/efun/get_extra_wizinfo b/doc/efun/get_extra_wizinfo
index 757d9cf..fd77b86 100644
--- a/doc/efun/get_extra_wizinfo
+++ b/doc/efun/get_extra_wizinfo
@@ -1,13 +1,13 @@
GESCHUETZT
SYNOPSIS
- mixed get_extra_wizinfo(object|string|int wiz)
+ mixed get_extra_wizinfo(object|lwobject|string|int wiz)
BESCHREIBUNG
Liefert die <extra> Information, die in der Wizlist fuer den
angegebenen Gott <wiz> angegeben wurde.
- Ist <wiz> ein Objekt, so wird der Eintrag des Erzeugers (UID)
- verwendet.
+ 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.
diff --git a/doc/efun/geteuid b/doc/efun/geteuid
index 0af0cbc..d107e85 100644
--- a/doc/efun/geteuid
+++ b/doc/efun/geteuid
@@ -1,5 +1,5 @@
SYNOPSIS
- string geteuid(object ob)
+ string geteuid(object|lwobject ob)
BESCHREIBUNG
Liefert die effektive User-ID des Objekts <obj> (normalerweise ein
diff --git a/doc/efun/getuid b/doc/efun/getuid
index 08679cd..c417586 100644
--- a/doc/efun/getuid
+++ b/doc/efun/getuid
@@ -1,5 +1,5 @@
SYNOPSIS
- string getuid(object ob)
+ string getuid(object|lwobject ob)
BESCHREIBUNG
User-IDs werden im COMPAT-Modus nicht verwendet.
diff --git a/doc/efun/include_list b/doc/efun/include_list
index 46c5c4c..2c14554 100644
--- a/doc/efun/include_list
+++ b/doc/efun/include_list
@@ -2,8 +2,8 @@
#include <include_list.h>
string * include_list()
- string * include_list(object ob)
- string * include_list(object ob, int flags)
+ 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
diff --git a/doc/efun/inherit_list b/doc/efun/inherit_list
index b17e5b0..62b12ee 100644
--- a/doc/efun/inherit_list
+++ b/doc/efun/inherit_list
@@ -2,8 +2,8 @@
#include <inherit_list.h>
string * inherit_list()
- string * inherit_list(object ob)
- string * inherit_list(object ob, int flags)
+ 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,
diff --git a/doc/efun/load_name b/doc/efun/load_name
index f26c1ea..2afbb61 100644
--- a/doc/efun/load_name
+++ b/doc/efun/load_name
@@ -1,13 +1,14 @@
SYNOPSIS
string load_name()
- string load_name(object|string obj)
+ string load_name(object|lwobject|string obj)
BESCHREIBUNG
Die Funktion liefert den Namen, mit dem <obj> geladen wurde. <obj>
- kann direkt als Objekt oder als String mit seinem Namen angegeben
- werden.
+ kann direkt als normales oder leichtgewichtiges Objekt oder als String
+ mit dem Namen des Objektes angegeben werden.
- Wenn <obj> ein Clon ist, liefert die Funktion den Namen des Blueprints.
+ 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.
diff --git a/doc/efun/lwobject_info b/doc/efun/lwobject_info
new file mode 100644
index 0000000..8e27bce
--- /dev/null
+++ b/doc/efun/lwobject_info
@@ -0,0 +1,102 @@
+SYNOPSIS
+ #include <lwobject_info.h>
+
+ mixed lwobject_info(lwobject lwob, int what)
+
+DESCRIPTION
+ Returns some internal information about the lightweight
+ object <lwob>. The Argument <what> determines which
+ information is returned.
+
+ It can be either a configuration option as given to
+ configure_object() or one of the following options:
+
+
+
+ Lightweight Object Information:
+
+ <what> == LI_LWOBJECT_REFS:
+ The number of references to <lwob>.
+
+ <what> == LI_DATA_SIZE:
+ The total size of the values held in the object's variables,
+ scaled down according to the extend of data sharing.
+
+ <what> == LI_DATA_SIZE_TOTAL:
+ The unmodified total size of the values held in the
+ object's variables
+
+
+
+ Program Flags:
+
+ <what> == LI_NO_INHERIT:
+ 1 if the program can't be inherited.
+
+ <what> == LI_NO_CLONE:
+ 1 if the program/blueprint can't be cloned.
+
+ <what> == LI_SHARE_VARIABLES:
+ 1 if lightweight objects of this program share their
+ initial variable values with the blueprint.
+
+
+
+ Program Statistics:
+
+ <what> == LI_PROG_REFS:
+ The number of references to <lwob>'s program.
+
+ <what> == LI_NUM_FUNCTIONS:
+ The number of functions in the program.
+
+ <what> == LI_NUM_VARIABLES:
+ The number of variables in the program.
+
+ <what> == LI_NUM_STRINGS:
+ The number of strings in the program.
+
+ <what> == LI_NUM_INHERITED:
+ The number of explicitely inherited programs.
+
+ <what> == LI_NUM_INCLUDED:
+ The number of included files in the program.
+
+ <what> == LI_SIZE_FUNCTIONS:
+ The size needed for the function structures.
+ Note that this does not include size of the function code.
+
+ <what> == LI_SIZE_VARIABLES:
+ The size needed for the variable structures.
+ Note that this does not include size of the variable data,
+ See LI_DATA_SIZE/LI_DATA_SIZE_TOTAL for that.
+
+ <what> == LI_SIZE_STRINGS:
+ The size needed for the string pointers.
+
+ <what> == LI_SIZE_STRINGS_DATA:
+ The size needed for the string values,
+ scaled down according to the extend of data sharing.
+
+ <what> == LI_SIZE_STRINGS_DATA_TOTAL:
+ The unmodified size needed for the string values.
+
+ <what> == LI_SIZE_INHERITED:
+ The size needed for the inherit structures.
+
+ <what> == LI_SIZE_INCLUDED:
+ The size needed for the include structures.
+
+ <what> == LI_PROG_SIZE:
+ The size of the program structure.
+
+ <what> == LI_PROG_SIZE_TOTAL:
+ The total size of the program.
+
+
+HISTORY
+ Introduced in LDMud 3.6.5.
+
+SEE ALSO
+ configure_lwobject(E), object_info(E), interactive_info(E),
+ driver_info(E)
diff --git a/doc/efun/lwobjectp b/doc/efun/lwobjectp
new file mode 100644
index 0000000..f6b4b33
--- /dev/null
+++ b/doc/efun/lwobjectp
@@ -0,0 +1,10 @@
+SYNOPSIS
+ int lwobjectp(mixed arg)
+
+DESCRIPTION
+ 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)
diff --git a/doc/efun/m_add b/doc/efun/m_add
index 6314c88..e7e34d1 100644
--- a/doc/efun/m_add
+++ b/doc/efun/m_add
@@ -3,9 +3,17 @@
BESCHREIBUNG
Fuegt einen neuen Eintrag mit Index <key> zum Mapping <map> hinzu
- oder ersetzt diesen. Das veraenderte Mapping wird als Ergebnis
- zurueck geliefert. Werte, die nicht zugeordnet werden koennen, werden
- als 0 interpretiert, irrelevante Argumente werden ignoriert.
+ oder ersetzt diesen. Das veraenderte Mapping wird auch als Ergebnis
+ zurueckgeliefert.
+
+ Die zugehoerigen Werte fuer diesen Eintrag werden aus den weiteren
+ Parametern entnommen. Fehlende Parameter werden als 0 interpretiert,
+ ueberzaehlige Parameter werden ignoriert.
+
+ 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.
BEISPIELE
mapping m;
diff --git a/doc/efun/map_indices b/doc/efun/map_indices
new file mode 100644
index 0000000..7aacc04
--- /dev/null
+++ b/doc/efun/map_indices
@@ -0,0 +1,33 @@
+VERALTET
+SYNOPSIS
+ mapping map_indices(mapping m, string fun, string|object ob,
+ mixed extra, ...)
+ mapping map_indices(mapping m, closure cl, mixed extra, ...)
+
+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.
+
+ Wird <ob> nicht angegeben oder weder ein String noch ein Objekt,
+ wird standardmaessig this_object() verwendet.
+
+ 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().
+
+BEISPIELE
+ m = mkmapping(users());
+ m = map_indices(m, #'envrionment);
+
+GESCHICHTE
+ In LDMud 3.2.6 umbenannt von map_mapping() und durch map() ergaenzt.
+
+SIEHE AUCH
+ 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 a0961f9..75952c1 100644
--- a/doc/efun/map_objects
+++ b/doc/efun/map_objects
@@ -1,15 +1,17 @@
SYNOPSIS
- mixed * map_objects(object *arr, string fun, mixed extra, ...)
- mixed * map_objects(string *arr, string fun, mixed extra, ...)
+ mixed * map_objects(object *arr, string fun, mixed extra, ...)
+ 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>.
- <arr> kann auch eine Mischung aus 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.
+
+ <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.
SIEHE AUCH
map(E), filter(E), filter_objects(E)
diff --git a/doc/efun/md5 b/doc/efun/md5
new file mode 100644
index 0000000..a559767
--- /dev/null
+++ b/doc/efun/md5
@@ -0,0 +1,38 @@
+VERALTET
+SYNOPSIS
+ string md5(string 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.
+
+ Das Ergebnis wird als 32-stelliger Hexadezimalwert geliefert.
+
+ 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.
+
+BEISPIELE
+ string s;
+
+ s = md5("Hallo");
+ 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().
+
+SIEHE AUCH
+ crypt(E), md5_crypt(E), sha1(E), hash(E), hmac(E)
diff --git a/doc/efun/mktime b/doc/efun/mktime
index e750e37..03f7913 100644
--- a/doc/efun/mktime
+++ b/doc/efun/mktime
@@ -5,8 +5,10 @@
BESCHREIBUNG
Ist das Argument <ts> ein Array mit 9 Elementen (int) entsprechend
- des Rueckgabewertes von local_time()/gm_time(), so liefert die Funktion
+ 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.
@@ -20,19 +22,22 @@
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
+ inz TM_ISDST (8): Sommerzeit, 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.
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}));
-
+
GESCHICHTE
Eingefuehrt in LDMud 3.3.718.
SIEHE AUCH
- ctime(E), gmtime(E), local_time(E), time(E), utime(E)
+ ctime(E), gmtime(E), localtime(E), time(E), utime(E)
diff --git a/doc/efun/new_lwobject b/doc/efun/new_lwobject
new file mode 100644
index 0000000..ab19e42
--- /dev/null
+++ b/doc/efun/new_lwobject
@@ -0,0 +1,63 @@
+SYNOPSIS
+ lwobject new_lwobject(string name, ...)
+
+DESCRIPTION
+ Creates a new lightweight object from the program <name> and
+ returns it. The program will be loaded as a regular object,
+ called a blueprint, first, and then a lightweight object will
+ be created therefrom.
+
+ Note that the pathname must be complete, which means there are no
+ relative paths allowed. Any further arguments will be passed to
+ the H_CREATE_LWOBJECT hook to initialize the lightweight object.
+
+ If strict euids are enforced, the calling object must have a
+ non-zero euid.
+
+ Variable initialization is done similar to cloned objects with a call
+ to the internal lfun __INIT(). However, if #pragma share_variables is
+ in effect, the values for a lightweight object's variables are taken
+ from the current variables of the blueprint.
+
+ In the absence of share_variables, variables without explicit
+ initializers are initialized to 0.
+
+
+EXAMPLES
+ --- /lwo/stack.c ---
+ mixed* stack = ({});
+
+ int empty()
+ {
+ return sizeof(stack) == 0;
+ }
+
+ void push(mixed val)
+ {
+ stack += ({ val });
+ }
+
+ mixed pop()
+ {
+ mixed result;
+
+ if (empty())
+ raise_error("stack is empty.\n");
+
+ result = stack[<1];
+ stack = stack[..<2];
+ return result;
+ }
+
+ --- usage: ---
+ lwobject stack = new_lwobject("/lwo/stack");
+
+ stack.push("A");
+ return stack.pop();
+
+
+HISTORY
+ LDMud 3.6.5 introduced lightweight objects.
+
+SEE ALSO
+ blueprint(E), lwobjectp(E), load_name(E), uids(C), pragma(LPC)
diff --git a/doc/efun/notify_fail b/doc/efun/notify_fail
index a18da94..b161c42 100644
--- a/doc/efun/notify_fail
+++ b/doc/efun/notify_fail
@@ -22,7 +22,7 @@
BEISPIELE
Verwendet man
- return notify_fail(message);
+ notify_fail(message); return 0;
anstelle von
diff --git a/doc/efun/objectp b/doc/efun/objectp
index 4183fba..a007993 100644
--- a/doc/efun/objectp
+++ b/doc/efun/objectp
@@ -5,5 +5,5 @@
Liefert 1, wenn <arg> ein Objekt ist.
SIEHE AUCH
- clonep(E), intp(E), stringp(E), bytesp(E), pointerp(E),
+ clonep(E), lwobjectp(E), intp(E), stringp(E), bytesp(E), pointerp(E),
symbolp(E), referencep(E), symbolp(E)
diff --git a/doc/efun/previous_object b/doc/efun/previous_object
index 086c2fa..2b22080 100644
--- a/doc/efun/previous_object
+++ b/doc/efun/previous_object
@@ -1,6 +1,6 @@
SYNOPSIS
- object previous_object()
- object previous_object(int i)
+ object|lwobject previous_object()
+ object|lwobject previous_object(int i)
BESCHREIBUNG
Liefert einen Pointer auf das letzte Objekt, das einen Aufruf (mittels
@@ -22,7 +22,7 @@
BEISPIELE
int sicherheitscheck() {
- object prev;
+ object|lwobject prev;
if (!(prev=previous_object()));
else if (getuid(prev) != getuid(this_object()));
else if (geteuid(prev) != geteuid(this_object()));
diff --git a/doc/efun/program_name b/doc/efun/program_name
index 2b76917..80cb4ab 100644
--- a/doc/efun/program_name
+++ b/doc/efun/program_name
@@ -1,6 +1,6 @@
SYNOPSIS
string program_name()
- string program_name(object obj)
+ string program_name(object|lwobject obj)
BESCHREIBUNG
Liefert den Name des Programms, aus dem <obj> kompiliert wurde.
diff --git a/doc/efun/program_time b/doc/efun/program_time
index 782d8d7..e7da010 100644
--- a/doc/efun/program_time
+++ b/doc/efun/program_time
@@ -1,6 +1,6 @@
SYNOPSIS
int program_time()
- int program_time(object obj)
+ int program_time(object|lwobject obj)
BESCHREIBUNG
Gibt den Zeitpunkt an, zu dem das Objekt <obj> (bzw. this_object(),
diff --git a/doc/efun/regexplode b/doc/efun/regexplode
index ca67db8..17970bc 100644
--- a/doc/efun/regexplode
+++ b/doc/efun/regexplode
@@ -1,30 +1,13 @@
SYNOPSIS
- #include <regexp.h>
-
string * regexplode(string text, string pattern)
- string * regexplode(string text, string pattern, int opt)
-DESCRIPTION
- This function is similar to explode but accepts a regular
- expression <pattern> as delimiter (interpreted according to <opt>
- if given).
+BESCHREIBUNG
+ regexplode() verhaelt sich aehnlich wie explode(), akzeptiert aber
+ auch regulaere Ausdruecke als Trennzeichen. Im Ergebnisarray ist
+ jedes zweite Element ein Trennzeichen.
- 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.
+GESCHICHTE
+ Eingefuehrt in 3.2@61.
-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)
+SIEHE AUCH
+ explode(E), regexp(E), regreplace(E)
diff --git a/doc/efun/remove_input_to b/doc/efun/remove_input_to
index 40dbd68..3bbbcea 100644
--- a/doc/efun/remove_input_to
+++ b/doc/efun/remove_input_to
@@ -2,8 +2,8 @@
int remove_input_to(object player)
int remove_input_to(object player, string fun)
int remove_input_to(object player, closure fun)
- int remove_input_to(object player, object fun)
- int remove_input_to(object player, object obj, string fun)
+ int remove_input_to(object player, object|lwobject fun)
+ int remove_input_to(object player, object|lwobject obj, string fun)
BESCHREIBUNG
Entfernt ein anhaengiges input_to() aus dem interaktiven Playerobjekt.
diff --git a/doc/efun/replace_program b/doc/efun/replace_program
index d2f41b4..98cc305 100644
--- a/doc/efun/replace_program
+++ b/doc/efun/replace_program
@@ -36,12 +36,6 @@
verschwundene Lfuns des Objekts referenzieren. Das stellt allerdings
kein Problem dar, solange diese Referenzen nicht ausgefuehrt werden.
-FEHLER
- Wenn ein ersetzendes Programm virtuell geerbte Variablen enthaelt,
- muss dieses Programm als erstes geerbt werden. Ohne diese
- Einschraenkung ueberleben die falschen Variablen den
- Ersetzungsprozess.
-
GESCHICHTE
LDMud 3.2.9 liess zu, dass das Argument <program> weggelassen wird,
wenn nur ein Inherit existiert.
diff --git a/doc/efun/say b/doc/efun/say
index 61dc373..cbb7819 100644
--- a/doc/efun/say
+++ b/doc/efun/say
@@ -3,9 +3,9 @@
void say(string str, object exclude)
void say(string str, object *excludes)
- void say(mixed *|mapping|struct|object msg)
- void say(mixed *|mapping|struct|object msg, object exclude)
- void say(mixed *|mapping|struct|object msg, object *excludes)
+ void say(mixed *|mapping|struct|object|lwobject msg)
+ 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():
diff --git a/doc/efun/set_extra_wizinfo b/doc/efun/set_extra_wizinfo
index 69efe15..d676e00 100644
--- a/doc/efun/set_extra_wizinfo
+++ b/doc/efun/set_extra_wizinfo
@@ -1,15 +1,16 @@
GESCHUETZT
SYNOPSIS
- void set_extra_wizinfo(object wiz, mixed extra)
- void set_extra_wizinfo(string wiz, mixed extra)
- void set_extra_wizinfo(int wiz, mixed extra)
+ 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>.
- Ist <wiz> ein Objekt, wird der Eintrag vom Erzeuger des Objekts (also
- dessen UID) verwendet.
+ 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.
diff --git a/doc/efun/set_this_object b/doc/efun/set_this_object
index 5c4a42d..1aa0c6a 100644
--- a/doc/efun/set_this_object
+++ b/doc/efun/set_this_object
@@ -1,6 +1,6 @@
GESCHUETZT
SYNOPSIS
- void set_this_object(object objekt-an-stelle-von-originalobjekt)
+ void set_this_object(object|lwobject objekt-an-stelle-von-originalobjekt)
BESCHREIBUNG
Dies ist eine geschuetzte Funktion, die nur vom Master-Objekt und im
diff --git a/doc/efun/sscanf b/doc/efun/sscanf
index a927b70..4344d0e 100644
--- a/doc/efun/sscanf
+++ b/doc/efun/sscanf
@@ -48,6 +48,9 @@
fuer %s zu erzielen. Trotzdem ueberspringt %D/%U keine Whitespaces,
dazu muss %.0t%D gesetzt werden.
+ Wenn eine Zahl erkannt wird, welche ausserhalb des Zahlenbereiches
+ von Integers ist, so wird dies nicht als Treffer betrachtet.
+
Zurueck gegeben wird die Anzahl Treffer.
Die Funktion sscanf() ist insofern ein Spezialfall, als dass
diff --git a/doc/efun/swap b/doc/efun/swap
index 4ab426d..0851fbd 100644
--- a/doc/efun/swap
+++ b/doc/efun/swap
@@ -1,7 +1,19 @@
-GESCHUETZT
+OPTIONAL
SYNOPSIS
- void swap(object obj)
+ void swap(object obj, int flags)
BESCHREIBUNG
Lagert ein Objekt aus. Diese Efun ist nur fuer systeminternes
Debugging und kann einen Absturz verursachen.
+
+ <flags> kann angegeben werden, um festzulegen, welcher Teil von <obj>
+ ausgelagert werden soll. Es ist eine Bitmaske aus folgenden:
+
+ 1: Programm auslagern
+ 2: Variablen auslagern
+
+ Standardmaessig (auch wenn 0 angegeben wurde) wird beides (3)
+ ausgelagert.
+
+GESCHICHTE
+ LDMud 3.6.4 fuehrte den zweiten Parameter ein.
diff --git a/doc/efun/symbol_function b/doc/efun/symbol_function
index dca2b3e..7178f93 100644
--- a/doc/efun/symbol_function
+++ b/doc/efun/symbol_function
@@ -1,7 +1,7 @@
SYNOPSIS
closure symbol_function(symbol arg)
closure symbol_function(string arg)
- closure symbol_function(string arg, object|string obj)
+ closure symbol_function(string arg, object|lwobject|string obj)
BESCHREIBUNG
Erzeugt eine Lfun-, Efun- oder Operator-Closure aus <arg>, wobei
diff --git a/doc/efun/tell_object b/doc/efun/tell_object
index 85991e2..207672e 100644
--- a/doc/efun/tell_object
+++ b/doc/efun/tell_object
@@ -1,6 +1,7 @@
SYNOPSIS
void tell_object(object|string obj, string str)
- void tell_object(object|string obj, mixed *|mapping|struct|object msg)
+ void tell_object(object|string obj,
+ mixed *|mapping|struct|object|lwobject msg)
BESCHREIBUNG
Sendet einen Nachricht an das Objekt <obj> (das auch durch seinen
@@ -27,7 +28,7 @@
Objekt1:
void catch_tell(string str)
{
- write("Erhaltener Text: "+str+"\n");
+ wirte("Erhaltener Text: "+str+"\n");
}
Objekt2:
diff --git a/doc/efun/tell_room b/doc/efun/tell_room
index 0f18ab5..6692643 100644
--- a/doc/efun/tell_room
+++ b/doc/efun/tell_room
@@ -2,9 +2,11 @@
void tell_room(string|object obj, string str)
void tell_room(string|object obj, string str, object *exclude)
- void tell_room(string|object obj, mixed *|mapping|struct|object msg)
- void tell_room(string|object obj, mixed *|mapping|struct|object msg,
- object *exclude)
+ void tell_room(string|object obj,
+ mixed *|mapping|struct|object|lwobject msg)
+ void tell_room(string|object obj,
+ mixed *|mapping|struct|object|lwobject msg,
+ object *exclude)
BESCHREIBUNG
Gibt einen Text <str> an den Raum <obj> aus. <obj> kann auch der
diff --git a/doc/efun/this_object b/doc/efun/this_object
index fa51f1c..39b9fcb 100644
--- a/doc/efun/this_object
+++ b/doc/efun/this_object
@@ -1,5 +1,5 @@
SYNOPSIS
- object this_object()
+ object|lwobject this_object()
BESCHREIBUNG
Liefert den Objektpointer auf dieses Objekt. Der Pointer darf nicht
diff --git a/doc/efun/unique_array b/doc/efun/unique_array
index d77f2fc..72da0b0 100644
--- a/doc/efun/unique_array
+++ b/doc/efun/unique_array
@@ -1,7 +1,10 @@
SYNOPSIS
- mixed unique_array(object *obj, string|closure fun)
- mixed unique_array(object *obj, string|closure fun, mixed skip)
- mixed unique_array(object *obj, string|closure fun, mixed extra...
+ <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)
BESCHREIBUNG
diff --git a/doc/efun/variable_exists b/doc/efun/variable_exists
index 65337e5..682490e 100644
--- a/doc/efun/variable_exists
+++ b/doc/efun/variable_exists
@@ -2,7 +2,7 @@
#include <functionlist.h>
string variable_exists(string str [, int flags])
- string variable_exists(string str, object obj [, int flags])
+ string variable_exists(string str, object|lwobject obj [, int flags])
BESCHREIBUNG
Sucht eine Varialbe <str> in this_object() oder (falls angegeben)
diff --git a/doc/efun/variable_list b/doc/efun/variable_list
index 48bd9c6..c57822f 100644
--- a/doc/efun/variable_list
+++ b/doc/efun/variable_list
@@ -3,7 +3,8 @@
#include <functionlist.h>
#include <lpctypes.h>
- mixed *variable_list(object obj, int flags = RETURN_FUNCTION_NAME)
+ mixed *variable_list(object|lwobject obj,
+ int flags = RETURN_FUNCTION_NAME)
BESCHREIBUNG
Liefert ein Array mit Informationen ueber die Variablen von <obj>.