aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os_unix.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-08-07 02:20:12 -0400
committerJustin M. Keyes <justinkz@gmail.com>2014-08-07 02:20:12 -0400
commitad5ae68acd3b0edae564064dfdc2b5b950d0b4e4 (patch)
tree4e0abd7622a6fd1a832efd9a712d2594f2f464ef /src/nvim/os_unix.c
parent1fa3a7d70a99127e5dde3fdb9aa19684febb2ac7 (diff)
parent8b72ae7c7875f47b7d775038700ee17ce71a2510 (diff)
downloadrneovim-ad5ae68acd3b0edae564064dfdc2b5b950d0b4e4.tar.gz
rneovim-ad5ae68acd3b0edae564064dfdc2b5b950d0b4e4.tar.bz2
rneovim-ad5ae68acd3b0edae564064dfdc2b5b950d0b4e4.zip
Merge #814 'Remove dead #ifdefed code'
Diffstat (limited to 'src/nvim/os_unix.c')
-rw-r--r--src/nvim/os_unix.c43
1 files changed, 16 insertions, 27 deletions
diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c
index 4809f0c38c..d4b661bff8 100644
--- a/src/nvim/os_unix.c
+++ b/src/nvim/os_unix.c
@@ -16,15 +16,6 @@
* changed beyond recognition.
*/
-/*
- * Some systems have a prototype for select() that has (int *) instead of
- * (fd_set *), which is wrong. This define removes that prototype. We define
- * our own prototype below.
- * Don't use it for the Mac, it causes a warning for precompiled headers.
- * TODO: use a configure check for precompiled headers?
- */
-# define select select_declared_wrong
-
#include <errno.h>
#include <inttypes.h>
#include <stdbool.h>
@@ -745,16 +736,16 @@ void mch_setmouse(int on)
if (ttym_flags == TTYM_URXVT) {
out_str_nf((char_u *)
(on
- ? IF_EB("\033[?1015h", ESC_STR "[?1015h")
- : IF_EB("\033[?1015l", ESC_STR "[?1015l")));
+ ? "\033[?1015h"
+ : "\033[?1015l"));
ison = on;
}
if (ttym_flags == TTYM_SGR) {
out_str_nf((char_u *)
(on
- ? IF_EB("\033[?1006h", ESC_STR "[?1006h")
- : IF_EB("\033[?1006l", ESC_STR "[?1006l")));
+ ? "\033[?1006h"
+ : "\033[?1006l"));
ison = on;
}
@@ -762,13 +753,13 @@ void mch_setmouse(int on)
if (on) /* enable mouse events, use mouse tracking if available */
out_str_nf((char_u *)
(xterm_mouse_vers > 1
- ? IF_EB("\033[?1002h", ESC_STR "[?1002h")
- : IF_EB("\033[?1000h", ESC_STR "[?1000h")));
+ ? "\033[?1002h"
+ : "\033[?1000h"));
else /* disable mouse events, could probably always send the same */
out_str_nf((char_u *)
(xterm_mouse_vers > 1
- ? IF_EB("\033[?1002l", ESC_STR "[?1002l")
- : IF_EB("\033[?1000l", ESC_STR "[?1000l")));
+ ? "\033[?1002l"
+ : "\033[?1000l"));
ison = on;
} else if (ttym_flags == TTYM_DEC) {
if (on) /* enable mouse events */
@@ -789,8 +780,8 @@ void check_mouse_termcode(void)
&& use_xterm_mouse() != 3
) {
set_mouse_termcode(KS_MOUSE, (char_u *)(term_is_8bit(T_NAME)
- ? IF_EB("\233M", CSI_STR "M")
- : IF_EB("\033[M", ESC_STR "[M")));
+ ? "\233M"
+ : "\033[M"));
if (*p_mouse != NUL) {
/* force mouse off and maybe on to send possibly new mouse
* activation sequence to the xterm, with(out) drag tracing. */
@@ -806,7 +797,7 @@ void check_mouse_termcode(void)
if (!use_xterm_mouse()
)
set_mouse_termcode(KS_NETTERM_MOUSE,
- (char_u *)IF_EB("\033}", ESC_STR "}"));
+ (char_u *)"\033}");
else
del_mouse_termcode(KS_NETTERM_MOUSE);
@@ -814,17 +805,15 @@ void check_mouse_termcode(void)
if (!use_xterm_mouse()
)
set_mouse_termcode(KS_DEC_MOUSE, (char_u *)(term_is_8bit(T_NAME)
- ? IF_EB("\233",
- CSI_STR) : IF_EB("\033[",
- ESC_STR "[")));
+ ? "\233" : "\033["));
else
del_mouse_termcode(KS_DEC_MOUSE);
/* same as the dec mouse */
if (use_xterm_mouse() == 3
) {
set_mouse_termcode(KS_URXVT_MOUSE, (char_u *)(term_is_8bit(T_NAME)
- ? IF_EB("\233", CSI_STR)
- : IF_EB("\033[", ESC_STR "[")));
+ ? "\233"
+ : "\033["));
if (*p_mouse != NUL) {
mch_setmouse(FALSE);
@@ -836,8 +825,8 @@ void check_mouse_termcode(void)
if (use_xterm_mouse() == 4
) {
set_mouse_termcode(KS_SGR_MOUSE, (char_u *)(term_is_8bit(T_NAME)
- ? IF_EB("\233<", CSI_STR "<")
- : IF_EB("\033[<", ESC_STR "[<")));
+ ? "\233<"
+ : "\033[<"));
if (*p_mouse != NUL) {
mch_setmouse(FALSE);