Currently only in make_X_keymap.
Output is to STDOUT (since the conditional compilation DEBUG did)
Medley branch: mth38--command-line-arg-to-support-maiko-runtime-debug adds command line argument support for this.
With additional Medley calls to KEYACTION (below), they should work in TTYIN (i.e., XCL and Interlisp EXECs).
I didn't try TEDIT.
They are unrecognized in SEDIT. (In any case, their use there probably is pretty restricted by the nature of SEDIT.)
(KEYACTION 'KEYPAD8 '(("Meta,^" 56 NOLOCKSHIFT) . IGNORE))
(KEYACTION 'KEYPAD6 '(("Meta,>" 54 NOLOCKSHIFT) . IGNORE))
(KEYACTION 'KEYPAD4 '(("Meta,<" 52 NOLOCKSHIFT) . IGNORE))
(KEYACTION 'KEYPAD2 '(("Meta,^J" 50 NOLOCKSHIFT) . IGNORE))
Unify the LispDisplayRequested... and lispDisplayRequested...
variables from the SDL and X11 display modules.
Move the storage definitions for LispDisplayRequested... to main.c
leaving external references in the modules that utilize them.
The implementation of various JUMP opcodes tried to use a common tail
that did a POP and branched to the next opcode. While the extra gotos
probably aren't harmful, neither are they beneficial to code size or speed.
* Update buildRelease workflow to use sdl2-2.30.11 on MacOS
* In buildRelease workflow, update Macos build for SDL to use -DMAIKO_DISPLAY_SDL=2 instead of =ON
A missing check for the applicability of a versioned file cache
caused loadups to fail in the case where the modification timestamp
of a directory and its parent were identical, and the file being
looked up had the same name (when lowercased) as the directory it was
contained within. E.g., looking up TEDIT in library/tedit/ where
the modification times of library and library/tedit were identical.
The inode number of the directory containing the file must be the
same as the inode number of the directory the cache was built from.
Redesign of exit status handling, instead of overloading the FAST flag
of (LOGOUT fast), add an optional 2nd argument, EXITSTATUS.
Retains compatability, with behavior unchanged, between new emulator
and older sysouts which do not pass the second argument to LISPFINISH.
Newer sysouts, which pass the 2nd argument, will continue to work with
older emulators though will not get the exit status set.
These changes add (LOGOUT <number>) to the traditional
(LOGOUT) and (LOGOUT T) calls. If an integer <number> is provided
it will be used as the exit status code, while NIL and T result
in an EXIT_SUCCESS.
If the argument passed is none of NIL, T, or a number, the exit
status code will be a generic EXIT_FAILURE (typically 1).
(LOGOUT) and (LOGOUT T) virtual memory behavior is unaffected.
When a <number> is passed Lisp will exit without saving the
virtual memory state, as is the case for (LOGOUT T), although
this behavior is determined by Lisp rather than the Maiko emulator.
DSPBOUT is called to output a single character to the "BCPL display",
which is the system text output rather than the bitmapped display.
Under maiko, this is mapped to "stdout". Interlisp-D uses CR as the EOL
character, but that is not appropriate for output to standard output
so CR is translated to LF here. Standard output is buffered, but there
is no indication of when the output should be flushed, so flush on every
character, since this is a low frequency operation.
SHOWDISPLAY is called to switch between the "BCPL display" and the
bitmapped display. The current display subsystems are not hooked up
to this subr, but this is a potential place to hook display size changes
in the future, so the code is updated to indicate the parameters passed
in and to set/reset the display initialization state variable.
At some point option "-t" was introduced as an abbreviation for
"-title" but "-t" was already in use, though undocumented, for overriding
the timer interval. This commit changes the command line timer option
to "-timer" and adds "timer" to the options that are processed from
the X11 resources.
Two problems fixed:
* only in the case of a software cursor is it necessary to check if
the bit being altered is within the region of the display covered by
the cursor, and if it is, the cursor must be hidden before operating
on the screen bitmap
* SDL as well as X requires modifications to the screen bitmap be
flushed to the actual display.
When the target for a PILOTBITBLT operation is the display bitmap,
and the display bitmap is not memory-mapped from the actual display,
the display subsystem needs to be notified to flush the Lisp display
bitmap to the display so that changes are immediately visible.
The mechanism was present for X11 displays but needed to be implemented
for SDL displays.
The variable MaikoGitVersion will contain a git revision from the head of the source tree
along with an indication if the status was "dirty". If git is not present on the system
or the directory that the build happened in was not under git control the version will be
"none".
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.
Where bit-fields are defined in a structure that represents a Lisp
DLword object the DLword type is now used as the base type instead of
"unsigned short".
* 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