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/iswxdigit.c')
-rw-r--r--newlib/libc/ctype/iswxdigit.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/newlib/libc/ctype/iswxdigit.c b/newlib/libc/ctype/iswxdigit.c
new file mode 100644
index 000000000..73d8fa445
--- /dev/null
+++ b/newlib/libc/ctype/iswxdigit.c
@@ -0,0 +1,39 @@
+/*
+FUNCTION
+ <<iswxdigit>>---hexadecimal digit wide-character test
+
+INDEX
+ iswxdigit
+
+ANSI_SYNOPSIS
+ #include <wctype.h>
+ int iswxdigit(wint_t <[c]>);
+
+TRAD_SYNOPSIS
+ #include <wctype.h>
+ int iswxdigit(<[c]>)
+ wint_t <[c]>;
+
+DESCRIPTION
+<<iswxdigit>> is a function which classifies wide-character values that
+are hexadecimal digits.
+
+RETURNS
+<<iswxdigit>> returns non-zero if <[c]> is a hexadecimal digit wide-character.
+
+PORTABILITY
+<<iswxdigit>> is C99.
+
+No supporting OS subroutines are required.
+*/
+#include <_ansi.h>
+#include <wctype.h>
+
+int
+_DEFUN(iswxdigit,(c), wint_t c)
+{
+ return ((c >= (wint_t)'0' && c <= (wint_t)'9') ||
+ (c >= (wint_t)'a' && c <= (wint_t)'f') ||
+ (c >= (wint_t)'A' && c <= (wint_t)'F'));
+}
+