Mercurial > vim
comparison src/os_unix.c @ 20591:4411c2b96af9 v8.2.0849
patch 8.2.0849: BeOS code is not maintained and probably unused
Commit: https://github.com/vim/vim/commit/041c7107f23d3b49ab62c1d7e36af90421db8b63
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 30 18:14:57 2020 +0200
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 https://github.com/vim/vim/issues/5817)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 30 May 2020 18:30:04 +0200 |
parents | d4b2a8675b78 |
children | 1c9b87841376 |
comparison
equal
deleted
inserted
replaced
20590:a76cdc4bf606 | 20591:4411c2b96af9 |
---|---|
10 */ | 10 */ |
11 | 11 |
12 /* | 12 /* |
13 * os_unix.c -- code for all flavors of Unix (BSD, SYSV, SVR4, POSIX, ...) | 13 * os_unix.c -- code for all flavors of Unix (BSD, SYSV, SVR4, POSIX, ...) |
14 * Also for OS/2, using the excellent EMX package!!! | 14 * Also for OS/2, using the excellent EMX package!!! |
15 * Also for BeOS and Atari MiNT. | 15 * Also for Atari MiNT. |
16 * | 16 * |
17 * A lot of this file was originally written by Juergen Weigert and later | 17 * A lot of this file was originally written by Juergen Weigert and later |
18 * changed beyond recognition. | 18 * changed beyond recognition. |
19 */ | 19 */ |
20 | 20 |
39 # include <attr/xattr.h> | 39 # include <attr/xattr.h> |
40 # include <linux/xattr.h> | 40 # include <linux/xattr.h> |
41 # ifndef SMACK_LABEL_LEN | 41 # ifndef SMACK_LABEL_LEN |
42 # define SMACK_LABEL_LEN 1024 | 42 # define SMACK_LABEL_LEN 1024 |
43 # endif | 43 # endif |
44 #endif | |
45 | |
46 #ifdef __BEOS__ | |
47 # undef select | |
48 # define select beos_select | |
49 #endif | 44 #endif |
50 | 45 |
51 #ifdef __CYGWIN__ | 46 #ifdef __CYGWIN__ |
52 # ifndef MSWIN | 47 # ifndef MSWIN |
53 # include <cygwin/version.h> | 48 # include <cygwin/version.h> |
148 #else | 143 #else |
149 typedef int waitstatus; | 144 typedef int waitstatus; |
150 #endif | 145 #endif |
151 static int WaitForChar(long msec, int *interrupted, int ignore_input); | 146 static int WaitForChar(long msec, int *interrupted, int ignore_input); |
152 static int WaitForCharOrMouse(long msec, int *interrupted, int ignore_input); | 147 static int WaitForCharOrMouse(long msec, int *interrupted, int ignore_input); |
153 #if defined(__BEOS__) || defined(VMS) | 148 #ifdef VMS |
154 int RealWaitForChar(int, long, int *, int *interrupted); | 149 int RealWaitForChar(int, long, int *, int *interrupted); |
155 #else | 150 #else |
156 static int RealWaitForChar(int, long, int *, int *interrupted); | 151 static int RealWaitForChar(int, long, int *, int *interrupted); |
157 #endif | 152 #endif |
158 | 153 |
1243 mch_suspend(void) | 1238 mch_suspend(void) |
1244 { | 1239 { |
1245 if (ignore_sigtstp) | 1240 if (ignore_sigtstp) |
1246 return; | 1241 return; |
1247 | 1242 |
1248 // BeOS does have SIGTSTP, but it doesn't work. | 1243 #if defined(SIGTSTP) |
1249 #if defined(SIGTSTP) && !defined(__BEOS__) | |
1250 in_mch_suspend = TRUE; | 1244 in_mch_suspend = TRUE; |
1251 | 1245 |
1252 out_flush(); // needed to make cursor visible on some systems | 1246 out_flush(); // needed to make cursor visible on some systems |
1253 settmode(TMODE_COOK); | 1247 settmode(TMODE_COOK); |
1254 out_flush(); // needed to disable mouse on some systems | 1248 out_flush(); // needed to disable mouse on some systems |
3484 } | 3478 } |
3485 | 3479 |
3486 tnew = told; | 3480 tnew = told; |
3487 if (tmode == TMODE_RAW) | 3481 if (tmode == TMODE_RAW) |
3488 { | 3482 { |
3489 /* | 3483 // ~ICRNL enables typing ^V^M |
3490 * ~ICRNL enables typing ^V^M | |
3491 */ | |
3492 tnew.c_iflag &= ~ICRNL; | 3484 tnew.c_iflag &= ~ICRNL; |
3485 # ifdef IXON_NOT_USED | |
3486 // Do not make CTRL-S stop output, for most users it is unexpected and | |
3487 // is hardly ever useful. | |
3488 tnew.c_iflag |= IXON; | |
3489 # endif | |
3493 tnew.c_lflag &= ~(ICANON | ECHO | ISIG | ECHOE | 3490 tnew.c_lflag &= ~(ICANON | ECHO | ISIG | ECHOE |
3494 # if defined(IEXTEN) && !defined(__MINT__) | 3491 # if defined(IEXTEN) && !defined(__MINT__) |
3495 | IEXTEN // IEXTEN enables typing ^V on SOLARIS | 3492 | IEXTEN // IEXTEN enables typing ^V on SOLARIS |
3496 // but it breaks function keys on MINT | 3493 // but it breaks function keys on MINT |
3497 # endif | 3494 # endif |
4629 } | 4626 } |
4630 | 4627 |
4631 if (!pipe_error) // pty or pipe opened or not used | 4628 if (!pipe_error) // pty or pipe opened or not used |
4632 { | 4629 { |
4633 SIGSET_DECL(curset) | 4630 SIGSET_DECL(curset) |
4634 | |
4635 # if defined(__BEOS__) && USE_THREAD_FOR_INPUT_WITH_TIMEOUT | |
4636 beos_cleanup_read_thread(); | |
4637 # endif | |
4638 | |
4639 BLOCK_SIGNALS(&curset); | 4631 BLOCK_SIGNALS(&curset); |
4640 pid = fork(); // maybe we should use vfork() | 4632 pid = fork(); // maybe we should use vfork() |
4641 if (pid == -1) | 4633 if (pid == -1) |
4642 { | 4634 { |
4643 UNBLOCK_SIGNALS(&curset); | 4635 UNBLOCK_SIGNALS(&curset); |
6073 * Or when a Linux GPM mouse event is waiting. | 6065 * Or when a Linux GPM mouse event is waiting. |
6074 * Or when a clientserver message is on the queue. | 6066 * Or when a clientserver message is on the queue. |
6075 * "interrupted" (if not NULL) is set to TRUE when no character is available | 6067 * "interrupted" (if not NULL) is set to TRUE when no character is available |
6076 * but something else needs to be done. | 6068 * but something else needs to be done. |
6077 */ | 6069 */ |
6078 #if defined(__BEOS__) | |
6079 int | |
6080 #else | |
6081 static int | 6070 static int |
6082 #endif | |
6083 RealWaitForChar(int fd, long msec, int *check_for_gpm UNUSED, int *interrupted) | 6071 RealWaitForChar(int fd, long msec, int *check_for_gpm UNUSED, int *interrupted) |
6084 { | 6072 { |
6085 int ret; | 6073 int ret; |
6086 int result; | 6074 int result; |
6087 #if defined(FEAT_XCLIPBOARD) || defined(USE_XSMP) || defined(FEAT_MZSCHEME) | 6075 #if defined(FEAT_XCLIPBOARD) || defined(USE_XSMP) || defined(FEAT_MZSCHEME) |