X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmultibyte%2Fwctob.c;h=b484a3fd01ad75b829b4be6eff710fd1a0fb31c4;hb=2d72b58070bc43a727b580a46746e87215a60a33;hp=d6353ee17935779719cc78eb0e730b0eb0265570;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/multibyte/wctob.c b/src/multibyte/wctob.c index d6353ee1..b484a3fd 100644 --- a/src/multibyte/wctob.c +++ b/src/multibyte/wctob.c @@ -1,8 +1,11 @@ -#include #include +#include +#include +#include "internal.h" int wctob(wint_t c) { if (c < 128U) return c; + if (MB_CUR_MAX==1 && IS_CODEUNIT(c)) return (unsigned char)c; return EOF; }