From bcfc37ea98136c449077baa8d97e2334da20d9fc Mon Sep 17 00:00:00 2001 From: Felipe Oliveira Carvalho Date: Wed, 22 Apr 2015 19:50:52 -0300 Subject: Replace vim_isspace() with ascii_isspace() defined in ascii.h --- src/nvim/ascii.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/nvim/ascii.h') diff --git a/src/nvim/ascii.h b/src/nvim/ascii.h index 014cd00706..1442b2a50c 100644 --- a/src/nvim/ascii.h +++ b/src/nvim/ascii.h @@ -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 and 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 */ -- cgit