1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-13 15:18:14 +00:00

1333 Commits

Author SHA1 Message Date
Matt Heffron
966290ff4d Enable runtime controlled debug output.
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.
2025-02-17 12:35:02 -08:00
Matt Heffron
4994982a90 Adds the non-keypad arrow keys to be detected.
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))
2025-02-12 11:22:08 -08:00
Frank Halasz
40d4fca8cc
Merge pull request #530 from Interlisp/fgh_use-22.04-build-builder
Specify Ubuntu22.04 instead of Ubuntu-latest in various github action scripts to solve libc version issue crashing online
2025-02-03 12:19:50 -08:00
Nick Briggs
c8dc63d418
Clean up display related variable names differing only in case (#529)
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.
2025-02-02 16:31:43 -08:00
Frank Halasz
7fe0f70640 In buildRelease.yml moving to ubuntu-22.04 instead of latest to see if it fixes these random linux arm64 build failures - crashes inside gcc compiler! 2025-02-01 19:10:38 -08:00
Frank Halasz
55e20ea993 In buildRelease.yml added apt update to emscriptem build since it was failing to find some of the packages called for by apt-get install sdl2 2025-02-01 18:48:38 -08:00
Frank Halasz
7d85a59e6f Change ubuntu version from latest to 22.04 in Dockerfile_builder to handle issue where the Medley-online docker image was failing to find the lastest versions of libc and libm when loading maiko 2025-02-01 17:53:01 -08:00
Nick Briggs
511a1b523e
Eliminate extra gotos in common branch tail code (#528)
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.
maiko-250201-7d85a59e maiko-250201-7fe0f706 maiko-250201-55e20ea9
2025-01-30 11:07:29 -08:00
Frank Halasz
04f9905ca0
Fix MacOS SDL build in buildRelease github workflow (#527)
* 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
2025-01-29 08:51:47 -08:00
Nick Briggs
e61d0f2e6c
Correct {DSK} versioned file cache failures (#526)
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.
maiko-250128-9628bb1b maiko-250126-e61d0f2e
2025-01-26 18:38:25 -08:00
Nick Briggs
3c4d9f5393
Modifies LISPFINISH subr to use 2nd argument, if present, for exit status (#525)
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.
2025-01-20 12:24:44 -08:00
Nick Briggs
31bb14b9d7
Modifies Lisp exit subr to permit passing an exit status code (#524)
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.
2025-01-16 09:57:01 -08:00
Nick Briggs
f23a43f1a0
Merge pull request #522 from Interlisp/nhb-dspbout-and-showdisplay
Improves behavior of display subrs DSPBOUT and SHOWDISPLAY
2024-12-22 14:10:37 -08:00
Nick Briggs
e251f26816 Improves behavior of display subrs DSPBOUT and SHOWDISPLAY
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.
2024-12-18 12:40:29 -08:00
Nick Briggs
51045b402f
Merge pull request #521 from Interlisp/nhb-print-maiko-git-version
Adds MaikoGitVersion to information printed with -info option
2024-12-17 11:22:43 -08:00
Nick Briggs
e6c972a62a
Merge pull request #520 from Interlisp/nhb-shadowed-timer-option
Replaces shadowed "-t <interval>" with "-timer <interval>"
2024-12-17 11:22:20 -08:00
Nick Briggs
31ad2f2169 Adds MaikoGitVersion to information printed with -info option 2024-12-16 20:13:05 -08:00
Nick Briggs
66721ccc1c Replaces shadowed "-t <interval>" with "-timer <interval>"
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.
2024-12-16 19:59:03 -08:00
Nick Briggs
b13a35e16e
Merge pull request #519 from Interlisp/nhb-fix-sdl-display-bitmap-flushing
Fix display bitmap flushing on modification when using SDL display subsystem
2024-12-15 09:25:29 -08:00
Nick Briggs
55d8504060 Corrects interaction of BITMAPBIT with buffered display bitmap
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.
2024-12-14 13:22:44 -08:00
Nick Briggs
ecdab720f2 Missing call to flush_display_lineregion() for SDL in PILOTBITBLT
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.
2024-12-14 12:57:24 -08:00
Nick Briggs
249efce565 Adds comments regarding init_cursor() purpose in initdsp.c 2024-12-03 15:40:37 -08:00
Nick Briggs
1de2e3e954 Update README.md to be slightly more accurate. 2024-12-02 13:57:24 -08:00
Nick Briggs
a2f62159e9
Merge pull request #518 from Interlisp/cmakelists-ldeinit-solaris
Updates CMakeLists.txt to add Solaris specific OS5 define to ldeint build
2024-11-24 08:08:49 -08:00
Nick Briggs
b2a22a8ac8 Updates CMakeLists.txt to add Solaris specific define to ldeint build 2024-11-24 02:45:50 -05:00
Nick Briggs
89b2b4f866
Merge pull request #517 from Interlisp/improve-cmake-vdate-depends
Improve cmake vdate depends
2024-11-20 12:14:09 -08:00
Nick Briggs
96046c01f0 Adds MaikoGitVersion string to vdate.o
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".
2024-11-20 11:18:41 -08:00
Nick Briggs
578b26547a Updates CMakeLists.txt to avoid recreating vdate.c if nothing has changed
Creating vdate.c/vdate.o should not be done unconditionally.  It is only
necessary to recreate it if one of the input files has changed.
2024-11-19 15:20:44 -08:00
Nick Briggs
13cbc33da3
Merge pull request #516 from Interlisp/include-file-reorganization
Include file reorganization (part 1)
2024-11-11 10:26:05 -08:00
Nick Briggs
baeec1b957 Renames bitblt.h to bbtmacro.h and updates all uses 2024-11-07 12:39:55 -08:00
Nick Briggs
99550aaa7c Renames return.h to retmacro.h and updates all uses 2024-11-06 13:31:46 -08:00
Nick Briggs
99601ede75 Removes incorrect dependency on osmsg.h and renames it to osmsgprint.h 2024-11-05 14:57:00 -08:00
Nick Briggs
4f3cb4d326 Removes ether.h and merges Lisp interface structs into lsptypes.h 2024-11-05 14:24:36 -08:00
Nick Briggs
b98e1612d1 Removes tty.h and merges #defines (all local) and Lisp interface structs into tty.c 2024-11-05 14:07:16 -08:00
Nick Briggs
fe71946f82 Removes vmemsave.h and merges #defines (all local, mostly unused) into vmemsave.c 2024-11-05 14:02:27 -08:00
Nick Briggs
c332c71a3e Removes unreferenced xscroll.h (dup of xscrolldefs.h) 2024-11-05 13:56:08 -08:00
Nick Briggs
cea720feb2
Remove tabs embedded in strings used for formatting output (#515)
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.
2024-10-31 13:36:31 -07:00
Nick Briggs
a3f3775c0a Add missing includes and include file if compiling with COLOR defined.
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
2024-10-22 10:13:00 -07:00
Nick Briggs
d2d4f18ade Correct error message when debug frame extension limit exceeded 2024-10-22 09:56:06 -07:00
Nick Briggs
c3b7d1707d Switch X11 options to use shared windowTitle and cleanup icon title variable name 2024-10-18 16:21:58 -07:00
Nick Briggs
532731b716 Cleanup options variables, spelling errors, declarations
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().
2024-10-18 16:07:46 -07:00
Nick Briggs
29e5b374fe Update CMakeLists.txt to suggested syntax for SDL projects. 2024-10-17 14:26:16 -07:00
Nick Briggs
0c7b1cccd4
Merge pull request #514 from Interlisp/cleanup-USHORT-bitfields
Remove USHORT and direct "unsigned short" uses in struct bitfields
2024-10-15 19:27:13 -07:00
Nick Briggs
fae5c4956e
Cleanup in the "version array" handling in the {DSK} device (#513)
* 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.
2024-10-14 14:15:02 -07:00
Nick Briggs
86ba485c3e Replace "unsigned short" use for bit-fields with DLword
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".
2024-10-14 13:17:26 -07:00
Nick Briggs
b88ea87fa8 Remove USHORT definition and replace uses with DLword
USHORT unnecessarily duplicates the DLword type that represents a
single Lisp 16-bit word.
2024-10-14 12:57:02 -07:00
Nick Briggs
91e0cea9d5
Fix #1826 - emulator crash when too many versions of a file in a directory (#512)
* 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.
2024-09-16 17:47:48 -07:00
Nick Briggs
4ad14fa832
Allow choice of foreground and background colors for Medley X11/SDL display (#511)
* 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)
2024-09-09 12:56:18 -07:00
Nick Briggs
aa4df518a1
Release 201 corrections (#510)
* 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
2024-09-01 16:26:30 -07:00
Nick Briggs
5c9b5ef4ec
Ignore mouse motion events when the window does not have keyboard focus (#509) 2024-08-21 20:59:37 -07:00