diff options
author | Karl Williamson <khw@cpan.org> | 2021-06-14 06:04:44 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-08-07 05:14:43 -0600 |
commit | 28ca3ab57366a041138756872c2020aca0b98ec8 (patch) | |
tree | 3e6f7512c5bfe4418ea9e957ce1d73f11004fb01 /utf8.h | |
parent | fcd03d925b4b3a67a6162b516b3ea4194e92bc92 (diff) | |
download | perl-28ca3ab57366a041138756872c2020aca0b98ec8.tar.gz |
utf8.h: Add symbol for easing EBCDIC handling
This is then used in regcomp.c to avoid an #ifdef EBCDIC
Diffstat (limited to 'utf8.h')
-rw-r--r-- | utf8.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -278,6 +278,12 @@ are in the character. */ #endif /* EBCDIC vs ASCII */ +/* It turns out that in a number of cases, that handling ASCII vs EBCDIC is a + * matter of being off-by-one. So this is a convenience macro, used to avoid + * some #ifdefs. */ +#define ONE_IF_EBCDIC_ZERO_IF_NOT \ + (UTF_CONTINUATION_BYTE_INFO_BITS == UTF_EBCDIC_CONTINUATION_BYTE_INFO_BITS) + /* Since the significant bits in a continuation byte are stored in the * least-significant positions, we often find ourselves shifting by that * amount. This is a clearer name in such situations */ |