Replace vim_iswhite with ascii_iswhite() defined in ascii.h

This commit is contained in:
Felipe Oliveira Carvalho
2015-04-22 19:12:26 -03:00
parent d350d12a00
commit 93bf201119
33 changed files with 198 additions and 192 deletions

View File

@@ -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 */