blob: 739869d059e4aec9b2f805cdc95d5c703dd711ca (
plain) (
tree)
|
|
#include <wctype.h>
#include <string.h>
wctrans_t wctrans(const char *class)
{
if (!strcmp(class, "toupper")) return (wctrans_t)1;
if (!strcmp(class, "tolower")) return (wctrans_t)2;
return 0;
}
wint_t towctrans(wint_t wc, wctrans_t trans)
{
if (trans == (wctrans_t)1) return towupper(wc);
if (trans == (wctrans_t)2) return towlower(wc);
return wc;
}
|