X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmultibyte%2Finternal.h;h=53d62edaffb9e1143a3f4a2aa34758b7e215ab01;hb=e8cbe0bad4284906230a53af4c91ad2b9713d03b;hp=25ba240e06269927dda0380b027c3f5e9c08f630;hpb=8f06ab0eb9c22998a47803938588bb0b13092a0b;p=musl diff --git a/src/multibyte/internal.h b/src/multibyte/internal.h index 25ba240e..53d62eda 100644 --- a/src/multibyte/internal.h +++ b/src/multibyte/internal.h @@ -6,9 +6,12 @@ #define bittab __fsmu8 -#include "libc.h" +#include -extern const uint32_t bittab[] ATTR_LIBC_VISIBILITY; +#ifdef __PIC__ +__attribute__((__visibility__("hidden"))) +#endif +extern const uint32_t bittab[]; /* Upper 6 state bits are a negative integer offset to bound-check next byte */ /* equivalent to: ( (b-0x80) | (b+offset) ) & ~0x3f */ @@ -20,3 +23,10 @@ extern const uint32_t bittab[] ATTR_LIBC_VISIBILITY; #define SA 0xc2u #define SB 0xf4u + +/* Arbitrary encoding for representing code units instead of characters. */ +#define CODEUNIT(c) (0xdfff & (signed char)(c)) +#define IS_CODEUNIT(c) ((unsigned)(c)-0xdf80 < 0x80) + +/* Get inline definition of MB_CUR_MAX. */ +#include "locale_impl.h"