patch 8.2.0849: BeOS code is not maintained and probably unused
Problem: BeOS code is not maintained and probably unused.
Solution: Remove the BeOS code. (Emir Sari, closes #5817)
diff --git a/src/os_unix.c b/src/os_unix.c
index 6c308af..3464426 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -12,7 +12,7 @@
/*
* os_unix.c -- code for all flavors of Unix (BSD, SYSV, SVR4, POSIX, ...)
* Also for OS/2, using the excellent EMX package!!!
- * Also for BeOS and Atari MiNT.
+ * Also for Atari MiNT.
*
* A lot of this file was originally written by Juergen Weigert and later
* changed beyond recognition.
@@ -43,11 +43,6 @@
# endif
#endif
-#ifdef __BEOS__
-# undef select
-# define select beos_select
-#endif
-
#ifdef __CYGWIN__
# ifndef MSWIN
# include <cygwin/version.h>
@@ -150,7 +145,7 @@
#endif
static int WaitForChar(long msec, int *interrupted, int ignore_input);
static int WaitForCharOrMouse(long msec, int *interrupted, int ignore_input);
-#if defined(__BEOS__) || defined(VMS)
+#ifdef VMS
int RealWaitForChar(int, long, int *, int *interrupted);
#else
static int RealWaitForChar(int, long, int *, int *interrupted);
@@ -1245,8 +1240,7 @@
if (ignore_sigtstp)
return;
- // BeOS does have SIGTSTP, but it doesn't work.
-#if defined(SIGTSTP) && !defined(__BEOS__)
+#if defined(SIGTSTP)
in_mch_suspend = TRUE;
out_flush(); // needed to make cursor visible on some systems
@@ -3486,10 +3480,13 @@
tnew = told;
if (tmode == TMODE_RAW)
{
- /*
- * ~ICRNL enables typing ^V^M
- */
+ // ~ICRNL enables typing ^V^M
tnew.c_iflag &= ~ICRNL;
+# ifdef IXON_NOT_USED
+ // Do not make CTRL-S stop output, for most users it is unexpected and
+ // is hardly ever useful.
+ tnew.c_iflag |= IXON;
+# endif
tnew.c_lflag &= ~(ICANON | ECHO | ISIG | ECHOE
# if defined(IEXTEN) && !defined(__MINT__)
| IEXTEN // IEXTEN enables typing ^V on SOLARIS
@@ -4631,11 +4628,6 @@
if (!pipe_error) // pty or pipe opened or not used
{
SIGSET_DECL(curset)
-
-# if defined(__BEOS__) && USE_THREAD_FOR_INPUT_WITH_TIMEOUT
- beos_cleanup_read_thread();
-# endif
-
BLOCK_SIGNALS(&curset);
pid = fork(); // maybe we should use vfork()
if (pid == -1)
@@ -6075,11 +6067,7 @@
* "interrupted" (if not NULL) is set to TRUE when no character is available
* but something else needs to be done.
*/
-#if defined(__BEOS__)
- int
-#else
static int
-#endif
RealWaitForChar(int fd, long msec, int *check_for_gpm UNUSED, int *interrupted)
{
int ret;