30 #if defined(UINT128_MAX)
32 # define P00_ISIN p00_isin2
33 #elif defined(p99x_uint128)
35 # define P00_ISIN p00_isin2
39 # define P00_ISIN p00_isin4
42 # define P99_BITSET_C(X) ((p99_bitset)+(X))
47 P99_CONSTANT(
int, p00_bitset_bit3, p00_bitset_bit1|p00_bitset_bit2);
51 uint8_t p00_bit_low(uint8_t p00_c) {
57 uint8_t p00_bit_high(uint8_t p00_c) {
67 #define P00_BITSET_CASE(B, _1, I) case I: if (p00_bit_high(p00_s2[I]) == B) p00_ret |= p00_set_bit(p00_s2[I])
68 #define P00_BITSET_CASE128(B, _1, I) case I+128: if (p00_bit_high(p00_s2[I+128]) == B) p00_ret |= p00_set_bit(p00_s2[I+128])
71 #define P00_BITS_DECLARE(B) \
74 p99_bitset P99_PASTE2(p00_bits, B)(rsize_t p00_s2l, uint8_t const p00_s2[const restrict p00_s2l]) { \
75 p99_bitset p00_ret = 0; \
76 switch (p00_s2l - 2) { \
77 P99_FOR(B, 128, P00_PES, P00_BITSET_CASE128, P00_ALLZERO); \
78 P99_FOR(B, 128, P00_PES, P00_BITSET_CASE, P00_ALLZERO); \
82 P99_MACRO_END(P00_BITS_DECLARE, B)
92 rsize_t p00_s2l, uint8_t
const p00_s2[
const restrict p00_s2l]) {
93 register p99_bitset const p00_b0 = p00_bits0(p00_s2l, p00_s2);
94 register p99_bitset p00_ret = p00_set_bit(p00_c);
102 rsize_t p00_s2l, uint8_t
const p00_s2[
const restrict p00_s2l]) {
103 register p99_bitset const p00_b0 = p00_bits0(p00_s2l, p00_s2);
104 register p99_bitset const p00_b1 = p00_bits1(p00_s2l, p00_s2);
106 register p99_bitset p00_ret = p00_set_bit(p00_c);
114 rsize_t p00_s2l, uint8_t
const p00_s2[
const restrict p00_s2l]) {
115 register p99_bitset const p00_b0 = p00_bits0(p00_s2l, p00_s2);
116 register p99_bitset const p00_b1 = p00_bits1(p00_s2l, p00_s2);
117 register p99_bitset const p00_b2 = p00_bits2(p00_s2l, p00_s2);
118 register p99_bitset const p00_b3 = p00_bits3(p00_s2l, p00_s2);
120 register p99_bitset p00_ret = p00_set_bit(p00_c);
121 switch (p00_c & p00_bitset_bit3) {
122 default: p00_ret &= p00_b0;
break;
123 case p00_bitset_bit1: p00_ret &= p00_b1;
break;
124 case p00_bitset_bit2: p00_ret &= p00_b2;
break;
125 case p00_bitset_bit3: p00_ret &= p00_b3;
break;
130 #define P00_BLANK " \t"
131 #define P00_SPACE " \f\n\r\t\v"
132 #define P00_LOWER "abcdefghijklmnopqrstuvwxyz"
133 #define P00_UPPER "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
134 #define P00_ALPHA P00_UPPER P00_LOWER
135 #define P00_DIGIT "0123456789"
136 #define P00_ALNUM P00_ALPHA P00_DIGIT
137 #define P00_XDIGIT "0123456789abcdefABCDEF"
142 return P00_ISIN(p00_c,
sizeof P00_BLANK, (uint8_t
const*)P00_BLANK);
148 return P00_ISIN(p00_c,
sizeof P00_SPACE, (uint8_t
const*)P00_SPACE);
154 return P00_ISIN(p00_c,
sizeof P00_LOWER, (uint8_t
const*)P00_LOWER);
160 return P00_ISIN(p00_c,
sizeof P00_UPPER, (uint8_t
const*)P00_UPPER);
166 return P00_ISIN(p00_c,
sizeof P00_ALPHA, (uint8_t
const*)P00_ALPHA);
172 return P00_ISIN(p00_c,
sizeof P00_DIGIT, (uint8_t
const*)P00_DIGIT);
178 return P00_ISIN(p00_c,
sizeof P00_XDIGIT, (uint8_t
const*)P00_XDIGIT);
184 return P00_ISIN(p00_c,
sizeof P00_ALNUM, (uint8_t
const*)P00_ALNUM);