aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mbyte.h
diff options
context:
space:
mode:
authorckelsel <ckelsel@hotmail.com>2017-08-17 08:20:48 +0800
committerckelsel <ckelsel@hotmail.com>2017-08-17 08:20:48 +0800
commit673fc748237345914e0ad584bc4cba997c96a37e (patch)
tree7f55a3b3dd362fbbc59ff204287a0aae99089e5e /src/nvim/mbyte.h
parent5d332084e1ca4c29b1ccb90ea44c3b861dac5701 (diff)
parent5b32bce73c93a64970afe0e92e0a8ba2fed88619 (diff)
downloadrneovim-673fc748237345914e0ad584bc4cba997c96a37e.tar.gz
rneovim-673fc748237345914e0ad584bc4cba997c96a37e.tar.bz2
rneovim-673fc748237345914e0ad584bc4cba997c96a37e.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/nvim/mbyte.h')
-rw-r--r--src/nvim/mbyte.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/mbyte.h b/src/nvim/mbyte.h
index ad9e38004c..bf6ccb13a5 100644
--- a/src/nvim/mbyte.h
+++ b/src/nvim/mbyte.h
@@ -1,6 +1,7 @@
#ifndef NVIM_MBYTE_H
#define NVIM_MBYTE_H
+#include <stdint.h>
#include <stdbool.h>
#include <string.h>
@@ -18,6 +19,9 @@
#define MB_BYTE2LEN(b) utf8len_tab[b]
#define MB_BYTE2LEN_CHECK(b) (((b) < 0 || (b) > 255) ? 1 : utf8len_tab[b])
+// max length of an unicode char
+#define MB_MAXCHAR 6
+
/* properties used in enc_canon_table[] (first three mutually exclusive) */
#define ENC_8BIT 0x01
#define ENC_DBCS 0x02
@@ -67,6 +71,8 @@ typedef struct {
///< otherwise use '?'.
} vimconv_T;
+extern const uint8_t utf8len_tab_zero[256];
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "mbyte.h.generated.h"
#endif