summaryrefslogtreecommitdiff
path: root/emulators/dlx/files/patch-io-termios
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/dlx/files/patch-io-termios')
-rw-r--r--emulators/dlx/files/patch-io-termios65
1 files changed, 0 insertions, 65 deletions
diff --git a/emulators/dlx/files/patch-io-termios b/emulators/dlx/files/patch-io-termios
deleted file mode 100644
index c9a268944ee1..000000000000
--- a/emulators/dlx/files/patch-io-termios
+++ /dev/null
@@ -1,65 +0,0 @@
---- dlxsim/io.c
-+++ dlxsim/io.c
-@@ -18,6 +18,8 @@
- static char rcsid[] = "$Header: /user1/ouster/mipsim/RCS/io.c,v 1.3 89/12/07 18:00:21 ouster Exp $ SPRITE (Berkeley)";
- #endif /* not lint */
-
-+#include <sys/ioctl.h>
-+
- #include <ctype.h>
- #include <stdio.h>
- #include <fcntl.h>
-@@ -283,17 +285,19 @@
- register DLX *machPtr; /* Machine being simulated. */
- {
- int flags;
-+ struct termios newState;
-
- /*
- * Save terminal state, and put it into a raw-er mode during
- * the simulation.
- */
-
-- ioctl(0, TIOCGETP, (char *) &(machPtr->ioState.savedState));
-- flags = machPtr->ioState.savedState.sg_flags;
-- machPtr->ioState.savedState.sg_flags = (flags | CBREAK) & ~ECHO;
-- ioctl(0, TIOCSETP, (char *) &machPtr->ioState.savedState);
-- machPtr->ioState.savedState.sg_flags = flags;
-+ tcgetattr(0, &newState);
-+ machPtr->ioState.savedState = newState;
-+ newState.c_lflag &= ~(ICANON|ECHO);
-+ newState.c_cc[VMIN] = 0;
-+ newState.c_cc[VTIME] = 0;
-+ tcsetattr(0, TCSANOW, &newState);
- }
-
- /*
-@@ -325,7 +329,7 @@
- */
-
- CheckInput(machPtr);
-- ioctl(0, TIOCSETP, (char *) &machPtr->ioState.savedState);
-+ tcsetattr(0, TCSANOW, &machPtr->ioState.savedState);
- }
-
- /*
---- dlxsim/io.h
-+++ dlxsim/io.h
-@@ -19,7 +19,7 @@
- #ifndef _MIPSIM_IO
- #define _MIPSIM_IO
-
--#include <sgtty.h>
-+#include <termios.h>
-
- /*
- * The following structure is part of each DLX machine, and describes
-@@ -27,7 +27,7 @@
- */
-
- typedef struct IoState {
-- struct sgttyb savedState; /* Used to save original terminal state
-+ struct termios savedState; /* Used to save original terminal state
- * so terminal can be put into CBREAK
- * mode during simulation and then be
- * restored when simulation stops. */