diff-3.2-doc-efun-en.patch (153,760 bytes)
diff -c efun.orig/abs efun/abs
*** efun.orig/abs 2009-11-02 22:22:36.000000000 +0000
--- efun/abs 2009-11-02 22:24:49.000000000 +0000
***************
*** 1,6 ****
SYNOPSIS
! int abs (int arg)
! float abs (float arg)
DESCRIPTION
Returns the absolute value of the argument <arg>.
--- 1,6 ----
SYNOPSIS
! int abs(int arg)
! float abs(float arg)
DESCRIPTION
Returns the absolute value of the argument <arg>.
diff -c efun.orig/add_action efun/add_action
*** efun.orig/add_action 2009-11-02 22:22:36.000000000 +0000
--- efun/add_action 2009-11-02 22:24:49.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! #include <sys/commands.h>
void add_action(string fun, string cmd)
void add_action(string fun, string cmd, int flag)
--- 1,5 ----
SYNOPSIS
! #include <commands.h>
void add_action(string fun, string cmd)
void add_action(string fun, string cmd, int flag)
diff -c efun.orig/all_environment efun/all_environment
*** efun.orig/all_environment 2009-11-02 22:22:36.000000000 +0000
--- efun/all_environment 2009-11-02 22:27:59.000000000 +0000
***************
*** 1,6 ****
SYNOPSIS
! object *all_environment()
! object *all_environment(object o)
DESCRIPTION
Returns an array with all environments object <o> is in. If <o> is
--- 1,6 ----
SYNOPSIS
! object * all_environment()
! object * all_environment(object o)
DESCRIPTION
Returns an array with all environments object <o> is in. If <o> is
***************
*** 8,20 ****
If <o> has no environment, or if <o> is destructed, 0 is returned.
! EXAMPLE
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 }).
HISTORY
! Introduced in LDMud 3.2.6, suggested by TubMud.
SEE ALSO
environment(E), all_inventory(E)
--- 8,20 ----
If <o> has no environment, or if <o> is destructed, 0 is returned.
! 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 }).
HISTORY
! Introduced in LDMud 3.2.6, suggested by Tubmud.
SEE ALSO
environment(E), all_inventory(E)
diff -c efun.orig/all_inventory efun/all_inventory
*** efun.orig/all_inventory 2009-11-02 22:22:36.000000000 +0000
--- efun/all_inventory 2009-11-02 22:24:49.000000000 +0000
***************
*** 1,6 ****
SYNOPSIS
! object *all_inventory()
! object *all_inventory(object ob)
DESCRIPTION
Returns an array of the objects contained in the inventory of
--- 1,6 ----
SYNOPSIS
! object * all_inventory()
! object * all_inventory(object ob)
DESCRIPTION
Returns an array of the objects contained in the inventory of
diff -c efun.orig/allocate efun/allocate
*** efun.orig/allocate 2009-11-02 22:22:36.000000000 +0000
--- efun/allocate 2009-11-02 22:24:49.000000000 +0000
***************
*** 1,9 ****
SYNOPSIS
! mixed *allocate(int size)
! mixed *allocate(int size, mixed init_value)
! mixed *allocate(int* sizes)
! mixed *allocate(int* sizes, mixed init_value)
DESCRIPTION
Allocate an array of size elements. The number of elements
--- 1,9 ----
SYNOPSIS
! mixed * allocate(int size)
! mixed * allocate(int size, mixed init_value)
! mixed * allocate(int *sizes)
! mixed * allocate(int *sizes, mixed init_value)
DESCRIPTION
Allocate an array of size elements. The number of elements
***************
*** 21,27 ****
and initialized by the ({ }) operator. The functions only
use is to construct big empty or initialized arrays.
! EXAMPLE
string *buffer;
buffer = allocate(50);
buffer = allocate(50, "");
--- 21,27 ----
and initialized by the ({ }) operator. The functions only
use is to construct big empty or initialized arrays.
! EXAMPLES
string *buffer;
buffer = allocate(50);
buffer = allocate(50, "");
diff -c efun.orig/and_bits efun/and_bits
*** efun.orig/and_bits 2009-11-02 22:22:36.000000000 +0000
--- efun/and_bits 2009-11-02 22:24:49.000000000 +0000
***************
*** 1,7 ****
SYNOPSIS
! string and_bits (string str1, string str2)
! DESTRIPTION
<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
--- 1,7 ----
SYNOPSIS
! string and_bits(string str1, string str2)
! 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
diff -c efun.orig/assoc efun/assoc
*** efun.orig/assoc 2009-11-02 22:22:36.000000000 +0000
--- efun/assoc 2009-11-02 22:24:49.000000000 +0000
***************
*** 1,8 ****
OPTIONAL
SYNOPSIS
! int assoc (mixed key, mixed *keys)
! mixed assoc (mixed key, mixed *alist [, mixed fail] )
! mixed assoc (mixed key, mixed *keys, mixed *data [, mixed fail] )
DESCRIPTION
All invocation forms search for a <key> in an <alist> (an array
--- 1,8 ----
OPTIONAL
SYNOPSIS
! int assoc(mixed key, mixed *keys)
! mixed assoc(mixed key, mixed *alist [, mixed fail])
! mixed assoc(mixed key, mixed *keys, mixed *data [, mixed fail])
DESCRIPTION
All invocation forms search for a <key> in an <alist> (an array
***************
*** 10,16 ****
An attempt to search in any other structure will yield an
unpredictable result.
! Complexity: O( lg(n) ) , where n is the number of keys.
1. Form: Key Search
--- 10,16 ----
An attempt to search in any other structure will yield an
unpredictable result.
! Complexity: O(lg(n)) , where n is the number of keys.
1. Form: Key Search
diff -c efun.orig/atan2 efun/atan2
*** efun.orig/atan2 2009-11-02 22:22:36.000000000 +0000
--- efun/atan2 2009-11-02 22:24:49.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! float atan2 (int|float y, int|float x)
DESCRIPTION
Returns the angle part of the polar coordinates of the point (x, y)
--- 1,5 ----
SYNOPSIS
! float atan2(int|float y, int|float x)
DESCRIPTION
Returns the angle part of the polar coordinates of the point (x, y)
diff -c efun.orig/attach_erq_demon efun/attach_erq_demon
*** efun.orig/attach_erq_demon 2009-11-02 22:22:36.000000000 +0000
--- efun/attach_erq_demon 2009-11-02 22:24:49.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! int attach_erq_demon(object ob, int do_close)
int attach_erq_demon(string obname, int do_close)
DESCRIPTION
--- 1,5 ----
SYNOPSIS
! int attach_erq_demon(object ob, int do_close)
int attach_erq_demon(string obname, int do_close)
DESCRIPTION
***************
*** 16,23 ****
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.
If there is alreay an erq demon connected to the driver, the
function will fail unless 'do_close' (default 0) is specified
--- 16,23 ----
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.
If there is alreay an erq demon connected to the driver, the
function will fail unless 'do_close' (default 0) is specified
***************
*** 25,31 ****
be closed before attaching the new.
The efun returns 1 on success, else 0.
! EXAMPLE
To restart the (default) erq, write in
master.c::stale_erq(closure c):
attach_erq_demon("", 0);
--- 25,31 ----
be closed before attaching the new.
The efun returns 1 on success, else 0.
! EXAMPLES
To restart the (default) erq, write in
master.c::stale_erq(closure c):
attach_erq_demon("", 0);
diff -c efun.orig/blueprint efun/blueprint
*** efun.orig/blueprint 2009-11-02 22:22:36.000000000 +0000
--- efun/blueprint 2009-11-02 22:25:00.000000000 +0000
***************
*** 1,7 ****
PRELIMINARY
SYNOPSIS
! object blueprint ()
! object blueprint (string|object ob)
DESCRIPTION
The efuns returns the blueprint for the given object <ob>, or for
--- 1,7 ----
PRELIMINARY
SYNOPSIS
! object blueprint()
! object blueprint(string|object ob)
DESCRIPTION
The efuns returns the blueprint for the given object <ob>, or for
***************
*** 10,15 ****
--- 10,16 ----
If the blueprint is destructed, the efun returns 0.
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 "/".
EXAMPLES
blueprint("/std/thing")) -> /std/thing
***************
*** 17,23 ****
blueprint(clone_object("/std/thing")) -> /std/thing
HISTORY
! Introduced in LDMud 3.2.9 .
SEE ALSO
clones(E), clone_object(E)
--- 18,24 ----
blueprint(clone_object("/std/thing")) -> /std/thing
HISTORY
! Introduced in LDMud 3.2.9.
SEE ALSO
clones(E), clone_object(E)
diff -c efun.orig/caller_stack efun/caller_stack
*** efun.orig/caller_stack 2009-11-02 22:22:36.000000000 +0000
--- efun/caller_stack 2009-11-02 22:25:06.000000000 +0000
***************
*** 1,6 ****
SYNOPSIS
! object *caller_stack()
! object *caller_stack(int add_interactive)
DESCRIPTION
Returns an array of the previous_object()s who caused the
--- 1,6 ----
SYNOPSIS
! object * caller_stack()
! object * caller_stack(int add_interactive)
DESCRIPTION
Returns an array of the previous_object()s who caused the
***************
*** 16,22 ****
from the closure object: the first is for the bound object,
the second for the closure object.
! EXAMPLE
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
--- 16,22 ----
from the closure object: the first is for the bound object,
the second for the closure object.
! 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
***************
*** 25,31 ****
If it calls caller_stack(1) the result is: ({C,B,A}).
HISTORY
! Introduced in LDMud 3.2.6, suggested by TubMud.
SEE ALSO
caller_stack_depth(E), previous_object(E), this_interactive(E),
--- 25,31 ----
If it calls caller_stack(1) the result is: ({C,B,A}).
HISTORY
! Introduced in LDMud 3.2.6, suggested by Tubmud.
SEE ALSO
caller_stack_depth(E), previous_object(E), this_interactive(E),
diff -c efun.orig/call_other efun/call_other
*** efun.orig/call_other 2009-11-02 22:22:36.000000000 +0000
--- efun/call_other 2009-11-02 22:25:06.000000000 +0000
***************
*** 48,54 ****
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.
string str, fun;
--- 48,53 ----
***************
*** 67,77 ****
// This statement calls the lfun short() in all interactive users
// and stores the collected results in a variable.
! string * s;
s = (string *)users()->short();
-
!Compat: call_other("/users/luser/thing", "???", 0);
Compat: call_other("users/luser/thing", "???", 0);
--- 66,75 ----
// This statement calls the lfun short() in all interactive users
// and stores the collected results in a variable.
! string *s;
s = (string *)users()->short();
!Compat: call_other("/users/luser/thing", "???", 0);
Compat: call_other("users/luser/thing", "???", 0);
diff -c efun.orig/call_out efun/call_out
*** efun.orig/call_out 2009-11-02 22:22:36.000000000 +0000
--- efun/call_out 2009-11-02 22:25:06.000000000 +0000
***************
*** 24,30 ****
call_outs() of this user scheduled for the same time are
discarded.
! EXAMPLE
call_out("RefreshMe", 10);
This will call the function RefreshMe() in 10 seconds without
--- 24,30 ----
call_outs() of this user scheduled for the same time are
discarded.
! EXAMPLES
call_out("RefreshMe", 10);
This will call the function RefreshMe() in 10 seconds without
diff -c efun.orig/call_out_info efun/call_out_info
*** efun.orig/call_out_info 2009-11-02 22:22:36.000000000 +0000
--- efun/call_out_info 2009-11-02 22:25:06.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! mixed *call_out_info(void)
DESCRIPTION
Get information about all pending call outs. The result is an
--- 1,5 ----
SYNOPSIS
! mixed * call_out_info(void)
DESCRIPTION
Get information about all pending call outs. The result is an
diff -c efun.orig/cat efun/cat
*** efun.orig/cat 2009-11-02 22:22:36.000000000 +0000
--- efun/cat 2009-11-02 22:25:06.000000000 +0000
***************
*** 18,24 ****
0 if no such file or no lines to read (if start or len is < 0,
or if the file has less than start lines).
! EXAMPLE
cat("/doc/efun/cat", 5, 9);
This will print out the file "/doc/efun/cat" begining at line
--- 18,24 ----
0 if no such file or no lines to read (if start or len is < 0,
or if the file has less than start lines).
! EXAMPLES
cat("/doc/efun/cat", 5, 9);
This will print out the file "/doc/efun/cat" begining at line
diff -c efun.orig/catch efun/catch
*** efun.orig/catch 2009-11-02 22:22:36.000000000 +0000
--- efun/catch 2009-11-02 22:27:05.000000000 +0000
***************
*** 1,6 ****
SYNOPSIS
! mixed catch (expr, expr, ...)
! mixed catch (expr, expr, ... ; modifiers)
DESCRIPTION
Evaluate the expressions. If there is no error, 0 is returned.
--- 1,6 ----
SYNOPSIS
! mixed catch(expr, expr, ...)
! mixed catch(expr, expr, ... ; modifiers)
DESCRIPTION
Evaluate the expressions. If there is no error, 0 is returned.
***************
*** 25,33 ****
for a caught error. This modifier instructs
catch() to call it nevertheless.
! Catch is not really an efun, but a compiler directive.
! EXAMPLE
object obj;
string err;
if (err = catch(obj = clone_object("/foo/bar/baz")))
--- 25,33 ----
for a caught error. This modifier instructs
catch() to call it nevertheless.
! Catch is not really an efun but a compiler directive.
! EXAMPLES
object obj;
string err;
if (err = catch(obj = clone_object("/foo/bar/baz")))
diff -c efun.orig/ceil efun/ceil
*** efun.orig/ceil 2009-11-02 22:22:36.000000000 +0000
--- efun/ceil 2009-11-02 22:31:44.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! float ceil (int|float arg)
DESCRIPTION
Round the <arg>ument upwards the nearest whole number, returning
--- 1,5 ----
SYNOPSIS
! float ceil(int|float arg)
DESCRIPTION
Round the <arg>ument upwards the nearest whole number, returning
***************
*** 7,15 ****
the argument value, converted to float.
EXAMPLES
! ceil(4.5) - return 5.0
! ceil(-4.5) - return -4.0
! ceil(5) - return 5.0
HISTORY
Introduced in LDMud 3.2.7.
--- 7,15 ----
the argument value, converted to float.
EXAMPLES
! ceil(4.5) - returns 5.0
! ceil(-4.5) - returns -4.0
! ceil(4) - returns 4.0
HISTORY
Introduced in LDMud 3.2.7.
diff -c efun.orig/clone_object efun/clone_object
*** efun.orig/clone_object 2009-11-02 22:22:36.000000000 +0000
--- efun/clone_object 2009-11-02 22:25:06.000000000 +0000
***************
*** 37,43 ****
Variables without explicit initializers are always initialized to 0.
! EXAMPLE
// Clone a torch (filename in non-compat format)
object torch;
torch = clone_object("/obj/torch");
--- 37,44 ----
Variables without explicit initializers are always initialized to 0.
!
! EXAMPLES
// Clone a torch (filename in non-compat format)
object torch;
torch = clone_object("/obj/torch");
diff -c efun.orig/clonep efun/clonep
*** efun.orig/clonep 2009-11-02 22:22:36.000000000 +0000
--- efun/clonep 2009-11-02 22:25:06.000000000 +0000
***************
*** 1,8 ****
SYNOPSIS
! int clonep ()
! int clonep (object obj)
! int clonep (string obj)
! int clonep (mixed arg)
DESCRIPTION
The efun returns 1 if <obj> is a clone, and 0 if it is not.
--- 1,8 ----
SYNOPSIS
! int clonep()
! int clonep(object obj)
! int clonep(string obj)
! int clonep(mixed arg)
DESCRIPTION
The efun returns 1 if <obj> is a clone, and 0 if it is not.
***************
*** 11,17 ****
Arguments of other types return 0.
Objects with replaced programs no longer count as clones.
! EXAMPLE
object o;
o = clone_object("/std/thing");
write(clonep(o)); --> writes "1"
--- 11,17 ----
Arguments of other types return 0.
Objects with replaced programs no longer count as clones.
! EXAMPLES
object o;
o = clone_object("/std/thing");
write(clonep(o)); --> writes "1"
diff -c efun.orig/clones efun/clones
*** efun.orig/clones 2009-11-02 22:22:36.000000000 +0000
--- efun/clones 2009-11-02 22:25:06.000000000 +0000
***************
*** 1,7 ****
SYNOPSIS
! object* clones ()
! object* clones (int what)
! object* clones (string|object obj [, int what])
DESCRIPTION
The efuns returns an array with all clones of a certain blueprint.
--- 1,7 ----
SYNOPSIS
! object * clones()
! object * clones(int what)
! object * clones(string|object obj [, int what])
DESCRIPTION
The efuns returns an array with all clones of a certain blueprint.
***************
*** 23,31 ****
If the driver is compiled with DYNAMIC_COSTS, the cost of this
efun is proportional to the number of objects in the game.
! EXAMPLE
object o, p;
! o = clone_object("/std/thing"); /* or "std/thing" in COMPAT_MODE */
destruct(find_object("/std/thing"));
p = clone_object("/std/thing");
--- 23,31 ----
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"); /* or "std/thing" in COMPAT mode */
destruct(find_object("/std/thing"));
p = clone_object("/std/thing");
diff -c efun.orig/command_stack efun/command_stack
*** efun.orig/command_stack 2009-11-02 22:22:36.000000000 +0000
--- efun/command_stack 2009-11-02 22:25:06.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! #include <sys/commands.h>
mixed * command_stack(void)
--- 1,5 ----
SYNOPSIS
! #include <commands.h>
mixed * command_stack(void)
diff -c efun.orig/copy efun/copy
*** efun.orig/copy 2009-11-02 22:22:36.000000000 +0000
--- efun/copy 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! mixed copy (mixed arg)
DESCRIPTION
Create a shallow copy of <arg> and return it. For arrays and mappings
--- 1,5 ----
SYNOPSIS
! mixed copy(mixed arg)
DESCRIPTION
Create a shallow copy of <arg> and return it. For arrays and mappings
***************
*** 8,14 ****
For other values this function is a no-op.
! EXAMPLE
mixed *a, *b;
a = ({ 1, ({ 21, 22 }) });
--- 8,14 ----
For other values this function is a no-op.
! EXAMPLES
mixed *a, *b;
a = ({ 1, ({ 21, 22 }) });
diff -c efun.orig/copy_bits efun/copy_bits
*** efun.orig/copy_bits 2009-11-02 22:22:36.000000000 +0000
--- efun/copy_bits 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,8 ****
SYNOPSIS
string copy_bits(string src, string dest
! [, int srcstart [, int deststart [, int copylen ]]]
! )
DESCRIPTION
Copy the bitrange [<srcstart>..<srcstart>+<copylen>[ from
--- 1,7 ----
SYNOPSIS
string copy_bits(string src, string dest
! [, int srcstart [, int deststart [, int copylen ]]])
DESCRIPTION
Copy the bitrange [<srcstart>..<srcstart>+<copylen>[ from
diff -c efun.orig/copy_file efun/copy_file
*** efun.orig/copy_file 2009-11-02 22:22:36.000000000 +0000
--- efun/copy_file 2009-11-02 22:25:16.000000000 +0000
***************
*** 12,18 ****
On successfull completion copy_file() will return 0. If any error
occurs, a non-zero value is returned.
! EXAMPLE
copy_file("/players/wizard/obj.c", "/players/wizard/newobj.c");
HISTORY
--- 12,18 ----
On successfull completion copy_file() will return 0. If any error
occurs, a non-zero value is returned.
! EXAMPLES
copy_file("/players/wizard/obj.c", "/players/wizard/newobj.c");
HISTORY
diff -c efun.orig/count_bits efun/count_bits
*** efun.orig/count_bits 2009-11-02 22:22:36.000000000 +0000
--- efun/count_bits 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,7 ****
SYNOPSIS
! int count_bits (string str)
! DESTRIPTION
Count the number of set bits in bitstring <str> and return the number
as result.
--- 1,7 ----
SYNOPSIS
! int count_bits(string str)
! DESCRIPTION
Count the number of set bits in bitstring <str> and return the number
as result.
diff -c efun.orig/ctime efun/ctime
*** efun.orig/ctime 2009-11-02 22:22:36.000000000 +0000
--- efun/ctime 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,6 ****
SYNOPSIS
string ctime(int clock)
! string ctime(int* uclock)
DESCRIPTION
Interpret the argument clock as number of seconds since Jan,
--- 1,6 ----
SYNOPSIS
string ctime(int clock)
! string ctime(int *uclock)
DESCRIPTION
Interpret the argument clock as number of seconds since Jan,
***************
*** 12,18 ****
of seconds like before, int[1] is the number of microseconds within
that second.
! EXAMPLE
write(ctime()+"\n");
This will print out something like "Fri Jul 17 19:13:33 1992".
--- 12,18 ----
of seconds like before, int[1] is the number of microseconds within
that second.
! EXAMPLES
write(ctime()+"\n");
This will print out something like "Fri Jul 17 19:13:33 1992".
diff -c efun.orig/db_coldefs efun/db_coldefs
*** efun.orig/db_coldefs 2009-11-02 22:22:36.000000000 +0000
--- efun/db_coldefs 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,6 ****
OPTIONAL
SYNOPSIS
! string * db_coldefs (int handle)
DESCRIPTION
Return an array with the column names of the current table.
--- 1,6 ----
OPTIONAL
SYNOPSIS
! string * db_coldefs(int handle)
DESCRIPTION
Return an array with the column names of the current table.
***************
*** 13,19 ****
The efun triggers a privilege violation ("mysql", "db_coldefs").
HISTORY
! Added in 3.2.9 .
LDMud 3.2.11 added the privilege violation.
SEE ALSO
--- 13,19 ----
The efun triggers a privilege violation ("mysql", "db_coldefs").
HISTORY
! Added in 3.2.9.
LDMud 3.2.11 added the privilege violation.
SEE ALSO
diff -c efun.orig/db_handles efun/db_handles
*** efun.orig/db_handles 2009-11-02 22:22:36.000000000 +0000
--- efun/db_handles 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,6 ****
OPTIONAL
SYNOPSIS
! int *db_handles()
DESCRIPTION
Returns an array with all open handles to the SQL-server.
--- 1,6 ----
OPTIONAL
SYNOPSIS
! int * db_handles()
DESCRIPTION
Returns an array with all open handles to the SQL-server.
diff -c efun.orig/db_insert_id efun/db_insert_id
*** efun.orig/db_insert_id 2009-11-02 22:22:36.000000000 +0000
--- efun/db_insert_id 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,6 ****
OPTIONAL
SYNOPSIS
! int db_insert_id (int handle)
DESCRIPTION
After inserting a line into a table with an AUTO_INCREMENT field,
--- 1,6 ----
OPTIONAL
SYNOPSIS
! int db_insert_id(int handle)
DESCRIPTION
After inserting a line into a table with an AUTO_INCREMENT field,
diff -c efun.orig/debug_info efun/debug_info
*** efun.orig/debug_info 2009-11-02 22:22:36.000000000 +0000
--- efun/debug_info 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! #include <sys/debug_info.h>
mixed debug_info(int flag)
mixed debug_info(int flag, mixed arg)
--- 1,5 ----
SYNOPSIS
! #include <debug_info.h>
mixed debug_info(int flag)
mixed debug_info(int flag, mixed arg)
***************
*** 84,90 ****
'opcdump' for the function.
-
DINFO_DATA (6): Return raw information about an aspect of
the driver specified by <arg2>. The result of the function
is an array with the information, or 0 for unsupported values
--- 84,89 ----
diff -c efun.orig/debug_message efun/debug_message
*** efun.orig/debug_message 2009-11-02 22:22:36.000000000 +0000
--- efun/debug_message 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! #include <sys/debug_message.h>
void debug_message(string text)
void debug_message(string text, int flags)
--- 1,5 ----
SYNOPSIS
! #include <debug_message.h>
void debug_message(string text)
void debug_message(string text, int flags)
***************
*** 18,24 ****
If <flags> is given as 0, left out, or contains no target
definition, debug_message() will print to stdout and to the logfile.
! EXAMPLE
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"
--- 18,25 ----
If <flags> is given as 0, left out, or contains no target
definition, debug_message() will print to stdout and to the logfile.
!
! 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"
***************
*** 30,36 ****
, DMSG_STDOUT | DMSG_STAMP);
HISTORY
! Introduced in 3.2.1@34
LDMud 3.2.9 introduced the <flags> parameter.
SEE ALSO
--- 31,37 ----
, DMSG_STDOUT | DMSG_STAMP);
HISTORY
! Introduced in 3.2.1@34.
LDMud 3.2.9 introduced the <flags> parameter.
SEE ALSO
diff -c efun.orig/deep_copy efun/deep_copy
*** efun.orig/deep_copy 2009-11-02 22:22:36.000000000 +0000
--- efun/deep_copy 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! mixed deep_copy (mixed arg)
DESCRIPTION
Create a deep copy of <arg> and return it. For arrays and mappings
--- 1,5 ----
SYNOPSIS
! mixed deep_copy(mixed arg)
DESCRIPTION
Create a deep copy of <arg> and return it. For arrays and mappings
***************
*** 11,17 ****
If DYNAMIC_COST is defined, every nested mapping or array counts
towards the evaluation cost in both size and nesting depth.
! EXAMPLE
mixed *a, *b;
a = ({ 1, ({ 21, 22 }) });
--- 11,17 ----
If DYNAMIC_COST is defined, every nested mapping or array counts
towards the evaluation cost in both size and nesting depth.
! EXAMPLES
mixed *a, *b;
a = ({ 1, ({ 21, 22 }) });
diff -c efun.orig/deep_inventory efun/deep_inventory
*** efun.orig/deep_inventory 2009-11-02 22:22:36.000000000 +0000
--- efun/deep_inventory 2009-11-02 22:35:47.000000000 +0000
***************
*** 1,6 ****
SYNOPSIS
! object *deep_inventory(void)
! object *deep_inventory(object ob)
DESCRIPTION
Returns an array of the objects contained in the inventory of
--- 1,6 ----
SYNOPSIS
! object * deep_inventory(void)
! object * deep_inventory(object ob)
DESCRIPTION
Returns an array of the objects contained in the inventory of
diff -c efun.orig/destruct efun/destruct
*** efun.orig/destruct 2009-11-02 22:22:36.000000000 +0000
--- efun/destruct 2009-11-02 22:25:16.000000000 +0000
***************
*** 28,34 ****
although the object is not visible anywhere anymore from
outside.
! EXAMPLE
ob->remove();
if(ob) /* still there, probably ob does not provide remove() */
destruct(ob);
--- 28,34 ----
although the object is not visible anywhere anymore from
outside.
! EXAMPLES
ob->remove();
if(ob) /* still there, probably ob does not provide remove() */
destruct(ob);
diff -c efun.orig/enable_commands efun/enable_commands
*** efun.orig/enable_commands 2009-11-02 22:22:36.000000000 +0000
--- efun/enable_commands 2009-11-02 22:25:16.000000000 +0000
***************
*** 9,15 ****
create() (or reset(0) in compat mode), because the command
giver will be set to this object.
! EXAMPLE
void create() {
enable_commands();
...
--- 9,15 ----
create() (or reset(0) in compat mode), because the command
giver will be set to this object.
! EXAMPLES
void create() {
enable_commands();
...
diff -c efun.orig/enable_telnet efun/enable_telnet
*** efun.orig/enable_telnet 2009-11-02 22:22:36.000000000 +0000
--- efun/enable_telnet 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! int enable_telnet (int num, object obj = this_interactive() )
DESCRIPTION
Enable or disable the telnet machine for the interactive object <obj>.
--- 1,6 ----
SYNOPSIS
! int enable_telnet(int num)
! int enable_telnet(int num, object obj)
DESCRIPTION
Enable or disable the telnet machine for the interactive object <obj>.
diff -c efun.orig/environment efun/environment
*** efun.orig/environment 2009-11-02 22:22:36.000000000 +0000
--- efun/environment 2009-11-02 22:25:16.000000000 +0000
***************
*** 10,16 ****
Destructed objects do not have an environment.
! EXAMPLE
object room;
room = environment(this_player());
--- 10,16 ----
Destructed objects do not have an environment.
! EXAMPLES
object room;
room = environment(this_player());
diff -c efun.orig/exec efun/exec
*** efun.orig/exec 2009-11-02 22:22:36.000000000 +0000
--- efun/exec 2009-11-02 22:25:16.000000000 +0000
***************
*** 27,33 ****
bind_lambda() to bind #'exec to the real object and funcall()
the resulting closure.
! EXAMPLE
ob = clone_object("std/player");
exec(ob, this_object());
destruct(this_object());
--- 27,33 ----
bind_lambda() to bind #'exec to the real object and funcall()
the resulting closure.
! EXAMPLES
ob = clone_object("std/player");
exec(ob, this_object());
destruct(this_object());
diff -c efun.orig/execute_command efun/execute_command
*** efun.orig/execute_command 2009-11-02 22:22:36.000000000 +0000
--- efun/execute_command 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,7 ****
PRELIMINARY
SYNOPSIS
!
! int execute_command (string command, object origin, object player)
DESCRIPTION
Low-level access to the command parser: take the <command>, parse it
--- 1,6 ----
PRELIMINARY
SYNOPSIS
! int execute_command(string command, object origin, object player)
DESCRIPTION
Low-level access to the command parser: take the <command>, parse it
***************
*** 21,27 ****
but must be evaluated by the caller.
HISTORY
! Introduced in LDMud 3.2.7
SEE ALSO
hooks(C), command(E), notify_fail(E), command_stack(E)
--- 20,26 ----
but must be evaluated by the caller.
HISTORY
! Introduced in LDMud 3.2.7.
SEE ALSO
hooks(C), command(E), notify_fail(E), command_stack(E)
diff -c efun.orig/expand_define efun/expand_define
*** efun.orig/expand_define 2009-11-02 22:22:36.000000000 +0000
--- efun/expand_define 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,6 ****
SYNOPSIS
! string expand_define (string name)
! string expand_define (string name, string arg, ...)
DESCRIPTION
Expands the macro <name> with the argument(s) <arg>... (default is
--- 1,6 ----
SYNOPSIS
! string expand_define(string name)
! string expand_define(string name, string arg, ...)
DESCRIPTION
Expands the macro <name> with the argument(s) <arg>... (default is
***************
*** 13,19 ****
H_INCLUDE_DIRS driver hook, or the masters runtime_error()
function.
! EXAMPLE
While compiling 'foo.c':
expand_define("__FILE__") --> "foo.c"
--- 13,19 ----
H_INCLUDE_DIRS driver hook, or the masters runtime_error()
function.
! EXAMPLES
While compiling 'foo.c':
expand_define("__FILE__") --> "foo.c"
diff -c efun.orig/explode efun/explode
*** efun.orig/explode 2009-11-02 22:22:36.000000000 +0000
--- efun/explode 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! string *explode(string str, string del)
DESCRIPTION
Return an array of strings, created when the string str is split
--- 1,5 ----
SYNOPSIS
! string * explode(string str, string del)
DESCRIPTION
Return an array of strings, created when the string str is split
diff -c efun.orig/file_size efun/file_size
*** efun.orig/file_size 2009-11-02 22:22:36.000000000 +0000
--- efun/file_size 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! #include <sys/files.h>
int file_size(string file)
--- 1,5 ----
SYNOPSIS
! #include <files.h>
int file_size(string file)
***************
*** 10,14 ****
--- 10,15 ----
or that it is not readable for the calling object/user.
Size FSIZE_DIR (-2) indicates that it is a directory.
+
SEE ALSO
write_file(E), cat(E), get_dir(E)
diff -c efun.orig/filter efun/filter
*** efun.orig/filter 2009-11-02 22:22:36.000000000 +0000
--- efun/filter 2009-11-02 22:46:05.000000000 +0000
***************
*** 1,12 ****
SYNOPSIS
! mixed * filter (mixed *arg, string fun, string|object ob
! , mixed extra...)
! mixed * filter (mixed *arg, closure cl, mixed extra...)
! mixed * filter (mixed *arg, mapping map, mixed extra...)
!
! mapping filter (mapping arg, string func, string|object ob
! , mixed extra...)
! mapping filter (mapping arg, closure cl, mixed extra...)
DESCRIPTION
Call the function <ob>-><func>() resp. the closure <cl> for
--- 1,12 ----
SYNOPSIS
! mixed * filter(mixed *arg, string fun, string|object ob
! , mixed extra...)
! mixed * filter(mixed *arg, closure cl, mixed extra...)
! mixed * filter(mixed *arg, mapping map, mixed extra...)
!
! mapping filter(mapping arg, string func, string|object ob
! , mixed extra...)
! mapping filter(mapping arg, closure cl, mixed extra...)
DESCRIPTION
Call the function <ob>-><func>() resp. the closure <cl> for
diff -c efun.orig/filter_objects efun/filter_objects
*** efun.orig/filter_objects 2009-11-02 22:22:36.000000000 +0000
--- efun/filter_objects 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! object *filter_objects(object *arr, string fun, mixed extra, ...)
DESCRIPTION
Similar to filter() but calls arr[n]->fun(extra, ...).
--- 1,5 ----
SYNOPSIS
! object * filter_objects(object *arr, string fun, mixed extra, ...)
DESCRIPTION
Similar to filter() but calls arr[n]->fun(extra, ...).
diff -c efun.orig/find_input_to efun/find_input_to
*** efun.orig/find_input_to 2009-11-02 22:22:36.000000000 +0000
--- efun/find_input_to 2009-11-02 22:25:16.000000000 +0000
***************
*** 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)
DESCRIPTION
Find the input_to most recently added to the interactive <player>
--- 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)
DESCRIPTION
Find the input_to most recently added to the interactive <player>
diff -c efun.orig/find_object efun/find_object
*** efun.orig/find_object 2009-11-02 22:22:36.000000000 +0000
--- efun/find_object 2009-11-02 22:25:16.000000000 +0000
***************
*** 5,11 ****
Find an object with the object_name str. If the object isn't loaded,
it will not be found.
! EXAMPLE
object obj;
obj = find_object("std/thing");
obj = find_object("std/thing.c");
--- 5,11 ----
Find an object with the object_name str. If the object isn't loaded,
it will not be found.
! EXAMPLES
object obj;
obj = find_object("std/thing");
obj = find_object("std/thing.c");
diff -c efun.orig/floor efun/floor
*** efun.orig/floor 2009-11-02 22:22:36.000000000 +0000
--- efun/floor 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! float floor (float arg)
DESCRIPTION
Round the <arg>ument downwards the nearest whole number, returning
--- 1,5 ----
SYNOPSIS
! float floor(float arg)
DESCRIPTION
Round the <arg>ument downwards the nearest whole number, returning
***************
*** 7,15 ****
the argument value, converted to float.
EXAMPLES
! floor(4.5) - return 4.0
! floor(-4.5) - return -5.0
! floor(5) - return 5.0
HISTORY
Introduced in LDMud 3.2.7.
--- 7,15 ----
the argument value, converted to float.
EXAMPLES
! floor(4.5) - returns 4.0
! floor(-4.5) - returns -5.0
! floor(5) - returns 5.0
HISTORY
Introduced in LDMud 3.2.7.
diff -c efun.orig/funcall efun/funcall
*** efun.orig/funcall 2009-11-02 22:22:36.000000000 +0000
--- efun/funcall 2009-11-02 22:25:16.000000000 +0000
***************
*** 9,15 ****
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)
--- 9,15 ----
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 -c efun.orig/function_exists efun/function_exists
*** efun.orig/function_exists 2009-11-02 22:22:36.000000000 +0000
--- efun/function_exists 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,8 ****
SYNOPSIS
#include <functionlist.h>
! mixed function_exists (string str [, int flags])
! mixed function_exists (string str , object ob, [, int flags])
DESCRIPTION
Look up a function <str> in the current object, respectively
--- 1,10 ----
SYNOPSIS
#include <functionlist.h>
! 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)
DESCRIPTION
Look up a function <str> in the current object, respectively
***************
*** 42,47 ****
--- 44,50 ----
If the function cannot be found (because it doesn't exist or
it is not visible to the caller), the result is 0.
+
EXAMPLES
function_exists("create")
function_exists("create", that_object, NAME_HIDDEN|FEXISTS_ALL);
diff -c efun.orig/functionlist efun/functionlist
*** efun.orig/functionlist 2009-11-02 22:22:36.000000000 +0000
--- efun/functionlist 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,16 ****
SYNOPSIS
! #include <sys/functionlist.h>
! #include <sys/lpctypes.h>
! mixed *functionlist (object ob, int flags = RETURN_FUNCTION_NAME)
DESCRIPTION
! Return 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 mudlib/sys/lpctypes.h)
- the number of accepted argumens
<ob> may be given as true object or as a filename. In the latter
--- 1,16 ----
SYNOPSIS
! #include <functionlist.h>
! #include <lpctypes.h>
! mixed * functionlist(object ob, int flags)
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> may be given as true object or as a filename. In the latter
***************
*** 19,25 ****
<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
! mudlib/sys/functionlist.h:
Control of returned information:
RETURN_FUNCTION_NAME include the function name
--- 19,25 ----
<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>:
Control of returned information:
RETURN_FUNCTION_NAME include the function name
***************
*** 45,50 ****
--- 45,51 ----
TYPE_MOD_NO_MASK function is nomask
TYPE_MOD_PUBLIC function is public
+
SEE ALSO
inherit_list(E), function_exists(E), variable_list(E),
call_resolved(E)
diff -c efun.orig/garbage_collection efun/garbage_collection
*** efun.orig/garbage_collection 2009-11-02 22:22:36.000000000 +0000
--- efun/garbage_collection 2009-11-02 22:38:24.000000000 +0000
***************
*** 1,6 ****
SYNOPSIS
! void garbage_collection ()
! void garbage_collection (string filename)
DESCRIPTION
Tell the parser to initiate a garbage collection after the
--- 1,6 ----
SYNOPSIS
! void garbage_collection()
! void garbage_collection(string filename)
DESCRIPTION
Tell the parser to initiate a garbage collection after the
diff -c efun.orig/get_combine_charset efun/get_combine_charset
*** efun.orig/get_combine_charset 2009-11-02 22:22:36.000000000 +0000
--- efun/get_combine_charset 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,7 ****
SYNOPSIS
! #include <sys/comm.h>
! mixed get_combine_charset (int mode)
DESCRIPTION
Return the combine charset of the current interactive in the form
--- 1,7 ----
SYNOPSIS
! #include <comm.h>
! mixed get_combine_charset(int mode)
DESCRIPTION
Return the combine charset of the current interactive in the form
***************
*** 15,21 ****
If there is no current interactive, the function returns 0.
-
HISTORY
Introduced in LDMud 3.2.10.
--- 15,20 ----
diff -c efun.orig/get_connection_charset efun/get_connection_charset
*** efun.orig/get_connection_charset 2009-11-02 22:22:36.000000000 +0000
--- efun/get_connection_charset 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,7 ****
SYNOPSIS
! #include <sys/comm.h>
! mixed get_connection_charset (int mode)
DESCRIPTION
Return the connection charset of the current interactive in the form
--- 1,7 ----
SYNOPSIS
! #include <comm.h>
! mixed get_connection_charset(int mode)
DESCRIPTION
Return the connection charset of the current interactive in the form
***************
*** 19,25 ****
If there is no current interactive, the function returns 0.
-
HISTORY
Introduced in LDMud 3.2.10.
--- 19,24 ----
diff -c efun.orig/get_dir efun/get_dir
*** efun.orig/get_dir 2009-11-02 22:22:36.000000000 +0000
--- efun/get_dir 2009-11-02 22:38:05.000000000 +0000
***************
*** 1,8 ****
SYNOPSIS
! #include <sys/files.h>
! mixed *get_dir(string str)
! mixed *get_dir(string str, int mask)
DESCRIPTION
This function takes a path as argument and returns an array of file
--- 1,8 ----
SYNOPSIS
! #include <files.h>
! mixed * get_dir(string str)
! mixed * get_dir(string str, int mask)
DESCRIPTION
This function takes a path as argument and returns an array of file
***************
*** 50,55 ****
--- 50,58 ----
The values of mask can be added together.
+ COMPAT mode: GETDIR_PATH will return the paths without leading /.
+
+
EXAMPLES
function returns
-------------------------------------------------------------------
***************
*** 79,88 ****
contains for each file in /obj its
name, its size and its modification
date, sorted by names, for example
! ({
! "axe.c" , 927, 994539583,
! "sword.c", 1283, 998153903,
! }).
get_dir("/obj/sword.c", GETDIR_NAMES|GETDIR_PATH)
({ "/obj/sword.c" }) if applicable.
--- 82,91 ----
contains for each file in /obj its
name, its size and its modification
date, sorted by names, for example
! ({
! "axe.c" , 927, 994539583,
! "sword.c", 1283, 998153903,
! }).
get_dir("/obj/sword.c", GETDIR_NAMES|GETDIR_PATH)
({ "/obj/sword.c" }) if applicable.
***************
*** 94,103 ****
, get_dir(str, GETDIR_DATES) }));
This returns an array of arrays, with filename, size and
filetime as elements, not sorted by names, for example
! ({
! ({ "sword.c", 1283, 998153903 }),
! ({ "axe.c" , 927, 994539583 }),
! }).
HISTORY
LDMud 3.2.9 added GETDIR_PATH.
--- 97,107 ----
, get_dir(str, GETDIR_DATES) }));
This returns an array of arrays, with filename, size and
filetime as elements, not sorted by names, for example
! ({
! ({ "sword.c", 1283, 998153903 }),
! ({ "axe.c" , 927, 994539583 }),
! }).
!
HISTORY
LDMud 3.2.9 added GETDIR_PATH.
diff -c efun.orig/get_extra_wizinfo efun/get_extra_wizinfo
*** efun.orig/get_extra_wizinfo 2009-11-02 22:22:36.000000000 +0000
--- efun/get_extra_wizinfo 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,7 ****
SYNOPSIS
! mixed get_extra_wizinfo (object wiz)
! mixed get_extra_wizinfo (string wiz)
! mixed get_extra_wizinfo (int wiz)
DESCRIPTION
Returns the 'extra' information that was set for the given
--- 1,7 ----
SYNOPSIS
! mixed get_extra_wizinfo(object wiz)
! mixed get_extra_wizinfo(string wiz)
! mixed get_extra_wizinfo(int wiz)
DESCRIPTION
Returns the 'extra' information that was set for the given
diff -c efun.orig/get_max_commands efun/get_max_commands
*** efun.orig/get_max_commands 2009-11-02 22:22:36.000000000 +0000
--- efun/get_max_commands 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,6 ****
SYNOPSIS
! int get_max_commands ()
! int get_max_commands (object obj)
DESCRIPTION
Return the max number of commands the interactive <obj> is
--- 1,6 ----
SYNOPSIS
! int get_max_commands()
! int get_max_commands(object obj)
DESCRIPTION
Return the max number of commands the interactive <obj> is
diff -c efun.orig/gmtime efun/gmtime
*** efun.orig/gmtime 2009-11-02 22:22:36.000000000 +0000
--- efun/gmtime 2009-11-02 22:25:16.000000000 +0000
***************
*** 1,8 ****
SYNOPSIS
! #include <sys/time.h>
int * gmtime(int clock)
! int * gmtime(int* uclock)
DESCRIPTION
Interpret the argument clock as number of seconds since Jan,
--- 1,8 ----
SYNOPSIS
! #include <time.h>
int * gmtime(int clock)
! int * gmtime(int *uclock)
DESCRIPTION
Interpret the argument clock as number of seconds since Jan,
***************
*** 25,39 ****
int TM_YDAY (7) : Day of the year (0..365)
int TM_ISDST (8) : TRUE: Daylight saving time
- 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)
--- 25,38 ----
int TM_YDAY (7) : Day of the year (0..365)
int TM_ISDST (8) : TRUE: Daylight saving time
! 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 -c efun.orig/heart_beat_info efun/heart_beat_info
*** efun.orig/heart_beat_info 2009-11-02 22:22:36.000000000 +0000
--- efun/heart_beat_info 2009-11-02 22:25:23.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! object *heart_beat_info()
DESCRIPTION
This function returns an array of all objects having their heart
--- 1,5 ----
SYNOPSIS
! object * heart_beat_info()
DESCRIPTION
This function returns an array of all objects having their heart
diff -c efun.orig/implode efun/implode
*** efun.orig/implode 2009-11-02 22:22:36.000000000 +0000
--- efun/implode 2009-11-02 22:25:28.000000000 +0000
***************
*** 15,22 ****
function of strings:
implode(explode("a short text", " "), "_") "a_short_text"
! But nowadays You can also use
! regreplace("a short text", " ", "_", 1)
instead.
SEE ALSO
--- 15,22 ----
function of strings:
implode(explode("a short text", " "), "_") "a_short_text"
! But nowadays you can also use
! regreplace("a short text", " ", "_", 1)
instead.
SEE ALSO
diff -c efun.orig/include_list efun/include_list
*** efun.orig/include_list 2009-11-02 22:22:36.000000000 +0000
--- efun/include_list 2009-11-02 22:25:28.000000000 +0000
***************
*** 1,9 ****
SYNOPSIS
! #include <sys/include_list.h>
! string *include_list ()
! string *include_list (object ob)
! string *include_list (object ob, int flags)
DESCRIPTION
--- 1,9 ----
SYNOPSIS
! #include <include_list.h>
! string * include_list()
! string * include_list(object ob)
! string * include_list(object ob, int flags)
DESCRIPTION
diff -c efun.orig/inherit_list efun/inherit_list
*** efun.orig/inherit_list 2009-11-02 22:22:36.000000000 +0000
--- efun/inherit_list 2009-11-02 22:25:28.000000000 +0000
***************
*** 1,9 ****
SYNOPSIS
! #include <sys/inherit_list.h>
! string *inherit_list ()
! string *inherit_list (object ob)
! string *inherit_list (object ob, int flags)
DESCRIPTION
--- 1,9 ----
SYNOPSIS
! #include <inherit_list.h>
! string * inherit_list()
! string * inherit_list(object ob)
! string * inherit_list(object ob, int flags)
DESCRIPTION
diff -c efun.orig/input_to efun/input_to
*** efun.orig/input_to 2009-11-02 22:22:36.000000000 +0000
--- efun/input_to 2009-11-02 22:25:28.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! #include <sys/input_to.h>
void input_to(string|closure fun)
void input_to(string|closure fun, int flag, ...)
--- 1,5 ----
SYNOPSIS
! #include <input_to.h>
void input_to(string|closure fun)
void input_to(string|closure fun, int flag, ...)
***************
*** 87,93 ****
The optional trailing args will be passed as second and
subsequent args to the function fun.
! EXAMPLE
void func() {
...
input_to("enter_name", INPUT_PROMPT, "Please enter your name:");
--- 87,93 ----
The optional trailing args will be passed as second and
subsequent args to the function fun.
! EXAMPLES
void func() {
...
input_to("enter_name", INPUT_PROMPT, "Please enter your name:");
***************
*** 122,128 ****
input will go to enter_lastname().
! Note that the list of input_tos is treated as a flat list:
void func() {
..
--- 122,128 ----
input will go to enter_lastname().
! Note that the list of input_to-s is treated as a flat list:
void func() {
..
diff -c efun.orig/input_to_info efun/input_to_info
*** efun.orig/input_to_info 2009-11-02 22:22:36.000000000 +0000
--- efun/input_to_info 2009-11-02 22:25:28.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! mixed * input_to_info (object player)
DESCRIPTION
Construct an array of all input_to's pending for this interactive
--- 1,5 ----
SYNOPSIS
! mixed * input_to_info(object player)
DESCRIPTION
Construct an array of all input_to's pending for this interactive
***************
*** 7,15 ****
input_to, the last element the most recently added one.
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).
HISTORY
Introduced in LDMud 3.2.9.
--- 7,15 ----
input_to, the last element the most recently added one.
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).
HISTORY
Introduced in LDMud 3.2.9.
diff -c efun.orig/insert_alist efun/insert_alist
*** efun.orig/insert_alist 2009-11-02 22:22:36.000000000 +0000
--- efun/insert_alist 2009-11-02 22:25:28.000000000 +0000
***************
*** 1,7 ****
OPTIONAL
SYNOPSIS
! mixed* insert_alist (mixed key, mixed data..., mixed * alist)
! int insert_alist (mixed key, mixed * keys)
DESCRIPTION
1. Form: Alist Insertion
--- 1,7 ----
OPTIONAL
SYNOPSIS
! mixed * insert_alist(mixed key, mixed data..., mixed * alist)
! int insert_alist(mixed key, mixed * keys)
DESCRIPTION
1. Form: Alist Insertion
diff -c efun.orig/interactive efun/interactive
*** efun.orig/interactive 2009-11-02 22:22:36.000000000 +0000
--- efun/interactive 2009-11-02 22:25:28.000000000 +0000
***************
*** 1,9 ****
SYNOPSIS
int interactive(object ob)
DESCRIPTION
! Return non-zero if ob, or when the argument is omitted, this
! object(), is an interactive user. Will return 1 if the
object is interactive, else 0.
SEE ALSO
--- 1,10 ----
SYNOPSIS
+ int interactive()
int interactive(object ob)
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.
SEE ALSO
diff -c efun.orig/intersect_alist efun/intersect_alist
*** efun.orig/intersect_alist 2009-11-02 22:22:36.000000000 +0000
--- efun/intersect_alist 2009-11-02 22:25:28.000000000 +0000
***************
*** 1,12 ****
OPTIONAL
SYNOPSIS
! mixed * intersect_alist (mixed * list1, mixed * list2)
DESCRIPTION
Does a fast set intersection on alist key vectors (NOT on full alists!).
The operator '&' does set intersection on arrays in general.
! EXAMPLE
new_list = intersect_alist(list1, list2);
SEE ALSO
--- 1,12 ----
OPTIONAL
SYNOPSIS
! mixed * intersect_alist(mixed * list1, mixed * list2)
DESCRIPTION
Does a fast set intersection on alist key vectors (NOT on full alists!).
The operator '&' does set intersection on arrays in general.
! EXAMPLES
new_list = intersect_alist(list1, list2);
SEE ALSO
diff -c efun.orig/invert_bits efun/invert_bits
*** efun.orig/invert_bits 2009-11-02 22:22:36.000000000 +0000
--- efun/invert_bits 2009-11-02 22:25:28.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! string invert_bits (string str)
DESCRIPTION
Invert the status of all bits in bitstring <str> and return the
--- 1,5 ----
SYNOPSIS
! string invert_bits(string str)
DESCRIPTION
Invert the status of all bits in bitstring <str> and return the
diff -c efun.orig/lambda efun/lambda
*** efun.orig/lambda 2009-11-02 22:22:36.000000000 +0000
--- efun/lambda 2009-11-02 22:25:28.000000000 +0000
***************
*** 11,17 ****
or apply().
HISTORY
! Introduced in 3.2@70
SEE ALSO
closures(LPC), unbound_lambda(E), apply(E), funcall(E),
--- 11,17 ----
or apply().
HISTORY
! Introduced in 3.2@70.
SEE ALSO
closures(LPC), unbound_lambda(E), apply(E), funcall(E),
diff -c efun.orig/last_bit efun/last_bit
*** efun.orig/last_bit 2009-11-02 22:22:36.000000000 +0000
--- efun/last_bit 2009-11-02 22:25:28.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! int last_bit (string str)
DESCRIPTION
Return the number of the last set bit in bitstring <str>.
--- 1,5 ----
SYNOPSIS
! int last_bit(string str)
DESCRIPTION
Return the number of the last set bit in bitstring <str>.
diff -c efun.orig/last_instructions efun/last_instructions
*** efun.orig/last_instructions 2009-11-02 22:22:36.000000000 +0000
--- efun/last_instructions 2009-11-02 22:25:28.000000000 +0000
***************
*** 1,9 ****
SYNOPSIS
! string *last_instructions (int length, int verbose)
DESCRIPTION
!
! Return 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:
--- 1,8 ----
SYNOPSIS
! string * last_instructions(int length, int verbose)
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:
***************
*** 24,30 ****
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
--- 23,29 ----
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
diff -c efun.orig/limited efun/limited
*** efun.orig/limited 2009-11-02 22:22:36.000000000 +0000
--- efun/limited 2009-11-02 22:47:20.000000000 +0000
***************
*** 1,11 ****
PRELIMINARY
SYNOPSIS
! #include <sys/rtlimits.h>
mixed limited(closure fun)
mixed limited(closure fun, int tag, int value, ...)
! mixed limited(closure fun, int * limits [, mixed args...] )
DESCRIPTION
Call the function <fun> with any given <args> as parameters,
--- 1,12 ----
PRELIMINARY
SYNOPSIS
! #include <rtlimits.h>
mixed limited(closure fun)
mixed limited(closure fun, int tag, int value, ...)
! mixed limited(closure fun, int *limits)
! mixed limited(closure fun, int *limits, mixed *args)
DESCRIPTION
Call the function <fun> with any given <args> as parameters,
***************
*** 31,36 ****
--- 32,38 ----
a case the closure costs only 10 ticks regardless of how many
ticks it actually needed.
+
EXAMPLES
limited(#'function)
--> executes function with no limits at all
diff -c efun.orig/living efun/living
*** efun.orig/living 2009-11-02 22:22:36.000000000 +0000
--- efun/living 2009-11-02 22:25:28.000000000 +0000
***************
*** 6,12 ****
enable_commands() has been called from inside the ob).
ob may be 0.
! EXAMPLE
living(this_player())
SEE ALSO
--- 6,12 ----
enable_commands() has been called from inside the ob).
ob may be 0.
! EXAMPLES
living(this_player())
SEE ALSO
diff -c efun.orig/load_name efun/load_name
*** efun.orig/load_name 2009-11-02 22:22:36.000000000 +0000
--- efun/load_name 2009-11-02 22:25:28.000000000 +0000
***************
*** 27,33 ****
The returned name starts with a '/', unless the driver is running
in COMPAT mode.
! EXAMPLE
object o;
o = clone_object("/std/thing");
write(load_name(o)); --> writes "/std/thing" in !compat mode
--- 27,33 ----
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)); --> writes "/std/thing" in !compat mode
diff -c efun.orig/load_object efun/load_object
*** efun.orig/load_object 2009-11-02 22:22:36.000000000 +0000
--- efun/load_object 2009-11-02 22:25:28.000000000 +0000
***************
*** 11,17 ****
If strict euids are enforced, the cloning object must have
a non-zero euid.
! EXAMPLE
// Update and reload the standard player object
destruct(find_object("/std/player"));
load_object("/std/player");
--- 11,17 ----
If strict euids are enforced, the cloning object must have
a non-zero euid.
! EXAMPLES
// Update and reload the standard player object
destruct(find_object("/std/player"));
load_object("/std/player");
diff -c efun.orig/localtime efun/localtime
*** efun.orig/localtime 2009-11-02 22:22:36.000000000 +0000
--- efun/localtime 2009-11-02 22:25:28.000000000 +0000
***************
*** 1,8 ****
SYNOPSIS
! #include <sys/time.h>
int * localtime(int clock)
! int * localtime(int* uclock)
DESCRIPTION
Interpret the argument clock as number of seconds since Jan,
--- 1,8 ----
SYNOPSIS
! #include <time.h>
int * localtime(int clock)
! int * localtime(int *uclock)
DESCRIPTION
Interpret the argument clock as number of seconds since Jan,
***************
*** 25,39 ****
int TM_YDAY (7) : Day of the year (0..365)
int TM_ISDST (8) : TRUE: Daylight saving time
- EXAMPLES
! printf("Today is %s\n"
! , ({ "Sunday", "Monday", "Tuesday", "Wednesday"
! , "Thursday", "Friday", "Saturday"
! })[localtime()[TM_WDAY]]);
HISTORY
! Introduced in LDMud 3.2.9
SEE ALSO
ctime(E), gmtime(E), time(E), utime(E)
--- 25,38 ----
int TM_YDAY (7) : Day of the year (0..365)
int TM_ISDST (8) : TRUE: Daylight saving time
! EXAMPLES
! printf("Today is %s\n",
! ({ "Sunday", "Monday", "Tuesday", "Wednesday",
! "Thursday", "Friday", "Saturday" })[localtime()[TM_WDAY]]);
HISTORY
! Introduced in LDMud 3.2.9.
SEE ALSO
ctime(E), gmtime(E), time(E), utime(E)
diff -c efun.orig/m_add efun/m_add
*** efun.orig/m_add 2009-11-02 22:22:36.000000000 +0000
--- efun/m_add 2009-11-02 22:25:28.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! mapping m_add (mapping map, mixed key, [mixed data...])
DESCRIPTION
Add (or replace) an entry with index <key> in mapping <map>.
--- 1,5 ----
SYNOPSIS
! mapping m_add(mapping map, mixed key, [mixed data...])
DESCRIPTION
Add (or replace) an entry with index <key> in mapping <map>.
diff -c efun.orig/make_shared_string efun/make_shared_string
*** efun.orig/make_shared_string 2009-11-02 22:22:36.000000000 +0000
--- efun/make_shared_string 2009-11-02 22:48:05.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! string make_shared_string (string str)
DESCRIPTION
Puts <str> in _the_ list of shared strings of the game.
--- 1,5 ----
SYNOPSIS
! string make_shared_string(string str)
DESCRIPTION
Puts <str> in _the_ list of shared strings of the game.
***************
*** 13,16 ****
efun unnecessary.
HISTORY
! Introduced in LDMud 3.2.6; following a suggestion from TubMud.
--- 13,16 ----
efun unnecessary.
HISTORY
! Introduced in LDMud 3.2.6; following a suggestion from Tubmud.
diff -c efun.orig/m_allocate efun/m_allocate
*** efun.orig/m_allocate 2009-11-02 22:22:36.000000000 +0000
--- efun/m_allocate 2009-11-02 22:48:31.000000000 +0000
***************
*** 1,10 ****
SYNOPSIS
mapping m_allocate(int size, int width)
DESCRIPTION
Reserve memory for a mapping.
! 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.
--- 1,11 ----
SYNOPSIS
+ mapping m_allocate(int size)
mapping m_allocate(int size, int width)
DESCRIPTION
Reserve memory for a mapping.
! <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.
***************
*** 27,33 ****
EXAMPLES
m_allocate(3, 7) -> mapping with 7 values per key, and with space
! for 3 entries.
([:2*3 ]) -> same as m_allocate(0, 6)
--- 28,34 ----
EXAMPLES
m_allocate(3, 7) -> mapping with 7 values per key, and with space
! for 3 entries.
([:2*3 ]) -> same as m_allocate(0, 6)
diff -c efun.orig/map efun/map
*** efun.orig/map 2009-11-02 22:22:36.000000000 +0000
--- efun/map 2009-11-02 22:25:28.000000000 +0000
***************
*** 8,14 ****
, mixed extra...)
mapping map(mapping arg, closure cl, mixed extra...)
-
DESCRIPTION
Call the function <ob>-><func>() resp. the closure <cl> for
every element of the array or mapping <arg>, and return a result
--- 8,13 ----
diff -c efun.orig/map_indices efun/map_indices
*** efun.orig/map_indices 2009-11-02 22:22:36.000000000 +0000
--- efun/map_indices 2009-11-02 22:25:28.000000000 +0000
***************
*** 19,25 ****
Also note that the behaviour of this function is different from
map_array().
! EXAMPLE
m = mkmapping(users());
m = map_indices(m, #'environment);
--- 19,25 ----
Also note that the behaviour of this function is different from
map_array().
! EXAMPLES
m = mkmapping(users());
m = map_indices(m, #'environment);
diff -c efun.orig/map_objects efun/map_objects
*** efun.orig/map_objects 2009-11-02 22:22:36.000000000 +0000
--- efun/map_objects 2009-11-02 22:25:28.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! mixed *map_objects(object *arr, string fun, mixed extra, ...)
DESCRIPTION
Similar to map(), but calls arr[n]->fun(extra,...). The
--- 1,5 ----
SYNOPSIS
! mixed * map_objects(object *arr, string fun, mixed extra, ...)
DESCRIPTION
Similar to map(), but calls arr[n]->fun(extra,...). The
diff -c efun.orig/master efun/master
*** efun.orig/master 2009-11-02 22:22:36.000000000 +0000
--- efun/master 2009-11-02 22:25:28.000000000 +0000
***************
*** 1,9 ****
SYNOPSIS
! object master ()
! object master (int dont_load)
DESCRIPTION
! Return the master object.
If <dont_load> is false, the function first makes sure that
the master object exists.
--- 1,9 ----
SYNOPSIS
! object master()
! object master(int dont_load)
DESCRIPTION
! Returns the master object.
If <dont_load> is false, the function first makes sure that
the master object exists.
diff -c efun.orig/max efun/max
*** efun.orig/max 2009-11-02 22:22:36.000000000 +0000
--- efun/max 2009-11-02 22:25:29.000000000 +0000
***************
*** 1,9 ****
SYNOPSIS
! string max (string arg, ...)
! string max (string * arg_array)
! int|float max (int|float arg, ...)
! int|float max (int|float * arg_array)
DESCRIPTION
Determaxe the maximum value of the <arg>uments and return it.
--- 1,9 ----
SYNOPSIS
! string max(string arg, ...)
! string max(string *arg_array)
! int|float max(int|float arg, ...)
! int|float max(int|float *arg_array)
DESCRIPTION
Determaxe the maximum value of the <arg>uments and return it.
diff -c efun.orig/md5 efun/md5
*** efun.orig/md5 2009-11-02 22:22:36.000000000 +0000
--- efun/md5 2009-11-02 22:25:29.000000000 +0000
***************
*** 19,25 ****
s = md5( ({ 'H', 'e', 'l', 'l', 'o' }), 2 )
HISTORY
! Introduced in LDMud 3.2.9
LDMud 3.2.12 added number arrays as argument, and the number of
interations.
--- 19,25 ----
s = md5( ({ 'H', 'e', 'l', 'l', 'o' }), 2 )
HISTORY
! Introduced in LDMud 3.2.9.
LDMud 3.2.12 added number arrays as argument, and the number of
interations.
diff -c efun.orig/m_entry efun/m_entry
*** efun.orig/m_entry 2009-11-02 22:22:36.000000000 +0000
--- efun/m_entry 2009-11-02 22:25:29.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! mixed * m_entry (mapping map, mixed key)
DESCRIPTION
Query the mapping <map> for the entry for <key> and return all
--- 1,5 ----
SYNOPSIS
! mixed * m_entry(mapping map, mixed key)
DESCRIPTION
Query the mapping <map> for the entry for <key> and return all
***************
*** 10,16 ****
Note: the efun m_add() can be used to add all values for an entry
at once.
! EXAMPLE
mapping m = ([ 1:"foo":-1, 2:"bar":-2 ]);
m_entry(m, 0) -> 0
--- 10,16 ----
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
diff -c efun.orig/min efun/min
*** efun.orig/min 2009-11-02 22:22:36.000000000 +0000
--- efun/min 2009-11-02 22:25:29.000000000 +0000
***************
*** 1,9 ****
SYNOPSIS
! string min (string arg, ...)
! string min (string * arg_array)
! int|float min (int|float arg, ...)
! int|float min (int|float * arg_array)
DESCRIPTION
Determine the minimum value of the <arg>uments and return it.
--- 1,9 ----
SYNOPSIS
! string min(string arg, ...)
! string min(string *arg_array)
! int|float min(int|float arg, ...)
! int|float min(int|float *arg_array)
DESCRIPTION
Determine the minimum value of the <arg>uments and return it.
diff -c efun.orig/m_indices efun/m_indices
*** efun.orig/m_indices 2009-11-02 22:22:36.000000000 +0000
--- efun/m_indices 2009-11-02 22:25:29.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! mixed *m_indices(mapping map)
DESCRIPTION
Returns an array containing the indices of mapping 'map'.
--- 1,5 ----
SYNOPSIS
! mixed * m_indices(mapping map)
DESCRIPTION
Returns an array containing the indices of mapping 'map'.
diff -c efun.orig/mkmapping efun/mkmapping
*** efun.orig/mkmapping 2009-11-02 22:22:36.000000000 +0000
--- efun/mkmapping 2009-11-02 22:25:29.000000000 +0000
***************
*** 14,20 ****
unused allocated space will be freed after the current function
returns.
! EXAMPLE
mkmapping( ({ 1, 2 }), ({ 10, 11 }), ({ 20, 21, 22}))
returns ([ 1:10;20, 2:11;21 ])
--- 14,20 ----
unused allocated space will be freed after the current function
returns.
! EXAMPLES
mkmapping( ({ 1, 2 }), ({ 10, 11 }), ({ 20, 21, 22}))
returns ([ 1:10;20, 2:11;21 ])
diff -c efun.orig/m_reallocate efun/m_reallocate
*** efun.orig/m_reallocate 2009-11-02 22:22:36.000000000 +0000
--- efun/m_reallocate 2009-11-02 22:25:31.000000000 +0000
***************
*** 9,22 ****
The mapping <m> is not changed.
! EXAMPLE
mapping m = ([ "foo":1;2;3, "bar":4;5;6 ])
m_reallocate(m, 1) --> returns ([ "foo":1, "bar:4 ])
m_reallocate(m, 4) --> returns ([ "foo":1;2;3;0, "bar:4;5;6;0 ])
HISTORY
! Introduced in LDMud 3.2.6, suggested by TubMud.
SEE ALSO
m_allocate(E), m_values(E), widthof(E)
--- 9,22 ----
The mapping <m> is not changed.
! EXAMPLES
mapping m = ([ "foo":1;2;3, "bar":4;5;6 ])
m_reallocate(m, 1) --> returns ([ "foo":1, "bar:4 ])
m_reallocate(m, 4) --> returns ([ "foo":1;2;3;0, "bar:4;5;6;0 ])
HISTORY
! Introduced in LDMud 3.2.6, suggested by Tubmud.
SEE ALSO
m_allocate(E), m_values(E), widthof(E)
diff -c efun.orig/m_values efun/m_values
*** efun.orig/m_values 2009-11-02 22:22:36.000000000 +0000
--- efun/m_values 2009-11-02 22:25:31.000000000 +0000
***************
*** 1,6 ****
SYNOPSIS
! mixed *m_values(mapping map)
! mixed *m_values(mapping map, int index)
DESCRIPTION
Returns an array with the values of mapping 'map'.
--- 1,6 ----
SYNOPSIS
! mixed * m_values(mapping map)
! mixed * m_values(mapping map, int index)
DESCRIPTION
Returns an array with the values of mapping 'map'.
diff -c efun.orig/object_info efun/object_info
*** efun.orig/object_info 2009-11-02 22:22:36.000000000 +0000
--- efun/object_info 2009-11-02 22:49:17.000000000 +0000
***************
*** 1,7 ****
SYNOPSIS
! #include <sys/objectinfo.h>
! mixed * object_info (object ob, int what)
! mixed * object_info (object ob, int what, int index)
DESCRIPTION
Returns some internal information about object <ob>, collected
--- 1,8 ----
SYNOPSIS
! #include <objectinfo.h>
!
! mixed * object_info(object ob, int what)
! mixed * object_info(object ob, int what, int index)
DESCRIPTION
Returns some internal information about object <ob>, collected
diff -c efun.orig/or_bits efun/or_bits
*** efun.orig/or_bits 2009-11-02 22:22:36.000000000 +0000
--- efun/or_bits 2009-11-02 22:25:31.000000000 +0000
***************
*** 1,7 ****
SYNOPSIS
! string or_bits (string str1, string str2)
! DESTRIPTION
<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
--- 1,7 ----
SYNOPSIS
! string or_bits(string str1, string str2)
! 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
diff -c efun.orig/order_alist efun/order_alist
*** efun.orig/order_alist 2009-11-02 22:22:36.000000000 +0000
--- efun/order_alist 2009-11-02 22:25:31.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! mixed *order_alist(mixed *keys, mixed *|void data, ...)
DESCRIPTION
Creates an alist.
--- 1,6 ----
+ OPTIONAL
SYNOPSIS
! mixed * order_alist(mixed *keys, mixed *|void data, ...)
DESCRIPTION
Creates an alist.
diff -c efun.orig/parse_command efun/parse_command
*** efun.orig/parse_command 2009-11-02 22:22:36.000000000 +0000
--- efun/parse_command 2009-11-02 22:43:36.000000000 +0000
***************
*** 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, ...)
DESCRIPTION
parse_command() is basically a spiffed up sscanf operating
--- 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, ...)
DESCRIPTION
parse_command() is basically a spiffed up sscanf operating
***************
*** 152,162 ****
function doesn't exist, the last word from the result
of short() is used instead.
! EXAMPLE
object *items;
! parse_command( "take apple",environment(this_player())
! , " 'get' / 'take' %i ",items);
SEE ALSO
sscanf(E)
--- 152,162 ----
function doesn't exist, the last word from the result
of short() is used instead.
! EXAMPLES
object *items;
! parse_command("take apple",environment(this_player()),
! " 'get' / 'take' %i ",items);
SEE ALSO
sscanf(E)
diff -c efun.orig/pow efun/pow
*** efun.orig/pow 2009-11-02 22:22:36.000000000 +0000
--- efun/pow 2009-11-02 22:25:34.000000000 +0000
***************
*** 1,11 ****
SYNOPSIS
! float pow (int|float base, int|float exp)
DESCRIPTION
The function returns the value of <base> raised to the power of <exp>.
EXAMPLES
! pow(-2, 3) - returns -8.0
pow(8, 1.0/3.0) - returns 2.0
HISTORY
--- 1,11 ----
SYNOPSIS
! float pow(int|float base, int|float exp)
DESCRIPTION
The function returns the value of <base> raised to the power of <exp>.
EXAMPLES
! pow(-2, 3) - returns -8.0
pow(8, 1.0/3.0) - returns 2.0
HISTORY
diff -c efun.orig/present efun/present
*** efun.orig/present 2009-11-02 22:22:36.000000000 +0000
--- efun/present 2009-11-02 22:50:12.000000000 +0000
***************
*** 30,36 ****
conjunction with self-defined verbs (like "open chest 3") you
can do it like that:
! init () { add_action ("open_chest", "open"); }
open_chest (str) {
if (present (str) != this_object ())
--- 30,36 ----
conjunction with self-defined verbs (like "open chest 3") you
can do it like that:
! init () { add_action("open_chest", "open"); }
open_chest (str) {
if (present (str) != this_object ())
diff -c efun.orig/present_clone efun/present_clone
*** efun.orig/present_clone 2009-11-02 22:22:36.000000000 +0000
--- efun/present_clone 2009-11-02 22:40:22.000000000 +0000
***************
*** 1,7 ****
PRELIMINARY
SYNOPSIS
! object present_clone (string str [, object env] )
! object present_clone (object obj [, object env] )
DESCRIPTION
This efun searches the inventory of object <env> (default is the
--- 1,10 ----
PRELIMINARY
SYNOPSIS
! object present_clone(string str)
! object present_clone(string str, object env)
!
! object present_clone(object obj)
! object present_clone(object obj, object env)
DESCRIPTION
This efun searches the inventory of object <env> (default is the
***************
*** 12,18 ****
blueprint as of object <obj>. The matching criteria in both cases is
the load_name().
! For plain driver this name starts with a '/', for compat-mode
drivers it doesn't.
Note that in contrast to present(), this efun never searches
--- 15,21 ----
blueprint as of object <obj>. The matching criteria in both cases is
the load_name().
! For plain driver this name starts with a '/', for COMPAT mode
drivers it doesn't.
Note that in contrast to present(), this efun never searches
***************
*** 32,38 ****
names.
HISTORY
! Introduced in 3.2.7
SEE ALSO
load_name(E), present(E)
--- 35,41 ----
names.
HISTORY
! Introduced in 3.2.7.
SEE ALSO
load_name(E), present(E)
diff -c efun.orig/previous_object efun/previous_object
*** efun.orig/previous_object 2009-11-02 22:22:36.000000000 +0000
--- efun/previous_object 2009-11-02 22:25:34.000000000 +0000
***************
*** 17,35 ****
added by add_action), previous_object() will return this_object(),
but previous_object(0) will return 0.
! EXAMPLE
int security() {
object 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 highly_sensible_func() {
! if(!security())
! return;
! ...
}
This example shows how we can check if the last call to a
--- 17,35 ----
added by add_action), previous_object() will return this_object(),
but previous_object(0) will return 0.
! EXAMPLES
int security() {
object 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 highly_sensible_func() {
! if (!security())
! return;
! ...
}
This example shows how we can check if the last call to a
diff -c efun.orig/process_string efun/process_string
*** efun.orig/process_string 2009-11-02 22:22:36.000000000 +0000
--- efun/process_string 2009-11-02 22:25:34.000000000 +0000
***************
*** 19,25 ****
Note that both filename and args are optional.
! EXAMPLE
string foo(string str) {
return "ab"+str+"ef";
}
--- 19,25 ----
Note that both filename and args are optional.
! EXAMPLES
string foo(string str) {
return "ab"+str+"ef";
}
diff -c efun.orig/program_name efun/program_name
*** efun.orig/program_name 2009-11-02 22:22:36.000000000 +0000
--- efun/program_name 2009-11-02 22:25:34.000000000 +0000
***************
*** 18,24 ****
CAVEAT: This efun swaps in the program if it is swapped out.
! EXAMPLE
object o;
o = clone_object("/std/thing");
write(program_name(o)); --> writes "/std/thing.c" in !compat mode
--- 18,24 ----
CAVEAT: This efun swaps in the program if it is swapped out.
! EXAMPLES
object o;
o = clone_object("/std/thing");
write(program_name(o)); --> writes "/std/thing.c" in !compat mode
diff -c efun.orig/query_actions efun/query_actions
*** efun.orig/query_actions 2009-11-02 22:22:36.000000000 +0000
--- efun/query_actions 2009-11-02 22:25:34.000000000 +0000
***************
*** 1,7 ****
SYNOPSIS
! #include <sys/commands.h>
! mixed *query_actions(object ob, mixed mask_or_verb)
DESCRIPTION
query_actions takes either an object or a filename as first
--- 1,8 ----
SYNOPSIS
! #include <commands.h>
! #include <sent.h>
! mixed * query_actions(object ob, mixed mask_or_verb)
DESCRIPTION
query_actions takes either an object or a filename as first
***************
*** 18,24 ****
QA_OBJECT ( 8): object
QA_FUNCTION (16): function
! "type" is one of the values defined in <sent.h> (/sys/sent.h)
(which is provided with the parser source).
SENT_PLAIN added with add_action (fun, cmd);
--- 19,25 ----
QA_OBJECT ( 8): object
QA_FUNCTION (16): function
! "type" is one of the values defined in <sent.h>
(which is provided with the parser source).
SENT_PLAIN added with add_action (fun, cmd);
diff -c efun.orig/query_command efun/query_command
*** efun.orig/query_command 2009-11-02 22:22:36.000000000 +0000
--- efun/query_command 2009-11-02 22:25:34.000000000 +0000
***************
*** 12,18 ****
by a call_out or the heart beat. Also when a user logs in
query_command() returns 0.
! EXAMPLE
void init() {
...
add_action("sing","sing");
--- 12,18 ----
by a call_out or the heart beat. Also when a user logs in
query_command() returns 0.
! EXAMPLES
void init() {
...
add_action("sing","sing");
diff -c efun.orig/query_limits efun/query_limits
*** efun.orig/query_limits 2009-11-02 22:22:36.000000000 +0000
--- efun/query_limits 2009-11-02 22:25:34.000000000 +0000
***************
*** 1,6 ****
PRELIMINARY
SYNOPSIS
! #include <sys/rtlimits.h>
int * query_limits()
int * query_limits(int default)
--- 1,6 ----
PRELIMINARY
SYNOPSIS
! #include <rtlimits.h>
int * query_limits()
int * query_limits(int default)
diff -c efun.orig/query_mccp_stats efun/query_mccp_stats
*** efun.orig/query_mccp_stats 2009-11-02 22:22:36.000000000 +0000
--- efun/query_mccp_stats 2009-11-02 22:25:34.000000000 +0000
***************
*** 1,7 ****
OPTIONAL
SYNOPSIS
! int *query_mccp_stats()
! int *query_mccp_stats(object player)
DESCRIPTION
This efun gives you statistics about current compression
--- 1,7 ----
OPTIONAL
SYNOPSIS
! int * query_mccp_stats()
! int * query_mccp_stats(object player)
DESCRIPTION
This efun gives you statistics about current compression
diff -c efun.orig/query_verb efun/query_verb
*** efun.orig/query_verb 2009-11-02 22:22:36.000000000 +0000
--- efun/query_verb 2009-11-02 22:25:34.000000000 +0000
***************
*** 9,15 ****
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.
! EXAMPLE
void init() {
...
add_action("sing","sing");
--- 9,15 ----
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.
! EXAMPLES
void init() {
...
add_action("sing","sing");
diff -c efun.orig/regexp efun/regexp
*** efun.orig/regexp 2009-11-02 22:22:36.000000000 +0000
--- efun/regexp 2009-11-02 22:53:52.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! string *regexp(string *list, string pattern)
DESCRIPTION
Match the pattern pattern against all strings in list, and
--- 1,7 ----
SYNOPSIS
! #include <regexp.h>
!
! string * regexp(string *list, string pattern)
DESCRIPTION
Match the pattern pattern against all strings in list, and
***************
*** 40,51 ****
If there is an error in the regular expression, a runtime
error will be raised.
! EXAMPLE
string strs;
! if (strs = regexp( ({"please, help me Sir John."}),
! "\\<help\\>.*\\<me\\>"))
! if (sizeof(strs)
! write("It matches.\n");
The regular expression will test the given string (which is
packed into an array) if there is something like "help ... me"
--- 42,54 ----
If there is an error in the regular expression, a runtime
error will be raised.
! EXAMPLES
string strs;
! if (strs = regexp(({"please, help me Sir John."}),
! "\\<help\\>.*\\<me\\>")) {
! if (sizeof(strs)
! write("It matches.\n");
! }
The regular expression will test the given string (which is
packed into an array) if there is something like "help ... me"
diff -c efun.orig/regexplode efun/regexplode
*** efun.orig/regexplode 2009-11-02 22:22:36.000000000 +0000
--- efun/regexplode 2009-11-02 22:40:43.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! string *regexplode (string text, string pattern)
DESCRIPTION
This function is similar to explode but accepts a regular
--- 1,5 ----
SYNOPSIS
! string * regexplode (string text, string pattern)
DESCRIPTION
This function is similar to explode but accepts a regular
***************
*** 7,13 ****
array is a delimiter.
HISTORY
! Introduced in 3.2@61
SEE ALSO
explode(E), regexp(E), regreplace(E)
--- 7,13 ----
array is a delimiter.
HISTORY
! Introduced in 3.2@61.
SEE ALSO
explode(E), regexp(E), regreplace(E)
diff -c efun.orig/regreplace efun/regreplace
*** efun.orig/regreplace 2009-11-02 22:22:36.000000000 +0000
--- efun/regreplace 2009-11-02 22:36:59.000000000 +0000
***************
*** 1,6 ****
SYNOPSIS
! string regreplace( string txt, string pattern
! , closure|string replacepattern, int flags)
DESCRIPTION
This function looks through txt looking for the regular
--- 1,6 ----
SYNOPSIS
! string regreplace(string txt, string pattern,
! closure|string replacepattern, int flags)
DESCRIPTION
This function looks through txt looking for the regular
***************
*** 31,37 ****
replacing variable strings (as opposed to regexplode, where
you can explode by regular expression, but not implode...)
! EXAMPLE
string msgin;
/* Checks msgin for the string 'tells you: ' and all following
--- 31,38 ----
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
***************
*** 49,56 ****
/* Put the word HOUSE into lower case. */
txt = regreplace(txt, "HOUSE", #'lower_case, 1);
HISTORY
! Introduced in 3.2.1@125
The use of a closure as replacepattern was introduced in
LDMud 3.2.9.
--- 50,58 ----
/* Put the word HOUSE into lower case. */
txt = regreplace(txt, "HOUSE", #'lower_case, 1);
+
HISTORY
! Introduced in 3.2.1@125.
The use of a closure as replacepattern was introduced in
LDMud 3.2.9.
diff -c efun.orig/remove_action efun/remove_action
*** efun.orig/remove_action 2009-11-02 22:22:36.000000000 +0000
--- efun/remove_action 2009-11-02 22:25:44.000000000 +0000
***************
*** 12,18 ****
Return the number of actions removed.
HISTORY
! Introduced in 3.2.1
LDMud 3.2.10 added the ability to remove all actions.
SEE ALSO
--- 12,18 ----
Return the number of actions removed.
HISTORY
! Introduced in 3.2.1.
LDMud 3.2.10 added the ability to remove all actions.
SEE ALSO
diff -c efun.orig/remove_call_out efun/remove_call_out
*** efun.orig/remove_call_out 2009-11-02 22:22:36.000000000 +0000
--- efun/remove_call_out 2009-11-02 22:25:44.000000000 +0000
***************
*** 10,16 ****
-1 is returned if there were no call-outs pending to this
function.
! EXAMPLE
To remove every pending call-out to MyTimer() :
while (remove_call_out("MyTimer") != -1) /* continue */ ;
--- 10,16 ----
-1 is returned if there were no call-outs pending to this
function.
! EXAMPLES
To remove every pending call-out to MyTimer() :
while (remove_call_out("MyTimer") != -1) /* continue */ ;
diff -c efun.orig/remove_input_to efun/remove_input_to
*** efun.orig/remove_input_to 2009-11-02 22:22:36.000000000 +0000
--- efun/remove_input_to 2009-11-02 22:55:30.000000000 +0000
***************
*** 1,9 ****
SYNOPSIS
! 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 ob, string fun)
DESCRIPTION
Remove a pending input_to from the interactive <player> object.
--- 1,9 ----
SYNOPSIS
! 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 ob, string fun)
DESCRIPTION
Remove a pending input_to from the interactive <player> object.
***************
*** 13,33 ****
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
!
! Return 1 on success, or 0 on failure (no input_to found, object is not
! interactive or has no input_to pending).
EXAMPLES
// Remove all pending input_to from the current user, if any.
while (remove_input_to(this_interactive())) ;
HISTORY
! Introduced in LDMud 3.2.9 .
SEE ALSO
input_to(E), find_input_to(E), input_to_info(E), query_input_pending(E)
--- 13,33 ----
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
+ Return 1 on success, or 0 on failure (no input_to found, object is
+ not interactive or has no input_to pending).
+
EXAMPLES
// Remove all pending input_to from the current user, if any.
while (remove_input_to(this_interactive())) ;
HISTORY
! Introduced in LDMud 3.2.9.
SEE ALSO
input_to(E), find_input_to(E), input_to_info(E), query_input_pending(E)
diff -c efun.orig/rename efun/rename
*** efun.orig/rename 2009-11-02 22:22:36.000000000 +0000
--- efun/rename 2009-11-02 22:25:44.000000000 +0000
***************
*** 19,25 ****
On successfull completion rename() will return 0. If any error
occurs, a non-zero value is returned.
! EXAMPLE
rename("/players/wizard/obj.c", "/players/wizard/newobj.c");
SEE ALSO
--- 19,25 ----
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");
SEE ALSO
diff -c efun.orig/rename_object efun/rename_object
*** efun.orig/rename_object 2009-11-02 22:22:36.000000000 +0000
--- efun/rename_object 2009-11-02 22:25:44.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! void rename_object (object ob, string new_name);
DESCRIPTION
Give the object <ob> a new object name <new_name>. Causes a privilege
--- 1,5 ----
SYNOPSIS
! void rename_object(object ob, string new_name)
DESCRIPTION
Give the object <ob> a new object name <new_name>. Causes a privilege
diff -c efun.orig/restore_object efun/restore_object
*** efun.orig/restore_object 2009-11-02 22:22:36.000000000 +0000
--- efun/restore_object 2009-11-02 22:56:48.000000000 +0000
***************
*** 1,6 ****
SYNOPSIS
! int restore_object (string name)
! int restore_object (string str) (PRELIMINARY)
DESCRIPTION
Restore values of variables for current object from the file <name>,
--- 1,6 ----
SYNOPSIS
! int restore_object(string name)
! int restore_object(string str) (PRELIMINARY)
DESCRIPTION
Restore values of variables for current object from the file <name>,
diff -c efun.orig/restore_value efun/restore_value
*** efun.orig/restore_value 2009-11-02 22:22:36.000000000 +0000
--- efun/restore_value 2009-11-02 22:25:44.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! mixed restore_value (string str)
DESCRIPTION
Decode the string representation <str> of a value back into the value
--- 1,5 ----
SYNOPSIS
! mixed restore_value(string str)
DESCRIPTION
Decode the string representation <str> of a value back into the value
diff -c efun.orig/rusage efun/rusage
*** efun.orig/rusage 2009-11-02 22:22:36.000000000 +0000
--- efun/rusage 2009-11-02 22:25:45.000000000 +0000
***************
*** 1,6 ****
OPTIONAL
SYNOPSIS
! int *rusage(void)
DESCRIPTION
Return an array with current system resource usage statistics,
--- 1,6 ----
OPTIONAL
SYNOPSIS
! int * rusage(void)
DESCRIPTION
Return an array with current system resource usage statistics,
***************
*** 14,17 ****
This function is optional.
SEE ALSO
! sys/resource.h(Unix)
--- 14,17 ----
This function is optional.
SEE ALSO
! <sys/resource.h>(Unix)
diff -c efun.orig/save_object efun/save_object
*** efun.orig/save_object 2009-11-02 22:22:36.000000000 +0000
--- efun/save_object 2009-11-02 22:25:45.000000000 +0000
***************
*** 1,6 ****
SYNOPSIS
! int save_object (string name [, int format])
! string save_object ([int format])
DESCRIPTION
Encode the saveable variables of the current object into a string.
--- 1,6 ----
SYNOPSIS
! int save_object(string name [, int format])
! string save_object([int format])
DESCRIPTION
Encode the saveable variables of the current object into a string.
***************
*** 20,26 ****
-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.
A variable is considered 'saveable' if it is not declared
--- 20,26 ----
-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.
A variable is considered 'saveable' if it is not declared
diff -c efun.orig/save_value efun/save_value
*** efun.orig/save_value 2009-11-02 22:22:36.000000000 +0000
--- efun/save_value 2009-11-02 22:25:45.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! string save_value (mixed value [, int format])
DESCRIPTION
Encode the <value> into a string suitable for restoration with
--- 1,6 ----
SYNOPSIS
! string save_value(mixed value)
! string save_value(mixed value, int format)
DESCRIPTION
Encode the <value> into a string suitable for restoration with
diff -c efun.orig/say efun/say
*** efun.orig/say 2009-11-02 22:22:36.000000000 +0000
--- efun/say 2009-11-02 22:25:45.000000000 +0000
***************
*** 60,66 ****
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):
--- 60,66 ----
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):
diff -c efun.orig/send_erq efun/send_erq
*** efun.orig/send_erq 2009-11-02 22:22:36.000000000 +0000
--- efun/send_erq 2009-11-02 22:52:00.000000000 +0000
***************
*** 1,4 ****
--- 1,6 ----
SYNOPSIS
+ #include <erq.h>
+
int send_erq(int request, string|int * data, closure callback)
DESCRIPTION
***************
*** 11,17 ****
The data given to send_erq() may be either a string, or an
array of integers, which are then interpreted as characters.
! The various requests are defined in /sys/erq.h.
The result returned is 0 on failure to send the data, or
non-zero on a successful send.
--- 13,19 ----
The data given to send_erq() may be either a string, or an
array of integers, which are then interpreted as characters.
! The various requests are defined in <erq.h>.
The result returned is 0 on failure to send the data, or
non-zero on a successful send.
***************
*** 20,26 ****
HISTORY
Introduced in 3.2.1@61.
! Made a privileged function in 3.2.1@84
SEE ALSO
attach_erq_demon(E), erq(C)
--- 22,28 ----
HISTORY
Introduced in 3.2.1@61.
! Made a privileged function in 3.2.1@84.
SEE ALSO
attach_erq_demon(E), erq(C)
diff -c efun.orig/send_udp efun/send_udp
*** efun.orig/send_udp 2009-11-02 22:22:36.000000000 +0000
--- efun/send_udp 2009-11-02 22:25:45.000000000 +0000
***************
*** 3,9 ****
int send_udp(string host, int port, int * message)
DESCRIPTION
! Sends The message in an UDP packet to the given host and port
number.
The efun causes a privilege violation. If USE_DEPRECATED is in effect,
--- 3,9 ----
int send_udp(string host, int port, int * message)
DESCRIPTION
! Sends the <message> in an UDP packet to the given host and port
number.
The efun causes a privilege violation. If USE_DEPRECATED is in effect,
***************
*** 18,24 ****
until the next send_udp() - the latter one might return '0' even
if itself was successful.
! BUG
If the <host> is given as a fully qualified name (instead of
an IP address), the execution will block until the name is resolved.
--- 18,24 ----
until the next send_udp() - the latter one might return '0' even
if itself was successful.
! 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.
diff -c efun.orig/set_bit efun/set_bit
*** efun.orig/set_bit 2009-11-02 22:22:36.000000000 +0000
--- efun/set_bit 2009-11-02 22:25:45.000000000 +0000
***************
*** 17,23 ****
s=set_bit("?",5);
Because "?" has a value of 31 the variable s will now contain
! the character "_" wich is equal to 63 (31+2^5=63).
string s;
s=set_bit("78",3);
--- 17,23 ----
s=set_bit("?",5);
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);
diff -c efun.orig/set_combine_charset efun/set_combine_charset
*** efun.orig/set_combine_charset 2009-11-02 22:22:36.000000000 +0000
--- efun/set_combine_charset 2009-11-02 22:25:45.000000000 +0000
***************
*** 1,7 ****
SYNOPSIS
! void set_combine_charset (int* bitvector)
! void set_combine_charset (string charset)
! void set_combine_charset (0)
DESCRIPTION
Set the set of characters which can be combined into a single string
--- 1,7 ----
SYNOPSIS
! void set_combine_charset(int *bitvector)
! void set_combine_charset(string charset)
! void set_combine_charset(0)
DESCRIPTION
Set the set of characters which can be combined into a single string
***************
*** 23,29 ****
if sizeof(bitvector) > n/8 && bitvector[n/8] & (1 << n%8) .
! EXAMPLE
// In a screen-oriented editor, most of the printable characters
// (excluding answers to editor prompts 'j', 'n' and 'q') can be
// combined into strings.
--- 23,29 ----
if sizeof(bitvector) > n/8 && bitvector[n/8] & (1 << n%8) .
! EXAMPLES
// In a screen-oriented editor, most of the printable characters
// (excluding answers to editor prompts 'j', 'n' and 'q') can be
// combined into strings.
***************
*** 33,39 ****
// Disable any previous setting.
set_combine_charset("");
-
HISTORY
Introduced in LDMud 3.2.8.
LDMud 3.2.10 added the ability to reset the charset to the default.
--- 33,38 ----
diff -c efun.orig/set_connection_charset efun/set_connection_charset
*** efun.orig/set_connection_charset 2009-11-02 22:22:36.000000000 +0000
--- efun/set_connection_charset 2009-11-02 22:25:45.000000000 +0000
***************
*** 1,11 ****
SYNOPSIS
! void set_connection_charset (int* bitvector, int quote_iac)
! void set_connection_charset (string charset, int quote_iac)
! void set_connection_charset (0, int quote_iac)
DESCRIPTION
Set the set of characters that can be output to the
! interactive user (this does not apply to binary_message() ).
The function must be called by the interactive user object
itself.
--- 1,11 ----
SYNOPSIS
! void set_connection_charset(int *bitvector, int quote_iac)
! void set_connection_charset(string charset, int quote_iac)
! void set_connection_charset(0, int quote_iac)
DESCRIPTION
Set the set of characters that can be output to the
! interactive user (this does not apply to binary_message()).
The function must be called by the interactive user object
itself.
diff -c efun.orig/set_driver_hook efun/set_driver_hook
*** efun.orig/set_driver_hook 2009-11-02 22:22:36.000000000 +0000
--- efun/set_driver_hook 2009-11-02 22:25:45.000000000 +0000
***************
*** 1,11 ****
SYNOPSIS
void set_driver_hook(int what, closure 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'.
The exact meanings and types of 'arg' depend of the hook set.
To remove a hook, set 'arg' to 0.
--- 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)
DESCRIPTION
This privileged efun sets the driver hook 'what' (values are
! 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.
***************
*** 80,86 ****
HISTORY
Introduced in 3.2.1@1 as efun309(), renamed to
! set_driver_hook() in 3.2.1@13
SEE ALSO
hooks(C)
--- 82,88 ----
HISTORY
Introduced in 3.2.1@1 as efun309(), renamed to
! set_driver_hook() in 3.2.1@13.
SEE ALSO
hooks(C)
diff -c efun.orig/set_extra_wizinfo efun/set_extra_wizinfo
*** efun.orig/set_extra_wizinfo 2009-11-02 22:22:36.000000000 +0000
--- efun/set_extra_wizinfo 2009-11-02 22:25:45.000000000 +0000
***************
*** 1,7 ****
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)
DESCRIPTION
Set the value <extra> as the 'extra' information for the wizlist
--- 1,7 ----
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)
DESCRIPTION
Set the value <extra> as the 'extra' information for the wizlist
diff -c efun.orig/set_limits efun/set_limits
*** efun.orig/set_limits 2009-11-02 22:22:36.000000000 +0000
--- efun/set_limits 2009-11-02 22:25:45.000000000 +0000
***************
*** 1,9 ****
PRELIMINARY
SYNOPSIS
! #include <sys/rtlimits.h>
void set_limits(int tag, int value, ...)
! void set_limits(int * limits)
DESCRIPTION
Set the default runtime limits from the given arguments. The new
--- 1,9 ----
PRELIMINARY
SYNOPSIS
! #include <rtlimits.h>
void set_limits(int tag, int value, ...)
! void set_limits(int *limits)
DESCRIPTION
Set the default runtime limits from the given arguments. The new
***************
*** 20,33 ****
The efun causes a privilege violation ("set_limits", current_object,
first
EXAMPLES
! set_limits( ({ 200000 }) )
! set_limits( LIMIT_EVAL, 200000 )
--> set new default eval_cost limit to 200000
! set_limits( ({ LIMIT_UNLIMITED, LIMIT_KEEP, 5000 }) )
! set_limits( LIMIT_EVAL, LIMIT_UNLIMITED, LIMIT_ARRAY, LIMIT_KEEP,
! LIMIT_MAPPING, 5000 )
--> set new eval_cost limit to unlimited, keep the current
array size limit, and limit mapping sizes to 5000.
--- 20,34 ----
The efun causes a privilege violation ("set_limits", current_object,
first
+
EXAMPLES
! set_limits(({ 200000 }))
! set_limits(LIMIT_EVAL, 200000)
--> set new default eval_cost limit to 200000
! set_limits(({ LIMIT_UNLIMITED, LIMIT_KEEP, 5000 }))
! set_limits(LIMIT_EVAL, LIMIT_UNLIMITED, LIMIT_ARRAY, LIMIT_KEEP,
! LIMIT_MAPPING, 5000)
--> set new eval_cost limit to unlimited, keep the current
array size limit, and limit mapping sizes to 5000.
diff -c efun.orig/set_max_commands efun/set_max_commands
*** efun.orig/set_max_commands 2009-11-02 22:22:36.000000000 +0000
--- efun/set_max_commands 2009-11-02 22:25:45.000000000 +0000
***************
*** 1,6 ****
SYNOPSIS
! void set_max_commands (int num)
! void set_max_commands (int num, object obj)
DESCRIPTION
Set the max number of commands the interactive <obj> is
--- 1,6 ----
SYNOPSIS
! void set_max_commands(int num)
! void set_max_commands(int num, object obj)
DESCRIPTION
Set the max number of commands the interactive <obj> is
***************
*** 17,31 ****
which causes a LPC call - actions and calls to input_to()
alike.
- HISTORY
- Introduced in LDMud 3.2.10.
! EXAMPLE
To establish a mud-wide default for the maximum command rate,
write master::connect() like this:
! object connect ()
! {
object obj;
...
--- 17,28 ----
which causes a LPC call - actions and calls to input_to()
alike.
! EXAMPLES
To establish a mud-wide default for the maximum command rate,
write master::connect() like this:
! object connect() {
object obj;
...
***************
*** 37,42 ****
--- 34,41 ----
modified max_commands will be rebound from the master object
to the returned object.
+ HISTORY
+ Introduced in LDMud 3.2.10.
SEE ALSO
set_max_commands(E), privilege_violation(M)
diff -c efun.orig/set_next_reset efun/set_next_reset
*** efun.orig/set_next_reset 2009-11-02 22:22:36.000000000 +0000
--- efun/set_next_reset 2009-11-02 22:25:45.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! int set_next_reset (int delay)
DESCRIPTION
Instruct the gamedriver to reset this object not earlier than
--- 1,5 ----
SYNOPSIS
! int set_next_reset(int delay)
DESCRIPTION
Instruct the gamedriver to reset this object not earlier than
***************
*** 13,19 ****
Note that the actual time the reset occurs depends on when
the object will be used after the given time delay.
! EXAMPLE
set_next_reset(15*60); // Next reset in 15 Minutes or later
set_next_reset(0) --> just returns the time until the
next reset.
--- 13,19 ----
Note that the actual time the reset occurs depends on when
the object will be used after the given time delay.
! 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.
diff -c efun.orig/set_this_object efun/set_this_object
*** efun.orig/set_this_object 2009-11-02 22:22:36.000000000 +0000
--- efun/set_this_object 2009-11-02 22:25:45.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! void set_this_object(object object_to_pretend_to_be);
DESCRIPTION
This is a privileged function, only to be used in the master
--- 1,5 ----
SYNOPSIS
! void set_this_object(object object_to_pretend_to_be)
DESCRIPTION
This is a privileged function, only to be used in the master
***************
*** 47,53 ****
Some people would consider this a feature.
-
HISTORY
LDMud 3.2.10 actively prevents references to global variables
and function calls by address while set_this_object() is in
--- 47,52 ----
diff -c efun.orig/sgn efun/sgn
*** efun.orig/sgn 2009-11-02 22:22:36.000000000 +0000
--- efun/sgn 2009-11-02 22:25:45.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! int sgn (int|float arg)
DESCRIPTION
Return the sign of the argument.
--- 1,5 ----
SYNOPSIS
! int sgn(int|float arg)
DESCRIPTION
Return the sign of the argument.
diff -c efun.orig/shadow efun/shadow
*** efun.orig/shadow 2009-11-02 22:22:36.000000000 +0000
--- efun/shadow 2009-11-02 22:56:32.000000000 +0000
***************
*** 31,54 ****
With the three objects a.c, b.c and c.c
--- a.c ---
! void fun()
! {
debug_message(sprintf("%O [a] fun()\n", this_object()));
}
! void fun3()
! {
debug_message(sprintf("%O [a] fun3()\n", this_object()));
}
--- b.c ---
! int fun()
! {
debug_message(sprintf("%O [b] fun()\n", this_object()));
find_object("a")->fun();
}
! void fun2()
! {
debug_message(sprintf("%O [b] fun2()\n", this_object()));
find_object("a")->fun3();
this_object()->fun3();
--- 31,50 ----
With the three objects a.c, b.c and c.c
--- a.c ---
! void fun() {
debug_message(sprintf("%O [a] fun()\n", this_object()));
}
! void fun3() {
debug_message(sprintf("%O [a] fun3()\n", this_object()));
}
--- b.c ---
! int fun() {
debug_message(sprintf("%O [b] fun()\n", this_object()));
find_object("a")->fun();
}
! void fun2() {
debug_message(sprintf("%O [b] fun2()\n", this_object()));
find_object("a")->fun3();
this_object()->fun3();
***************
*** 57,69 ****
void do_shadow(object target) { shadow(target, 1); }
--- c.c ---
! int fun()
! {
debug_message(sprintf("%O [c] fun()\n", this_object()));
find_object("a")->fun();
}
! void fun3()
! {
debug_message(sprintf("%O [c] fun3()\n", this_object()));
}
void do_shadow(object target) { shadow(target, 1); }
--- 53,63 ----
void do_shadow(object target) { shadow(target, 1); }
--- c.c ---
! int fun() {
debug_message(sprintf("%O [c] fun()\n", this_object()));
find_object("a")->fun();
}
! void fun3() {
debug_message(sprintf("%O [c] fun3()\n", this_object()));
}
void do_shadow(object target) { shadow(target, 1); }
diff -c efun.orig/sort_array efun/sort_array
*** efun.orig/sort_array 2009-11-02 22:22:36.000000000 +0000
--- efun/sort_array 2009-11-02 22:25:48.000000000 +0000
***************
*** 1,10 ****
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, closure cl)
! mixed *sort_array(mixed *arr, closure cl, mixed extra...)
DESCRIPTION
Create a shallow copy of the array <arr> and sort the copy
--- 1,10 ----
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, closure cl)
! mixed * sort_array(mixed *arr, closure cl, mixed extra...)
DESCRIPTION
Create a shallow copy of the array <arr> and sort the copy
***************
*** 15,24 ****
If the 'arr' argument equals 0, the result is also 0.
'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().
-
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.
--- 15,23 ----
If the 'arr' argument equals 0, the result is also 0.
'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().
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.
diff -c efun.orig/sscanf efun/sscanf
*** efun.orig/sscanf 2009-11-02 22:22:36.000000000 +0000
--- efun/sscanf 2009-11-02 22:25:48.000000000 +0000
***************
*** 2,8 ****
int sscanf(string str, string fmt, mixed var1, mixed var2, ...)
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, ... .
--- 2,7 ----
***************
*** 52,58 ****
The function sscanf is special, in that arguments are passed
by reference automatically.
! EXAMPLE
string who, what;
if (sscanf("throw frisbee to rover",
"throw %s to %s", what, who) != 2)
--- 51,57 ----
The function sscanf is special, in that arguments are passed
by reference automatically.
! EXAMPLES
string who, what;
if (sscanf("throw frisbee to rover",
"throw %s to %s", what, who) != 2)
diff -c efun.orig/start_mccp_compress efun/start_mccp_compress
*** efun.orig/start_mccp_compress 2009-11-02 22:22:36.000000000 +0000
--- efun/start_mccp_compress 2009-11-02 22:25:48.000000000 +0000
***************
*** 16,21 ****
--- 16,22 ----
Available only if the driver is compiled with MCCP enabled;
__MCCP__ is defined in that case.
+
HISTORY
Added in LDMud 3.3.447, backported to LDMud 3.2.10.
diff -c efun.orig/strrstr efun/strrstr
*** efun.orig/strrstr 2009-11-02 22:22:36.000000000 +0000
--- efun/strrstr 2009-11-02 22:25:49.000000000 +0000
***************
*** 1,6 ****
SYNOPSIS
! int strrstr (string str, string str2)
! int strrstr (string str, string str2, int pos)
DESCRIPTION
Returns the index of the first occurance of <str2> in <str> searching
--- 1,6 ----
SYNOPSIS
! int strrstr(string str, string str2)
! int strrstr(string str, string str2, int pos)
DESCRIPTION
Returns the index of the first occurance of <str2> in <str> searching
diff -c efun.orig/strstr efun/strstr
*** efun.orig/strstr 2009-11-02 22:22:36.000000000 +0000
--- efun/strstr 2009-11-02 22:25:49.000000000 +0000
***************
*** 1,6 ****
SYNOPSIS
! int strstr (string str, string str2)
! int strstr (string str, string str2, int pos)
DESCRIPTION
Returns the index of the first occurance of <str2> in <str> searching
--- 1,6 ----
SYNOPSIS
! int strstr(string str, string str2)
! int strstr(string str, string str2, int pos)
DESCRIPTION
Returns the index of the first occurance of <str2> in <str> searching
Common subdirectories: efun.orig/.svn and efun/.svn
diff -c efun.orig/symbol_function efun/symbol_function
*** efun.orig/symbol_function 2009-11-02 22:22:36.000000000 +0000
--- efun/symbol_function 2009-11-02 22:25:50.000000000 +0000
***************
*** 24,30 ****
symbol_function("QueryProp", other_obj) -> other_obj->QueryProp()
HISTORY
! Introduced in 3.2@70
SEE ALSO
lambda(E), quote(E)
--- 24,30 ----
symbol_function("QueryProp", other_obj) -> other_obj->QueryProp()
HISTORY
! Introduced in 3.2@70.
SEE ALSO
lambda(E), quote(E)
diff -c efun.orig/symbolp efun/symbolp
*** efun.orig/symbolp 2009-11-02 22:22:36.000000000 +0000
--- efun/symbolp 2009-11-02 22:25:50.000000000 +0000
***************
*** 4,10 ****
DESCRIPTION
Returns true, if arg is a symbol.
! EXAMPLE
symbolp('foo) returns 1.
HISTORY
--- 4,10 ----
DESCRIPTION
Returns true, if arg is a symbol.
! EXAMPLES
symbolp('foo) returns 1.
HISTORY
diff -c efun.orig/symbol_variable efun/symbol_variable
*** efun.orig/symbol_variable 2009-11-02 22:22:36.000000000 +0000
--- efun/symbol_variable 2009-11-02 22:25:50.000000000 +0000
***************
*** 15,28 ****
and private in the inherited object (i.e. hidden), then a
privilege violation will occur.
- HISTORY
- Enabled since 3.2.1@8
-
EXAMPLES
int base;
int var;
! symbol_variable("var") -> #'<this_object>->var
symbol_variable(0) -> #'<this_object>->base
SEE ALSO
lambda(E), quote(E), symbol_function(E)
--- 15,28 ----
and private in the inherited object (i.e. hidden), then a
privilege violation will occur.
EXAMPLES
int base;
int var;
! symbol_variable("var") -> #'<this_object>->var
symbol_variable(0) -> #'<this_object>->base
+ HISTORY
+ Enabled since 3.2.1@8.
+
SEE ALSO
lambda(E), quote(E), symbol_function(E)
diff -c efun.orig/terminal_colour efun/terminal_colour
*** efun.orig/terminal_colour 2009-11-02 22:22:36.000000000 +0000
--- efun/terminal_colour 2009-11-02 22:42:13.000000000 +0000
***************
*** 1,7 ****
SYNOPSIS
! varargs string terminal_colour( string str
! , null|mapping|closure map
! , int wrap, int indent )
DESCRIPTION
If <map> is given as a non-0 value, this efun expands all
--- 1,6 ----
SYNOPSIS
! varargs string terminal_colour(string str, null|mapping|closure map,
! int wrap, int indent)
DESCRIPTION
If <map> is given as a non-0 value, this efun expands all
***************
*** 61,68 ****
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, "%^")-({""})
,"%^%^")
, ext, w, i);
--- 60,66 ----
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, "%^")-({""})
,"%^%^")
, ext, w, i);
diff -c efun.orig/this_player efun/this_player
*** efun.orig/this_player 2009-11-02 22:22:36.000000000 +0000
--- efun/this_player 2009-11-02 22:25:50.000000000 +0000
***************
*** 8,14 ****
If called from inside the heart_beat() of a not living object
0 will be returned.
! EXAMPLE
if (this_player() != this_interactive())
write("Hey, somebody must have forced us to do a
command!\n");
--- 8,14 ----
If called from inside the heart_beat() of a not living object
0 will be returned.
! EXAMPLES
if (this_player() != this_interactive())
write("Hey, somebody must have forced us to do a
command!\n");
diff -c efun.orig/throw efun/throw
*** efun.orig/throw 2009-11-02 22:22:36.000000000 +0000
--- efun/throw 2009-11-02 22:25:50.000000000 +0000
***************
*** 8,14 ****
Calling throw() without previous catch() does not make sense
and will result in an ``throw without catch'' error.
! EXAMPLE
catch(throw("aborting execution"));
This will just print the string "aborting execution".
--- 8,14 ----
Calling throw() without previous catch() does not make sense
and will result in an ``throw without catch'' error.
! EXAMPLES
catch(throw("aborting execution"));
This will just print the string "aborting execution".
diff -c efun.orig/time efun/time
*** efun.orig/time 2009-11-02 22:22:36.000000000 +0000
--- efun/time 2009-11-02 22:25:50.000000000 +0000
***************
*** 11,17 ****
The result of time() does not change during the course of a command
execution.
! EXAMPLE
write(ctime(time())+"\n");
Print out the current date and time.
--- 11,17 ----
The result of time() does not change during the course of a command
execution.
! EXAMPLES
write(ctime(time())+"\n");
Print out the current date and time.
diff -c efun.orig/tls_check_certificate efun/tls_check_certificate
*** efun.orig/tls_check_certificate 2009-11-02 22:22:36.000000000 +0000
--- efun/tls_check_certificate 2009-11-02 22:30:51.000000000 +0000
***************
*** 1,7 ****
PRELIMINARY
SYNOPSIS
! mixed *tls_check_certificate()
! mixed *tls_check_certificate(object obj);
DESCRIPTION
tls_check_certificate() checks the certificate of the secured
--- 1,7 ----
PRELIMINARY
SYNOPSIS
! mixed * tls_check_certificate()
! mixed * tls_check_certificate(object obj)
DESCRIPTION
tls_check_certificate() checks the certificate of the secured
diff -c efun.orig/tls_init_connection efun/tls_init_connection
*** efun.orig/tls_init_connection 2009-11-02 22:22:36.000000000 +0000
--- efun/tls_init_connection 2009-11-02 22:25:50.000000000 +0000
***************
*** 1,7 ****
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, closure fun, mixed extra...)
DESCRIPTION
--- 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, closure fun, mixed extra...)
DESCRIPTION
diff -c efun.orig/tls_query_connection_info efun/tls_query_connection_info
*** efun.orig/tls_query_connection_info 2009-11-02 22:22:36.000000000 +0000
--- efun/tls_query_connection_info 2009-11-02 22:25:50.000000000 +0000
***************
*** 1,7 ****
PRELIMINARY
SYNOPSIS
! #include <sys/ tls.h>
! int *tls_query_connection_info (object ob)
DESCRIPTION
If <ob> does not have a TLS connection or if the connection
--- 1,8 ----
PRELIMINARY
SYNOPSIS
! #include <tls.h>
!
! int * tls_query_connection_info(object ob)
DESCRIPTION
If <ob> does not have a TLS connection or if the connection
diff -c efun.orig/to_array efun/to_array
*** efun.orig/to_array 2009-11-02 22:22:36.000000000 +0000
--- efun/to_array 2009-11-02 22:42:37.000000000 +0000
***************
*** 1,8 ****
SYNOPSIS
! mixed *to_array(string)
! mixed *to_array(symbol)
! mixed *to_array(quotedarray)
! mixed *to_array(mixed *)
(int*)<value>
--- 1,8 ----
SYNOPSIS
! mixed * to_array(string)
! mixed * to_array(symbol)
! mixed * to_array(quotedarray)
! mixed * to_array(mixed *)
(int*)<value>
diff -c efun.orig/to_int efun/to_int
*** efun.orig/to_int 2009-11-02 22:22:36.000000000 +0000
--- efun/to_int 2009-11-02 22:36:06.000000000 +0000
***************
*** 15,21 ****
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 .
The function supports the '0x', '0o' and '0b' base prefixes.
--- 15,21 ----
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.
The function supports the '0x', '0o' and '0b' base prefixes.
***************
*** 25,31 ****
function form instead.
HISTORY
! Introduced in 3.2.1@2
LDMud 3.2.11 added support for the base prefixes.
SEE ALSO
--- 25,31 ----
function form instead.
HISTORY
! Introduced in 3.2.1@2.
LDMud 3.2.11 added support for the base prefixes.
SEE ALSO
diff -c efun.orig/to_string efun/to_string
*** efun.orig/to_string 2009-11-02 22:22:36.000000000 +0000
--- efun/to_string 2009-11-02 22:41:32.000000000 +0000
***************
*** 13,19 ****
CAVEAT: Arrays are considered exploded strings, ie. arrays of
char codes, and are 'imploded' up to the first 0 or the first
non-number entry, whatever comes first. That means that
! to_string( ({ 49, 50 }) ) will return "12" and not "({ 49, 50 })".
BUGS
The cast notation only works if the precise type of <value>
--- 13,19 ----
CAVEAT: Arrays are considered exploded strings, ie. arrays of
char codes, and are 'imploded' up to the first 0 or the first
non-number entry, whatever comes first. That means that
! to_string(({ 49, 50 })) will return "12" and not "({ 49, 50 })".
BUGS
The cast notation only works if the precise type of <value>
diff -c efun.orig/trace efun/trace
*** efun.orig/trace 2009-11-02 22:22:36.000000000 +0000
--- efun/trace 2009-11-02 22:25:50.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! #include <sys/trace.h>
int trace(int traceflags)
--- 1,5 ----
SYNOPSIS
! #include <trace.h>
int trace(int traceflags)
***************
*** 31,46 ****
massive output! TRACE_OBJNAME should be avoided when you know
what you trace.
-
The master-lfun valid_trace() is called with ("trace", traceflags)
as argument to verify the use of this efun.
! EXAMPLE
object obj;
string prefix;
! obj=find_player("wessex");
! prefix=object_name(obj);
! prefix=prefix[1..strlen(prefix)-1]; /* cut off the leading "/" */
traceprefix(prefix);
/* From here on, only code in the object "std/player#69"
* will be traced.
--- 31,46 ----
massive output! TRACE_OBJNAME should be avoided when you know
what you trace.
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("wessex");
! prefix = object_name(obj);
! prefix = prefix[1..]; /* cut off the leading "/" */
traceprefix(prefix);
/* From here on, only code in the object "std/player#69"
* will be traced.
***************
*** 51,57 ****
HISTORY
LDMud 3.2.9 passes the <traceflags> argument to the valid_trace()
! apply as well.
SEE ALSO
traceprefix(E)
--- 51,57 ----
HISTORY
LDMud 3.2.9 passes the <traceflags> argument to the valid_trace()
! apply as well.
SEE ALSO
traceprefix(E)
diff -c efun.orig/traceprefix efun/traceprefix
*** efun.orig/traceprefix 2009-11-02 22:22:36.000000000 +0000
--- efun/traceprefix 2009-11-02 22:25:50.000000000 +0000
***************
*** 1,4 ****
--- 1,6 ----
SYNOPSIS
+ #include <trace.h>
+
string traceprefix(string prefix)
string traceprefix(int dummy)
***************
*** 13,35 ****
The master-lfun valid_trace() is called with ("traceprefix", prefix)
as arguments to verify the use of this efun.
! EXAMPLE
object obj;
string prefix;
obj = find_player("wessex");
prefix = object_name(obj);
! prefix = prefix[1..strlen(prefix)-1]; /* cut off the leading "/" */
traceprefix(prefix);
/* From here on, only code in the object "std/player#69"
* will be traced.
*/
! trace(1|2|4|8);
...
! trace(0);
HISTORY
LDMud 3.2.9 passes the <prefix> argument to the valid_trace()
! apply as well.
SEE ALSO
trace(E)
--- 15,37 ----
The master-lfun valid_trace() is called with ("traceprefix", prefix)
as arguments to verify the use of this efun.
! EXAMPLES
object obj;
string prefix;
obj = find_player("wessex");
prefix = object_name(obj);
! prefix = prefix[1..]; /* cut off the leading "/" */
traceprefix(prefix);
/* 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);
HISTORY
LDMud 3.2.9 passes the <prefix> argument to the valid_trace()
! apply as well.
SEE ALSO
trace(E)
diff -c efun.orig/transpose_array efun/transpose_array
*** efun.orig/transpose_array 2009-11-02 22:22:36.000000000 +0000
--- efun/transpose_array 2009-11-02 22:25:50.000000000 +0000
***************
*** 1,19 ****
SYNOPSIS
! mixed *transpose_array (mixed *arr);
DESCRIPTION
! transpose_array ( ({ ({1,2,3}), ({a,b,c}) }) )
== ({ ({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.
! EXAMPLE
! sort_array(transpose_array( ({ m_indices(map), m_values(map) }) ),
! lambda( ({ 'a, 'b }),
! ({ #'<, ({ #'[, 'a, 0 }),
! ({ #'[, 'b, 0}) }) )
The given mapping 'map' is returned as an array of
({ key, data }) pairs, sorted by the keys.
--- 1,19 ----
SYNOPSIS
! mixed * transpose_array(mixed *arr)
DESCRIPTION
! transpose_array(({ ({1,2,3}), ({a,b,c}) }))
== ({ ({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.
! EXAMPLES
! sort_array(transpose_array(({ m_indices(map), m_values(map) })),
! lambda(({ 'a, 'b }),
! ({ #'<, ({ #'[, 'a, 0 }),
! ({ #'[, 'b, 0}) }) )
The given mapping 'map' is returned as an array of
({ key, data }) pairs, sorted by the keys.
diff -c efun.orig/trim efun/trim
*** efun.orig/trim 2009-11-02 22:22:36.000000000 +0000
--- efun/trim 2009-11-02 22:25:50.000000000 +0000
***************
*** 1,10 ****
SYNOPSIS
! #include <sys/strings.h>
! 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)
DESCRIPTION
Remove all leading and trailing characters <ch> from the string
--- 1,10 ----
SYNOPSIS
! #include <strings.h>
! 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)
DESCRIPTION
Remove all leading and trailing characters <ch> from the string
***************
*** 19,25 ****
TRIM_RIGHT (2): remove the trailing characters
TRIM_BOTH (3 or 0): remove both leading and trailing characters
! EXAMPLE
trim(" 1234 ") --> "1234"
trim(" 1234 ", TRIM_RIGHT) --> " 1234"
trim(" 1234 ", TRIM_BOTH, " 1") --> "234"
--- 19,25 ----
TRIM_RIGHT (2): remove the trailing characters
TRIM_BOTH (3 or 0): remove both leading and trailing characters
! EXAMPLES
trim(" 1234 ") --> "1234"
trim(" 1234 ", TRIM_RIGHT) --> " 1234"
trim(" 1234 ", TRIM_BOTH, " 1") --> "234"
diff -c efun.orig/typeof efun/typeof
*** efun.orig/typeof 2009-11-02 22:22:36.000000000 +0000
--- efun/typeof 2009-11-02 22:25:50.000000000 +0000
***************
*** 1,12 ****
SYNOPSIS
int typeof(mixed)
DESCRIPTION
Returns a code for the type of the argument, as defined in
! <sys/lpctypes.h>
HISTORY
! Introduced in 3.2@63
SEE ALSO
get_type_info(E), intp(E), objectp(E), floatp(E), pointerp(E),
--- 1,14 ----
SYNOPSIS
+ #include <lpctypes.h>
+
int typeof(mixed)
DESCRIPTION
Returns a code for the type of the argument, as defined in
! <lpctypes.h>.
HISTORY
! Introduced in 3.2@63.
SEE ALSO
get_type_info(E), intp(E), objectp(E), floatp(E), pointerp(E),
diff -c efun.orig/unbound_lambda efun/unbound_lambda
*** efun.orig/unbound_lambda 2009-11-02 22:22:36.000000000 +0000
--- efun/unbound_lambda 2009-11-02 22:25:50.000000000 +0000
***************
*** 18,24 ****
or apply(), the second arg forms the code of the closure.
HISTORY
! Introduced in 3.2@82
SEE ALSO
closures(LPC), lambda(E), apply(E), funcall(E), bind_lambda(E)
--- 18,24 ----
or apply(), the second arg forms the code of the closure.
HISTORY
! Introduced in 3.2@82.
SEE ALSO
closures(LPC), lambda(E), apply(E), funcall(E), bind_lambda(E)
diff -c efun.orig/unique_array efun/unique_array
*** efun.orig/unique_array 2009-11-02 22:22:36.000000000 +0000
--- efun/unique_array 2009-11-02 22:25:50.000000000 +0000
***************
*** 18,24 ****
....
({ SameM:1, SameM:2, ... SameM:N }) })
! EXAMPLE
mixed *arr;
arr=unique_array(users(), "_query_level", -1);
--- 18,24 ----
....
({ SameM:1, SameM:2, ... SameM:N }) })
! EXAMPLES
mixed *arr;
arr=unique_array(users(), "_query_level", -1);
diff -c efun.orig/unmkmapping efun/unmkmapping
*** efun.orig/unmkmapping 2009-11-02 22:22:36.000000000 +0000
--- efun/unmkmapping 2009-11-02 22:25:50.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! mixed* unmkmapping(mapping map)
DESCRIPTION
Take mapping <map> and return an array of arrays with the keys
--- 1,5 ----
SYNOPSIS
! mixed * unmkmapping(mapping map)
DESCRIPTION
Take mapping <map> and return an array of arrays with the keys
***************
*** 17,23 ****
holds.
! EXAMPLE
mapping m = ([ 1:10;20, 2:11;21 ]);
unmkmapping(m)
--> returns ({ ({1, 2}), ({ 10, 11 }), ({ 20, 21 }) })
--- 17,23 ----
holds.
! EXAMPLES
mapping m = ([ 1:10;20, 2:11;21 ]);
unmkmapping(m)
--> returns ({ ({1, 2}), ({ 10, 11 }), ({ 20, 21 }) })
diff -c efun.orig/users efun/users
*** efun.orig/users 2009-11-02 22:22:36.000000000 +0000
--- efun/users 2009-11-02 22:25:50.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! object *users(void)
DESCRIPTION
Return an array containing all interactive users.
--- 1,5 ----
SYNOPSIS
! object * users(void)
DESCRIPTION
Return an array containing all interactive users.
diff -c efun.orig/utime efun/utime
*** efun.orig/utime 2009-11-02 22:22:36.000000000 +0000
--- efun/utime 2009-11-02 22:25:50.000000000 +0000
***************
*** 1,5 ****
SYNOPSIS
! int* utime()
DESCRIPTION
Return the time since 1. Jan 1970, 00:00:00 GMT in microsecond
--- 1,5 ----
SYNOPSIS
! int * utime()
DESCRIPTION
Return the time since 1. Jan 1970, 00:00:00 GMT in microsecond
***************
*** 9,15 ****
int[0]: number of seconds elapsed
int[1]: number of microseconds within the current second.
! EXAMPLE
write(ctime(utime())+"\n");
Print out the current date and time.
--- 9,15 ----
int[0]: number of seconds elapsed
int[1]: number of microseconds within the current second.
! EXAMPLES
write(ctime(utime())+"\n");
Print out the current date and time.
diff -c efun.orig/variable_exists efun/variable_exists
*** efun.orig/variable_exists 2009-11-02 22:22:36.000000000 +0000
--- efun/variable_exists 2009-11-02 22:25:50.000000000 +0000
***************
*** 1,8 ****
SYNOPSIS
#include <functionlist.h>
! string variable_exists (string str [, int flags])
! string variable_exists (string str , object ob, [, int flags])
DESCRIPTION
Look up a variable <str> in the current object, respectively
--- 1,10 ----
SYNOPSIS
#include <functionlist.h>
! string variable_exists(string str)
! string variable_exists(string str, int flags)
! string variable_exists(string str, object ob)
! string variable_exists(string str, object ob, int flags)
DESCRIPTION
Look up a variable <str> in the current object, respectively
diff -c efun.orig/variable_list efun/variable_list
*** efun.orig/variable_list 2009-11-02 22:22:36.000000000 +0000
--- efun/variable_list 2009-11-02 22:25:50.000000000 +0000
***************
*** 1,8 ****
NAME
! #include <sys/functionlist.h>
! #include <sys/lpctypes.h>
! mixed *variable_list (object ob, int flags = RETURN_FUNCTION_NAME)
DESCRIPTION
Return an array with information about <ob>s variables. For
--- 1,8 ----
NAME
! #include <functionlist.h>
! #include <lpctypes.h>
! mixed * variable_list(object ob, int flags)
DESCRIPTION
Return an array with information about <ob>s variables. For
***************
*** 10,16 ****
stored in the result array conveying in this order:
- the name of the variable
- the variable flags (see below)
! - the return type (listed in mudlib/sys/lpctypes.h)
- the value of the variable
<ob> may be given as true object or as a filename. In the latter
--- 10,16 ----
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
<ob> may be given as true object or as a filename. In the latter
***************
*** 22,28 ****
<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
! mudlib/sys/functionlist.h:
Control of returned information:
RETURN_FUNCTION_NAME include the variable name
--- 22,28 ----
<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>:
Control of returned information:
RETURN_FUNCTION_NAME include the variable name
***************
*** 45,54 ****
TYPE_MOD_NO_MASK variable is nomask
TYPE_MOD_PUBLIC variable is public
! All these flags are defined in mudlib/sys/functionlist.h, which
! should be copied into an accessible place in the mudlib. The
! return types are defined in mudlib/sys/lpctypes.h which also
! should be copied into the mudlib.
HISTORY
Introduced in LDMud 3.2.10.
--- 45,52 ----
TYPE_MOD_NO_MASK variable is nomask
TYPE_MOD_PUBLIC variable is public
! All these flags are defined in <functionlist.h>, the
! return types are defined in <lpctypes.h>.
HISTORY
Introduced in LDMud 3.2.10.
diff -c efun.orig/widthof efun/widthof
*** efun.orig/widthof 2009-11-02 22:22:36.000000000 +0000
--- efun/widthof 2009-11-02 22:25:50.000000000 +0000
***************
*** 1,11 ****
SYNOPSIS
! int widthof (mapping map)
DESCRIPTION
Returns the number of values per key of mapping <map>.
If <map> is 0, the result is 0.
! EXAMPLE
mapping m = ([ "foo": 1,2 ]);
widthof(m) --> returns 2
--- 1,11 ----
SYNOPSIS
! int widthof(mapping map)
DESCRIPTION
Returns the number of values per key of mapping <map>.
If <map> is 0, the result is 0.
! EXAMPLES
mapping m = ([ "foo": 1,2 ]);
widthof(m) --> returns 2
diff -c efun.orig/wizlist_info efun/wizlist_info
*** efun.orig/wizlist_info 2009-11-02 22:22:36.000000000 +0000
--- efun/wizlist_info 2009-11-02 22:25:50.000000000 +0000
***************
*** 1,7 ****
SYNOPSIS
! #include <sys/wizlist.h>
! mixed *wizlist_info()
DESCRIPTION
Returns an array with the interesting entries of the wizlist.
--- 1,7 ----
SYNOPSIS
! #include <wizlist.h>
! mixed * wizlist_info()
DESCRIPTION
Returns an array with the interesting entries of the wizlist.
diff -c efun.orig/xor_bits efun/xor_bits
*** efun.orig/xor_bits 2009-11-02 22:22:36.000000000 +0000
--- efun/xor_bits 2009-11-02 22:25:52.000000000 +0000
***************
*** 1,7 ****
SYNOPSIS
! string xor_bits (string str1, string str2)
! DESTRIPTION
<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
--- 1,7 ----
SYNOPSIS
! string xor_bits(string str1, string str2)
! 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