aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ascii.h
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-03-29 23:15:07 +0200
committerGitHub <noreply@github.com>2017-03-29 23:15:07 +0200
commitc60e409471c51864883bd0b874980d0a8857f813 (patch)
tree64444c3f0210461e398654e3d6dd6f00e0091cd9 /src/nvim/ascii.h
parentc35420558bed0bfa9938ecd1facec88f1df392a5 (diff)
parent46efe14473fa803f84509592cc1e8fca4eb20640 (diff)
downloadrneovim-c60e409471c51864883bd0b874980d0a8857f813.tar.gz
rneovim-c60e409471c51864883bd0b874980d0a8857f813.tar.bz2
rneovim-c60e409471c51864883bd0b874980d0a8857f813.zip
Merge #5119 from ZyX-I/split-eval
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 */