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 'winsup/mingw/mingwex/wctype.c')
-rwxr-xr-xwinsup/mingw/mingwex/wctype.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/winsup/mingw/mingwex/wctype.c b/winsup/mingw/mingwex/wctype.c
deleted file mode 100755
index 197fde5f7..000000000
--- a/winsup/mingw/mingwex/wctype.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- wctype.c
- 7.25.2.2.2 The wctype function
-
- Contributed by: Danny Smith <dannysmith@usesr.sourcefoge.net>
- 2005-02-24
-
- This source code is placed in the PUBLIC DOMAIN. It is modified
- from the Q8 package created by Doug Gwyn <gwyn@arl.mil>
-
- The wctype function constructs a value with type wctype_t that
- describes a class of wide characters identified by the string
- argument property.
-
- In particular, we map the property strings so that:
-
- iswctype(wc, wctype("alnum")) == iswalnum(wc)
- iswctype(wc, wctype("alpha")) == iswalpha(wc)
- iswctype(wc, wctype("cntrl")) == iswcntrl(wc)
- iswctype(wc, wctype("digit")) == iswdigit(wc)
- iswctype(wc, wctype("graph")) == iswgraph(wc)
- iswctype(wc, wctype("lower")) == iswlower(wc)
- iswctype(wc, wctype("print")) == iswprint(wc)
- iswctype(wc, wctype("punct")) == iswpunct(wc)
- iswctype(wc, wctype("space")) == iswspace(wc)
- iswctype(wc, wctype("upper")) == iswupper(wc)
- iswctype(wc, wctype("xdigit")) == iswxdigit(wc)
-
-*/
-
-#include <string.h>
-#include <wctype.h>
-
-/* Using the bit-OR'd ctype character classification flags as return
- values achieves compatibility with MS iswctype(). */
-static const struct {
- const char *name;
- wctype_t flags;} cmap[] = {
- {"alnum", _ALPHA|_DIGIT},
- {"alpha", _ALPHA},
- {"cntrl", _CONTROL},
- {"digit", _DIGIT},
- {"graph", _PUNCT|_ALPHA|_DIGIT},
- {"lower", _LOWER},
- {"print", _BLANK|_PUNCT|_ALPHA|_DIGIT},
- {"punct", _PUNCT},
- {"space", _SPACE},
- {"upper", _UPPER},
- {"xdigit", _HEX}
- };
-
-#define NCMAP (sizeof cmap / sizeof cmap[0])
-wctype_t wctype (const char *property)
-{
- int i;
- for (i = 0; i < NCMAP; ++i)
- if (strcmp (property, cmap[i].name) == 0)
- return cmap[i].flags;
- return 0;
-}