charset.h
Go to the documentation of this file.
1 #ifndef NVIM_CHARSET_H
2 #define NVIM_CHARSET_H
3 
4 #include "nvim/types.h"
5 #include "nvim/pos.h"
6 #include "nvim/buffer_defs.h"
7 #include "nvim/eval/typval.h"
8 #include "nvim/option_defs.h"
9 
15 #define CH_FOLD(c) \
16  utf_fold((sizeof(c) == sizeof(char)) \
17  ?((int)(uint8_t)(c)) \
18  :((int)(c)))
19 
21 typedef enum {
23  STR2NR_BIN = (1 << 0),
24  STR2NR_OCT = (1 << 1),
25  STR2NR_HEX = (1 << 2),
26  STR2NR_FORCE = (1 << 3),
34 
35 #ifdef INCLUDE_GENERATED_DECLARATIONS
36 # include "charset.h.generated.h"
37 #endif
38 
39 static inline bool vim_isbreak(int c)
42 
45 static inline bool vim_isbreak(int c)
46 {
47  return breakat_flags[(char_u)c];
48 }
49 #endif // NVIM_CHARSET_H
Definition: charset.h:22
EXTERN char breakat_flags[256]
Definition: option_defs.h:320
Definition: charset.h:30
#define REAL_FATTR_CONST
Definition: func_attr.h:167
Allow octal numbers.
Definition: charset.h:24
ChStr2NrFlags
Flags for vim_str2nr()
Definition: charset.h:21
Allow binary numbers.
Definition: charset.h:23
static int REAL_FATTR_WARN_UNUSED_RESULT REAL_FATTR_ALWAYS_INLINE
Definition: typval_encode.c.h:258
unsigned char char_u
Definition: types.h:11
Recognize all formats vim_str2nr() can recognize.
Definition: charset.h:32
Definition: charset.h:25