Rather than adding/or-ing the STK_OFFSET constant into a stack offset
to convert it to a pointer in general Lisp memory and then converting
from that to a native address... use the functions specifically
present to do those conversions with embedded checks on stack offset
validity.
Pointer difference calculations on an inappropriate stack pointer could
result in a negative offset, not just an offset that is too large to fit
in 16 bits. Complain if either case occurs.
While packing is not guaranteed, and most compilers will combine
adjacent bit fields regardless of the alignment requirements of the
datatype that is being divided, here we can be clearer that we
expect packing into 16-bit fields and we do not require (and must not
have) 32-bit alignment of the collections of bitfields.
Compiling with -DMAIKO_ENABLE_NETHUB makes it possible to test out having a WebSocket
server that could pass packets back and forth to the Dodo NetHub.
Setting Emscripten link-time option for EXIT_RUNTIME allows the runtime code to shutdown
when you exit Medley via a (LOGOUT)
Set up preloads for all the parts of the Medley directory that MEDLEYDIR-INIT expects
to be there. The resulting ldesdl.data is (at this time) 128 MB. It can be installed
gzipped if using nginx or some other web server that supports pre-zipped static files.
It would be better to have these as lazy-loading files, but the setup for that is
complicated. Another alternative to embedding all the data would be if a WebSocket
to XNS/Nethub gateway were written and deployed.
Passes the window width/height as the requested geometry to lde at startup.
Since we control the directory structure of the file-system, we can pass the
known fixed location of the Medley directories in the MEDLEYDIR environment variable.
Sets up the NetHub host as localhost - not currenty functional, but a WebSocket
server could be added to communicate with the NetHub gateway to enable local
networking from the browser version of Medley.
Moves the full.sysout from the root of tle system to /medley/loadups/full.sysout,
adds /medley/lispusers/BACKGROUND-YIELD.LCOM and an Emscripten/WAsm specific
site init file at /usr/local/lde/site-init.lisp
Adjusts options so that the options are in the correct place for the
compiler and loader.
There is no need for an additional Emscripten-specific counter to periodically call emscripten_sleep().
Make test for Emscripten environment check MAIKO_OS_EMSCRIPTEN rather than checking __EMSCRIPTEN__,
which is localized in the maiko/platform.h include.
Adds stub procedures and hooks them in to the X11 error handlers as an
example of how we may be able to handle lost X connections and
gracefully terminate the session.
This is only a potential issue in DEBUG build. A problem hasn't occurred, that I know of, but it seemed best just to be safe.
Moved the DEBUG code to precede the XFree(mapping) call. (Equivalent to moving the XFree down.)