From ab1eec10a1906cadeed7f480b0d12505a0fba0ad Mon Sep 17 00:00:00 2001 From: Nicolas Hillegeer Date: Fri, 18 Jul 2014 10:51:44 +0200 Subject: globals.h: decouple vim.h and globals.h Allow globals.h to be included without including vim.h. Another small piece of the puzzle of dismantling vim.h. Moving some extra `#define`'s to globals.h is no better than having them in vim.h. We should, in a later PR, move them to the file where they belong or to a separate `constants.h` or something. --- src/nvim/types.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/nvim/types.h') diff --git a/src/nvim/types.h b/src/nvim/types.h index 9d53722014..c18c6abb4b 100644 --- a/src/nvim/types.h +++ b/src/nvim/types.h @@ -24,4 +24,13 @@ typedef uintptr_t long_u; */ typedef unsigned char char_u; +// The u8char_T can hold one decoded UTF-8 character. We normally use 32 +// bits now, since some Asian characters don't fit in 16 bits. u8char_T is +// only used for displaying, it could be 16 bits to save memory. +#ifdef UNICODE16 +typedef uint16_t u8char_T; +#else +typedef uint32_t u8char_T; +#endif + #endif /* NVIM_TYPES_H */ -- cgit