source: trunk/libs/newlib/src/newlib/libc/ctype/iswdigit.c @ 444

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: 892 bytes
Line 
1/*
2FUNCTION
3        <<iswdigit>>, <<iswdigit_l>>---decimal digit wide character test
4
5INDEX
6        iswdigit
7
8INDEX
9        iswdigit_l
10
11SYNOPSIS
12        #include <wctype.h>
13        int iswdigit(wint_t <[c]>);
14
15        #include <wctype.h>
16        int iswdigit_l(wint_t <[c]>, locale_t <[locale]>);
17
18DESCRIPTION
19<<iswdigit>> is a function which classifies wide-character values that
20are decimal digits.
21
22<<iswdigit_l>> is like <<iswdigit>> but performs the check based on the
23locale specified by the locale object locale.  If <[locale]> is
24LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined.
25
26RETURNS
27<<iswdigit>>, <<iswdigit_l>> return non-zero if <[c]> is a decimal digit wide character.
28
29PORTABILITY
30<<iswdigit>> is C99.
31<<iswdigit_l>> is POSIX-1.2008.
32
33No supporting OS subroutines are required.
34*/
35#include <_ansi.h>
36#include <wctype.h>
37
38int
39iswdigit (wint_t c)
40{
41  return (c >= (wint_t)'0' && c <= (wint_t)'9');
42}
Note: See TracBrowser for help on using the repository browser.