Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/ctype/iswdigit.c')
-rw-r--r--newlib/libc/ctype/iswdigit.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/newlib/libc/ctype/iswdigit.c b/newlib/libc/ctype/iswdigit.c
new file mode 100644
index 000000000..94c74ae9c
--- /dev/null
+++ b/newlib/libc/ctype/iswdigit.c
@@ -0,0 +1,37 @@
+/*
+FUNCTION
+ <<iswdigit>>---decimal digit wide-character test
+
+INDEX
+ iswdigit
+
+ANSI_SYNOPSIS
+ #include <wctype.h>
+ int iswdigit(wint_t <[c]>);
+
+TRAD_SYNOPSIS
+ #include <wctype.h>
+ int iswdigit(<[c]>)
+ wint_t <[c]>;
+
+DESCRIPTION
+<<iswdigit>> is a function which classifies wide-character values that
+are decimal digits.
+
+RETURNS
+<<iswdigit>> returns non-zero if <[c]> is a decimal digit wide-character.
+
+PORTABILITY
+<<iswdigit>> is C99.
+
+No supporting OS subroutines are required.
+*/
+#include <_ansi.h>
+#include <wctype.h>
+
+int
+_DEFUN(iswdigit,(c), wint_t c)
+{
+ return (c >= (wint_t)'0' && c <= (wint_t)'9');
+}
+