| 7.25.3.2 Extensible wide-character case mapping functions
|
| Contributed by: Danny Smith <dannysmith@usesr.sourcefoge.net>
|
| This source code is placed in the PUBLIC DOMAIN. It is modified
|
| from the Q8 package created by Doug Gwyn <gwyn@arl.mil>
|
| This differs from the MS implementation of wctrans which
|
| returns 0 for tolower and 1 for toupper. According to
|
| C99, a 0 return value indicates invalid input.
|
| These two function go in the same translation unit so that we
|
| towctrans(wc, wctrans("tolower")) == towlower(wc)
|
| towctrans(wc, wctrans("toupper")) == towupper(wc)
|
| towctrans(wc, wctrans("")) == wc
|
| which is not required by standard.
|
| wctrans_t val; } tmap[] = {
|
| #define NTMAP (sizeof tmap / sizeof tmap[0])
|
| wctrans (const char* property)
|
| for ( i = 0; i < NTMAP; ++i )
|
| if (strcmp (property, tmap[i].name) == 0)
|
| wint_t towctrans (wint_t wc, wctrans_t desc)
|