diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-07-02 21:16:05 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-07-02 21:16:05 -0400 |
commit | d89fdec51b5849ebdf8000ff1c2fb49878004f39 (patch) | |
tree | 3f417d463f914ba78c594ca44d9e9c0fb0f629e4 /src/ctype/towctrans.c | |
parent | 0bc03091bb674ebb9fa6fe69e4aec1da3ac484f2 (diff) | |
download | musl-d89fdec51b5849ebdf8000ff1c2fb49878004f39.tar.gz musl-d89fdec51b5849ebdf8000ff1c2fb49878004f39.tar.bz2 musl-d89fdec51b5849ebdf8000ff1c2fb49878004f39.tar.xz musl-d89fdec51b5849ebdf8000ff1c2fb49878004f39.zip |
consolidate *_l ctype/wctype functions into their non-_l source files
the main practical purposes of this commit are to remove a huge amount
of clutter from the src/locale directory, to cut down on the length of
the $(AR) and $(LD) command lines, and to reduce the amount of space
wasted by object file headers in the static libc.a. build time may
also be reduced, though this has not been measured.
as an additional justification, if there ever were a need for the
behavior of these functions to vary by locale, it would be necessary
for the non-_l versions to call the _l versions, so that linking the
former without the latter would not be possible anyway.
Diffstat (limited to 'src/ctype/towctrans.c')
-rw-r--r-- | src/ctype/towctrans.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ctype/towctrans.c b/src/ctype/towctrans.c index 2842d690..5e0889b1 100644 --- a/src/ctype/towctrans.c +++ b/src/ctype/towctrans.c @@ -1,6 +1,5 @@ -#include <wchar.h> #include <wctype.h> -#include <stdio.h> +#include "libc.h" #define CASEMAP(u1,u2,l) { (u1), (l)-(u1), (u2)-(u1)+1 } #define CASELACE(u1,u2) CASEMAP((u1),(u2),(u1)+1) @@ -266,3 +265,16 @@ wint_t towlower(wint_t wc) { return __towcase(wc, 1); } + +wint_t __towupper_l(wint_t c, locale_t l) +{ + return towupper(c); +} + +wint_t __towlower_l(wint_t c, locale_t l) +{ + return towlower(c); +} + +weak_alias(__towupper_l, towupper_l); +weak_alias(__towlower_l, towlower_l); |