diff options
author | ZyX <kp-pav@yandex.ru> | 2017-05-08 15:43:45 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-05-08 15:43:45 +0300 |
commit | 09f849b60000c2d401d82f2b2fb2badde5583658 (patch) | |
tree | 662d17ea2e905f4136abef2d003014cb7dc914d4 /src/nvim/macros.h | |
parent | 1d7fde39a6927d01de74aefb540ad445bfdfbfda (diff) | |
parent | a9605bb4aff76a934a4c39fbda093ee8fc8a1c71 (diff) | |
download | rneovim-09f849b60000c2d401d82f2b2fb2badde5583658.tar.gz rneovim-09f849b60000c2d401d82f2b2fb2badde5583658.tar.bz2 rneovim-09f849b60000c2d401d82f2b2fb2badde5583658.zip |
Merge branch 'master' into luaviml'/lua
Diffstat (limited to 'src/nvim/macros.h')
-rw-r--r-- | src/nvim/macros.h | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/nvim/macros.h b/src/nvim/macros.h index 22fd48de9d..214af82422 100644 --- a/src/nvim/macros.h +++ b/src/nvim/macros.h @@ -29,25 +29,6 @@ #define S_LEN(s) (s), (sizeof(s) - 1) /* - * Position comparisons - */ -# define lt(a, b) (((a).lnum != (b).lnum) \ - ? (a).lnum < (b).lnum \ - : (a).col != (b).col \ - ? (a).col < (b).col \ - : (a).coladd < (b).coladd) -# define ltp(a, b) (((a)->lnum != (b)->lnum) \ - ? (a)->lnum < (b)->lnum \ - : (a)->col != (b)->col \ - ? (a)->col < (b)->col \ - : (a)->coladd < (b)->coladd) -# define equalpos(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col) && \ - ((a).coladd == (b).coladd)) -# define clearpos(a) {(a)->lnum = 0; (a)->col = 0; (a)->coladd = 0; } - -#define ltoreq(a, b) (lt(a, b) || equalpos(a, b)) - -/* * lineempty() - return TRUE if the line is empty */ #define lineempty(p) (*ml_get(p) == NUL) @@ -94,7 +75,7 @@ do { \ if (*p_langmap \ && (condition) \ - && (p_lrm || (!p_lrm && KeyTyped)) \ + && (p_lrm || KeyTyped) \ && !KeyStuffed \ && (c) >= 0) \ { \ @@ -120,8 +101,10 @@ /* mch_open_rw(): invoke os_open() with third argument for user R/W. */ #if defined(UNIX) /* open in rw------- mode */ # define mch_open_rw(n, f) os_open((n), (f), (mode_t)0600) +#elif defined(WIN32) +# define mch_open_rw(n, f) os_open((n), (f), S_IREAD | S_IWRITE) #else -# define mch_open_rw(n, f) os_open((n), (f), 0) +# define mch_open_rw(n, f) os_open((n), (f), 0) #endif # define REPLACE_NORMAL(s) (((s) & REPLACE_FLAG) && !((s) & VREPLACE_FLAG)) |