aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authorwill <will@FreeBSD.org>2000-05-22 15:19:12 +0800
committerwill <will@FreeBSD.org>2000-05-22 15:19:12 +0800
commit46a0e69d5da5a6b6ef1a8fbbca8b2d97f52094d1 (patch)
treec417db2a94d7fb92f6b405bdd836c3ab52b4bd58 /emulators
parent0d41f2c6934cc0e8ad3c7cd30660ffe4d8abd685 (diff)
downloadfreebsd-ports-gnome-46a0e69d5da5a6b6ef1a8fbbca8b2d97f52094d1.tar.gz
freebsd-ports-gnome-46a0e69d5da5a6b6ef1a8fbbca8b2d97f52094d1.tar.zst
freebsd-ports-gnome-46a0e69d5da5a6b6ef1a8fbbca8b2d97f52094d1.zip
Whoops, forgot this file with the update to 1999121400.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/truereality/files/patch-ad108
1 files changed, 108 insertions, 0 deletions
diff --git a/emulators/truereality/files/patch-ad b/emulators/truereality/files/patch-ad
new file mode 100644
index 000000000000..f0e061bc9305
--- /dev/null
+++ b/emulators/truereality/files/patch-ad
@@ -0,0 +1,108 @@
+--- os/bsd/signal.c.orig Tue Nov 16 15:02:45 1999
++++ os/bsd/signal.c Sat May 20 13:36:15 2000
+@@ -39,51 +39,37 @@
+
+ #include <signal.h>
+
+-#include <dispatch.h>
++#include "../../main.h"
++#include "../../N64/registers.h"
+ #include <parser_extern.h>
+
+-#include "../os.h"
+-#include "signal.h"
++static void signal_handler(int signum);
+
+
+
+
+
+-void CatchSignals()
+-{
+- signal(SIGINT, stop_signal); /* CTRL+C pressed -> cpu halt -> debugger */
+- signal(SIGQUIT, shutdown_signal);
+- signal(SIGTERM, shutdown_signal);
+-#if DISPLAY_SUPPORT
+- signal(SIGHUP, visualkilled_signal); /* should be sent if display killed */
+- signal(SIGPIPE, shutdown_signal); /* when pipe is broken */
+-#endif
+-
+-} /* void CatchSignals() */
+
+
+
+
+
+-void shutdown_signal()
+-{
+- dispatch(SHUTDOWN, 0);
+-
+-} /* void shutdown_signal() */
+
+
+
+
+
+-void stop_signal()
++void tr_signals_catch()
+ {
+- signal(SIGINT, SIG_IGN);
+-
+- dispatch(CPU_STOP, 0);
++ signal(SIGINT, signal_handler); /* CTRL+C pressed -> cpu halt ->
++debugger */
++ signal(SIGQUIT, signal_handler);
++ signal(SIGTERM, signal_handler);
++#ifdef TR_DISPLAY
++ signal(SIGPIPE, signal_handler); /* when pipe is broken */
++#endif
+
+- signal(SIGINT, stop_signal); /* CTRL+C pressed -> cpu halt -> debugger */
+-
+-} /* void shutdown_signal() */
++} /* void tr_signals_catch() */
+
+
+
+@@ -91,15 +77,36 @@
+
+
+
+-#if DISPLAY_SUPPORT
+-void visualkilled_signal()
++static void signal_handler(int signum)
+ {
+- prefs.display = NO_DISPLAY;
+-
+-} /* void visualkilled_signal() */
++ signal(signum, SIG_IGN);
++ switch(signum)
++ {
++#ifdef TR_DEBUG
++ case SIGINT:
++ case SIGQUIT:
++ reg.halt = 1; /* stop cpu */
++ break;
++#else
++ case SIGINT:
++ case SIGQUIT:
+ #endif
++ case SIGTERM:
++ /* ask for shutting down the emulation */
++ tr_shutdown();
++ break;
++
++#ifdef TR_DISPLAY
++ case SIGPIPE:
++ prefs.display = NO_DISPLAY;
++ break;
++#endif
++
++ } /* switch(signum) */
+
++ signal(signum, signal_handler);
+
++} /* static void signal_handler(int signum) */
+
+
+