| 1 |
/* wctype_portable.cpp |
| 2 |
* |
| 3 |
* Copyright (C) 2024 Paul Boersma |
| 4 |
* |
| 5 |
* This code is free software; you can redistribute it and/or modify |
| 6 |
* it under the terms of the GNU General Public License as published by |
| 7 |
* the Free Software Foundation; either version 2 of the License, or (at |
| 8 |
* your option) any later version. |
| 9 |
* |
| 10 |
* This code is distributed in the hope that it will be useful, but |
| 11 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 13 |
* See the GNU General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License |
| 16 |
* along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
#include "wctype_portable.h" |
| 20 |
#include "melder.h" |
| 21 |
|
| 22 |
int iswalpha_portable (wint_t wc) { |
| 23 |
return Melder_isLetter ((char32) wc); |
| 24 |
} |
| 25 |
|
| 26 |
int iswalnum_portable (wint_t wc) { |
| 27 |
return Melder_isAlphanumeric ((char32) wc); |
| 28 |
} |
| 29 |
|
| 30 |
int iswpunct_portable (wint_t wc) { |
| 31 |
return Melder_isPunctuationOrSymbol ((char32) wc); |
| 32 |
} |
| 33 |
|
| 34 |
int iswdigit_portable (wint_t wc) { |
| 35 |
return Melder_isDecimalNumber ((char32) wc); |
| 36 |
} |
| 37 |
|
| 38 |
int iswspace_portable (wint_t wc) { |
| 39 |
return Melder_isHorizontalOrVerticalSpace ((char32) wc); |
| 40 |
} |
| 41 |
|
| 42 |
int iswlower_portable (wint_t wc) { |
| 43 |
return Melder_isLowerCaseLetter ((char32) wc); |
| 44 |
} |
| 45 |
|
| 46 |
int iswupper_portable (wint_t wc) { |
| 47 |
return Melder_isUpperCaseLetter ((char32) wc); |
| 48 |
} |
| 49 |
|
| 50 |
/* End of file wctype_portable.cpp */ |