diff options
author | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2015-04-22 19:12:26 -0300 |
---|---|---|
committer | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2015-04-24 20:37:13 -0300 |
commit | 93bf201119f68b0723ee3f240afa48134cc41399 (patch) | |
tree | e314c40921aa19141cc68b6f6af3e23fa2ca2ef8 /src/nvim/ascii.h | |
parent | d350d12a00518aa0d9e3a1d49c6815c3398d882f (diff) | |
download | rneovim-93bf201119f68b0723ee3f240afa48134cc41399.tar.gz rneovim-93bf201119f68b0723ee3f240afa48134cc41399.tar.bz2 rneovim-93bf201119f68b0723ee3f240afa48134cc41399.zip |
Replace vim_iswhite with ascii_iswhite() defined in ascii.h
Diffstat (limited to 'src/nvim/ascii.h')
-rw-r--r-- | src/nvim/ascii.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/ascii.h b/src/nvim/ascii.h index d9d9eac04d..82562b9aa5 100644 --- a/src/nvim/ascii.h +++ b/src/nvim/ascii.h @@ -8,6 +8,9 @@ #ifndef NVIM_ASCII_H #define NVIM_ASCII_H +#include <stdbool.h> +#include "func_attr.h" + // Definitions of various common control characters. #define CharOrd(x) ((x) < 'a' ? (x) - 'A' : (x) - 'a') @@ -87,4 +90,13 @@ # define PATHSEPSTR "/" #endif +static inline bool ascii_iswhite(int c) 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. +static inline bool ascii_iswhite(int c) +{ + return c == ' ' || c == '\t'; +} + #endif /* NVIM_ASCII_H */ |