Commit d96764ba d96764ba829cea2bd2cbd8ff483a11101e74883b by Sergey Poznyakoff

cctype: bugfix.

* include/mailutils/cctype.h (mu_isblank): Use mu_c_is_class.
* libmailutils/string/muctype.c (mu_c_tab): Mark ' ' and '\t' as
MU_CTYPE_BLANK.
1 parent 192e01af
...@@ -56,7 +56,7 @@ extern int mu_c_tab[MU_C_TAB_MAX]; ...@@ -56,7 +56,7 @@ extern int mu_c_tab[MU_C_TAB_MAX];
56 #define mu_isxdigit(c) mu_c_is_class (c, MU_CTYPE_DIGIT|MU_CTYPE_XLETR) 56 #define mu_isxdigit(c) mu_c_is_class (c, MU_CTYPE_DIGIT|MU_CTYPE_XLETR)
57 #define mu_isalnum(c) mu_c_is_class (c, MU_CTYPE_ALPHA|MU_CTYPE_DIGIT) 57 #define mu_isalnum(c) mu_c_is_class (c, MU_CTYPE_ALPHA|MU_CTYPE_DIGIT)
58 #define mu_isascii(c) (((unsigned)c) < MU_C_TAB_MAX) 58 #define mu_isascii(c) (((unsigned)c) < MU_C_TAB_MAX)
59 #define mu_isblank(c) ((c) == ' ' || (c) == '\t') 59 #define mu_isblank(c) mu_c_is_class (c, MU_CTYPE_BLANK)
60 #define mu_isendln(c) mu_c_is_class (c, MU_CTYPE_ENDLN) 60 #define mu_isendln(c) mu_c_is_class (c, MU_CTYPE_ENDLN)
61 61
62 #define mu_tolower(c) \ 62 #define mu_tolower(c) \
......
...@@ -30,7 +30,7 @@ int mu_c_tab[MU_C_TAB_MAX] = { ...@@ -30,7 +30,7 @@ int mu_c_tab[MU_C_TAB_MAX] = {
30 MU_CTYPE_CNTRL, 30 MU_CTYPE_CNTRL,
31 MU_CTYPE_CNTRL, 31 MU_CTYPE_CNTRL,
32 MU_CTYPE_CNTRL, 32 MU_CTYPE_CNTRL,
33 MU_CTYPE_CNTRL|MU_CTYPE_SPACE, 33 MU_CTYPE_CNTRL|MU_CTYPE_SPACE|MU_CTYPE_BLANK,
34 MU_CTYPE_CNTRL|MU_CTYPE_SPACE|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