1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-13 07:09:58 +00:00

1301 Commits

Author SHA1 Message Date
Frank Halasz
e68fb0dd57 Trying macos-12 in buildRelease.yml since the workflow fails for macos-latest (= macos-14). 2024-11-10 23:09:12 -08:00
Frank Halasz
11978b714f Update docker/ github actions to current versions to account for deprecation of node12 - on which previous versions were based 2024-11-10 22:44:06 -08:00
Frank Halasz
d55b9e55c6 Add workflow_dispatch (in addition to push and pull_request) to build.yml triggers - for testing 2024-11-10 22:27:33 -08:00
Frank Halasz
666cceff7e Update github actions to account for deprecation of macos-12 runners and the move of ubuntu-latest runner to ubuntu-24.04. Use explicit versions instead of latest to prevent issues when latest changes unexpectedly. 2024-11-10 21:58:34 -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
Nick Briggs
3ef7d2d68e Fixing mismatched type declaration avoids cast from DLword* to short* 2024-05-29 16:52:29 -07:00
Nick Briggs
68c74e4e79
Add support for setting cursor color to ldex (X11 display) (#508)
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.
2024-05-23 09:52:22 -07:00
Nick Briggs
c765ca5cc8
Update SDL dependent code and makefile segments to prepare for SDL3 (#497)
* 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)
2024-05-21 12:07:13 -07:00
Nick Briggs
3ac46abc5c
Implement the "B hexaddr" command to print array block (#506)
The array block printer was already documented, but not implemented.
Clean up with IncludeWhatYouUse, to document why particular includes
are present.
2024-05-20 15:12:38 -07:00
Nick Briggs
613ffd8aca
Update .gitignore to ignore 386-sdl build directory (#507) 2024-05-20 15:10:38 -07:00
Nick Briggs
db5d5a31e7
Add -rpath /Library/Frameworks to accommodate newer macOS releases (#505)
On or before macOS Ventura's release, defaulting the @rpath to
include /Library/Frameworks stopped.  Since we expect the SDL2
framework to be installed there we must add a -rpath option.
This should be backwards compatible with older macOS releases.
(verified on Catalina but nothing older)
2024-05-19 23:39:00 -07:00
Nick Briggs
4becc6ad93
Not all systems define MAP_FAILED for the return value from failing mmap() (#502) maiko-240513-4becc6ad 2024-05-13 15:37:53 -07:00
Frank Halasz
40a1a8dcd2
Rationalize the processing of command line args for the sysout. Fixes Issue#1703 (#503)
* 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.
2024-05-13 15:36:33 -07:00
Frank Halasz
fd16058ca7
Merge pull request #504 from Interlisp/fgh_fix-cygwin-github-build
Fix Cygwin github builds:  Issue#1705
maiko-240510-fd16058c
2024-05-10 14:31:50 -07:00
Frank Halasz
1426386830 In buildRelease.yml, change site for cygwin download to https:/mirrors.kernel.org since old gatech site is now deprecated. 2024-05-10 14:19:12 -07:00
Nick Briggs
de361e0258
IPv4 host network addresses convert with htonl() not htons() (#501) 2024-05-06 22:57:39 -07:00
Nick Briggs
3979cdd60d
Update config.guess, config.sub to current GNU versions (#500) 2024-05-06 22:57:16 -07:00
Frank Halasz
6c6b01f99c
Merge pull request #499 from Interlisp/fgh_buildRelease_MacOS_fix
In buildRelease workflow, MacOS job - fix issue with uninstall of casks that have not actually been installed
maiko-240506-6c6b01f9
2024-05-06 16:41:23 -07:00
Frank Halasz
143c0f67cf In buildRelease workflow, MacOS job - fix issue with uninstall of casks that have not actually been installed. result of changes to github runner in MacOS-lastest 2024-05-06 16:12:59 -07:00
Nick Briggs
c391641691 Eliminate warnings for ignored fprintf() result when printing messages to stderr maiko-240424-c3916416 2024-04-24 11:41:46 -07:00
Nick Briggs
38862ddb08 Ignore snprintf() result where OK to do so, convert sprintf() to snprintf() 2024-04-23 21:49:38 -07:00
Nick Briggs
8d34f0869a Problem with directory caching, #1661, disable until it is solved. 2024-04-13 11:12:10 -07:00
Anarchos
e2e2c7e394
Haiku OS port (#485)
* 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>
2024-04-10 20:14:46 -07:00
Nick Briggs
2e86450fad
Improve the file lookup performance for {DSK} files (#498)
The directory caching for file lookup on {DSK} was disabled due to a
bug in SunOS - this is no longer relevant, so the cache can be reenabled.
2024-04-03 21:10:54 -07:00
Nick Briggs
400ccab637
exit with non-zero status if unable to open sysout or... (#496) 2024-03-31 09:55:26 -07:00
Nick Briggs
95f4ac8167
Update UNIX-GETPARM to return values for OSNAME and ARCH (#495)
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"
2024-03-25 15:26:31 -07:00
Nick Briggs
40f6488ee4
Merge pull request #494 from Interlisp/color-code-cleanup
Color code cleanup
2024-03-19 21:09:44 -07:00
Nick Briggs
3c3fc94246 Clean up rawcolor code so it at least compiles without error 2024-03-19 09:10:29 -07:00
Nick Briggs
559ba779b2 Missing definition for taking_mouse_up() 2024-03-19 09:09:36 -07:00
Nick Briggs
afd6cf4b80
Merge pull request #493 from Interlisp/stack-debug-01
Cleanup of stack-related code
2024-03-18 16:30:06 -07:00
Nick Briggs
68baf6fb30 Use ...FromStackOffset functions where appropriate
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.
2024-03-07 10:45:38 -08:00
Nick Briggs
939c23c03b Additional check for bad stack offset calculation
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.
2024-03-07 10:01:19 -08:00
Nick Briggs
55591557b6 Clarify the expected size/packing of bit fields in stack structures
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.
2024-03-07 09:30:59 -08:00
Frank Halasz
fb579a2ab5
Merge pull request #491 from Interlisp/fgh_emscripten-vmem_save
Fix Issue#1541: IL:LOGOUT does not work running Medley on emscripten maiko
2024-02-16 12:03:31 -08:00
Frank Halasz
258f70a82b Fix Issue#1541: IL:LOGOUT does not work running Medley on emscripten maiko 2024-02-16 00:03:39 -08:00
Nick Briggs
895f765105
Merge pull request #490 from Interlisp/nhb-no-wasm-getrusage
Emscripten/wasm does not support getrusage() system call
2024-02-13 16:08:40 -08:00
Nick Briggs
9f02ce0590 Emscripten/wasm does not support getrusage() system call
Updating the MiscStats data can at best provide the time of day and
attribute all elapsed time to total CPU time.

Closes issue #1537
2024-02-12 09:30:46 -08:00