Last change
on this file since 445 was 444, checked in by coas-nagasima, 4 years ago |
muslのソースコードを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-csrc;charset=UTF-8
|
File size:
614 bytes
|
Line | |
---|
1 | #include <wctype.h>
|
---|
2 | #include <string.h>
|
---|
3 | #include "libc.h"
|
---|
4 |
|
---|
5 | wctrans_t wctrans(const char *class)
|
---|
6 | {
|
---|
7 | if (!strcmp(class, "toupper")) return (wctrans_t)1;
|
---|
8 | if (!strcmp(class, "tolower")) return (wctrans_t)2;
|
---|
9 | return 0;
|
---|
10 | }
|
---|
11 |
|
---|
12 | wint_t towctrans(wint_t wc, wctrans_t trans)
|
---|
13 | {
|
---|
14 | if (trans == (wctrans_t)1) return towupper(wc);
|
---|
15 | if (trans == (wctrans_t)2) return towlower(wc);
|
---|
16 | return wc;
|
---|
17 | }
|
---|
18 |
|
---|
19 | wctrans_t __wctrans_l(const char *s, locale_t l)
|
---|
20 | {
|
---|
21 | return wctrans(s);
|
---|
22 | }
|
---|
23 |
|
---|
24 | wint_t __towctrans_l(wint_t c, wctrans_t t, locale_t l)
|
---|
25 | {
|
---|
26 | return towctrans(c, t);
|
---|
27 | }
|
---|
28 |
|
---|
29 | weak_alias(__wctrans_l, wctrans_l);
|
---|
30 | weak_alias(__towctrans_l, towctrans_l);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.