mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 16:58:17 +00:00
Replace vim_isspace() with ascii_isspace() defined in ascii.h
This commit is contained in:
@@ -93,6 +93,7 @@
|
||||
static inline bool ascii_iswhite(int c) FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_CONST;
|
||||
static inline bool ascii_isdigit(int c) FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_CONST;
|
||||
static inline bool ascii_isxdigit(int c) FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_CONST;
|
||||
static inline bool ascii_isspace(int x) FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_CONST;
|
||||
|
||||
/// ascii_iswhite() is used for "^" and the like. It differs from isspace()
|
||||
/// because it doesn't include <CR> and <LF> and the like.
|
||||
@@ -122,5 +123,12 @@ static inline bool ascii_isxdigit(int c)
|
||||
|| (c >= 'A' && c <= 'F');
|
||||
}
|
||||
|
||||
/// Vim has its own isspace() function, because on some machines isspace()
|
||||
/// can't handle characters above 128.
|
||||
static inline bool ascii_isspace(int x)
|
||||
{
|
||||
return (x >= 9 && x <= 13) || x == ' ';
|
||||
}
|
||||
|
||||
|
||||
#endif /* NVIM_ASCII_H */
|
||||
|
Reference in New Issue
Block a user