From 8e43a393bd1f7febc446f3667733522e47d06524 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Tue, 1 Aug 2023 11:16:42 -0700 Subject: [PATCH] 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. --- src/vmemsave.c | 2 +- src/xwinman.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vmemsave.c b/src/vmemsave.c index 8ab1e0e..00c371b 100644 --- a/src/vmemsave.c +++ b/src/vmemsave.c @@ -531,5 +531,5 @@ void lisp_finish(void) { #ifdef DOS exit_host_filesystem(); #endif /* DOS */ - exit(1); + exit(0); } diff --git a/src/xwinman.c b/src/xwinman.c index 00cd288..ffb957a 100644 --- a/src/xwinman.c +++ b/src/xwinman.c @@ -189,11 +189,13 @@ void process_Xevents(DspInterface dsp) if (report.xany.window == dsp->DisplayWindow) /* Try the most important window first. */ switch (report.type) { case MotionNotify: +#ifndef INIT *CLastUserActionCell68k = MiscStats->secondstmp; *EmCursorX68K = (*((DLword *)EmMouseX68K)) = (short)((report.xmotion.x + dsp->Visible.x) & 0xFFFF) - Current_Hot_X; *EmCursorY68K = (*((DLword *)EmMouseY68K)) = (short)((report.xmotion.y + dsp->Visible.y) & 0xFFFF) - Current_Hot_Y; +#endif break; case KeyPress: kb_trans(SUNLispKeyMap[(report.xkey.keycode) - KEYCODE_OFFSET], FALSE);