Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions newlib/libc/ctype/iswalnum.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,5 @@ No supporting OS subroutines are required.
int
iswalnum (wint_t c)
{
#ifdef _MB_CAPABLE
return iswalnum_l (c, 0);
#else
return c < (wint_t)0x100 ? isalnum (c) : 0;
#endif
}
9 changes: 9 additions & 0 deletions newlib/libc/ctype/iswdigit_l.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,20 @@ Copyright (c) 2016 Corinna Vinschen <[email protected]>
Modified (m) 2017 Thomas Wolff: revise Unicode and locale/wchar handling
*/
#define _DEFAULT_SOURCE
#include <ctype.h>
#include <wctype.h>
#include "local.h"
#include "categories.h"

int
iswdigit_l (wint_t c, struct __locale_t *locale)
{
(void) locale;
#ifdef _MB_CAPABLE
c = _jp2uc_l (c, locale);
enum category cat = category (c);
return cat == CAT_Nd; // Decimal_Number
#else
return c >= (wint_t)'0' && c <= (wint_t)'9';
#endif /* _MB_CAPABLE */
}
Loading