This file lists all changes to the game driver which have a visible impact on its behaviour both towards the mudlib as well as towards the host system. For a detailed list of all changes see the file CHANGELOG. 10-Sep-2022 (LDMud Team) -- 3.6.6 - Fixed Crashes: + Fixed a crash in configure_interactive() and input_to() checking privileges without an actual living object. + Fixed several crashes in lambda(). + Fixed a crash when compiling wildcard calls. + Fixed a crash in Python code with a missing current object. + Fixed a crash in Python code when handling a swapped-out object. + Fixed a crash when calling nonexistent functions on LWOs. + Fixed a crash when swapping LWOs. + Fixed a crash when aborting a coroutine due to an error. + Fixed a crash during the garbage collection. + Fixed a crash when calling MySQL functions. - Language: + Introduced 'struct mixed' as type declaration for any struct. + Introduced range indexing for wide mappings (i.e. m[key, index1..index2]) + Implemented inheritance modifier and default declaration for struct visibility. + Simul-efun structs are now available in every program. + Added new privileged pragma no_simul_efuns to deactivate the access to simul-efuns. + Fixed object and lwobject type being treated as equal. - Runtime: + Implemented runtime type checks for struct initialization. + Several fixes and changes for lightweight objects: + Introduced driver hooks for object creation. + Variables of a new object will be initialized prior to their values being copied or restored. + nosave variables will not be saved anymore. + Fixed a failure when restoring. + Fixed several reference counting issues and other memory leaks. - Changed Efuns: + ed() shows Unicode characters now. + unique_array() does not warn about missing functions anymore. + symbol_function() now supports simul-efun closures with high indices. + regexp() can now handle nul bytes in the regular expression. + driver_info() got some more statistics about simul-efuns, lightweight objects and coroutines. - Networking: + Added code for TLS and MCCP to the telnet example. - Master: + H_CREATE_* hooks can now be arbitrary closures. - Other: + Implemented encoding suffixes //IGNORE and //REPLACE for error handling during reading. 09-Jan-2022 (LDMud Team) -- 3.6.5 - Fixed Crashes: + Fixed a crash in implode() with bytes. + Fixed a freeze when handling default function argument values. + Fixed crash when having more than 255 lambda values. + Fixed crash in virtual inherit handling (#899). + Fixed crash on too many local variables (#900). - Lanuage: + Added new type: lightweight objects + Added new type: coroutines + Implement named object types (#842). + Implemented 'in' operator for membership tests (#726). + Improved missing return detection (#332). + Implemented dead code detection. + Implemented type checks for comparison operations. + Warn about floats used in a boolean context (#780). + Warn about incorrect definitions of applied lfuns (#882). + Warn about unused literal values. + Index operation cannot be called like efuns anymore. + Fixed refcounting mismatch when a virtual function disappeared. - Runtime: + Removed argument for create() and reset(). + Warn when a callback function does not exist. + Implemented closures to simul-efuns that exceeded the sefun table. (#782) + Prevent reentrant SQLite calls. + Implement recursion limit in traditional regexp engine. - Changed Efuns: + clone_object(): Pass additional arguments to create(). + read_bytes() accepts now negative start offsets beyond file start. + restore_value()/restore_object(): Fixed parsing of context closures. + sprintf(): Fixed newline handling in column mode (#529). + sprintf(): Fixed handling of '%%' (#665). + sprintf(): Fixed handling of '\0' (#800). + sprintf(): Treat '\r' in table mode as line breaks. - Networking: + Fixed discarding of newlines when switching to charmode (#892). + Fixed handling of Telnet NUL bytes. - Master Object: + log_error(): New argument "line" containing the line number (#899). - Other: + Python functions can amend LPC objects with additional member variables. 06-Apr-2021 (LDMud Team) -- 3.6.4 - Fixed Crashes: + Assertion failure when adding string contants to byte constants. + Fixed a crash when a virtual inherited program was updated twice. + Fixed out-of-bounds write on errors in lambda closures. + lambda() compiled #'catch and #'call_direct without the needed argument frame. + Python call operator on uninitialized closure could crash. + variable_list() failed to swap the variable block in when the values were requested. - Language: + Function arguments can now have default argument values. + Added prefixes #'lfun:: and #'var:: for closure literals. + Preprocessor statements and pragmas need now to be written fully. + Warn about trailing characters in all preprocessor statements. + A for/foreach variable cannot be used in its initializer anymore. + Added compile and runtime type checks for foreach(). + Added compile and runtime type checks for all types of assignment operations. + Inherited function calls will no longer call indirectly inherited virtual programs. + Check efun arguments for references. + Extended function overload type checks to include optional arguments. + Fixed type comparison of arrays with different depths. + Structs in a privately inherited program are now still visible in the directly inheriting program. - Runtime: + Added subtraction of mappings from arrays and vice versa. + Failed assignments to mapping entries will not leave a zero entry. + Fixed int *= float operation. + Fixed a resource leak for interactive connections. + Fixed a memory leak when an object is destroyed in __INIT. + Fixed use after free in get_type_info() for anonymous structs. - Changed Efuns: + get_type_info(x,0) will now return the numeric type as documented. + interactive_info() now also gives noecho and charmode information. + map()/filter() got support for Unicode strings and byte sequences. + regexplode() will not split UTF-8 sequences anymore. + replace_program() can now handle virtual inherits. + restore_object() can now correctly handle quoted arrays. + sscanf() and parse_commands() are now real efuns. + sscanf() will not match upon numeric overflows. + struct_info() and variable_list() now return type information once again. + symbol_variable() returned wrong value when called as a closure. + to_struct() now accepts arrays that are greater as the template struct. - Other: + Fixed missing security check in debug_info() simul-efun implementation. + Added support for password protected TLS keys with the --tls-password command line option. + Disallow the use of simul-efun closure literals when compiling the master object. + Implemented Python bool operator for objects and closures. + Fixed Python hash operator on closures. + Pass SQLite warnings to the master object. 01-Sep-2020 (LDMud Team) -- 3.6.3 - Fixed Crashes: + slaballoc/smalloc forget to set the magic bytes when splitting of a small block from a large block. + When printing collected garbage blocks the access to malloc information was off by one word. + The compiler left a semantic value uninitialized when parsing lvalue preserving calls. + The current object was not set when setting up the call to H_CLEAN_UP. + to_struct() freed a struct definition when base and derived struct had the same size. + The Closure() constructor in Python crashed when used in the backend loop. - Language: + The new pragma warn_unused_variables will warn about variables that are not read from or not written to. + The pragma strict_types will now raise errors. - New Efuns: + text_width() returns the approximate screen width of a given string. - Changed Efuns: + sprintf() and terminal_colour() respect extended grapheme clusters. + restore_value() and restore_object() restore structs now by struct member name when the names are available. + restore_value() and restore_object() can now restore anonymous structs. + baseof() and to_struct() now detect or convert structs that are based on an older or newer definition. + regexp() didn't handle the star operator correctly. + regexp() now supports \X (grapheme cluster) for traditional regular expressions. - Other: + Implemented support for lvalues in Python. 28-Apr-2020 (LDMud Team) -- 3.6.2 - Language: + Added the dot operator as a shortcut to call_strict() and strict struct member access. + Modified the arrow operator to be a relaxed struct member access operator. + Reimplement pragma strict_types. + Calls to simul-efuns are now type checked. - New Efuns: + call_strict() and call_strict_direct() are similar to call_other()/call_direct(), but raise an error if the function does not exist. - Changed Efuns: + call_resolved() and call_direct_resolved() now also support array calls. - Other: + Implemented support for function and variable inspection and child processes in Python. + Fix information leakage when snooping. 08-Jan-2020 (LDMud Team) -- 3.6.1 - Runtime: + Assignments to variables and declarative type casts are now subject to the runtime type checks. - Language: + Argument types of efuns with arbitrarily many arguments are now checked at compile time. + Type annotations of Python efuns are used for checks at compile time and runtime. + Warn on C style casts that have no effect. + A variable cannot be used in its initializer anymore. - Other: + Added support for closures and symbols in the indent tool. + Added valgrind memcheck instrumentation to the slaballoc allocator. 28-Oct-2019 (LDMud Team) -- 3.6.0 - Removed Efuns: + The efun convert_charset() was removed, the new efuns to_text() and to_bytes() can be used instead. - Runtime: + The string type and all its operation support the full Unicode character set (#432). + sl_exec() supports blobs now. - Language + Introduced a new type named 'bytes' to differentiate between Unicode character sequences (strings) and byte sequences. 05-Apr-2019 (LDMud Team) -- 3.5.2 - Fixed Crashes: + Syntax errors when parsing inline closures didn't clean up status variables (#866). + Destructing newly created interactives resulted in fatal errors. + Calling lambda closures with mapping index operations resulted in execution of random bytes (#867). + #'return in a middle of an expression in a lambda closure could result in a fatal error (#868). + Replacing the system malloc could result in a segmentation fault (#862). + A garbage collection when using the slaballoc/smalloc allocator with mmap could result in a fatal error. - Runtime: + Clean-up, reset and swap times can now be configured at runtime using configure_driver(). + Reactions to the signals SIGINT, SIGHUP, SIGUSR1 and SIGUSR2 can now be configured using configure_driver(). 04-Jan-2018 (LDMud Team) -- 3.5.1 - Fixed Crashes: + missing type declarations resulted in a NULL pointer dereference (#859). + fixed handling of program updates with triply virtually inherited programs. + fixed crash when swapping out programs with lvalue references (#854). + fixed a crash on exceptions in a call of Python efun closures. + compiling a call to Python efuns resulted in an uninitialized type. + SQLite crashed when LDMud's allocator replaced the system malloc. - Runtime: + sl_exec() allows the ATTACH statement now. + SQLite log messages are now printed to the debug log (#835). - Other: + Corrected simul-efun implementations of deprecared efuns (#855, #857). + Corrected the LP-245 mudlib to work with the current driver. 04-Oct-2017 (LDMud Team) -- 3.5.0 - Fixed Crashes + xml_generate(), xml_parse() could crash the driver due to a wrong order during initialization of libxml2 (#671) and could lead to memory corruption, because the memory used by libxml2 was subject to the garbage collector and would be free'd by it while still in use. + get_type_info() lost refcounts to the function name of a closure, causing it eventually being free'd prematurely (#712). + 'dumpallobj' crashed if there are strings with 0 refcounts (#725). + fixed a crash during tracing caused by a wrong call to add_message() in do_trace(), when compiled with --enable-debug (#736). + sprintf() could result in a fatal error if some buffer overflowed. Removed these overflow opportunities (#825). + fixed a crash during compilation when the handling of a preprocessor statement meet the end of the lexer input buffer (#833). + fixed a crash in crypt() when given an invalid salt. + fixed a crash when calling ctime(-1) the first time. - Changed Efuns: + apply() now expands an lvalue reference to an array or an array range as lvalue references to the array elements. + add_action(): The function can be given as a closure. (#243) + call_other() and call_direct() now always accept an array of objects or strings (object names) as argument and call the function in all of these objects. + command(): Won't throw an error anymore when a static function in another object is called. Such an action will simply be skipped. + get_dir(): prepend '/' in plain mode for entries in the root directory, if paths are requested by GETDIR_PATH. + explode() always returns a non-empty array, even upon explode("","") (#180). + net_connect() will return an error code from comm.h instead of the system errno value (#427). + net_connect() had the current udp port as an undocumented default value for its second argument. Now both parameters are mandatory. + object_info() was redesigned to just return a single information including configuration options from configure_object(). (#596) + The functionality of shadow(ob, 0) was removed in favor of object_info(ob, OI_SHADOW_NEXT). There is a sefun implementation with the old signature in /mudlib/deprecated/. (#596) + restore_object()/restore_value() can now restore null bytes in strings. + sort_array() will sort in-place instead of a copying the array first, if the array is passed as reference. (#224) + sort_array() and reverse() also work with array range references. + to_struct() can convert a struct into another one if one of them is a (indirect) base of the other. (#646) + restore_object() checks if the types of restored data are compatible with the declared types of variables, if runtime type checks are enabled in the program of the object. + clone_object() does not deactivate an active heart_beat in a blueprint. (#747) + Fixed result of convert_charset(): returns now the unchanged string if it gets an empty string for conversion. (#739) + tls_init_connection() supports outgoing connections also with GnuTLS. - Removed Efuns: + The deprecated efuns cat() and tail() were removed. They can be easily and more flexibly replaced by sefuns, which are supplied with the driver. (#637, #228) + The efun set_light() was removed. This includes the internal light state managment in the driver. The mudlib does a better and more flexible job at managing light in/from objects. (#775) + The supporting efuns for alists were removed: insert_alist, order_alist, intersect_alist, assoc. (#776) + strlen() was removed. sizeof() can be used as a drop-in replacement, which does exactly the same thing. (#798) + The following efuns were removed in favor of new efuns. There are sefun replacements in /mudlib/deprecated/. (#596) set_heart_beat() -> configure_object(ob, OC_HEART_BEAT, flag) enable_commands() -> configure_object(ob, OC_COMMANDS_ENABLED, 1) disable_commands() -> configure_object(ob, OC_COMMANDS_ENABLED, 0) seteuid() -> configure_object(ob, OC_EUID, euid) query_once_interactive() -> object_info(ob, OI_ONCE_INTERACTIVE) query_shadowing() -> object_info(ob, OI_SHADOW_PREV) set_connection_charset() -> configure_object(ob, IC_CONNECTION_CHARSET_AS_STRING, val) configure_object(ob, IC_CONNECTION_CHARSET_AS_ARRAY, val) configure_object(ob, IC_QUOTE_IAC, 1 resp. 0) get_connection_charset() -> object_info(ob, IC_CONNECTION_CHARSET_AS_STRING) object_info(ob, IC_CONNECTION_CHARSET_AS_STRING) object_info(ob, IC_QUOTE_IAC) set_combine_charset() -> configure_object(ob, IC_COMBINE_CHARSET_AS_STRING, val) configure_object(ob, IC_COMBINE_CHARSET_AS_ARRAY, val) get_combine_charset() -> object_info(ob, IC_COMBINE_CHARSET_AS_STRING) object_info(ob, IC_COMBINE_CHARSET_AS_STRING) set_buffer_size() -> configure_interactive(ob, IC_SOCKET_BUFFER_SIZE, size) enable_telnet() -> configure_interactive(ob, IC_TELNET_ENABLED, state) start_mccp_compress() -> configure_interactive(ob, IC_MCCP, state) end_mccp_compress() -> configure_interactive(ob, IC_MCCP, 0) query_mccp() -> interactive_info(ob, IC_MCCP) query_mccp_stats() -> interactive_info(ob, II_MCCP_STATS) set_prompt() -> configure_interactive(ob, IC_PROMPT, prompt) set_max_commands() -> configure_interactive(ob, IC_MAX_COMMANDS, num) get_max_commands() -> interactive_info(ob, IC_MAX_COMMANDS) set_modify_command() -> configure_interactive(ob, IC_MODIFY_COMMAND, ob) query_ip_name() -> interactive_info(ob, II_IP_NAME) interactive_info(ob, II_IP_ADDRESS) query_ip_number() -> interactive_info(ob, II_IP_NUMBER) interactive_info(ob, II_IP_ADDRESS) query_editing() -> interactive_info(ob, II_EDITING) query_idle() -> interactive_info(ob, II_IDLE) query_input_pending() -> interactive_info(ob, II_INPUT_PENDING) debug_info() -> driver_info(...) dump_driver_info(...) objects(...) query_limits() -> driver_info(DC_DEFAULT_RUNTIME_LIMITS) driver_info(DI_CURRENT_RUNTIME_LIMITS) set_limits() -> configure_driver(DC_DEFAULT_RUNTIME_LIMITS) set_extra_wizinfo_size() -> configure_driver(DC_EXTRA_WIZINFO_SIZE) query_load_average() -> driver_info(DI_LOAD_AVERAGE_COMMANDS) driver_info(DI_LOAD_AVERAGE_LINES) query_mud_port() -> driver_info(DI_MUD_PORTS) interactive_info(ob, II_MUD_PORT) query_udp_port() -> driver_info(DI_UDP_PORT) query_snoop() -> interactive_info(ob, II_SNOOP_NEXT) + The efun set_is_wizard() was removed. It can be implemented with normal actions. Example implementations are provided in /mudlib/deprecated. (#596) + The efun export_uid() was removed. The object's UID is now constant and can't be changed. Instead the EUID can be exported with configure_object(ob, OC_EUID, geteuid()). (#828) - New Efuns: + json_parse() parses strings encoding a JSON object into an appropriate LPC value. (optional efun) + json_serialize() converts a LPC value into an JSON object and serializes it as LPC string. (optional efun) + configure_object() sets options for given objects. (#596) + interactive_info() and driver_info() return information about interactive objects resp. the driver and the LPC runtime. (#596) + dump_driver_info() dumps information to a file. (#596) + objects() returns an excerpt from the object list. (#596) - Portability + Removed built-in PCRE package, because it was awfully out of date. Since libpcre is installed on nearly every halfway POSIX compatible system, we just link against the system libpcre. If there is none available, no PCREs are available in the driver (#658). + Removed a bunch of checks and own fall-back implementations for functions required by C89/90/99 or POSIX.1. We just require them. + The data from the bytecode is not written/read byte per byte and combined by shifting and masking anymore, but by reading the specific type directly. This should not have endianness issues, as long as compiled bytecode is not transferred to a different machine. But Alignment issues may arise on some system. + The bytecode uses fixed-size integer types from C99. + Entities in the bytecode are getting their semantic types (like bc_offset_t). + Take more care of issues with different width of integers in the bytecode (e.g. long was regarded as 32 bit until now). + Improved detection of working sbrk/brk() and malloc replaceability. Enabled the possibility to replace malloc while using mmap() independently of the old SBRK_OK. (#680) - Runtime + re-worked and consolidated hash functions and hash types. (#564) + re-worked string hashing to use dedicated hash types and MurmurHash2. This is about 5 times faster than our old hashing algorithm and supports hashes with more than 16 bit width. This supports larger hash tables than 65535. + The ptmalloc memory allocator was removed. (#552) + The interpreter checks for the correct types of function arguments upon function calls, if runtime type checks are enabled for the program defining the function (and save_types is used as well). (experimental feature) + The intrepreter checks for the correct type of return values when returning from a lfun or sefun, if runtime type checks are enabled for the program defining the function (and save_types is used as well). (experimental feature) + When the driver receives SIGTERM, SIGINT, SIGHUP, SIGUSR1 or SIGUSR2 it calls handle_external_signal() in the mudlib master. If the master does not handle the signal, the driver defaults back to the standard behaviour. + Heartbeats were called only when players are logged on. They are now called regardless of logged-on players. However, the mudlib can activate/deactivate the calls to heartbeats globally by using configure_driver(). (#731) + Improved the determination of the drivers current_time which fixes issues with wrongly timed heart_beats or apparantly wrong timings. (e.g. #743) + A profiling feature for detecting long executions was introduced. It can be configured with configure_driver(). + Redefined structs (by re-compiling its program) are now always considered compatible. (#838) - Language + Added a sefun:: specifier to explicitly call simul-efuns. (#669) + structs are always enabled. (#557) + 'new' inline closure are always enabled. (#557) + Added three new pragmas: 'rtt_checks', which will enable type checks at runtime. 'warn_rtt_checks', which will only give warnings on type checks. 'no_rtt_checks', which disables runtime type checks. + A base struct is recorded as base struct in a child struct even if the base struct has no members. (#695) + The behaviour of the pragmas combine_strings, verbose_errors and local_scopes are mandatory. These three pragmas plus their no_* variants are ignored. + The pragma warn_deprecated is no enabled by default. + A new modifier 'deprecated' can be used to mark lfuns, sefuns and global variable as deprecated. Using/Calling them will cause warnings. + 'float' variables on LP64 architectures (64 bit) now have the same precision as 'double' in C (the driver uses internally 'double' instead of the traditional self-built format). + Implemented union types. (#721) + Private prototypes are now invisible in the inheriting program. + Programs that are virtually inherited twice will always exist only once, updating an older program if necessary. (#233) + Visibility modifiers are not combinable anymore. (#771) + Added a new modifier: visible (which is the default visibility). + Many restrictions for lvalue refrences (&var, &(arr[i]), &(arr[i1..i2])) were lifted: - They are not limited to the original variable's scope. Therefore they can be returned from a function or passed to a call_out. - For this reason the error message "Can't trace reference assignments." doesn't exist anymore. - A range can be indexed again, so it can be used as an array replacement. - Multiple char references to the same string are allowed. Lvalue references are automatically dereferenced when they are not used as the left hand side of an expression without the '&' operator. Variables that contain an lvalue reference can be 'reseated', i.e. change their value without changing the lvalue they reference: &var = new_value_or_reference; - Networking + UDP datagrams with lengths up to 65507 (including UDP and IPv4 headers: 65535) bytes are supported. + TLS: Use 2048 bit wide DH parameters per default. (#845) + TLS: Disable weak ciphers/hashs (DES, 3DES, RC4, MD5) and protocolls (SSLv3). (#847) + TLS: DH parameters can be set with configure_driver(). (#846) + TLS: Allowed ciphers can be set with configure_driver(). (#849) - Other + The driver requires a C99 compatible build system. Some checks and work-arounds for non-C99 were removed. + A bunch of statistic counters (string handler, object table, swapper, network layer,...) were changed to a larger type to prevent them from overflowing. (#521, #608) + Renamed some command-line flags to match the LPC defines better (#704) --heart-interval -> --heart-beat-interval --sync-heart -> --synchronous-heart-beat --async-heart -> --asynchronous-heart-beat --no-heart -> --no-heart-beat + A new savefile format (version 2) was added to store the new 'double' floats losslessly. It additionally is simpler to write/restore and makes the savefiles more compact because only one representation of the float value is stored. + A further savefile format (version 3) was added to store lvalue references. + Added --tls-keydirectory command line option to specify a multiple TLS keys to choose from with configure_driver(DC_TLS_CERTIFICATE). + Added the pkg-python package to allow definition of efuns in Python. + The special driver actions ('status', 'malloc', dumpallobj' and 'opcdump') were removed. They can be implemented as normal actions. Example implementations are provided in /mudlib/deprecated/set_is_wizard.c (#596). 30-May-2009 (LDMud Team) -- 3.3.719 - Fixed Crashes: + gmtime(), localtime(), ctime() and strftime() could crash the driver on platforms where time_t is 64 bits long and users supply huge values as time stamp (>2^55) due to unchecked results from libc functions (Bug #587). + Fixed a bug in esbrk() during memory allocation, where SINT (sizeof(word_t)) was not taken into account in the calculation of a block size, leading to crashes afterwards. (#611) - New Efuns: + configure_interactive(): To set options for interactives. + configure_driver(): To set settings/options for the driver itself. - Changed Efuns: + idna_stringprep(): fixed the evaluation of the arguments and removed a memory leak (#498). + map(): it's now possible to specify a mapping column when mapping through mappings (#367) + tls_check_certificate(), tls_refresh_certs(): Now available if GnuTLS is supported. + hash() and hmac() is now always available und is able to use OpenSSL, libgcrypt or internal MD5 and SHA1 routines (builtin routines for hash() only). hash() costs 10 ticks per iteration. + md5() and sha1() are obsoleted by hash(). + lambda() now supports bound and unbound lambdas as the first element in an array of a lambda expression. + xml_generate(), xml_parse(): Also available using libxml2. + cat(): marked as deprecated (#637) - Runtime + The --max-malloced memory limit was renamed to --hard-malloc-limit. + Introduced new --soft-malloc-limit in addition to the hard one. + When exceeding the soft memory limit, the function low_memory() is called in the mudlib master with details about the kind of low memory situation. This check is done during the backend cycle and not at 'real-time'. + Made the maximum length of commands configurable at compile-time (MAX_COMMAND_LENGTH, --max-command-length) + The driver hook H_MSG_DISCARDED can be used to specify the messages given to players when their messages were discarded. + The soft and hard memory limits can now be configured at runtime (configure_driver()). - Language + Added a permanent define __MAX_COMMAND_LENGTH__ for the maximum length of command. + Added a permanent define __GCRYPT__ when libgcrypt support is available. - Portability + Savefiles are written in binary mode, if the host system supports any such notion (O_BINARY exists). Additionally, they are read as binary as well, if it is supported. (Note: POSIX conforming systems do not distinguish between 'text' and 'binary' modes, this is only relevant to Cygwin.) + Fixed a major bug on 64 bit platforms, where floats with negative exponents were saved incorrectly leading to data corruption (#627). + Removed the whole hosts/ directory because it wasn't maintained for a long time and most of the systems were anyway dead for a long time (#625). This removed --enable-use-system-crypt as well (#624). + Removed checks and special code for OS2 and __EMX__. + Removed checks and special code for MSDOS. + Removed checks and special code for BeOS. + Removed checks and special code for AMIGA. + Removed checks and work-arounds for very old gcc compilers (2.x, <3.2). + Removed checks and special code for SunOS4 + Removed checks and special code for Ultrix. + Removed MSDOS filesystem semantics (Checks for MSDOS_FS and special behaviour (e.g. \\ as path separator). + Support for using mmap() to get memory from the system (slaballoc), because brk()/sbrk() are more or less deprecated and not supported by some systems (e.g. Darwin/MacOS). (#640) + Support for using mmap() to get memory from the system (smalloc). (#640) - Other + Generalized the write buffer for non-threaded use and renamed the configuration option '--with-pthreads-write-max-size' to '--with-write-buffer-max-size'. + Removed background threads that sent the data to the network and with it the '--enable-use-pthreads' configuration option. + The commandline options '--access-file' and '--access-log' specify the access permissions and log file, activating or deactivating access control and log. The old configure options '--enable-access-control', '--with-access-file', '--with-access-log' and their config.h symbols ACCESS_FILE and ACCESS_LOG just give the default values. + The default path of TLS certificates are now configurable during compile time (--with-tls-keyfile, --with-tls-certfile, --with-tls-trustfile, --with-tls-trustdirectory, --with-tls-crlfile, --with-tls-crldirectory), these TLS features can also be deactivated by giving "no" during compile time or "none" as a runtime parameter. + Ed sessions are removed when an object becomes non-interactive. + Multiple ed sessions per interactive are allowed. + Check the compiler for support of -fwrapv and enable if supported. Enables a fully defined overflow/wrap behaviour of signed integers (#635)). 12-Jan-2009 -- 3.3.718 - New Efuns: + mktime(): convert a date/time information as returned by local_time() to a unix timestamp (integer value). + strftime(): convert a timestamp to a formatted string using a format string with a variety of format specifiers. + xml_generate(), xml_parse(): Optional XML support. - Changed Efuns: + present_clone(): the efuns now optionally searches for the <n>th object in <env> instead of the first one. + debug_info(): can be used to query the current stack control depth with DIT_CURRENT_DEPTH (LPC recursion depth). - Runtime: + random(): Uses now a new random number generator (SFMT) see below. + sprintf(): Can now print values larger than 2^32-1 if the driver is compiled on 64 bit platforms. - Fixed Crashes: + filter(), save_object(), restore_object(), send_erq(), send_udp(), db_conv_string(), regexplode(), regexp(), process_string(), present_clone(), load_object(), rename_object(), replace_program() could crash the driver due to stack overflows, when large string were used as arguments. - Language + Disallowed case labels in inner blocks of switch statements and variable declarations that cross case labels. - Other + Exchanged the Mersenne Twister (pseudo random number generator) by the SIMD-oriented Fast Mersenne Twister (SFMT) to support random numbers up to 2^63-1 on 64 bit platforms. http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/ Additionally, the period length can be configured now at compile-time. The SFMT faciliates a better equidistribution and a faster recovery from a 0-excess state as well. (Bug #527) http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/ + Added the possibility to seed the PRNG from arbitrary files or devices by using the commandline option --randomdevice. The default device is /dev/urandom. If that is not readable, the driver falls back to seed the PRNG with the system time (Bug #515). + The driver dumps a core now even if the master object is not loaded. + New configuration option '--enable-eval-cost-trace' to show the evaluation costs in the stacktrace. 10-Aug-2008 (Lars Duening) -- 3.3.717 - Changed Efuns: + md5(): The efuns costs 10 eval ticks per iteration (Bug #485). + sha1(): The efuns costs 10 eval ticks per iteration (Bug #485). + strrstr(): A starting position of the input string's length led to the target string never being found (Bug #509). - Compiler: + After two consecutive inline closures within the same function, the line number information was incorrect (Bug #510). + Corrected an off-by-one linenumber error related to auto-include strings (Bug #508) - Other: + Improved the removal of actions added by shadows (Bug #514). 14-Oct-2007 (Lars Duening) -- 3.3.716 - Changed Efuns: + load_object(): The object name must not be empty (Bug #500). - Fixed Crashers: + Size-changing mapping operations didn't fully check for destructed objects as keys, sometimes derefencing invalid pointers in the process (Bug #517). + Removed a crasher when running with --check-refcounts: References by snooping non-interactives weren't counted (Bug #492). + Loading an object with an empty name twice could crash the driver (Bug #500). + clone_object(): When initializing a clone's variables using #pragma share_variables, really use the variables from the blueprint object being given. This allows the handling of inherited blueprint objects with replaced programs. (Bug #483) + An argument mismatch error during a lfun-closure call could crash the driver. (Bug #495). + The definition 'struct abc abc;' could crash the driver. (Bug #494) + The use of local undefined structs as 'struct abc abc = (<abc>)' could crash the driver. (Bug #493) - Compiler: + The lfuns backing the inline closures are again 'private nomask'. - Runtime: + foreach(int i: <num>) recognizes if <num> is negative and throws an error. (Bug #503) + The handling of charmode with combine-charset could lead to premature socket closing if present with longer data than the input buffer could at one time. (Bug #442) + The Apply-Cache statistics counters should overflow less often (Bug #520). + If a simul_efun object appears before being 'blessed', that object is rejected to avoid variable/function inconsistency bugs. (Bug #489). - Other: + The autoconfiguration of YACC was incompatible with gentoo Linux. + Removed a few (partly fatal) 64-bit issues (Bug #490, #491). + Removed a memory leak when catching errors inside master::runtime_error() (Bug #513). 30-Sep-2007 (Lars Duening) -- 3.3.715 - New Efuns: + tls_refresh_certs(): Reload the certificates and certificate revocation information. - Other: + New commandline options to handle certification revocations: --tls-crlfile <pathname> Use <pathname> as the filename holding your certificate revocation lists. If relative, <pathname> is interpreted relative to <mudlib>. --tls-crldirectory <pathname> Use <pathname> as the directory where your certificate revocation lists reside. If relative, <pathname> is interpreted relative to <mudlib>. 09-Jul-2006 (Lars Duening) -- Release 3.3.714 - New Efuns: + hash(): Available if OpenSSL is supported, this efun calculates hashes for various methods. + hmac(): Available if OpenSSL is supported, this efun calculates HMACs for various methods. - Changed Efuns: + save_value(), restore_value(), save_object(), restore_object(): lfun closures are now saved with their inheritance path to allow proper restoration under complex circumstances. + tls_check_certificate(): GEN_DNS, GEN_EMAIL and GEN_URI certificates are supported. - Language: + <array> & <mapping> implements the intersection of the array with the indices of mapping. - Fixed Crashers: + Lfun closures now keep proper track of which program they belong to. + Apply cache entries for non-existing functions could lead to memory corruption as result of garbage collection. - Compiler: + If a non-virtual baseclass was inherited multiple times with a virtual class inside the inheritance tree, its members were merged even though they shouldn't. + The type tracking was improved so that variable initializations like 'int i = to_int( ({float})0 );' compile correctly. + New macros __OPENSSL__ and __GNUTLS__ offer insight as to which TLS package is being used. - Other: 12-Mar-2006 (Lars Duening) -- Release 3.3.713 - New Efuns: + sl_close(), sl_open(), sl_exec(), sl_insert_id(): Optional SQLite support. + idna_stringprep(), idna_to_ascii(), idna_to_unicode(): Optional International Domain Name support. - Changed Efuns: + function_exists(): The 'FEXISTS_ALL' result also contains information about the function's type, flags, and number of arguments. + present(): Modified the <n> search behaviour so that the numbering is applied over both inventory and environment together. Before, the numbering was individual in each space, leading to situations where low-numbered objects in the environment were hidden by those in the inventory. + sscanf(): The new modifier '+' requires the matching of the characters after a field in order to consider the field as matched. + tls_check_certificate(): Returns more informative results. - Master Object: + disconnect(): The remaining input data is passed as the second argument. - Language: + Inherited private functions are now more invisible and can cleanly be hidden by publich functions. + Simul-efuns can only be called when they are public. This is to enable the construction of simul-efun objects via inheritance: this way they can use protected functions internally without having to make them available to everybody. + Preprocessor macro __SQLITE__ is defined if SQLite support is available. - Runtime: + The tracedepth was calculated incorrectly for efun closures and callbacks. + Removing an interactive as part of a fatal comm error clobbered the current object. + Removed the stipulation that CATCH_RESERVED_COST must be twice as much as MASTER_RESERVED_COST, since the master reserve is used automatically anyway. + Missing returns are logged at runtime only once per function and occurance. + If the master:;connect() initiates a secure connection which gets stuck in the handshake, neither logon() is called nor is the prompt printed. Also, if the tls_init_connection() didn't set a callback, the driver will provide a callback to logon(). This way logon() won't be called unless the connection is up and running. - Other: + The makefile is able to install the driver's LPC header files as well. 24-Nov-2005 (Lars Duening) -- Release 3.3.712 - Changed efuns: + Removed obsolete and deprecated efuns: add_verb(), add_xverb(), allocate_mapping(), copy_mapping(), efun308(), extract(), file_name(), filter_array(), filter_mapping(), m_sizeof(), map_array(), map_mapping(), mapping_contains(), member_array(), set_auto_include_string(), slice_array(). + catch(): If there is not enough time left (less than __CATCH_EVAL_COST__), this is thrown as an error from inside the catch instead of causing the catch to return 0. + catch(): Modifier 'reserve <expr>' can be used to specify a computing reserve different from __CATCH_EVAL_COST__. + copy(), deep_copy(), get_type_info(), to_array(), to_string(): Added struct support. + add_action(): Historical usage with just one argument no longer supported. + assoc(), insert_alist(), order_alist(), intersect_alist(): Optional as package 'alists'. + call_out(): The minimum delay can now be 0, meaning: as soon as possible. + debug_info(): Option DINFO_DUMP:"memory" to dump a list of all allocated memory blocks (currently supported just by smalloc). + debug_info(): Added more data to the option DINFO_DATA:DID_MEMORY result. + debug_info(): DINFO_DATA:DID_ST_PACKETS_IN and DID_ST_PACKET_SIZE_IN are the statistics for the incoming network traffic. + deep_inventory(): The result can be restricted to a certain depth. + filter(): The efun can now filter strings as well. + function_exists(): now also returns the filename and linenumber of a function. + garbage_collection(): An optional flag argument allows to change the name of the default GC log file. + get_type_info(): The name of the defining program of a lfun or context closure, or the function name itself can be returned. + map(): The efun can now map strings as well. + make_shared_string(): Deprecated. + member(), rmember(): The start position for the search can be specified. + mkmapping(): Convert structs to mappings, too. + pg_*(): Postgres efuns trigger a privilege violation ("pgsql", "<efun name>"). + process_string(): Spaces are now allowed in function arguments and no longer terminate the function specification. + regexp(), regexplode(): Optionally take RE interpretation options. + regexplode(): New flag RE_OMIT_DELIM allows to omit the matched delimiters from the result. + send_erq(): ERQ callback closures can now accept the data as a string instead of an array. + sprintf(), printf(): Formats %O and %Q print floats always with a decimal point. + say(), tell_room(), tell_object(): The efuns can now take a mapping, an object or a struct instead of an array to use with the catch_msg() mechanism. + transfer(): Available (in compat mode) only when USE_DEPRECATED is in effect. + unique_array(): The separator function can now be a closure, and can also be given extra arguments. + wizlist_info(): Added the number of mappings to the result. + write_file(): Allowed to remove the file before writing. - Corrected efuns: + restore_object(): An exception during the restore no longer has the danger of leaking values and memory. + unique_array(): An exception during the process no longer has the danger of leaking values and memory. - New efuns: + baseof(): Test the relation between two structs. + call_direct(), call_direct_resolved(): To perform calls which are not resolved by a default method. + convert_charset(): Convert a string between character sets. + match_command(): Find all matching actions for a command. + md5_crypt(): Compute an Apache-compatible password encryption using the MD5 message digest algorithm. + pg_connect(), pg_query(), pg_pending(), pg_conv_string(), pg_close(): Optional: PostgreSQL support. + regmatch(): To match a string against a regexp and optionally retrieve the match results for subexpressions. + regexp_package(): Returns the currently selected default regexp package. + reverse(): Reverse the content of an integer, a string or an array. + sha1(): Compute the SHA1 message digest. + struct_info(): Return information about a struct. + structp(): Predicate efun to detect structs. + to_struct(): Convert an array into a struct. - Master Object: + Function runtime_warning() is called for runtime warnings. + privilege_violation(): For "set_limits" and "limited" the resulting limits are passed as argument. + During the compilation of the master object, simul-efuns are disabled (so they won't be used by accident). - Fixed Crashers: + The driver crashed when a private lfun shadowing a public sefun was virtually inherited twice in parallel. + When walking over a mapping of width 1, deletions from the mapping from within the walk_mapping callback could cause walk_mapping() to pass invalid pointers to the callback on later iterations. - Language: + Strings can hold all characters, including '\0'. + New operator '...' to flatten array arguments in function call argument lists. + foreach() can loop over references, allowing the loop to change the base data. + foreach() can loop over an integer expression, implementing a counted loop. + 'nosave' is now an official feature. + New indexing method '[>]' to index either from the beginning or the end, depending on the sign of the index value. + New pragma 'range_check' allows to check array range indexing at runtime. + If a value of the wrong type is passed to switch(), the driver no longer throws a runtime error, but instead jumpgs to the default case. + Operators '|' and '|=' can compute the union of two arrays. + Operators '^' and '^=' can compute the symmetric difference of two arrays. + Closure operators #'| and #'^ can take more than two arguments. + Support for structs; preprocessor symbol __LPC_STRUCTS__ is defined. + Preprocessor symbol __PCRE__ is always defined. + Real inline closures; preprocessor symbol __LPC_INLINE_CLOSURES__ is defined. + New macro __BOOT_TIME__ expands to the time() the driver was started. + Blueprint variables are now always initialized using __INIT(). Clone variables are usually initialized the same way, however with the pragmas 'share_variables' and 'init_variables' the programmer can instruct the driver on a pre-program basis to initialize the variables of clone from the current values of the corresponding variables in the blueprint. + If the function definitions in two inherits differ in their visibility, the compiler emits a warning. + Bugfix: The type recognition of the variables for a foreach() no longer gets confused by visibility flags. - Runtime: + Revamped the string handling to use refcounted strings everywhere. + If input is requested in CHARMODE, the NL characters are passed verbatim to the caller (old drivers passed an empty string instead). + The driver hook H_DEFAULT_METHOD can be used to resolve call_other()/call_resolved()s to non-existing functions. + The driver hook H_DEFAULT_PROMPT can be used to specify a default prompt different from "> ". + The driver hook H_PRINT_PROMPT can be used to do special magic when printing the prompt. + The driver regularly checks the variables of all objects for references to destructed objects and removes them; it is therefore no longer necessary to "clean" mappings by hand. + The driver can now warn about missing return statements for value returning functions (this applies only for functions with a specified return type). If possible the driver tries to detect this situation at compile time, but also inserts a special 'return' bytecode to catch certain pathological cases at runtime. The check can be controlled the pragma '(no_)warn_missing_return'. + New runtime 'limit' LIMIT_COST to control how much a limited execution should cost. + Both the traditional and PCRE regular expressions can be used at runtime, with the selection being made by extra option flags. + The basic timing granularity and the heartbeat interval time can be configured at compile time and with the commandline options "--alarm-time" and "--heart-interval". The values are available in LPC with the macros __ALARM_TIME__ and __HEART_BEAT_INTERVAL__. + Heartbeats can be executed synchronously (all at the same time as far as granularity allows, regardless of when inside one hb interval they have executed last). The commandline options are "--sync-heart" and "--async-heart"; if enabled, the macro __SYNCHRONOUS_HEART_BEAT__ is defined. - Other Changes: + The input escape character can be configured at compile time to something different from '!'. + The MAX_MAPPING configuration parameter now determines the total number of elements (keys + values) a mapping can hold, not just the maximum number of keys. + The driver can be configured to use either the traditional regular expression code, or the PCRE package (default). + The threadsafe ptmalloc is now available as allocator choice ( though it doesn't support GC yet). + New commandline options '--share-variables' and '--init-variables' to define the default for clone variable initialization. + New configuration option '--enable-malloc-sbrk' to selectively allow the memory allocator to use sbrk() instead of malloc() where available (default is to allow sbrk()). + New commandline options '--tls-key' and '--tls-cert' to define the x509 key- and certfile for the TLS package. + New commandline option '--max-mapping-keys' to determine separately the maxinum number of entries in a mapping. 27-Nov-2005 (Lars Duening) -- Release 3.2.12 - Changed efuns: + md5(): Accept number arrays as arguments as well. + md5(): Accept the number of iterations as optional argument. + function_exists(): The 'FEXISTS_ALL' result also contains information about the function's type, flags, and number of arguments. + tls_check_certificate(): Return the low-level API results, and throw an error if the connection is not secure. + sscanf(): Added test whether the constant characters after a %-field also match - if not, the %-field is considered unmatched. - Corrected efuns: + call_out(), input_to(): Local references are no longer accepted as extra arguments. + restore_value(): Restoring one-character operator closures in arrays works again. + set_environment(): Clear the RESET_STATE flag of of the moved object's original environment, if any. + to_int(): No longer accepts "x<num>" as valid sedecimal notation. - Master Object: + runtime_error(), heart_beat_error(): A new argument 'caught' signals if the error is caught or not. - Fixed Crashers: + Freeing a deeply nested value structure no longer overflows the local stack. + An error during the fatal() processing will be treated as a double-fatal. - Language: + foreach(): When looping over a mapping with no values, or with only the index being extracted, the loop actually loops over the mapping and not just the indices copied into an array. 13-Feb-2005 (Lars Duening) -- Release 3.2.11 - Changed efuns: + db_*(): mySQL efuns trigger a privilege violation ("mysql", "<efun name>"). + get_dir(): New flags GETDIR_ACCESS and GETDIR_MODES to return the file access times and file modes. + input_to(): New flag INPUT_NO_TELNET to modify the INPUT_CHARMODE behaviour. + input_to(): New flag INPUT_APPEND to queue input_to()s. + tell_object(): The efun can now take an array as second argument, and then calls catch_msg() in the target. + present(): The argument form (str, n) allows for ids with embedded numbers. + shutdown(): Added an argument to set the process exit code. + to_int(): The base prefixes '0x', '0o' and '0b' are supported. - Corrected efuns: + deep_copy(): Deep-copying mappings with shared arrays as keys could corrupt memory. + net_connect(): On multi-homed machines, the created socket is bound to the hostname given at program start. + save_object(): Matching the documentation, the efun really removes a trailing '.c' from the filename. + save_{value, object}(), restore_{value, object}(): Some operator closures could not be saved and restored. - New efuns: + tls_query_connection_state(), tls_query_connection_info(), tls_init_connection(), tls_deinit_connection(), tls_error(), tls_available(), tls_check_certificate(): Optional: Support for TLS connections. - Fixed Crashers: + A shadow executing remove_action(1, shadowee). + A too-large allocation (like in " "*MAX_INT) no longer crashes the mud unless done in SYSTEM allocation mode. + Allocating an array enough elements to exceed the internal numeric limits. + Warnings printed during the generation of a closure crashed the driver. + The traceback generation was limited by the array limits, and thus could throw an error again. + to_array('symbol) caused a crash. + An error in save_{object, value}() followed by a GC left behind an invalid pointer. + Error while loading an object with a too-long filename. + Restoring non-existing (simul-)efun closures created illegal closure values. + Specifying a fieldsize or precision beyond the numerical limits in sprintf()/printf(). + Indexing a 0-width mapping yielded invalid values. - Language: + The macros __FLOAT_MIN__ and __FLOAT_MAX__ gave a too-small range. + New pragma (no_)warn_function_inconsistent to control the handling of function redefinitions which differ in return or argument types. + Implemented closures explicitly referencing inherited functions ("#'super::fun"). - Runtime: + Closures now work correctly when used as mapping keys. + The tracedepth wasn't calculated correctly. + A 'Command too long' error now also prints the beginning of the offending command as debugging aid. + Corrected a number of memory leaks in runtime errors. + Corrected a memory leak in MCCP. + An error during a call-out causes all pending call-outs for the same user in the same cycle to be re-scheduled to the next cycle. + If an ERQ callback accepts an array, the numbers in the array are all positive in the range 0..255. + Float variables without an initializer are now properly initialized to float-0 instead of number-0. + Calls from destructed objects to other objects (including simul-efun calls) elicit a warning. + The garbage collection now zeroes out closures found to be bound to destructed objects. The old behaviour was to change them into 'undef' closures. 13-Apr-2004 (Lars Duening) -- Release 3.2.10 - Changed efuns: + debug_info(): Removed the DID_MEM_UNUSED value from the DINFO_DATA: DID_MEMORY result. + debug_info(): Added the DID_ST_MB_ values to the DINFO_DATA: DID_STATUS result. + debug_info(): The DINFO_DATA:"objects" dump also lists the object creation times. + debug_info(): Added DID_ST_BOOT_TIME to the DINFO_DATA:DID_STATUS result. + debug_info(): Added a third argument to DINFO_OBJLIST to return multiple objects. + function_exists(): now also returns the filename and linenumber of a function. + remove_action(): It is now possible to remove all actions an object defines. + save_object(), save_value(): The format of the saved data can be specified with an function argument. + set_connection_charset(), set_combine_charset(): Passing 0 as argument re-establishes the default charset. + sprintf(), printf(): Modifier '#' for '%O'/'%Q' prints the values in a compact format. + sprintf(), printf(): Format specifier '%b' prints a number in binary notation. + wizlist_info(): The evalcost statistic is now split into 'ticks' and 'gigaticks', and a second non-decaying evalcost statistic has been added. - Corrected efuns: + find_call_out(): No longer throws an error when passed an unbound lambda to look for. + m_add(): Fixed a memory leak when existing entries were overwritten. + remove_input_to(): The proper noecho state is restored after removing a pending input handler. + restore_object(): The function leaked memory when restoring from a MALLOCed string. + to_array(): When converting a string, the characters are treated as unsigned. - New efuns: + enable_telnet(): Enable or disable telnet for an interactive object. + master(): Return the current master object. + m_entry(): Return all values for mapping entry at once. + start_mccp_compress(), end_mccp_compress(), query_mccp(), query_mccp_stats(): Optional: MCCP support. + net_connect(): Open a TCP connection. + rmember(): Search arrays and strings from the end. + get_combine_charset(), get_connection_charset(): Query the combine resp. connection charset. + get_max_commands(): Query the allowed command rate of an interactive object. + set_max_commands(): Set the allowed command rate of an interactive object. + strrstr(): Search a string within a string backwards. + variable_exists(): Check the existance of a named variable. + variable_list(): Return all variable names of an object. - Master Object: - Fixed Crashers: + Using 'break' or 'continue' in large programs caused bytecode corruption. + Function calls by address and global variable accesses are no longer possible after set_this_object(). + Overflowing the value stack during a secure_apply() could crash the driver in the error recovery. + walk_mapping(): If the callback object was destructed before the first call, the efun crashed in the error handling. + Swapping of volatile strings could crash the driver. + H_COMMAND specifying an lfun by name which doesn't exist in the interactive object. + Using function_exists() or variable_exists() on a destructed object. + Editor: 'Z' given at the end of a file followed by two 'd' corrupted the internal text storage, which sometimes caused crashes. - Language: + catch(; nolog) is now an official feature. + New modifier catch(; publish). + Constrained the switch() grammar so that only blocks are suitable as bodies. + Operator '&' can intersect mappings with other mappings and arrays. + Macro __MAX_MALLOC__ is defined to the internal upper limit for total memory usage. + Macro __MSDOS_FS__ is defined on systems using the MS-DOS filesystem conventions. + Preprocessor symbol __FILENAME_SPACES__ is defined if the driver is instructed to allow spaces in filenames. + A cast of a value to its own type, or a cast not resulting in a conversion operation generates a warning. The pragma no_warn_empty_casts can turn this warning off. + The strong_types/strict_types pragmas now persist beyond the end of an include file (as does every other pragma). + call_other()s on arrays of objects is now configurable; if enabled, the macro __LPC_ARRAY_CALLS__ is defined. + Bugfix: Characters with the 8th bit set are now treated as positive when entered as literal character constants. + Bugfix: Illegal case ranges like '100..50' now generate an error message. - Runtime: + Mapping are now compacted (apart from a GC) only, if a certain amount of time has elapsed since the last addition/removal of a key, and if either more than half of the condensed entries have been deleted, or if the number of hashed entries exceeds the number of (non-deleted) condensed entries. + A heart-beat error now longer aborts the heartbeat cycle. + The operators -=, *= and /= can now operate on <int> x <float>, yielding a <float> result. + <mapping> &= <mapping>, <mapping> &= <vector> implemented. + Allowed longer program names in backtraces. + If the H_RESET/H_CREATE_* hooks are defined by name, static functions are found as well. + Bugfix: Subtracting arrays of closures from each other now actually identifies identical closures. + Bugfix: The smalloc allocator now re-uses free 'large' memory for small block chunks instead of always allocating them from the system. - Other Changes: + Editor: Consecutive 'z' or 'Z' commands no longer repeat the previous current line. + Editor: Faulty commands 'quit'/'Quit' are caught before the text buffer is cleared. + Configuration option '--enable-malloc-sbrk-trace' to enable a log of all system memory requests including the stats of the memory allocation request causing it. The intention is to help debugging muds with high system memory usage. + Configuration option '--with-optimize' to set the optimization level in the generated Makefiles. + New commandline option '--filename-spaces'/'--no-filename-spaces' to allow or disallow space characters in filenames (default is to disallow them). 02-Feb-2003 (Lars Duening) -- Release 3.2.9 - Changed efuns: + add_action(): New flag AA_IMM_ARGS implements the sane NOSPACE handling. + allocate(): Accepts an optional initialisation value and can create multi-dimensional arrays. + ceil(), floor(): Also accept integer argument values. + clones(): If the driver is compiled with DYNAMIC_COSTS, the cost is proportional to the number of objects in the game. + ctime(): Accepts the output of new efun utime() as well. + debug_info(): New argument DINFO_TRACE to return the current or the last error call stack. Argument (DINFO_DATA, DID_MEMORY) also returns the number and size of permanent and clib allocations, the amount of memory allocated and available, and the amount of memory unused (where applicable). Argument (DINFO_DATA, DID_STATUS) also returns the number of destructed objects and the total number of heartbeat calls. Single values of (DINFO_DATA) can be returned instead of the whole array. Argument (DINFO_DUMP, "destructed") creates a dump of all destructed objects, by default in <mudlib>/DEST_OBJ_DUMP. + debug_message(): New second argument determines where to log the message, and if to prepend a timestamp. + deep_copy(): If DYNAMIC_COST is active, the evaluation cost depends on size and nesting depth of copied arrays, structs and mappings. + exec(): If this_interactive() points to one of the involved objects, it is switched over as well, like this_player(). + filter(), map(), sort_array(), walk_mapping(): Protected lvalues (e.g. &(i[0])) are not allowed as callback parameters. + garbage_collection(): An optional filename argument specifies the filename for the next and only the next GC. + get_dir(): New flag GETDIR_PATH to return the full pathnames. + get_type_info(): now returns the bound object for efun, simul-efun and operator closures as well. + inherit_list(): the inherited objects can be returned in a tree reflecting the inheritance structure. Virtual inherits can be returned tagged as such. + input_to(): New option INPUT_PROMPT to specify a prompt for this input_to. + lambda(): Simul efuns with extended varargs weren't compiled correctly. + load_name(), object_name(), program_name(): 0 is now accepted as argument, the efuns returns 0 in that case. + object_info(): OINFO_MEMORY also returns the program flags NO_INHERIT, NO_SHADOW and NO_CLONE, and gives a better account of the memory used for strings and variables. Single values can be returned instead of the whole array. + printf(), sprintf(): A leading zero in the field size will now print only leading zeros and not interfere with the pad string option. + printf(), sprintf(): If an explicit pad string is defined, even if it is space, the efuns won't remove white space before a line end. + printf(), sprintf(): Printing numbers with leading zeroes and a sign character printed the sign in the wrong place. + printf(), sprintf(): When printing closures with %O, the program name for inherited lfun closures is printed as well. + printf(), sprintf(): New format specifier 'Q' act like 'O', but quotes special characters in strings. + printf(), sprintf(): New format modifier '$' implements flush formatting for strings and columns of strings. + printf(), sprintf(): In justified column formatting, when a word is too long to fit on a line by itself and there are at least two characters space left on the current line, the long word is begun immediately. Previously, such long words were always printed on a line of their own. + query_udp_port(), send_udp(): Renamed from query_imp_port() and send_imp(). + query_verb(): Added an optional flag argument to return the verb as given in the add_action() statement. + regexp functions: more compatible with 8-bit characters. + regexp functions: New metacharacters '+' allows to specifiy 'at least one match'. + regreplace(): Accepts a closure to produce the replacement string instead of just a constant string. + regreplace(): Pattern which could match on the empty string matched once too often at string end. + replace_program(): Argument can be omitted if only one inherit exists. + replace_program(): If the object alread has closures bound, the efun will issue a debug_message() and fail, instead of raising a full runtime error. + replace_program(): If the replacement program has virtually inherited variables, it must be the first inherited program. + restore_{object,value}(), save_{object,value}(): Non-lambda closures, symbols and quoted arrays can now be saved and restored. This required a new savefile format, though. + sin(), cos(), tan(), atan(), atan2(), log(), exp(), sqrt(), pow(): Integers are accepted as arguments, too. + sizeof(): Now also returns the length of strings. + terminal_colour(): Colour keys can now be mapped using a closure. The pattern "%%^^" is recognized as second notation for literal "%^" besides "%^%^". + terminal_colour(): In wrapped formatting, when a word is too long to fit on a line by itself and there are at least two characters space left on the current line, the long word is begun immediately. Previously, such long words were always printed on a line of their own. + add_verb(), add_xverb(), efun308(), file_name(), map_array(), filter_array(), filter_mapping(), map_mapping(), m_sizeof(), send_imp(), set_auto_include_string(): Available only if driver is compiled with support for deprecated efuns. - Corrected efuns: + and_bits(), or_bits(), xor_bits(): The bits 5, 11, 17,... were mishandled. + call_out(): In release 3.2.8 lvalues were not allowed as arguments - now they are again. + call_out_info(): Did not return the target object for closure call outs. + call_resolved(): Now accepts a destructed object as second parameter as it should. + copy_file(), rename(): Just return a non-0 value on errors, but don't throw a runtime error. + deep_copy(): Didn't handle quoted arrays properly. + filter(), map(): When used on multi-value mappings, the driver did not recognize when the called closure kept a reference to the array with the values, overwriting the values in the next iteration. + functionlist(): The filter flags didn't really work. + input_to(): The option IGNORE_BANG didn't work. In charmode, !-escapes after the first received data are now recognized. + map() and other efuns taking callbacks arguments: The pattern 'function, object, extra' was parsed such that 'object' became part of the 'extra' arguments. + notify_fail(): When used by an object which is not an undestructed command_giver, this efun no longer leaks memory. + object_info(): The returned OIB_NAME now starts with a '/' in plain mode. + printf(), sprintf(): The formatter "%^" will print "%^", for compatibility with terminal_colour(). + printf(), sprintf(): Column-formatting a string with one newline printed one newline too few if the formatstring didn't end immediately. + printf(), sprintf(): A format instruction '%#=s' is now rejected. + printf(), sprintf(): Max length of a result is now 128 KByte. + printf(), sprintf(): One-line columns ending with a newline now behave like multi-line columns and delay adding the newline until the end of the line and only if no other columns are pending. + printf(), sprintf(): The formatter %O/%Q stumbled over really large arrays and mappings (this was actually a potential crasher). + sscanf(): the format '%s%d' failed to parse 'ab1cd' correctly. + to_string(): Can handle operator closures now. + unquote(): Unquoting symbols no longer adds a quote level. - New efuns: + blueprint(): Return the blueprint object. + copy_bits(): To copy ranges of bitstrings. + db_affected_rows(), db_conv_string(), db_close(), db_connect(), db_exec(), db_fetch(), db_handles(), db_coldefs(), db_insert_id(), db_error(): Optional: mySQL support. + gmtime(), localtime(): Return the time broken up into its constituents. + find_input_to(): Find a pending input_to. + include_list(): Return the files included in a program file. + input_to_info(): Return information about all pending input_to's for a player. + m_add(): To add a new entry to a mapping and assign all values in one go. + md5(): Compute the MD5 message digest for a string. + min(), max(): To select the minimum resp. maximum among a bunch of numbers or strings. + remove_input_to(): Remove a pending input_to. + sgn(): Return the sign of a numeric argument. + unquote(): Remove a quote from a quoted array or symbol. + utime(): Return the current time in microsecond resolution. - Master Object: + receive_udp(): Renamed from receive_imp(). + privilege_violation(): Privilege "send_udp" replaced "send_imp". + valid_trace(): New second argument to receives the argument passed to the efun. + runtime_error(): Receives an extra argument to distinguish between normal runtime errors, and those occuring during a heartbeat. + include_file(), H_INCLUDE_DIRS: The pathnames can now start with leading slashes. + If a master is forced to reload via SIGUSR1, all inherited objects (if any) are reloaded as well. + notify_shutdown(): Is now called too when the driver crashes. In that case it is passed a string denoting the type of crash. + Bugfix: slow_shut_down() was not called with previous_object(), this_player() and this_interactive() being 0. + Bugfix: When reactivating a destructed master, the lfuns inaugurate_master() and reactivate_destructed_master() are found even when static. - Fixed Crashers: + Catching errors with catch() did not work reliably when the driver was compiled with gcc. + Unlucky combinations of heart_beat() definitions or declarations (e.g. private and public inheritance in this order) crashed the driver when the heart_beat() was called. + When creating long value save strings, the driver crashed on corrupted memory. + If the object for a prompt-closure is destructed, the driver could crash under extremely unlucky circumstances. + #define'ing the name of an inline closure was not detected. + Assignments of computed strings sometimes crashed the driver. + Pre-increment or -decrement on an undefined variable, where the result was used in a typechecked context. + Adding a mapping to itself with '+='. + The MAX_MALLOCED limit check was faulty, sometimes allowing the driver to clobber memory. + Tracing active when the control flow changes the current player to a non-interactive object. + Allowing adding an action between two objects with no environment. + "stack overflow" runtime errors freed svalues twice. + It was possible to instruct sprintf to format a string as both columns and as a table. sprintf() then formatted it as columns, but any error (like buffer overflow) would crash the driver. + Formatting sprintf("%#9999999999999@s", ({ "bla" }) * 2) clobbered its internal precision information on the first line, and thus crashed on the second. + Remove a couple crashers when handling numbers at the numerical limits. + Using set_this_object() before the simul-efun object was loaded. + Updating the simul-efun object could crash the driver when the update changed the signature of sefuns which had already been used by objects: executing the calls after the update could mess up the interpreter stack or cause it to execute garbage bytecode. + Too long error messages overwrote the stack. + When players were already destructed in notify_shutdown(), the following remove_player() was passed the destructed objects. + If call_other() was implemented by a sefun which required call_other() to be called itself, the compiler generated invalid bytecode. + If a method in a virtual inherit is rendered invisible, but also made available again through a parallel inherit of the same program, the compiler resolved the visible function to the wrong inheritance. + Calling a self-destructing closure from limited(). + Runtime errors in a catch occasionally crashed in the traceback collection. + LPC tracing with lambda closures or call_resolved(). - Language: + New operators '>>>' and '>>>=' for logical right shifts. + New operators '&&=' and '||=' for logical assignments. + New LPC define __LDMUD__ to identify this driver branch. + New LPC defines __VERSION_MAJOR__, __VERSION_MINOR__, __VERSION_MICRO__, __VERSION_PATCH__ expand to the various parts of the driver version. + New LPC define __WIZLIST__ specifies from where the driver read the initial wizlist information. + New LPC defines __INT_MAX__ and __INT_MIN__ give the integer number limits. + New LPC defines __FLOAT_MAX__ and __FLOAT_MIN__ give the float number limits. + Numbers can also be specified as binary patterns with the '0b' prefix, and as octals with the '0o' prefix. + Floating point numbers can now also be specified in the exponential notation, e.g. '3.14E-5'. + Character escape sequences can now specify the character code directly in decimal ('\[1-9]...'), octal ('\0o...'), sedecimal ('\x...' and '\0x...') and binary ('\0b...'). + The operators '++' and '--' can now be used on floats, too. + Closures bound to destructed objects are now treated uniformly like destructed objects and are replaced by 0s where required. + Lfun and variable closures can now be compared with '==' and '!=', and are treated correctly in alist and array operations. + Inline closures inherit the visibility of their defining function. + Experimental: Extended the construct catch() with the keyword 'nolog', which suppresses logging the caught error in the logfiles. It is meant for objects like wizard tools. + It is no longer possible to prematurely end an inline closure function by inserting a free '}'. + Global functions are no longer hidden by local variables. + It is now possible to cast to '(mixed)'. + If operands of different types are given to '?:', the result will have the type 'mixed'. + Integers and floats can now be compared against each other. + Identifier names can use the extended alpha characters from the ISO 8859-1 alphabet. + Experimental: The 'default' statement allows to set a default visibility for variables and functions. It is meant to make the re-engineering of existing code easier. + It is possible to specify multiple pragmas in one '#pragma' directive, separated by comma. + Additions, subtractions and multiplications now check for numeric overflows. + The wildcarded supercall "*":: no longer throws an error if none of the inherited objects defines the called function. + In a for() statement, variables may now be declared without initialisation (e.g. 'for (int i; ...)'). + Definitions of local variables can appear anywhere in a block. The variables are defined from the point of definition onward. + If pragma 'pedantic' is in effect, the compiler warns about calls to undefined functions even if typechecking is off. + The notation ([:<expr>]) can be used to create empty mappings of the given width. + Duplicate inherits of a program on the toplevel raise a warning, resp. an error if pragma 'pedantic' is in effect. + New preprocessor macros __CATCH_EVAL_COST__ and __MASTER_EVAL_COST__ for the corresponding evalcost limits. + New predefined macro __RESET_TIME__ and __CLEANUP_TIME__ to return the default reset and cleanup interval time. + If the driver uses the default debug.log file, its (mudlib) name is available in the predefined macro __DEBUG_LOG__. + Pragma warn_deprecated causes the compiler to print a warning when a deprecated efun is used. + Lfun closures can now explicit name inherited functions (#'base::create). + Bugfix: Adding mappings of different width throws an error, unless one of the mappings if empty. + Bugfix: Right shift by 32 or more bits was computed incorrectly. + Bugfix: The type tracking of multiplications can returns the right type when seeing 'mixed' operands. + Bugfix: All <op>= assignment can now operate on indexed strings on the left hand side. + Bugfix: Additions of floats to 0 yielded the wrong type. + Bugfix: For closely consecutive switch case ranges (e.g. 'case -2..-1: case 1..2:') the compiler generated faulty lookup tables. + Bugfix: Improved the typetracking for operator '&' when used with mixed variables. + Bugfix: A cast of an expression to its own type now longer inserts a conversion operation. + Bugfix: Global variables can no longer be redefined in the same scope. + Bugfix: It is now possible to use symbols in inline closures, ie. "(: 'a :)". + Bugfix: Escaped character constants are now only parsed up to a maximum length. If no valid digits are found, the whole item is simply treated as escaped character. + Bugfix: When defining a function of the same name as an inherited private function, the latter is no longer redefined. + Bugfix: Multi-dimensional mapping indices in macro calls are no longer confused with multiple macro arguments. + Bugfix: Prototypes could modify the definition of inherited functions in strange ways. + Bugfix: Termination of a macro definition with End-of-file in an include file confused the lexer. + Bugfix: Inherited private functions no longer hide (simul-)efuns. + Bugfix: Inheriting two private functions with the same name caused the compiler to cross-define the second to the first. Invisible to the user, this messed up any use by __INIT and other local calls. + Bugfix: The '::' operator did not recognize the separate namespaces of variables and functions: void foo(string id) { ::id(id); } lead to a syntax error. + Bugfix: Using auto-includes no longer generate wrong line numbers in error messages. + Bugfix: "*"::foo() checks just the directly inherited programs. - Runtime: + Attempts to set a single string character to 0 now raise a runtime error. + The internal alarm timing is monitored and restarted in case the alarm gets lost (happens often on Cygwin). + Normal runtime errors are no longer reported on the console. + New optional driver hook H_SEND_NOTIFY_FAIL to send a notify fail message to the proper receiver. + For the first 255 simul efuns, it is now permissible to catch reference parameters in a varargs parameter. However, the only permitted use is to pass them flat in a function call (using apply())! + The protocols MCP, MSP and MXP can now be negotiated through the H_TELNET_NEG hook. + New optional driver hook H_AUTO_INCLUDE to set a string or closure for auto-include information. + Errors while loading objects now include the inheritance chain. + 'Too long evaluation' errors during a compilation (caused by too many master calls) are considered compilation errors. + On systems with pthread support, the driver may be compiled to use background threads to send the data to the network, thus avoiding EWOULDBLOCK problems. + Signal USR2 forces the driver to reopen the host.debug.log file. + External master calls (like for ERQ messages) get the same eval-cost benefits during error handling as normal call-others. + Lfun closures left danging by a replace_program() are now converted into alien-lfun closures, so that the error handler has a chance to determine the originating object. + Bugfix: When logging on players, the initial prompt wasn't printed. + Bugfix: IPv6 name lookup works again, and also with both xerq and erq. + Bugfix: The driver now longer gets a confused when a client like TinyFugue refuses to use CHARMODE. + Bugfix: On mapping addition or element assignment, invalid keys (like destructed objects) were still counted against the allowed mapping size. + Bugfix: Most reference loops as created by for example 'b = 0 || &a; b = 0 || &a;' are detected. + Bugfix: When destructing an object, references through closures are removed from the local variables as well. + Bugfix: Removing or destructing a shadow now properly removes all associated actions. + Bugfix: The tracing checks weren't done against the current interactive as documented, but instead against the current commandgiver. + Bugfix: The automatic mapping compaction did not remove destructed objects and closures. + Bugfix: If H_INCLUDE_DIRS was set to an array of directory names, the names couldn't have leading '/'. + Bugfix: Before calling reset() or clean_up() from the backend, the previous_object is cleared. - Other Changes: + Renamed the driver executable to 'ldmud'. + New driver option '--pidfile <filename>' to write the pid of the driver process into a file. + New driver option '--erq <filename>' to choose a different name for the ERQ executable (default is 'erq'). The option can also be used to specify the full pathname of the executable. + The driver mode (plain or compat) can be selected with a commandline option ('--no-compat' resp. '--compat'). + New driver options '--min-malloced' and '--min-small-malloced' to specify the size of the initial block allocations. + New driver options '--wizlist-file <filename>' and '--no-wizlist-file' to control from where the driver reads the initial wizlist information. + New driver option '--args <filename>' reads the commandline arguments from a textfile. These argument files can be nested. + New driver option '--random-seed <num>' sets the seed value for the random number generator for debugging purposes. If not given, the driver chooses a seed value on its own. + New driver option '--hostname <name>' to specify the hostname, overriding the value returned by the system. + New driver option '--hostaddr <addr>' to specify the hosts address, overriding the value returned by the system. In particular this address will be used to open the driver ports under. + Removed a couple of fatal race-conditions in the xerq. + New configuration option 'trace-code' enables the bytecode tracing. + New configuration option 'use-deprecated' allows to disable obsolete and deprecated efuns. If enabled, the macro __DEPRECATED__ is defined. + New configuration options 'use-set-is-wizard', 'use-set-light' and 'use-process-string' to configure the corresponding optional efuns. + The UDP port is now a standard feature. The option has been renamed from 'catch_udp_port' to just 'udp_port'. + Swapping is now a standard feature, though it still can be disabled by specifying swapping times of 0. + The ERQ_EXECUTE command now recognizes quoted arguments. + The special command "malloc" is now under the control of the IS_WIZARD flag, too. + The erq/xerq commandline argument '--execdir <dir>' allows the to override the default ERQ_DIR specification for the directory with the callable executables. + Commandline option '--erq' can now be used to pass simple arguments to the erq. + New editor command 'T' to perform Tab <-> Whitespace conversion. + Builtin command 'dumpallobj' now also creates a dump of all destructed objects in the file <mudlib>/DEST_OBJ_DUMP. + Character conversions are now done with regards to the locale selected by the LANG environment variable. + The xerq now sends an ERQ_OK message when a queued write is finally completed. 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. + Bugfix: copy()ing or subtracting mappings did not remove destructed elements first. - 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. 19-Aug-1999 (Lars Duening) -- Release 3.2.7 - Changed efuns: + command(): + native-mode restriction to the current object is gone since there is no native mode anymore. + commands are now stacked, meaning that after a command finishes, the previous this_player(), verb, etc, are restored. + debug_info(): + debug_info(DINFO_STATUS): now returns the status information instead of printing it. debug_info(DINFO_STATUS, "malloc") returns the malloc information usually connected with the 'malloc' command. + debug_info(DINFO_DUMP): allows to dump object information and (if compiled) opcode usage information into a file. + destruct(): accepts an already destructed object as argument. + get_type_info(): returns for strings whether they are shared or not. + inherit_list(), debug_info(), object_info(): duplicate virtual inherits are no longer listed. + notify_fail(): calls to notify_fail() only affect the current command. Also, NPCs can see 'their' notify_fail messages. + object_info(): OINFO_BASIC result 'OIB_APPROVED' is gone. + replace_program(): no longer flags objects as 'clones', but instead uses the new flag 'O_REPLACED'. + set_light(): is optional (though by default active) + sprintf(), printf(): if an error occurs, the filename and line are included in all error messages, not just the one printed to stderr. + symbol_function(): can't make closures from protected lfuns of other objects anymore. + trace(), traceprefix() are validated with the master-lfun valid_trace(). - Corrected efuns: + caller_stack(): is now declared to return 'object *' as it indeed does. + query_mud_port(): now accepts 'int' arguments as documented. + restore_object(): protected against negative '([:<width>])' specifications. + (s)printf(): prints variable closures properly even if the variable vanished in a program replacement. + symbol_variable(): recognizes objects with pending program replacements. + terminal_colour(): when wrapping is active, keywords were replaced even when no '%^' was present. Not any more. + to_object(): returns 0 for closures bound to a destructed object. + to_string(): converts variable closures properly even if the variable vanished in a program replacement. + to_string(): in compat mode, object names are no longer prepended with a slash. + unmkmapping(): now handles key-only mappings as it should. - New efuns: + atan2(): alternative way to calculate the inverse tangens. + ceil(): rounds a float up to the nearest whole number. + floor(): rounds a float down to the nearest whole number. + pow(): raises a float to the power of another float. + and_bits(): binary-ands two bitstrings. + or_bits(): binary-ors two bitstrings. + xor_bits(): binary-xors two bitstrings. + invert_bits(): negates a bitstring. + next_bit(): finds the next set (cleared) bit in a bitstring. + last_bit(): returns the last set bit in a bitstring. + count_bits(): count the number of bits in a bitstring. + (preliminary) command_stack(): returns the current command stack. + command_stack_depth(): returns the depth of the command stack. + (preliminary) execute_command(): low-level access to the command parser. + query_command(): returns the full command seen by the parser. + query_notify_fail(): returns the current notify-fail setting. + object_time(): return the time an object was created. + (preliminary) present_clone(): find objects with a specific blueprint in a given environment. + trim(): trim a certain character from a string. + (preliminary) limited(): executes a closure with changed runtime limits + query_limits(): queries the current/default runtime limits + (preliminary) set_limits(): sets new default runtime limits. - Master Object: + valid_write(): New call_funs 'objdump' and 'opcdump', passed when attempting to dump the object and opcode information into a file. This applies to the special commands 'dumpallobj' and 'opcdump' as well as for the debug_info() uses. + query_player_level(): obsolete and gone. + valid_trace(): New lfun to validate uses of trace() and traceprefix() (query_player_level() did this before). - Fixed Crashers: + A heart_beat() removing all remaining objects on the hb list. + An error during a (s)efun bound to a swapped out object could crash the dump_trace. + An error during macro expansion crashed the driver if the error handling itself required macro expansion again. + to_string() on a lfun of a swapped program. + call_lambda() on not-inherited variable closures. + replace_program() on a program of which one variable is referenced by a symbol_variable(). + Swap in of a closure variable which was invalidated during a garbage collection. + Failure to swap in an object during a garbage collection. + Binding an unbound lambda to two objects and destructing the originating object freed the lambda. - Language: + '+=' now allows to add an int onto a float (before only floats were allowed). Similar for '-=', '*=' and '/='. + '*'/'*=' may multiply strings or arrays with positive numbers. The result is the string/array <number>times repeated. + Scope of variables defined in nested local blocks ends with the defining local block. The limit MAX_LOCAL applies only to the variables which are in scope at the same time. Variables in inner scopes can hide variables in outer scopes. Unchanged is that local variables are initialised to 0 when their scope is (re)entered. + The pragmas 'no_local_scopes' and 'local_scopes' turn the local scoping of variables off resp. back on. + in 'for(<init>, <init>, ..., <init>; ...)' each <init> can either be a normal expression, or a definition of a local variable with assignment, e.g. 'int i = <expr>'. The scope of such variables is the whole for() statement. + added inline closures as alternative to lfun closures: instead of int foo(int arg ) { return arg * 2; } map_array(arr, #'foo); you can write map_array(arr, (: return $1 * 2; :) ); or just map_array(arr, (: $1 * 2 :) ); The syntax is modelled after MudOS functionals. + Support for alien-lfun closures was incomplete. + New pragma 'no_clone': disallows clones of a program. + New pragma 'no_inherit': disallows inheriting a program. + Bugfix: Variables in closures may start with '_'. + Bugfix: *::f() did not call all inherited functions (and others multiple times). + Bugfix: '#[<] indexing corrected. - Runtime: + If hook H_RESET is a closure, and the closure returns a negative value, the object will not be reset again, as if set_next_reset(-1) had been used. + New optional driver hook H_COMMAND allows to replace the driver command parsing with your own. When used, the H_MODIFY_COMMAND and H_NOTIFY_FAIL hooks are ignored. + The H_MODIFY_COMMAND hooks may now change the commandgiver. The change remains active during the execution of the command, and the original commandgiver is passed to the NOTIFY_FAIL hook. + Mappings have an upper limit of MAX_MAPPING_SIZE keys (default is 5000). + Special commands 'dumpallobj' and 'opcdump' are verified through master->valid_write(). + Driver can be compiled for DYNAMIC_COSTS, causing increased eval-costs for computationally expensive operations. For now, this applies only to string additions with an additional cost of strlen(result)/1000 . - Other Changes: + Tweaks to the timing of swapping, cleanup() and reset() to achieve a smoother operation. + On loading errors, the name of the affected object is printed in the error message. + The multiport feature is no longer optional. + Corrections to the manpages of clone_object, clonep, filter_mapping, filter_indices. + Added the include files mudlib/sys/{trace.h,input_to.h,files.h, debug_info.h} with definitions for the efuns trace(), input_to(), file_size(), get_dir(), and debug_info(). + NATIVE_MODE is gone. + Euids are now a standard feature (the LPC macro __EUIDS__ stays defined, though). + Use of euids (loading or cloning other objects requires a non-zero euid) can be enforced with the commandline option '--strict-euids'. If defined, the LPC macro '__STRICT_EUIDS__' is defined. If your mud ran in NATIVE_MODE, this is the option you'll want to use. + The commandline options '--reset-time' and '--cleanup-time' specify the cleanup and reset times. The old config.h symbols TIME_TO_RESET and TIME_TO_CLEAN_UP just give the default values. + The commandline options '--max-array' and '--max-mapping' can set the max limits for arrays and mappings. For both, a setting of 0 disables the limit checks. + The commandline options '--max-bytes' and '--max-file' can set the max IO limits for file reads and writes. + Efun closures are printed with full name in error tracebacks. + The ACCESS.ALLOW file can specify portnumbers. + Special command 'status malloc' is now identical to 'malloc'. + Special commands 'debugmalloc' and 'showsmallnewmalloced' are deactivated. + Bugfix: Reset of swapped objects did not work properly. + Bugfix: Errors during the execution of closures no longer leak memory. + Bugfix: Switching driver hooks from within themselves no longer leaks memory. + Bugfix: New callouts added from within a callout with odd delay resulted in the new callouts called at the wrong time. If the new callout had a MAX_INT delay, the existing callout list was effectively disabled. 01-Apr-1999 (Lars Duening) -- Release 3.2.6 - Changed efuns: + allocate_mapping() renamed to m_allocate(). The old name is still available as alias. + clone_object() accepts objects as templates. + efun308() renamed to set_environment(). The old name is still available as alias. + file_name() renamed to object_name(). The old name is still available as alias. + filter_mapping() renamed to filter_indices(). The old name is still available as alias. + mapping_contains() renamed to m_contains(). The old name is still available as alias. + map_mapping() renamed to map_indices(). The old name is still available as alias. + mapping_contains() renamed to m_contains(). The old name is + m_values() can return any column of a mapping. + notify_fail() returns 0. + set_this_player() accepts 0 as argument. + to_int(), to_object() and to_float() accept their result type as argument. - Corrected efuns: + call_out(): if the command_giver destructs before the callout is activated, this_player() is made sure to be 0. + map_array() stumbled when objects in the array in question were destructed during the operation. + sizeof(mapping) no longer counts destructed objects in the mapping to the size. + sprintf() of float values < 1.0 no longer causes a SING error. + terminal_colour() correctly wraps strings with a length one less than the wrap limit. + this_interactive(): during login it points to the login object. - New efuns: + abs(): return the absolute value of the argument. + all_environment(): return all environments of an object. + caller_stack(): return the call stack. + clonep(): test if an object is a clone. + copy(): produce a shallow copy of the argument. + deep_copy(): produce a shallow copy of the argument. + filter(): filter an array or fill-width mapping. + load_name(): returns the filename of an objects blueprint. + load_object(): loads an object. + make_shared_string(): enters a string into the shared string table. + map(): map an array or full-width mapping. + m_reallocate(): changes the width of a mapping. + object_info(): returns internal information about an object. + program_name(): returns the name of an objects program. + set_next_reset(): set the time of the next reset. + unmkmapping(): deconstruct a mapping to arrays. + upper_case(): make a string all upper case. + widthof(): return the width of a mapping. - Master Object: + All functions can be static. + Functions like privilege_violation() or heart_beat_error(), but also valid_read() and valid_write() no longer receive destructed objects as arguments. + Apply 'object_name()' renamed to 'printf_obj_name()'. - Compiler: + New predefined macro __MAX_EVAL_COST__ expands to the evaluation cost limit. + Bugfix: __DOMAIN_NAME__ on some machines returned the NIS, not the DNS domain. + Bugfix: __MASTER_OBJECT__ could be set to a non-canonic name. + Bugfix: __FILE__ and __MASTER_OBJECT__ returned names with leading '/' in compat mode. + Bugfix: (virtual) inheritance of variable-only objects with variable initialisation doesn't crash the driver anymore. + Bugfix: #'++/#'-- in closures work. - Fixed Crashers: + Errors in a callout to an efun closure. + Adding arrays up to and over the upper limit. + Destruction of non-interactive snoopers. + funcall()/apply() on a swapped variable. - Other Changes: + The old behaviour of explode() and previous_object() is no longer available. Floats, transcendent functions, mappings and extended varargs are now permanent features of the driver. + Re-implemented the handling of heartbeats, resets, cleanups and swapping in order to avoid caused lags. This also makes the config parameter RESET_GRANULARITY unnecessary. + If used, the __INIT() function is protected instead of global, and can't be called from outside the objects anymore (it shouldn't be callable at all anyway). + When subtracting mappings from each other, the subtrahend may be of any width, but only its keys count. + The 'status tables' command has an additional entry 'Object status'. + Bugfix: fixed an eval cost leak in catch(). + Bugfix: fixed memory leak in terminal_colour(). + Bugfix: if a command disconnects, but not quits a player, the prompt is no longer printed (before it ended up on stdout, cluttering the logfiles). 10-Dec-1998 (Lars Duening) -- Release 3.2.5 - Collapsing of '/' in object names also used for inherits. - Default limit for bitstrings is 6144 bits. - The efuns break_point() and swap() are disabled by default. - Pre-release versions have an extended version number of the form '3.2.5-dev.16'. - Compat mode drivers define __COMPAT_MODE__ (meant to replace COMPAT_FLAG eventually); native mode drivers define __NATIVE_MODE__. Similar, a driver using euids defines __EUIDS__. - New defines __ERQ_MAX_SEND__ and __ERQ_MAX_REPLY__ when the driver supports the ERQ. The values are the max sizes of the send and receive buffers. - MSDOS support removed (the MSDOS filesystem however is still supported). - It is now possible to use '..' in filenames as long as it doesn't has the 'parent directory' meaning (that means, 'foo..bar' is ok, bug 'foo/../bar' is not). - When a connection is closed, the driver no longer sends 'Closing down' as last text. - Bugfix: branches in bigger lambda() closures use the correct branch offsets. I am not completely sure if the bugfix is correct, so I left in two 'DEBUG:' diagnostics with information needed to debug the code further if necessary. - Bugfix: the commandline parser printed a faulty error message if a required value was missing. - Bugfix: mapping_contains() freed the wrong values, clobbering passed mapping literals. - Bugfix: After an UDP packet was processed, the evaluation costs are restored. - Bugfix: The LPC compiler now accepts only regular files for includes. - Bugfix: If a npc was destructed between to command() calls, and the H_MODIFY_COMMAND hook was set to a string, the driver called the named modify-command function on the destructed npc. - Bugfix: During the execution of a closure, an extra refcount is added to protect it from destruction while it is executed. This is primarily a safety measure for the driver hooks which only have 1 refcount and are thus very sensitive against master object updates. - Bugfix: Under some OS like Linux, the normal SIG_IGN handler is just one-shot. To reliably ignore signals (ie SIGPIPE), a homemade handler is used. - Bugfix: regreplace("acc", "a*", "yy",1) trashed memory. - Bugfix: runtime errors in an alien-lfun-closure (as created by symbol_function() calls) no longer crash the driver during the error handling. - Bugfix: sprintf() on big floats or in long fields no longer causes a buffer overrun (and should it happen nevertheless, a proper fatal() is generated). 24-Sep-1998 (Lars Duening) -- Release 3.2.4 - Bugfix for the collapsing of '/' in object names. 21-Sep-1998 (Lars Duening) -- Release 3.2.3 - Bugfix: mapping_contains() no longer returns destructed objects. - New special command 'status files' to append file usage statistics from within the mud to the file /FILESTAT. - New commandline option: --swap-compact: reuse free space in the swapfile immediately. Giving this option results in smaller, but also more fragmented swapfiles, and the swap performance may degrade. 14-Sep-1998 (Lars Duening) -- Release 3.2.2 - Version number pattern changed from 03.02.1@<patchlevel> to 3.2.<patchlevel>. This affects all uses of the __VERSION__ lpc predefine. - Objects may be loaded/inherited with filenames containing two or more consecutive '/'es, these are collapsed into just one. However, it is not possible to find objects using the wrong names. - The dreaded __INIT() bug is fixed. - New commandline options: --options : prints all options used in compiling the driver --version : prints the game driver version --help : prints a short help of the commandline options --longhelp: prints an elaborate description of the commandline options - The commandline option handling was renovated, most options now exist in a short and long form. This caused slight changes in name and syntax for well-known options (.e.g '--gcollect_out_fd<file>' is now '--gcollect-out-fd <file>'). Please see doc/driver/invocation for further information. 10-Jul-1998 (Lars Duening) -- Release 3.2.1@141-osb.16 - Bugfix for the "*":: problem. - Added a minimal master for simple driver tests. 17-May-1998 (Lars Duening) -- Release 3.2.1@141-osb.14 and before - Small speedup for regexps through usage of a cache. Also increased the complexity limit for regexps. - Added support for BeOS. - Automatic garbage collections are kept at least 5 minutes apart. Every garbage collection is logged on stdout. - Variables are swapped independantly from program code. - Multiple login ports may be used in parallel. The port numbers are given on the commandline, efun query_mud_port() was extended to return the appropriate port number. - MudOS-efun terminal_colour() added by Mica. - this_object() in destructed objects does not print a diagnostic anymore. - 'status tables' prints the number of cache hits both absolute and as percentage.