source: asp3_tinet_ecnl_arm/trunk/musl-1.1.18/src/ctype/wctrans.c@ 352

Last change on this file since 352 was 352, checked in by coas-nagasima, 6 years ago

arm向けASP3版ECNLを追加

  • 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
5wctrans_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
12wint_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
19wctrans_t __wctrans_l(const char *s, locale_t l)
20{
21 return wctrans(s);
22}
23
24wint_t __towctrans_l(wint_t c, wctrans_t t, locale_t l)
25{
26 return towctrans(c, t);
27}
28
29weak_alias(__wctrans_l, wctrans_l);
30weak_alias(__towctrans_l, towctrans_l);
Note: See TracBrowser for help on using the repository browser.