aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ascii.h
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-04-05 22:39:40 -0400
committerJames McCoy <jamessan@jamessan.com>2017-04-05 22:39:40 -0400
commitbb54d921aaf85f0393c1ba10585560056f7f4ec8 (patch)
tree316ff7424337b3572b58340383eeabb3a0d36e80 /src/nvim/ascii.h
parent4f69a8fb8854698adb2de8956ad0d86ff35a6f68 (diff)
parent210b013ce75b5ea8a897071e32decc1e1f88189e (diff)
downloadrneovim-bb54d921aaf85f0393c1ba10585560056f7f4ec8.tar.gz
rneovim-bb54d921aaf85f0393c1ba10585560056f7f4ec8.tar.bz2
rneovim-bb54d921aaf85f0393c1ba10585560056f7f4ec8.zip
Merge remote-tracking branch 'origin/master' into vim-7.4.2170
Diffstat (limited to 'src/nvim/ascii.h')
-rw-r--r--src/nvim/ascii.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/nvim/ascii.h b/src/nvim/ascii.h
index 44ff540b40..adde91f9ec 100644
--- a/src/nvim/ascii.h
+++ b/src/nvim/ascii.h
@@ -8,9 +8,11 @@
// Definitions of various common control characters.
-#define CharOrd(x) ((x) < 'a' ? (x) - 'A' : (x) - 'a')
-#define CharOrdLow(x) ((x) - 'a')
-#define CharOrdUp(x) ((x) - 'A')
+#define CharOrd(x) ((uint8_t)(x) < 'a' \
+ ? (uint8_t)(x) - 'A'\
+ : (uint8_t)(x) - 'a')
+#define CharOrdLow(x) ((uint8_t)(x) - 'a')
+#define CharOrdUp(x) ((uint8_t)(x) - 'A')
#define ROT13(c, a) (((((c) - (a)) + 13) % 26) + (a))
#define NUL '\000'
@@ -18,15 +20,14 @@
#define BS '\010'
#define TAB '\011'
#define NL '\012'
-#define NL_STR (char_u *)"\012"
+#define NL_STR "\012"
#define FF '\014'
#define CAR '\015' /* CR is used by Mac OS X */
#define ESC '\033'
-#define ESC_STR (char_u *)"\033"
-#define ESC_STR_nc "\033"
+#define ESC_STR "\033"
#define DEL 0x7f
-#define DEL_STR (char_u *)"\177"
-#define CSI 0x9b /* Control Sequence Introducer */
+#define DEL_STR "\177"
+#define CSI 0x9b // Control Sequence Introducer
#define CSI_STR "\233"
#define DCS 0x90 /* Device Control String */
#define STERM 0x9c /* String Terminator */