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_OOCT = (1 << 3),
27  STR2NR_FORCE = (1 << 7),
39  STR2NR_QUOTE = (1 << 4),
41 
42 #ifdef INCLUDE_GENERATED_DECLARATIONS
43 # include "charset.h.generated.h"
44 #endif
45 
46 static inline bool vim_isbreak(int c)
49 
52 static inline bool vim_isbreak(int c)
53 {
54  return breakat_flags[(char_u)c];
55 }
56 #endif // NVIM_CHARSET_H
STR2NR_QUOTE
@ STR2NR_QUOTE
Ignore embedded single quotes.
Definition: charset.h:39
STR2NR_OOCT
@ STR2NR_OOCT
Definition: charset.h:26
breakat_flags
EXTERN char breakat_flags[256]
Definition: option_defs.h:329
STR2NR_HEX
@ STR2NR_HEX
Allow hexadecimal numbers.
Definition: charset.h:25
types.h
STR2NR_DEC
@ STR2NR_DEC
Definition: charset.h:22
STR2NR_FORCE
@ STR2NR_FORCE
Definition: charset.h:34
option_defs.h
STR2NR_BIN
@ STR2NR_BIN
Allow binary numbers.
Definition: charset.h:23
REAL_FATTR_CONST
#define REAL_FATTR_CONST
Definition: func_attr.h:167
ChStr2NrFlags
ChStr2NrFlags
Flags for vim_str2nr()
Definition: charset.h:21
typval.h
STR2NR_NO_OCT
@ STR2NR_NO_OCT
Disallow octals numbers without the 0o prefix.
Definition: charset.h:38
char_u
unsigned char char_u
Definition: types.h:12
buffer_defs.h
STR2NR_OCT
@ STR2NR_OCT
Allow octal numbers.
Definition: charset.h:24
STR2NR_ALL
@ STR2NR_ALL
Recognize all formats vim_str2nr() can recognize.
Definition: charset.h:36
REAL_FATTR_ALWAYS_INLINE
static int REAL_FATTR_WARN_UNUSED_RESULT REAL_FATTR_ALWAYS_INLINE
Definition: typval_encode.c.h:265
pos.h