In previous versions, the GT.M variable environment was configured separately for GT.M itself and separately for EGTM NIF module where it was hardcoded in egtm_worker. Since the priv/gtmenv cannot be loaded from egtm during runtime (variables should apply on the entire BEAM VM), we decided to write priv/listenv shellscript that dumps all the gtmenv variables so that Erlang (egtm_env) can load it via Erlang port (pipe-reader) mechanism and set the BEAM environment using os:putenv just before EGTM application starts, just before the EGTM NIF shared library is loaded. Everything is configured from priv/gtmenv and works perfectly now!
- UTF-8 by default; - database files changed to be referenced using environment variables so that EGTM installation can be moved between directories without need to modify paths in Global Directory; - EGTM_CUSTOM_ENV variable can be externally defined to enforce application-specific customizations made to GT.M environment - badchar turned off; - noundef options turned off by default; - nocenable enabled by default (GT.M overrides Erlang's Ctrl-C behaviour so that if you press Ctrl-C in Erlang prompt when the EGTM is launched, you will get GT.M direct mode what might not be so good for Erlang/OTP runtime); - nice GT.M prompt :-)
Kill/ZKill operations accepts one input argument and does not return anything. They were incorrectly defined to return a value even if the M code ended up with argument-less QUIT. Since GT.M call-in API treats the first argument like variable where to store a return value of call-in function, our input argument was modified by an empty result what made GT.M to SIGSEGV in all the cases when the kill/zkill was called more than once.
All the MUMPS data formatting/encoding/decoding stuff moved to a separate module egtm_util_fmt which can be easily used from another project that need to communicate with MUMPS somehow. A good example of such a project might be a code generator of native MUMPS routines useful for optimizing some higher level stuff.