Merge branch 'ebcdic' into blead
authorKarl Williamson <public@khwilliamson.com>
Thu, 29 Aug 2013 15:57:59 +0000 (09:57 -0600)
committerKarl Williamson <public@khwilliamson.com>
Thu, 29 Aug 2013 15:57:59 +0000 (09:57 -0600)
commit3f40aba3cc2139eb7b147b8db25c9d3ed7e7adb0
treec1ef789af97ff99a511ae5c842604a245f8fc611
parentd7f2696daa830564250fcf2f421bb58e97f14d0d
parentd943212517d35e9f03278a2209388b93f634664a
Merge branch 'ebcdic' into blead

Work on getting EBCDIC to work again in blead has slowed to a standstill
due to lack of summertime tuits.  I've gotten concerned about bit rot,
and with the Pumpking's permission am merging in this commit the portion
most subject to bit rot.  This includes almost all the changes in the
core C language files and a few modules.  Omitted from this merge are
most test changes, a very few C language changes that for various
reasons aren't ready for merge, and most module changes, as well as any
totally new files.  These will be merged sometime in the future.

With this merge and regenerating some tables, Perl mostly works with
EBCDIC on z/OS, even if many tests fail because they are testing for
ASCII-specific behavior.

This branch also isolates into just a few files the need to
differentiate between running on an ASCII versus an EBCDIC platform.
This will allow easier ripping out of EBCDIC code should we decide to do
so in the future, as well as making it easier to decide to leave it in,
as it now affects only a small amount of code.

One of the major reasons that ASCII and EBCDIC had to be distinguished
in code is that there were two sets of functions, one that worked on
native code points; the other on Unicode code points; the latter was
used when working with Unicode properties.  To use the latter, one had
to convert to/from Unicode.  This branch collapses those functions by
changing mktables to generate the Unicode property tables in terms of
the native character set.  (This was a fairly simple change).  Now, only
one set of functions is needed (the other is deprecated in this merge or
will be deprecated in later commits), and the conversions are almost
entirely avoided.  Fortunately, most CPAN code did not bother with
distinguishing the two function sets, and so the deprecation affects
only a few modules.

Most of the "#ifdef EBCDIC" lines are removed, retained in only a few
files, most notably toke.c.  These are required there for dealing with the
discontinuities in EBCDIC of the A-Z range, specifically in parsing
tr/// commands.  (There are also some in utf8.[ch] for the differences
between UTF-8 and UTF-EBCDIC.)  And a few smattered in other files,
mostly for performance.

The other major reason for ASCII/EBCDIC differences was due to UTF-8 vs
UTF-EBCDIC.  New macros are created and used to hide more of those
differences from code than before.

Quite a few bugs that were only on EBCDIC platforms are now fixed.
These escaped earlier detection because we had no such platform to test
on.