Last change
on this file since 444 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
1010 bytes
|
Rev | Line | |
---|
[444] | 1 | /* |
---|
| 2 | FUNCTION |
---|
| 3 | <<iswxdigit>>, <<iswxdigit_l>>---hexadecimal digit wide character test |
---|
| 4 | |
---|
| 5 | INDEX |
---|
| 6 | iswxdigit |
---|
| 7 | |
---|
| 8 | INDEX |
---|
| 9 | iswxdigit_l |
---|
| 10 | |
---|
| 11 | SYNOPSIS |
---|
| 12 | #include <wctype.h> |
---|
| 13 | int iswxdigit(wint_t <[c]>); |
---|
| 14 | |
---|
| 15 | #include <wctype.h> |
---|
| 16 | int iswxdigit_l(wint_t <[c]>, locale_t <[locale]>); |
---|
| 17 | |
---|
| 18 | DESCRIPTION |
---|
| 19 | <<iswxdigit>> is a function which classifies wide character values that |
---|
| 20 | are hexadecimal digits. |
---|
| 21 | |
---|
| 22 | <<iswxdigit_l>> is like <<iswxdigit>> but performs the check based on the |
---|
| 23 | locale specified by the locale object locale. If <[locale]> is |
---|
| 24 | LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined. |
---|
| 25 | |
---|
| 26 | RETURNS |
---|
| 27 | <<iswxdigit>>, <<iswxdigit_l>> return non-zero if <[c]> is a hexadecimal digit wide character. |
---|
| 28 | |
---|
| 29 | PORTABILITY |
---|
| 30 | <<iswxdigit>> is C99. |
---|
| 31 | <<iswxdigit_l>> is POSIX-1.2008. |
---|
| 32 | |
---|
| 33 | No supporting OS subroutines are required. |
---|
| 34 | */ |
---|
| 35 | #include <_ansi.h> |
---|
| 36 | #include <wctype.h> |
---|
| 37 | |
---|
| 38 | int |
---|
| 39 | iswxdigit (wint_t c) |
---|
| 40 | { |
---|
| 41 | return ((c >= (wint_t)'0' && c <= (wint_t)'9') || |
---|
| 42 | (c >= (wint_t)'a' && c <= (wint_t)'f') || |
---|
| 43 | (c >= (wint_t)'A' && c <= (wint_t)'F')); |
---|
| 44 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.