Go to the documentation of this file.
19 #define MB_BYTE2LEN(b) utf8len_tab[b]
20 #define MB_BYTE2LEN_CHECK(b) (((b) < 0 || (b) > 255) ? 1 : utf8len_tab[b])
28 #define ENC_UNICODE 0x04
30 #define ENC_ENDIAN_B 0x10 // Unicode: Big endian
31 #define ENC_ENDIAN_L 0x20 // Unicode: Little endian
33 #define ENC_2BYTE 0x40 // Unicode: UCS-2
34 #define ENC_4BYTE 0x80 // Unicode: UCS-4
35 #define ENC_2WORD 0x100 // Unicode: UTF-16
37 #define ENC_LATIN1 0x200 // Latin1
38 #define ENC_LATIN9 0x400 // Latin9
39 #define ENC_MACROMAN 0x800 // Mac Roman (not Macro Man! :-)
51 #define MBYTE_NONE_CONV { \
52 .vc_type = CONV_NONE, \
72 #ifdef INCLUDE_GENERATED_DECLARATIONS
73 # include "mbyte.h.generated.h"
76 static inline int mb_strcmp_ic(
bool ic,
const char *s1,
const char *s2)
84 static inline int mb_strcmp_ic(
bool ic,
const char *s1,
const char *s2)
86 return (ic ?
mb_stricmp(s1, s2) : strcmp(s1, s2));
88 #endif // NVIM_MBYTE_H
int mb_stricmp(const char *s1, const char *s2)
Definition: mbyte.c:1576
@ CONV_9_TO_UTF8
Definition: mbyte.h:45
@ CONV_TO_LATIN1
Definition: mbyte.h:46
Structure used for string conversions.
Definition: mbyte.h:58
@ CONV_TO_LATIN9
Definition: mbyte.h:47
#define REAL_FATTR_NONNULL_ALL
Definition: func_attr.h:183
const uint8_t utf8len_tab_zero[256]
Definition: mbyte.c:102
int vc_factor
Maximal expansion factor.
Definition: mbyte.h:60
@ CONV_NONE
Definition: mbyte.h:43
const uint8_t utf8len_tab[256]
Definition: mbyte.c:81
bool vc_fail
Definition: mbyte.h:64
int vc_type
Zero or more ConvFlags.
Definition: mbyte.h:59
ConvFlags
Flags for vimconv_T.
Definition: mbyte.h:42
@ CONV_ICONV
Definition: mbyte.h:48
#define REAL_FATTR_PURE
Definition: func_attr.h:163
@ CONV_TO_UTF8
Definition: mbyte.h:44
static int REAL_FATTR_WARN_UNUSED_RESULT
Definition: typval_encode.c.h:302