fix types for wctype_t and wctrans_t
[musl] / src / ctype / wctrans.c
1 #include <wctype.h>
2 #include <string.h>
3
4 wctrans_t wctrans(const char *class)
5 {
6         if (!strcmp(class, "toupper")) return (wctrans_t)1;
7         if (!strcmp(class, "tolower")) return (wctrans_t)2;
8         return 0;
9 }
10
11 wint_t towctrans(wint_t wc, wctrans_t trans)
12 {
13         if (trans == (wctrans_t)1) return towupper(wc);
14         if (trans == (wctrans_t)2) return towlower(wc);
15         return wc;
16 }