1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-17 00:22:59 +00:00

1362 Commits

Author SHA1 Message Date
Nick Briggs
3569e54524 Uses consistent naming (_np) for native pointer equivalents of Lisp addresses in GC aref1 2025-07-20 10:48:20 -07:00
Nick Briggs
b75e66d91c Renames struct buf to struct buffer to match corresponding Lisp datatype name 2025-07-19 23:19:19 -07:00
Nick Briggs
0e2cda2328 Cleans up releasingvmempage implementation
Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses
2025-07-19 22:44:27 -07:00
Nick Briggs
c58336f813 Cleans up checkarrayblock implementation
Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses
  Ensures non-zero return value if arrayblock fails check
2025-07-19 18:11:43 -07:00
Nick Briggs
f2bf026b07 Adds URaid F command to print array block free list heads 2025-07-19 17:50:55 -07:00
Nick Briggs
3fad090a6c Cleans up printarrayblock implementation
Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses
2025-07-19 17:34:52 -07:00
Nick Briggs
812e296fe8 Cleans up reclaimarrayblock implementation
Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses
  Adds comments regarding the parameter passed to reclaimarrayblock
2025-07-19 15:41:50 -07:00
Nick Briggs
7c7da4cd0c Cleans up mergeforward implementation
Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses
2025-07-19 13:19:27 -07:00
Nick Briggs
f375519dbc Cleans up mergebackward implementation
Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses
  Adds comments with a little explanation of what the code is doing
2025-07-19 12:35:02 -07:00
Nick Briggs
2c46a9473a Cleans up and makes static arrayblockmerger implementation
Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses
2025-07-19 12:29:33 -07:00
Nick Briggs
93b3a709c9 Cleans up makefreearrayblock implementation
Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses
  Adds comments regarding use of WORDPTR macro to hide BYTESWAP setting
2025-07-19 12:11:11 -07:00
Nick Briggs
31fcfb36ca Cleans up linkblock implementation to increase clarity
Procedure can be static as it is only used within this file
  Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses, and better matches Lisp implementation naming of variables.
  Improve readability by reducing if/else nesting with early outs in
    exceptional cases.  Still equivalent to the original Lisp version.
  Adds comments with a little explanation of what the code is doing.
2025-07-19 11:49:30 -07:00
Nick Briggs
1f18779eb8 Cleans up deleteblock implementation to increase clarity
Procedure can be static void as there was only an unused constant result.
  Uses consistent naming (_np) for native pointer equivalents of Lisp
    addresses, and better matches Lisp implementation naming of variables.
  Adds comments with a little explanation of what the code is doing.
2025-07-18 10:09:41 -07:00
Nick Briggs
357336b5f1 Rewrites (and makes static) findptrsbuffer to avoid multiple conversions between Lisp and native pointers 2025-07-18 09:12:43 -07:00
Nick Briggs
1ffd1ba7cb Replaces integerlength(n) implementation with call to fls(n) and makes it static 2025-07-17 18:52:15 -07:00
Nick Briggs
0a6f8ac72b Replaces scaling factor 2 for array length offsets by DLWORDSPER_CELL as that is what it represents. 2025-07-17 18:46:57 -07:00
Nick Briggs
fc90838ad8
Increases number of stack frames that can be displayed by URaid 'l' command (#538) 2025-07-10 18:36:55 -07:00
Frank Halasz
de1fafba7e
Merge pull request #536 from Interlisp/fgh_fix-2164-WSL1-try2
To fix Issue#2164, create infrastructure to compile Maiko for Windows System for Linux v1 as a separate OS from Linux

Created makefile-wsl1-* files as well as makefile-init-wsl1-* files.  Modified bin/osversion to detect wsl1 as a special case of linux so that the wsl1 makefiles would be selected appropriately by makeright.

Did not make CMAKE changes for WSL1.

Changed Build Release workflow (via changes to Dockerfile-maiko) to build wsl1 versions of lde, ldex, ldesdl and ldeinit for x86_64 and aarch64.  These are now included in the release tars.
maiko-250616-de1fafba
2025-06-16 00:30:06 -07:00
Frank Halasz
6f42b353b2 In Dockerfile_maiko, for wsl1 case called makeright XX clean twice. Eliminated second call, which was deleting first run of makefile x 2025-06-16 00:00:54 -07:00
Frank Halasz
8e17c0747d Fix typo in Dockerfile_maiko 2025-06-15 23:32:27 -07:00
Frank Halasz
6aafbbcb05 Enable using LDEARCH to set wsl1 as the osversion. Set LDEARCH to get a WSL1 compile on a standard Linux system in Dockerfile_maiko (and hence in the workflow buildRelease.yml). 2025-06-15 22:56:36 -07:00
Frank Halasz
5dc9233aef One more typo in Dockerfile_maiko 2025-06-03 23:31:46 -07:00
Frank Halasz
b029b98fca Fix Dockerfile_maiko to set execute permissions on osversion while building wsl1 versions of maiko 2025-06-03 23:25:35 -07:00
Frank Halasz
7dd3c90a77 Fix up various makefile-wsl (and -cygwin) errors pointed out by gemini-code-assist! 2025-06-03 22:40:11 -07:00
Frank Halasz
389ecf7874 Fix Dockerfile_maiko so osversion is restored after building the wsl1 lde executables. 2025-06-03 22:27:16 -07:00
Frank Halasz
5d3639a905 Fix another error is Dockerfile_maiko for wsl1 2025-06-03 19:19:08 -07:00
Frank Halasz
59953c2629 Fix error is Dockerfile_maiko for wsl1 2025-06-03 19:01:14 -07:00
Frank Halasz
6d171bff1d Create/update additional makefiles for building maiko for WSL1. Update buildRelease workflow and assicated Dockerfile to build the WSL1 variants along wih standard linux variants. 2025-06-03 18:54:15 -07:00
Frank Halasz
834a6084c3 WIP. Moving to WSL1 environment 2025-05-28 14:03:13 -07:00
Frank Halasz
9343f58b17
Fix typo in bin/mkvdate that was preventing it from executing correctly (#534) 2025-05-27 22:24:10 -07: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