20-Aug-2000 (Lars Duening) -- Release 3.2.8
- Changed efuns:
+ add_action(): Implemented the 'abbreviated verb' feature associated
with negative flag values.
+ apply(): Just returns the first argument if it is not a closure.
+ clonep(): Accepts arguments of all types.
+ command_stack(): Also returns which objects did the notify_fail()s.
+ debug_info(): DINFO_MEMORY also prints the datasize of an object.
+ debug_info(): New request DINFO_DATA.
+ debug_info(): DINFO_MALLOC also returns the size of the wasted
memory (where available).
+ inherit_list(): in non-COMPAT mode, the returned program names
start with a '/'.
+ input_to(): input_to()s can now be stacked, and also accept
closures for the function (this is not yet a real stacked
input handling, though).
+ load_name(): also accepts strings as object designators.
+ map(): can now map an array through a mapping.
+ object_info(): OINFO_MEMORY also returns the datasize of an object.
+ present(): present(object) returns the object found, not its
environment.
+ printf(): prints to NPCs are sent to catch_tell().
+ (s)printf(): object names printed in plain mode with %O now
start with a leading "/".
+ (s)printf(): fields are now always padded to their full size,
even if no more data is following in the format string.
+ query_notify_fail(): A flag allows to query which object set
the current error message.
+ restore_object(): Preliminary: optionally restore the object
variables from a string.
+ save_object(): Preliminary: optionally return the saved object
variables in a string.
+ set_connection_charset(): Now also accepts a string as charset
specificator.
+ sort_array(): Now accepts extra arguments to pass to the sorting
function.
+ terminal_colour(): Straightened the key recognition, and added
a wrapping-only mode.
+ to_string(): Now also accepts lambda closures and returns a string
suitable for debugging purposes.
- Corrected efuns:
+ get_type_info(): The object a lambda closure is bound to is now
returned properly.
+ limited(): When calling closures with limited eval ticks, the
efun didn't make the full amount of ticks available.
+ terminal_colour(): When removing spaces due to wrapping, the
efun sometimes falsely reported a "partial string too long".
+ random(): distributes the random numbers more evenly, especially
over small ranges.
+ regexp(), regexplode(), regreplace(): Errors in the regular
expression are raised as normal errors, and no longer printed
to the user.
+ sprintf(): Is now reentrant.
+ strstr(): When given negative starting offsets, the efun no
longer returns negative results.
+ transpose_array(): Can now handle variable sized sub-arrays.
+ typeof(): Now accepts literal references.
+ unique_array(): When applied on an empty array, it no longer
raises an assertion.
- New efuns:
+ clones(): find and return the clones of an object.
+ copy_file(): copies a file.
+ save_value(): encodes a value into a string.
+ restore_value(): decodes a value from a string generated by
save_value().
+ set_combine_charset(): Define characters to combine into strings
when received in charmode.
- Master Object:
+ valid_read(), valid_write(): new function code "copy_file" to cater
for the new efun.
+ valid_write(): the old function code "do_rename" (used twice) was
replaced by "rename_from" and "rename_to".
+ log_error(): New argument "warn" determines if the message
passed to the lfun is an error or just a warning.
+ New include_file(): generates the full pathname of a filename
given in an #include directive.
+ New inherit_file(): generates the full pathname of a filename
given in an inherit directive.
- Fixed Crashers:
+ Unaligned pointer access in efun functionlist(), caused
by unaligned function stand-ins.
+ Multiplication of an array of allocated strings with an integer.
+ Replacing a prompt-closure from within the closure.
+ Comparison "#'f == other_type" (also !=).
+ It is no longer possible to pass destructed objects to
input_to() handlers.
+ When apply() was called with an array as last argument, it didn't
check the array elements for destructed objects.
+ When creating lambda closures with more than 254 constants, the
compiler stored the number of values at the wrong place,
clobbering one of the constants.
+ Evalstack overflows caused by intermediate results went
unnoticed.
+ Calling functions with more than 255 arguments triggered
a sanity check.
+ Replacing a notify-fail closure while it is executed.
+ The default handling of telnet negotiations (answering DONT/WONT)
for unsupported options like NAWS if no hooks are specified,
leaked LPC stack entries, eventually overwriting memory.
+ The lambda block ({ #'return }) was compiled incorrectly,
causing a 'Bad stack at F_RETURN' at the end of the lambda
closure latest.
+ Efun write_file() running out of fds outside of a compilation
no longer tries to raise a compilation error.
+ A failing include statement at the end of the internal lex buffer
no longer causes the driver to lex invalid data, sometimes
crashing while doing so.
- Language:
+ The preincrement/-decrement operators can now be applied
to wide mappings ('++m[x,y]').
+ If an object is inherited virtually multiple times,
a wildcarded super call ("*::") calls it only once.
+ The ->() operator also accepts the following forms:
+ x->y() where y is the name of a local variable
+ x->"y"() where "y" is a constant string
+ x->(y)() where y is an expression returning a string.
+ New loop-construct: foreach().
+ call_others (ie. ->()) can be applied on arrays of objects, the
single call results are collected in one result array.
+ <int> += <type> now works for <type> being string and float as well.
+ The operator "&" (and "&=") can now be used to intersect strings.
+ The operator "-" (and "-=") can now be used to remove characters
from a string.
+ <mapping1> -= <mapping2> now works for <mapping2> of any width,
like the normal subtraction already does.
+ Indexing [..x] and [..<x] are allowed as short form of [0..x]
and [0..<x].
+ When enabled, the modifier 'nosave' replaces the modifier 'static'
for variables - the latter is still recognized, but its use
is deprecated. Similar, 'nosave' should be used instead
of 'static' as inheritance modifier.
+ New pragma "weak_types" to turn off type checking.
+ New pragmas "pedantic" and "sloppy" turn on resp. off the
treatment of certain warnings as errors.
+ Inherited functions are looked up using a breadth search.
+ Local variables can be initialized in their definition, for example:
int i = 3;
int j = 3*i, k;
+ New preprocessor macros __DIR__ and __PATH__() to retrieve the
path of the currently compiled file.
+ '(void)' is now accepted as empty function argument list.
+ Failure to pass enough arguments to a non-vararg simul_efun
generates a warning (error in pedantic mode).
+ Redefinition of a function now checks the types of the arguments and
of the return type for consistency. Same for the
consistency between a function and a preceeding prototype. If a
difference is detected, a warning (error in pedantic mode for
arguments) is issued.
+ Preprocessor statements #else and #endif no longer accept uncommented
text after the keyword. In pedantic mode, an error is raised,
otherwise a warning is generated.
+ Preprocessor statement #define requires a definition after the
keyword.
+ Bugfix: Newlines in literal strings in inline closures are now
rejected.
+ Bugfix: #'parse_command wasn't implemented.
+ Bugfix: The expressions &(expr4[x]) and &(expr4[<x]) could
generate invalid code (causing a "(lvalue) Indexing on illegal
type" error) in extreme circumstances.
+ Bugfix: Compiler typechecks for "int * string" yielded "int"
instead of "string" (the generated code was correct).
+ Bugfix: objects with "nomask" functions can be inherited virtually
multiple times.
+ Bugfix: "*"::foo() failed if the last inherited object checked did
not contain the function - even if it has been found in other
objects.
+ Bugfix: ::foo() didn't find the topmost definition when
confronted with virtual inherits.
+ Bugfix: In the expression '++<ident>' the opcode for '++' was
overwritten if the <ident> required a 2-Byte index internally.
Same for '--'.
+ Bugfix: The preprocessor properly ignores a '//'-comment in
the argument list for a function macro.
- Runtime:
+ If the driver is compiled for IPv6 support, the macro '__IPV6__'
is defined in LPC compiles.
+ Simul-efuns can now take "varargs" arguments, like
in "foo(varargs mixed arg)".
+ A simul-efun "call_other()" finally catches ->() calls as well.
+ New pragma "no_shadow" to disallow shadows on a program.
- Other Changes:
+ The standard erq now supports the socket requests (actually it
does so for some time now, it just hasn't been published).
+ Where supported, the erq supports lookup of IPv6 addresses.
+ When compiled with DEBUG and CHECK_STRINGS, the commandline option
"--check-strings" checks the consistency of the shared string
table with every backend cycle.
+ When compiled with DEBUG, the commandline option "--check-state"
controls the simplistic state checks of the virtual machine
in the backend loop.
+ The driver can be compiled with bison as well as with byacc.
+ New editor command 'M' to strip ^Ms from lineends.
+ The commandline argument "--max-small-malloc" and the corresponding
configuration parameter are gone.