Add a new type 'lpctype' to contain a type object, describing a compile-time
type, together with a decltype() operator and to_lpctype() and check_type()
efuns.
Added info about the number of simul_efuns (active or not) in
the simul_efun table (simul_efun_table).
Some admins may find this interesting to verify that they stay
below the limit for creating real closures to sefuns (currently
2048).
Add a new type and data structure to LPC. Lightweight objects combine
properties from structs (small memory footprint, automatic lifetime
management) and objects (capsulation, functions).
(Implements #688)
Extend the type system with named object types like
'object "/std/room" var;' to include a mandatory program.
This is only checked by runtime type checks.
(Implements #842)
Since introduction of type objects struct_info() and variable_list()
didn't return any type information anymore. functionlist() however did,
used its code for converting type objects to integers also for the
other two efuns.
Added a configure_interactive option IC_ENCODING that denotes
the source and target encoding of the interactive. Input and
output will automatically converted using this encoding.
Added a configure_driver option DC_FILESYSTEM_ENCODING to specify the
encoding for filenames. It is initialized per default with the default
locale's encoding with the exception of the C locale which gets UTF-8
as its encoding.
The lexer now converts each file internally to UTF-8 before lexing and
parsing it. Added a driver hook H_FILE_ENCODING to query the encoding
for each file (default is the very restrictive ASCII encoding).
The mudlib can now configure signal handling for
SIGINT, SIGHUP, SIGUSR1 and SIGUSR2 via configure_driver().
Added the new possibility of interrupting an LPC or Python
execution thread via a signal.
configure_driver gets options to configure the time intervals
for swapping out programs and variables and for calling
the cleanup and reset hooks.
driver_info() can be used to query these intervals.
Removed the efuns seteuid() and export_uid() in favor of the new
configure_object() with OC_EUID flag. UIDs are constant this way
and all EUID changes will get master oversight using the privilege
violation checks (Resolves#828).
When Python support is compiled in, operator closures use
another closure type range. Update the lpctype.h to reflect
this. Also implement a __PYTHON__ define, to detect the
python support in mudlibs.
Removed the efuns set_connection_charset(), get_connection_charset(),
set_combine_charset(), and get_combine_charset() in favor of the new
configure_object() with IC_CONNECTION_CHARSET_AS_STRING,
IC_CONNECTION_CHARSET_AS_ARRAY, IC_COMBINE_CHARSET_AS_STRING,
IC_COMBINE_CHARSET_AS_ARRAY, and IC_QUOTE_IAC. Added simul-efun
implementations providing the old interface. (Issue #596)
configure_object completes the configure_* efuns for objects.
interactive_info and driver_info complement the already
existing configure_interactive and configure_driver. (Issue #596)
configure_driver() supports setting the cipher list (OpenSSL)
or priorities (GnuTLS).
Otherwise, defaults are used which favor strong ciphers with
PFS and forbid SSLv3 and weak ciphers.
(fixes#849)
The DH parameters can now be set with configure_driver().
The argument is expected to be a PEM encoded string or
0 to restore the built-in defaults.
pkg-gnutls keeps the parameters in a permanently allocated
block, pkg-openssl does not keep a copy of the parameters
for itself.
If the parameters can't be imported, the driver tries to
retain the old parameters, which is guaranteed for GnuTLS,
but not for OpenSSL.
(fixes#846)
The old and very basic light support was removed.
It was rarely used and the mudlibs do a better
and more flexible job at maintaining light
from/in objects.
object_info() does not report OIB_TOTAL_LIGHT any
more, therefore the array OINFO_BASIC is one
element shorter.
(fixed#775)
Returning errno is not a good idea since the numbers are
implementation defined and there is no good way on the LPC
side to make sense of the number.
Additionally there was a complaint about transient errors
not clearly identifiable.
We now return our own error numbers, defined in comm.h.
(fixes#427)
The time between two data cleanups of an objects was derived from the
general cleanup time (time until to call clean_up() in the object).
This did not make much sense. It now has a default of 3600s and can
be configured at run-time with configure_driver().
Since structs are always active, the corresponding checks with
#ifdef USE_STRUCTS are removed as well.
git-svn-id: svn://svn.bearnip.com/ldmud/trunk@3062 56160b6e-f8f8-0310-bd54-bccebfe6a2f2
TELOPT_KERMIT and TELOPT_SEND_URL were new,
TELOPT_EXOPL is not really an unofficial, mud-specific option.
git-svn-id: svn://svn.bearnip.com/ldmud/trunk@3027 56160b6e-f8f8-0310-bd54-bccebfe6a2f2
As discussed in bug #302, we introduce an optional limit for the
_additional_ memory consumption per top-level execution. This is not to
prevent against malicious users, but against accidental allocations of
huge amounts of memory. The limit should not be set too low. The minimum
is 50000 bytes, but the recommendation is to set it much higher.
(interpret.c, simulate.c)
git-svn-id: svn://svn.bearnip.com/ldmud/trunk@2983 56160b6e-f8f8-0310-bd54-bccebfe6a2f2
ITIMER_PROF is a timer which accounts time spent on the process and its
syscalls. This patch adds a handler for the SIGPROF signal and sets a
timer at the beginning of each top-level execution. At the end the
timer is deactivated again.
Should it trigger in between the handler will set a flag and the
interpreter will dump a stacktrace into the debuglog after the current
instruction.
This feature is deactivated by default.
(backend.c, interpreter.c)
git-svn-id: svn://svn.bearnip.com/ldmud/trunk@2930 56160b6e-f8f8-0310-bd54-bccebfe6a2f2
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().
(efuns.c, heartbeat.c, main.c)
git-svn-id: svn://svn.bearnip.com/ldmud/trunk@2887 56160b6e-f8f8-0310-bd54-bccebfe6a2f2
Created mudlib/sys/signals.h our own definitions of the SIG* for the
mudlib and translate the host system signals.
Merged the SIGTERM handler into the general signal handler.
(backend.c)
git-svn-id: svn://svn.bearnip.com/ldmud/trunk@2879 56160b6e-f8f8-0310-bd54-bccebfe6a2f2
Added new efun: configure_driver() and documentation.
configure_driver() will configure variuous aspects of the driver at run-time.
The first settings available is now the soft and hard memory limits.
git-svn-id: svn://svn.bearnip.com/ldmud/trunk@2556 56160b6e-f8f8-0310-bd54-bccebfe6a2f2