1570af302Sopenharmony_ci#define bittab __fsmu8 2570af302Sopenharmony_ci 3570af302Sopenharmony_ci#include <stdint.h> 4570af302Sopenharmony_ci#include <features.h> 5570af302Sopenharmony_ci 6570af302Sopenharmony_ciextern hidden const uint32_t bittab[]; 7570af302Sopenharmony_ci 8570af302Sopenharmony_ci/* Upper 6 state bits are a negative integer offset to bound-check next byte */ 9570af302Sopenharmony_ci/* equivalent to: ( (b-0x80) | (b+offset) ) & ~0x3f */ 10570af302Sopenharmony_ci#define OOB(c,b) (((((b)>>3)-0x10)|(((b)>>3)+((int32_t)(c)>>26))) & ~7) 11570af302Sopenharmony_ci 12570af302Sopenharmony_ci/* Interval [a,b). Either a must be 80 or b must be c0, lower 3 bits clear. */ 13570af302Sopenharmony_ci#define R(a,b) ((uint32_t)((a==0x80 ? 0x40u-b : 0u-a) << 23)) 14570af302Sopenharmony_ci#define FAILSTATE R(0x80,0x80) 15570af302Sopenharmony_ci 16570af302Sopenharmony_ci#define SA 0xc2u 17570af302Sopenharmony_ci#define SB 0xf4u 18570af302Sopenharmony_ci 19570af302Sopenharmony_ci/* Arbitrary encoding for representing code units instead of characters. */ 20570af302Sopenharmony_ci#define CODEUNIT(c) (0xdfff & (signed char)(c)) 21570af302Sopenharmony_ci#define IS_CODEUNIT(c) ((unsigned)(c)-0xdf80 < 0x80) 22570af302Sopenharmony_ci 23570af302Sopenharmony_ci/* Get inline definition of MB_CUR_MAX. */ 24570af302Sopenharmony_ci#include "locale_impl.h" 25