AnidR |bool |is_utf8_invariant_string_loc|NN const U8* const s \
|STRLEN len \
|NULLOK const U8 ** ep
+#ifndef EBCDIC
AniR |unsigned int|_variant_byte_number|PERL_UINTMAX_T word
+#endif
#if defined(PERL_CORE) || defined(PERL_EXT)
EinR |Size_t |variant_under_utf8_count|NN const U8* const s \
|NN const U8* const e
#define _to_utf8_lower_flags(a,b,c,d,e,f,g) Perl__to_utf8_lower_flags(aTHX_ a,b,c,d,e,f,g)
#define _to_utf8_title_flags(a,b,c,d,e,f,g) Perl__to_utf8_title_flags(aTHX_ a,b,c,d,e,f,g)
#define _to_utf8_upper_flags(a,b,c,d,e,f,g) Perl__to_utf8_upper_flags(aTHX_ a,b,c,d,e,f,g)
-#define _variant_byte_number S__variant_byte_number
#define amagic_call(a,b,c,d) Perl_amagic_call(aTHX_ a,b,c,d)
#define amagic_deref_call(a,b) Perl_amagic_deref_call(aTHX_ a,b)
#define apply_attrs_string(a,b,c,d) Perl_apply_attrs_string(aTHX_ a,b,c,d)
#if !(defined(HAS_SIGACTION) && defined(SA_SIGINFO))
#define csighandler Perl_csighandler
#endif
+#if !defined(EBCDIC)
+#define _variant_byte_number S__variant_byte_number
+#endif
#if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP)
#define my_chsize(a,b) Perl_my_chsize(aTHX_ a,b)
#endif
return TRUE;
}
+#ifndef EBCDIC
+
PERL_STATIC_INLINE unsigned int
S__variant_byte_number(PERL_UINTMAX_T word)
{
return (unsigned int) word;
}
+#endif
#if defined(PERL_CORE) || defined(PERL_EXT)
/*
PERL_CALLCONV UV Perl__to_utf8_upper_flags(pTHX_ const U8 *p, const U8 *e, U8* ustrp, STRLEN *lenp, bool flags, const char * const file, const int line);
#define PERL_ARGS_ASSERT__TO_UTF8_UPPER_FLAGS \
assert(p); assert(ustrp); assert(file)
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE unsigned int S__variant_byte_number(PERL_UINTMAX_T word)
- __attribute__warn_unused_result__;
-#endif
-
PERL_CALLCONV void Perl__warn_problematic_locale(void);
PERL_CALLCONV_NO_RET void Perl_abort_execution(pTHX_ const char * const msg, const char * const name)
__attribute__noreturn__;
assert(sv); assert(mg)
#endif
+#if !defined(EBCDIC)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE unsigned int S__variant_byte_number(PERL_UINTMAX_T word)
+ __attribute__warn_unused_result__;
+#endif
+
+#endif
#if !defined(HAS_GETENV_LEN)
PERL_CALLCONV char* Perl_getenv_len(pTHX_ const char *env_elem, unsigned long *len);
#define PERL_ARGS_ASSERT_GETENV_LEN \
continue;
}
- /* Here, at least one byte in the word isn't 'span_byte'. This xor
- * leaves 1 bits only in those non-matching bytes */
+ /* Here, at least one byte in the word isn't 'span_byte'. */
+
+#ifdef EBCDIC
+
+ break;
+
+#else
+
+ /* This xor leaves 1 bits only in those non-matching bytes */
span_word ^= * (PERL_UINTMAX_T *) s;
/* Make sure the upper bit of each non-matching byte is set. This
/* That reduces the problem to what this function solves */
return s + _variant_byte_number(span_word);
+#endif
+
} while (s + PERL_WORDSIZE <= send);
}
assert(send >= s);
assert((byte & mask) == byte);
+#ifndef EBCDIC
+
if ((STRLEN) (send - s) >= PERL_WORDSIZE
+ PERL_WORDSIZE * PERL_IS_SUBWORD_ADDR(s)
- (PTR2nat(s) & PERL_WORD_BOUNDARY_MASK))
} while (s + PERL_WORDSIZE <= send);
}
+#endif
+
while (s < send) {
if (((*s) & mask) == byte) {
return s;
continue;
}
+#ifdef EBCDIC
+
+ break;
+
+#else
+
masked ^= span_word;
masked |= masked << 1;
masked |= masked << 2;
masked |= masked << 4;
return s + _variant_byte_number(masked);
+#endif
+
} while (s + PERL_WORDSIZE <= send);
}