aboutsummaryrefslogtreecommitdiff
path: root/libbb/lineedit.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2019-05-27 11:56:52 +0100
committerRon Yorston <rmy@pobox.com>2019-05-27 11:56:52 +0100
commita61949401890cbb33a9d6c4571b51c53460ad438 (patch)
tree64dedaddb89896d5b1670a421af123670ca2120b /libbb/lineedit.c
parent03a7b173605a890e1db5177ecd5b8dd591081c41 (diff)
parentbcb1fc3e6ca6fe902610f507eaf9b0b58a5c583a (diff)
downloadbusybox-w32-a61949401890cbb33a9d6c4571b51c53460ad438.tar.gz
busybox-w32-a61949401890cbb33a9d6c4571b51c53460ad438.tar.bz2
busybox-w32-a61949401890cbb33a9d6c4571b51c53460ad438.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 191bc0598..9781b4a08 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -70,13 +70,20 @@
70#if ENABLE_UNICODE_SUPPORT 70#if ENABLE_UNICODE_SUPPORT
71# define BB_NUL ((wchar_t)0) 71# define BB_NUL ((wchar_t)0)
72# define CHAR_T wchar_t 72# define CHAR_T wchar_t
73static bool BB_isspace(CHAR_T c) { return ((unsigned)c < 256 && isspace(c)); } 73static bool BB_isspace(CHAR_T c)
74{
75 return ((unsigned)c < 256 && isspace(c));
76}
74# if ENABLE_FEATURE_EDITING_VI 77# if ENABLE_FEATURE_EDITING_VI
75static bool BB_isalnum_or_underscore(CHAR_T c) { 78static bool BB_isalnum_or_underscore(CHAR_T c)
79{
76 return ((unsigned)c < 256 && isalnum(c)) || c == '_'; 80 return ((unsigned)c < 256 && isalnum(c)) || c == '_';
77} 81}
78# endif 82# endif
79static bool BB_ispunct(CHAR_T c) { return ((unsigned)c < 256 && ispunct(c)); } 83static bool BB_ispunct(CHAR_T c)
84{
85 return ((unsigned)c < 256 && ispunct(c));
86}
80# undef isspace 87# undef isspace
81# undef isalnum 88# undef isalnum
82# undef ispunct 89# undef ispunct