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/iswctype.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/iswctype.c')
-rw-r--r-- | src/ctype/iswctype.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/ctype/iswctype.c b/src/ctype/iswctype.c index d917975b..3d9c2cc7 100644 --- a/src/ctype/iswctype.c +++ b/src/ctype/iswctype.c @@ -1,6 +1,6 @@ -#include <wchar.h> #include <wctype.h> #include <string.h> +#include "libc.h" #define WCTYPE_ALNUM 1 #define WCTYPE_ALPHA 2 @@ -61,3 +61,16 @@ wctype_t wctype(const char *s) return i; return 0; } + +int __iswctype_l(wint_t c, wctype_t t, locale_t l) +{ + return iswctype(c, t); +} + +wctype_t __wctype_l(const char *s, locale_t l) +{ + return wctype(s); +} + +weak_alias(__iswctype_l, iswctype_l); +weak_alias(__wctype_l, wctype_l); |