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

840 Commits

Author SHA1 Message Date
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
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
Nick Briggs
29fdf4c40b Adapt to window geometry, set up a fake environment variable MEDLEYDIR
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.
2024-01-01 16:58:23 -08:00
Nick Briggs
7bb2393637 Adjustments to WAsm file system layout and compilation options
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.
2023-12-27 17:20:11 -08:00
Nick Briggs
acffcb74aa Merge remote-tracking branch 'wasm-updates/master' into incorporate-wasm-changes 2023-12-22 19:18:56 -08:00
Nick Briggs
ad71e1e830 Merge remote-tracking branch 'no-defun-allowed/master' into incorporate-wasm-changes 2023-12-22 19:15:28 -08:00
Nick Briggs
4b0032e1b6 Piggyback on existing async timer emulation instruction countdown for periodic emscripten_sleep() call.
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.
2023-12-22 18:17:02 -08:00
Nick Briggs
b21fbcbcb1 subr_settime should avoid settimeofday() completely in Emscripten environment 2023-12-22 18:15:18 -08:00
Nick Briggs
0cc8e4d71c Revert/update unixfork.c since it is no longer used in emscripten based builds 2023-12-22 13:35:33 -08:00
Nick Briggs
f208fd3302 Rename/move ldesdl.html out of emscripten.wasm (which gets cleared on rebuild) to src/lde.html 2023-12-22 13:18:20 -08:00
Nick Briggs
b666b1b2de
Add stubs for X11 IOErrorHandler and IOErrorExitHandler (#487)
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.
2023-12-22 10:36:13 -08:00
Matt Heffron
d933ba88b7
XFree(mapping) was called *before* mapping was referenced in DEBUG conditional code. (#486)
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.)
2023-12-16 15:14:02 -08:00
Nick Briggs
28d7d5ec00 improve debug output in interprocess communication code 2023-11-17 12:11:10 -08:00
Nick Briggs
1e0264416f Error exits in forked process code should exit with failure status rather than success 2023-11-17 12:07:23 -08:00
Nick Briggs
15966ccf34 If SUNDISPLAY is defined REALCURSOR will be defined so remove redundant defined(SUNDISPLAY) 2023-11-17 09:46:22 -08:00
Nick Briggs
2caa2269a9 Avoid initializing CLastUserActionCell68k in INIT mode as \LASTUSERACTION will not have been set. 2023-11-13 13:23:41 -08:00
Hayley Patton
79a788279b Add Emscripten/WASM support 2023-11-13 15:18:49 +11:00
Nick Briggs
42477318b5 Assignments embedded in if-condition are not a good idea. 2023-11-12 17:37:34 -08:00
Nick Briggs
562f4c30ee Fix typo 2023-11-09 16:48:48 -08:00
Nick Briggs
98569d10b4 Reduce false positives for misaligned pointer access when checking array blocks
The forward and backward pointers in an array block only contain
    valid pointer values when the block is free therefore avoid
    producing native addresses from these fields if the block is in use.

Add comments regarding the operation of the array block merging code
    Array block merging will produce a single block if possible,
    otherwise it will produce two blocks with one as large as possible
    and the other no less than the minimum block size.

Rewrite the checks in array block merge forward to minimize unnecessary field accesses
2023-11-09 15:43:11 -08:00
Nick Briggs
7fce08f92c
More Lisp variables to avoid in INIT mode - turn off X11 input handling (#482) 2023-08-09 14:04:51 -07:00
Nick Briggs
8e43a393bd
Avoid setting Lisp variables whose locations are unknown when in INIT mode (#481)
* Avoid setting Lisp variables whose locations are unknown when in INIT mode.

* Exit with a success (0) status for normal lisp_finish.
2023-08-01 11:16:42 -07:00
Nick Briggs
4a9f5500c4
struct buf is missing definition for byte-swapped bigvm case (#477)
While there was a definition for the pre-bigvm case, with 24-bit
pointers, for byteswapped (little-endian) systems, there was no
structure definition for the bigvm case, with 28-bit pointers.
2023-07-24 20:43:25 -07:00
Nick Briggs
408559b0d8
Add lisp keynames to document the SDL key map table (#471)
Adding the lisp keynames and reformatting the keymap table to be
one line per Lisp key bit makes it easier to see what is going on.
2023-06-07 16:12:32 -07:00
Nick Briggs
2e893a75ab
Merge pull request #467 from Interlisp/sdl
Bring SDL into master branch
2023-05-31 14:44:04 -07:00
Nick Briggs
4754ec73eb Add ctrl-shift-esc as a synonym for ctrl-shift-delete (user interrupt)
On a Mac laptop (without a full keyboard) it isn't easy to generate
the delete in the ctrl-shift-delete user interrupt.  The esc key is
in the same word and can easily be generated, so add ctrl-shift-esc
as an alternative.
2023-05-30 17:19:14 -07:00
Nick Briggs
a6d645ce9b SunOS bug avoidances should only execute when on SunOS 2023-05-16 21:18:15 -07:00
Nick Briggs
e8daed41ea UNIX-GETPARM(DISPLAY) should return "SDL" for SDL-based display, as it returns "X" for X11 2023-05-16 18:52:23 -07:00
Nick Briggs
41ae0162da Construct path for invoking display executable to match original path of lde
The pathname for the display program is constructed to parallel the
path for "lde", which makes it more likely that the correct display
program will get run rather than
  (a) not being found because "lde" wasn't found from the PATH, or
  (b) a different version of the display program which was found from the PATH
2023-05-07 15:10:01 -07:00
Nick Briggs
9cc7d9e13c Remove references to KATANA and replace with MAIKO
No functional difference. Replaces a few leftover references to a prior
project name for the C implementation of the Lisp Virtual Machine with the
current name.
2023-05-05 13:37:25 -07:00
Nick Briggs
45494170a3 Use SDL defined symbolic constants for mouse button events 2023-05-04 18:47:34 -07:00
Nick Briggs
a511feff39 Resolve some warnings noted by clang-tidy
Remove unused #include "miscstat.h"
Make parameters of cursor_equal_p both const
Remove unnecessary extern declarations for EmKbdAd068K, EmRealUtilin68K, MiscStats
2023-05-04 18:11:56 -07:00
Nick Briggs
d14d6183da Comment out debug printf for mousewheel(trackpad) handling. 2023-05-04 12:51:29 -07:00
Nick Briggs
44b2412fd6
Merge pull request #465 from Interlisp/warning-reductions-clang15-part2
Warning reductions clang15 part2
2023-05-01 15:35:01 -07:00
Nick Briggs
087c7a053a Compiling with -DDTDDEBUG requires including testtooldefs.h in gcrcell.c 2023-04-20 18:19:04 -07:00
Nick Briggs
222a9594d5
Speed up initial sysout loading by avoiding unnecessary lseek() calls. (#461)
On slower filesystems/disks, an lseek() operation can consume
noticeable time. During initial sysout loading we can avoid an
unnecessary lseek() before each read() by tracking if the position it
will seek to is the same position that the previous read() left us.
2023-03-19 16:32:00 -07:00
Nick Briggs
0bd29ae643 Remove extraneous extern declarations. Convert some int to LispPTR as appropriate. 2023-03-10 15:23:25 -08:00
Nick Briggs
f16b01167e Remove LHS casts in old color code. Add void return types where needed. Add includes. 2023-03-10 15:20:08 -08:00
Frank Halasz
00d306d72f
Maiko code changes needed to compile on Alpine Linux with clang. (#456)
* Changes needed to compile maiko on Alpine Linux with clang.  Switching to Alpine on github actions to streamline maiko release builds

* Changes needed to compile maiko on Alpine Linux with clang.

Switching to Alpine on github actions to streamline maiko release builds.

  * ether_nethub.c missing a couple of includes, and incorrectly including
    <sys/poll.h> instead of plain <poll.h>
  * <dirent.h> does not define MAXNAMLEN on Alpine Linux, but "locfile.h"
    compensates for this already, if it is modified to include <limits.h>,
    so use this in "dirdefs.h".

---------

Co-authored-by: Nick Briggs <nicholas.h.briggs@gmail.com>
2023-03-07 12:12:55 -08:00
Nick Briggs
a8ded8a5f6
Correct syntax error, missing semicolon (#459)
* Correct syntax error, missing semicolon

* Use appropriate datatype for dlpi buffer.  DLPI_CHUNKSIZE is already defined as 4*DLPI_MAXDLBUF.
2023-02-27 17:33:04 -08:00
Nick Briggs
88cde175fc Remove duplicate include version.h (loopsops.c, subr.c, z2.c) 2023-02-26 12:08:25 -08:00
Nick Briggs
d19aec2fbf Remove duplicate include version.h in xbbt.c 2023-02-26 12:04:47 -08:00
Nick Briggs
8e40ae8811 Remove duplicate include version.h in xlspwin.c 2023-02-26 12:04:47 -08:00
Nick Briggs
7c81d1fa08 Remove duplicate include version.h in xrdopt.c 2023-02-26 12:04:47 -08:00
Nick Briggs
ac14ce0e40 Collapse conditionals with identical consequents 2023-02-26 12:04:47 -08:00
Nick Briggs
3745c08f51 Remove unused include files from asmbbt.c 2023-02-26 12:04:47 -08:00
Nick Briggs
d4cccd7878 Simplify awkward if-test expression 2023-02-26 12:04:47 -08:00
Nick Briggs
3e1130909c Simplify awkward if-test expression 2023-02-26 12:04:47 -08:00
Nick Briggs
55b45aa2aa Replace grammatically incorrect comments in rplaca/rplacd 2023-02-26 12:04:47 -08:00
Nick Briggs
2b5a34ebe9 Correct parameter declarations for N_OP_cons (int => LispPTR) 2023-02-26 12:04:47 -08:00