Data Structures | Macros | Enumerations | Variables
mbyte.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "nvim/func_attr.h"
#include "nvim/iconv.h"
#include "nvim/os/os_defs.h"
#include "nvim/types.h"

Go to the source code of this file.

Data Structures

struct  vimconv_T
 Structure used for string conversions. More...
 

Macros

#define MB_BYTE2LEN(b)   utf8len_tab[b]
 
#define MB_BYTE2LEN_CHECK(b)   (((b) < 0 || (b) > 255) ? 1 : utf8len_tab[b])
 
#define MB_MAXCHAR   6
 
#define ENC_8BIT   0x01
 
#define ENC_DBCS   0x02
 
#define ENC_UNICODE   0x04
 
#define ENC_ENDIAN_B   0x10
 
#define ENC_ENDIAN_L   0x20
 
#define ENC_2BYTE   0x40
 
#define ENC_4BYTE   0x80
 
#define ENC_2WORD   0x100
 
#define ENC_LATIN1   0x200
 
#define ENC_LATIN9   0x400
 
#define ENC_MACROMAN   0x800
 
#define MBYTE_NONE_CONV
 

Enumerations

enum  ConvFlags {
  CONV_NONE = 0, CONV_TO_UTF8 = 1, CONV_9_TO_UTF8 = 2, CONV_TO_LATIN1 = 3,
  CONV_TO_LATIN9 = 4, CONV_ICONV = 5
}
 Flags for vimconv_T. More...
 

Variables

const uint8_t utf8len_tab_zero [256]
 
const uint8_t utf8len_tab [256]
 

Macro Definition Documentation

◆ ENC_2BYTE

#define ENC_2BYTE   0x40

◆ ENC_2WORD

#define ENC_2WORD   0x100

◆ ENC_4BYTE

#define ENC_4BYTE   0x80

◆ ENC_8BIT

#define ENC_8BIT   0x01

◆ ENC_DBCS

#define ENC_DBCS   0x02

◆ ENC_ENDIAN_B

#define ENC_ENDIAN_B   0x10

◆ ENC_ENDIAN_L

#define ENC_ENDIAN_L   0x20

◆ ENC_LATIN1

#define ENC_LATIN1   0x200

◆ ENC_LATIN9

#define ENC_LATIN9   0x400

◆ ENC_MACROMAN

#define ENC_MACROMAN   0x800

◆ ENC_UNICODE

#define ENC_UNICODE   0x04

◆ MB_BYTE2LEN

#define MB_BYTE2LEN (   b)    utf8len_tab[b]

◆ MB_BYTE2LEN_CHECK

#define MB_BYTE2LEN_CHECK (   b)    (((b) < 0 || (b) > 255) ? 1 : utf8len_tab[b])

◆ MB_MAXCHAR

#define MB_MAXCHAR   6

◆ MBYTE_NONE_CONV

#define MBYTE_NONE_CONV
Value:
{ \
.vc_type = CONV_NONE, \
.vc_factor = 1, \
.vc_fail = false, \
}

Enumeration Type Documentation

◆ ConvFlags

enum ConvFlags

Flags for vimconv_T.

Enumerator
CONV_NONE 
CONV_TO_UTF8 
CONV_9_TO_UTF8 
CONV_TO_LATIN1 
CONV_TO_LATIN9 
CONV_ICONV 

Variable Documentation

◆ utf8len_tab

const uint8_t utf8len_tab[256]

◆ utf8len_tab_zero

const uint8_t utf8len_tab_zero[256]
CONV_NONE
@ CONV_NONE
Definition: mbyte.h:43