Files gcfinal.c and testool.c both contain literal TAB characters embedded
in printf() format strings in an attempt to align output.
The output formatting depends on the user's simulated tab settings and
therefore may not produce the expected results.
The output formatting is rewritten to make tab characters unnecessary.
File rawcolordefs.h was completely missing.
Both llcolordefs.h and rawcolordefs.h must be included in subr.c if -DCOLOR
Make newColorizeFont8() local to rawcolor.c
Options for requested width, height, and pixel scaling and window title can
be shared between display subsystems.
Include correct header for local sdl function definitions rather than
manually duplicating a reference for init_SDL().
Correct a typo in comments on build_lisp_map().
* Remove useless VersionArray parameter in maintain_version()
The 2nd argument, FileName *varray, is only ever NULL, so
remove it and simplify the code.
* Remove useless and unused VersionArray cache mechanism
* Simplify setting of file times on file close
The futimes(fd, ...) function allows changing the times of a file with
reference to an open file descriptor which allows us to avoid trying to
find a pathname by which utimes(path, ...) would operate on the inode
corresponding to the fd we have just closed.
* Remove unnecessary temporary variable for VersionArray
* In get_version_array() do not mix array and pointer access to VersionArray
* Improve {DSK} device handling of files with many versions
Somewhat dynamically allocate the version array storage, in chunks of
VERSIONARRAYCHUNKLENGTH (currently 200) allowing for up to
VERSIONARRAYMAXLENGTH (currently 2000) entries before reporting an
error. These numbers could be adjusted, or the limit could be removed.
Sorts the version array in descending order of version number to
improve the performance of check_vless_link() which stats every file
in the version array until it finds one linked to the versionless name
(which should be the highest version). Sorting, and tracking the
number of active entries, also allows for future optimization of other
operations that currently walk through the version array.
* futimens() appears more widely available than futimes() - so use it
* Rework caching of version array for files
While enumerating the entries in a directory is relatively fast,
on some systems (macOS) stat() of a file is slow.
While there is not general agreement on the name in the stat structure
of the timespec field for the modification time, POSIX specifies it
as "st_mtim", and it is possible to #define st_mtim to be the
system-specific name in "version.h" (macOS: st_mtimespec).
* FindHighestVersion can make use of sorted order of filename/version cache
Since the list of filename and versions is maintained in descending order
by version number (see get_version_array) the highest version is trivially
located at index 0 of the filename array.
* Fix#1826 - emulator crash when too many versions of a file in a directory
This is a preliminary fix to avoid a system crash (bus error/seg fault) when
operating on a file with too many versions present in the directory.
Initial fix is to report an error (EIO, SIMPLE-DEVICE-ERROR) when doing
an operation that would result in an out-of-bounds access in the emulator.
* Add comment noting that the DOS get_version_array code comes first.
* Allow choice of foreground and background colors for Medley X11 display
lde/ldex Accepts -fg/-foreground <color> and -bg/-background <color>,
or the corresponding X resources ldex*foreground and ldex*background
to specify the colors that will represent the monochrome Medley display
pixels.
* Extend screen foreground/background color selection to SDL display subsystem (ldesdl)
* Fix compilation for maiko version 201
Version 201 does not have BIGVM, so SWA_FNHEAD requires swapx
which is defined in byteswapdefs.h
* Fix compilation for maiko version 201
Version 201 did not have NEWCDRCODING, so the implementation of
N_OP_rplcons requires definitions from gcdata.h and address.h
* Set up makeright etc. to allow for easier compilation of alternate versions
The makeright script and the makefile-* slices it depends are modified
to allow easily specifying the RELEASE version number of the Maiko emulator
to be built. The default version remains 351, but can be changed with e.g.
RELEASE=201 ./makeright x
The object directories and executables are NOT named with the version.
* Remove unnecessary include of gcdata.h from bbtsub.c
* Users of gcdata.h should include gchtfinddefs.h explicitly if they use gcdata.h macros
* Correct modify_big_reference_count entry parameter type to reflect dependence on GCENTRY size differences between releases
* Add MAIKO_RELEASE to CMake options for building
The cursor (foreground) color can be set with the
-cursorColor x11-color-spec
option to ldex or any front-end that passes the options through to ldex.
For example:
lde ... -cursorColor red
lde ... -cursorColor '#A020F0'
./run-medley -cursorColor RED -g 1200x700 -sc 1200x700 -noscroll
Alternatively, the color may be specified with the ldex*cursorColor resource
(in ~/.Xresources, or other such X11 resource databases that are loaded by
the X11 server)
The command line option will override the X11 resource option.
* Update SDL dependent code and makefile segments to prepare for SDL3
Many APIs have changed between SDL2 and SDL3. This update adds
preprocessor conditionals to adapt the Maiko SDL code to allow selection of
the SDL major version (2 or 3) from the -DSDL=n define.
The SDL3 implementation is currently available as a preview release, 3.1.0, at
https://github.com/libsdl-org/SDL/releases/tag/prerelease-3.1.0
* Add updates for makefile-haiku.x86_64-sdl to prepare for SDL3
* Allow makeright to accept sdl3 as display type to ease SDL3 experiments
* Update CMakeLists.txt for SDL3 library
* Replaces configuration option -DMAIKO_DISPLAY_SDL=ON/OFF with
-DMAIKO_DISPLAY_SDL=OFF/2/3
* Replaces PUBLIC definitions with PRIVATE definitions on targets since
we are not exporting definitions outside this local compilation
* Update messages to indicate which version of SDL is being configured
* Add fixup for SDL3.xcframework on macOS to compensate for missing
RPATH specification (CMake issue 25998)
* Rationalize the processing of command line args for the sysout. Remove most of the redundancy between what is done for sysout arg processing in xrdopt.c versus main.c. Move all of the decision making about what sysout_name to use until all args have been processed (both in xrdpopt and main). This is done in main, where the prioritization and checking is done in one place rather than spread in several places in xrdopt and main. // Order of priority:
628 // 1. Value of -sysout command line arg
629 // 2. Value of the first command line arg
630 // 3. Value of LDESRCESYSOUT env variable
631 // 4. Value of LDESOURCESYSOUT env variable
632 // 5. Value as determined by X resource manager, if any
633 // 6. Value of /home/frank/lisp.virtualmem (or lisp.vm for DOS)
* In main.c moved check for sysout as first arg to before the call to read_Xoption. This will ensure that we always check the 'true' first argument even when read_Xoption modifies argv.
* Haiku OS port
* haiku with X11 backend
* haiku has stpncpy
* Haiku is not Linux.
* X not stable enough on Haiku
* Haiku : settimeofday is a no-op
* Haiku : no need to define settimeofday at all (pointed by nbriggs)
---------
Signed-off-by: Anarchos <sylvain_kerjean@hotmail.com>
Calls to UNIX-GETPARM with argument "OSNAME" or "ARCH" now return
values derived from the compile-time settings in inc/maiko/platform.h
The current return values are
OSNAME:
"macOS"
"Cygwin"
"DragonFly BSD"
"FreeBSD"
"Linux"
"NetBSD"
"OpenBSD"
"AmigaOS 3"
"Solaris"
"Windows"
"Emscripten"
ARCH:
"WebAssembly"
"x86_64"
"arm"
"arm64"
"x86"
"PowerPC"
"RISC-V"
"SPARC"
"Motorola68K"
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.
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.)