Chris 'BinGOs' Williams [Sun, 1 Sep 2013 14:38:07 +0000 (15:38 +0100)]
Update parent to CPAN version 0.227
[DELTA]
0.227
20130991
. Fix RT #88320, restore tests passing for 5.17.5+
Thanks to Zefram for the report and contributing the fix
Steve Hay [Sun, 1 Sep 2013 14:01:54 +0000 (15:01 +0100)]
perldelta - CPAN::Meta::Requirements has been upgraded
Steve Hay [Sun, 1 Sep 2013 13:59:01 +0000 (14:59 +0100)]
Upgrade Unicode::Collate from version 0.98 to 0.99
Steve Hay [Sun, 1 Sep 2013 13:57:33 +0000 (14:57 +0100)]
Upgrade Scalar-List-Utils from version 1.31 to 1.32
Chris 'BinGOs' Williams [Sun, 1 Sep 2013 10:45:24 +0000 (11:45 +0100)]
Update Module-Load-Conditional to CPAN version 0.58
[DELTA]
Changes for 0.58 Sun Sep 1 11:21:59 BST 2013
=================================================
* RT#83728 make quoting work portably and remove
prototypes from one-liner in requires()
Karl Williamson [Sat, 31 Aug 2013 18:42:46 +0000 (12:42 -0600)]
lib/locale.t: Refactor some tests
The tests were to make sure that UTF-8 is returned when it should be.
This makes somewhat these somewhat cleaner
Karl Williamson [Sat, 24 Aug 2013 18:59:46 +0000 (12:59 -0600)]
Make printf, sprintf respect 'use locale' for radix
When called from outside the lexical scope of 'use locale', these now
always print a dot for the decimal point character.
This change is actually done in Perl_sv_vcatpvfn_flags, which is common
to many things, but the principal external effect that I could determine
is on printf and sprintf.
Without this change, unrelated code can change the locale, thus
affecting what an unsuspecting application prints.
Karl Williamson [Sat, 24 Aug 2013 18:42:28 +0000 (12:42 -0600)]
lib/locale.t: Add a bunch of tests
I looked through the online standard and added as many conformance tests
as I could think of.
Karl Williamson [Sat, 24 Aug 2013 18:30:34 +0000 (12:30 -0600)]
lib/locale.t: Display unassigned chars
This adds debug output to list the characters that aren't matched by any
posix class.
Karl Williamson [Sat, 24 Aug 2013 18:28:19 +0000 (12:28 -0600)]
lib/locale.t: Change debug output
This combines the output so that all characters are shown in code point
order, with only ASCII alphanumerics displayed literally. This is
clearer.
Karl Williamson [Sat, 24 Aug 2013 18:25:01 +0000 (12:25 -0600)]
lib/locale.t: Display :punct: characters under debug mode
This class of characters was previously omitted
Karl Williamson [Sat, 24 Aug 2013 18:14:43 +0000 (12:14 -0600)]
lib/locale.t: Use hash keys instead of many arrays
This implementation detail allows easier handling of things as a whole.
We could save code by adding evals, but I'm trying to not add the added
complexity of evals to the tests here.
Karl Williamson [Mon, 15 Jul 2013 02:38:17 +0000 (20:38 -0600)]
More changes to perllocale and POSIX.pod setlocale
These address some concerns from John Peacock.
Chris 'BinGOs' Williams [Sat, 31 Aug 2013 10:21:15 +0000 (11:21 +0100)]
Update CPAN-Meta-Requirements to CPAN version 2.123
[DELTA]
2.123 2013-08-30 12:17:14 America/New_York
[Fixed]
- On Perls prior to v5.12, CPAN::Meta::Requirements will be installed
into the 'core' library path to avoid an older version bundled with
ExtUtils::MakeMaker and installed there taking precedence.
Craig A. Berry [Fri, 30 Aug 2013 15:23:41 +0000 (10:23 -0500)]
Use explicit glob in concise.t.
This was sending a Perl program consisting entirely of '<.>' to
runperl, which on VMS does:
$ perl -e "<.>"
Can't open input file .> as stdin
%RMS-E-FNF, file not found
because the CLI strips the quotes and then the home-grown
redirection code sees the '<' as an invitation to redirect '.>'
to stdin. That's not readily fixable, so just dodge it here.
Steve Hay [Fri, 30 Aug 2013 07:19:58 +0000 (08:19 +0100)]
Upgrade Module::Load::Conditional from version 0.54 to 0.56
Steve Hay [Thu, 29 Aug 2013 21:12:31 +0000 (22:12 +0100)]
perldelta - Note upgrades to Encode and ExtUtils::ParseXS
Zefram [Thu, 29 Aug 2013 21:00:07 +0000 (22:00 +0100)]
preserve $! and $^E in Carp
Carp::longmess and Carp::shortmess now explicitly localise these status
variables, for the reason described in the new paragraph of documentation.
Chris 'BinGOs' Williams [Thu, 29 Aug 2013 18:30:07 +0000 (19:30 +0100)]
Update Encode to CPAN version 2.54
[DELTA]
$Revision: 2.54 $ $Date: 2013/08/29 16:47:39 $
! Encode.xs
+ t/cow.t
Addressed: COW breakage with _utf8_on()
https://rt.cpan.org/Ticket/Display.html?id=88230
! Encode.pm
Reverted the document accordingly to #11
https://github.com/dankogai/p5-encode/pull/10
+ t/decode.t
Unit test for decoding behavior change in #11
https://github.com/dankogai/p5-encode/pull/12
2.53 2013/08/29 15:20:31
! Encode.pm
Merged: Do not short-circuit decode_utf8 with utf8 flags
https://github.com/dankogai/p5-encode/pull/11
Merged: document decode_utf8 behaviour more precise
https://github.com/dankogai/p5-encode/pull/10
! Makefile.PL
Added repository cpan metadata
https://github.com/dankogai/p5-encode/pull/9
Chris 'BinGOs' Williams [Thu, 29 Aug 2013 18:27:59 +0000 (19:27 +0100)]
Update ExtUtils-ParseXS to CPAN version 3.22
[DELTA]
3.22 - Thu Aug 29 19:30:00 CET 2013
- Fix parallel testing crashes.
- Explicitly require new-enough Exporter.
Steve Hay [Thu, 29 Aug 2013 17:09:59 +0000 (18:09 +0100)]
Better check for the fork emulation in t/win32/signal.t
The d_pseudofork Configure variable hasn't been around all that long so
isn't suitable for use in dual-lived module tests, but is good for use in
core tests.
(t/win32/runenv.t doesn't do this since it is actually PERL_IMPLICIT_SYS
rather than the fork emulation which that test requires.)
Karl Williamson [Wed, 21 Aug 2013 03:51:23 +0000 (21:51 -0600)]
Allow trie use for /iaa matching
This adds code so that tries can be formed under /iaa, which formerly
weren't handled. A problem occurs when the string contains the LATIN
SMALL LETTER SHARP S when the regex pattern is not UTF-8 encoded. I
tried several ways to get this to work easily, but ended up deciding it
was too hard, to in this one situation, a new regnode is created to
prevent the trie code from even trying to turn it into a trie.
Karl Williamson [Wed, 21 Aug 2013 03:43:03 +0000 (21:43 -0600)]
Remove no longer necessary constants
These character constants were used only for a special edge case in trie
construction that has been removed -- except for one instance in
regexec.c which could just as well be some other character.
Karl Williamson [Wed, 21 Aug 2013 03:23:59 +0000 (21:23 -0600)]
Remove newly unnecessary regnode, code
The previous commit fixed things up so that this work-around regnode
doesn't have to exist; nor the work around for the EXACTFU_SS regnode
Karl Williamson [Wed, 21 Aug 2013 02:55:44 +0000 (20:55 -0600)]
regcomp.c: Create better estimate of trie match lengths
This commit improves the estimate of the length of a string that a trie
matches. Before this, the estimate gave more false positives, and
required some workarounds which are no longer necessary, and future
commits will remove.
The ultimate answer is to know precisely what will be matched. As noted
in the comments, this information is already largely available in a
global variable. But more work there needs to be done to complete it,
and make it conveniently accessible.
Karl Williamson [Tue, 20 Aug 2013 04:55:14 +0000 (22:55 -0600)]
regcomp.c: Split count variable into two: min, max
This is in preparation in later commits for the min and max to diverge.
This also renames the two variables to emphasize that bytes are what are
being counted, not characters.
Karl Williamson [Tue, 20 Aug 2013 04:38:43 +0000 (22:38 -0600)]
fold_grind.t: Modify trie test
The trie tests just add an alternation of a fixed string. This commit
makes that string the same number of bytes as the first alternative, in
an effort to not bias the test. Otherwise, something that might
otherwise appear to be too short might be long enough to match the fixed
string, defeating properly testing the length.
Karl Williamson [Mon, 19 Aug 2013 19:34:23 +0000 (13:34 -0600)]
regcomp.c: White-space, comment only
Fit into 79 columns, add comment
Karl Williamson [Mon, 19 Aug 2013 18:15:56 +0000 (12:15 -0600)]
regcomp.c: Remove unreachable code
This code no longer gets executed, as the single multi-char fold in the
Latin1 range is pre-folded before this code sees it. The surrounding
code didn't properly handle multi-char folds either.
Not having to deal with this allows us to not have to call the general
purpose function, but we do have to deal with one edge case
Karl Williamson [Mon, 19 Aug 2013 18:09:54 +0000 (12:09 -0600)]
regexec.c: Add comments, assertions
Karl Williamson [Mon, 19 Aug 2013 18:01:37 +0000 (12:01 -0600)]
regcomp.c: White-space only
Reflow comment to fit in 79 columns
Karl Williamson [Mon, 19 Aug 2013 17:57:52 +0000 (11:57 -0600)]
utf8.c: Add comment
Karl Williamson [Sun, 18 Aug 2013 15:00:11 +0000 (09:00 -0600)]
utf8.c: Add omitted fold cases
The LATIN SMALL LETTER SHARP S can't fold to 'ss' under /iaa because the
definition of /aa prohibits it, but it can fold to two consecutive
instances of LATIN SMALL LETTER LONG S. A capital sharp s can do the
same, and that was fixed in
1ca267a5, but this one was overlooked then.
It turns out that another possibility was also overlooked in
1ca267a5.
Both U+FB05 (LATIN SMALL LIGATURE LONG S T) and U+FB06 (LATIN SMALL
LIGATURE ST) fold to the string 'st', except under /iaa these folds are
prohibited. But U+FB05 and U+FB06 are equivalent to each other under
/iaa. This wasn't working until now. This commit changes things so
both fold to FB06.
This bug would only surface during /iaa matching, and I don't believe
there are any current code paths which lead to it, hence no tests are
added by this commit. However, a future commit will lead to this bug,
and existing tests find it then.
Karl Williamson [Sun, 18 Aug 2013 14:51:42 +0000 (08:51 -0600)]
utf8.h: White space only
Vertically align the definitions of a few #defines
Karl Williamson [Sun, 18 Aug 2013 14:50:34 +0000 (08:50 -0600)]
utf8.h, unicode_constants.h: Add some #defines.
These will be used in a future commit
Nicholas Clark [Wed, 28 Aug 2013 14:14:21 +0000 (16:14 +0200)]
In Perl_magic_setdbline, replace the use of atoi() with sv_2iv().
The value on which atoi() is called is actually always the buffer of an SV.
Hence we can use sv_2iv() instead.
Karl Williamson [Thu, 29 Aug 2013 15:57:59 +0000 (09:57 -0600)]
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.
Karl Williamson [Wed, 26 Jun 2013 21:30:59 +0000 (15:30 -0600)]
utf8.c: Move some code around for speed
This is a micro optimization. We now check for a common case and return
if found, before checking for a relatively uncommon case.
Karl Williamson [Wed, 26 Jun 2013 18:05:24 +0000 (12:05 -0600)]
utf8.h: Fix UTF8_IS_SUPER defn for EBCDIC
The parentheses were misplaced, so it wasn't looking at the second byte
of the input string properly.
Karl Williamson [Sat, 4 May 2013 19:29:15 +0000 (13:29 -0600)]
pp.c, regexec.c: Declare buffers large enough
These three buffers are not declared with the proper size. There is
a #define available to use, so use it. These matter only on EBCDIC
platforms, where the one in pp.c prior to this commit could cause a
buffer overrun there.
The others shouldn't because what is being used is known (smaller) size.
Karl Williamson [Sun, 28 Apr 2013 04:14:02 +0000 (22:14 -0600)]
utf8.c: Remove wrapper functions.
Now that the Unicode data is stored in native character set order, it is
rare to need to work with the Unicode order. Traditionally, the real
work was done in functions that worked with the Unicode order, and
wrapper functions (or macros) were used to translate to/from native.
There are two groups of functions: one that translates from code point
to UTF-8, and the other group goes the opposite direction.
This commit changes the base function that translates from UTF-8 to code
point to output native instead of Unicode. Those extremely rare
instances where Unicode output is needed instead will have to hand-wrap
calls to this function with a translation macro, as now described in the
API pod. Prior to this, it was the other way, the native was wrapped,
and the rare, strict Unicode wasn't. This eliminates a layer of
function call overhead for a common case.
The base function that translates from code point to UTF-8 retains its
Unicode input, as that is more natural to process. However, it is
de-emphasized in the pod, with the functionality description moved to
the pod for a native input wrapper function. And, those wrappers are
now macros in all cases; previously there was function call overhead
sometimes. (Equivalent exported functions are retained, however, for XS
code that uses the Perl_foo() form.)
I had hoped to rebase this commit, squashing it with an earlier commit
in this series, eliminating the use of a temporary function name change,
but the work involved turns out to be large, with no real payoff.
Karl Williamson [Tue, 30 Apr 2013 15:13:35 +0000 (09:13 -0600)]
perlapi vis utf8.c: Nits
Karl Williamson [Sat, 20 Apr 2013 23:04:08 +0000 (17:04 -0600)]
gv.c: Add comment
Karl Williamson [Tue, 30 Apr 2013 14:04:45 +0000 (08:04 -0600)]
utf8.c: Move 2 functions to earlier in file
This moves these two functions to be adjacent to the function they each
call, thus keeping like things together.
Karl Williamson [Fri, 19 Apr 2013 19:18:20 +0000 (13:18 -0600)]
regcomp.c: Add missing (parens) to expression
A pair of parentheses were missing leading to this 'if' not acting as
intended.
Karl Williamson [Sat, 13 Apr 2013 19:16:00 +0000 (13:16 -0600)]
toke.c: Fix EBCDIC bugs with single char variable names
Latin1 variable single character variable names should all be legal,
but the test was not for non-ASCII, it was for variant characters. On
EBCDIC platforms, this isn't the same as non-ASCII.
The legal control character variable names are not the same as the C0
and DEL controls, but are \001 .. \037, minus those that traditionally
match \s on ASCII platforms, plus \c?.
Karl Williamson [Sat, 13 Apr 2013 18:55:09 +0000 (12:55 -0600)]
toke.c: An EBCDIC fix
toCTRL(0..31) yields a printing character. This is different from
toCTRL(control) on EBCDIC machines.
Karl Williamson [Sat, 13 Apr 2013 15:18:41 +0000 (09:18 -0600)]
perlio.c: Generalize for EBCDIC
This code had the hex constants for CARRIAGE RETURN and LINE FEED
hard-coded in. It appears to me from the comments that '\r' and '\n'
are not suitable to use instead. This commit changes the constants to
use the native values instead.
Karl Williamson [Sat, 13 Apr 2013 15:51:34 +0000 (09:51 -0600)]
unicode_constants.h: Add #defines for CR, LF
Karl Williamson [Sat, 6 Apr 2013 18:56:52 +0000 (12:56 -0600)]
regcomp.c: In EBCDIC [i-j] exclude also ASCII
i and j are not adjacent in EBCDIC. This excluded any alphabetic
characters between them, but allowed other ascii ones.
Karl Williamson [Sat, 6 Apr 2013 18:54:42 +0000 (12:54 -0600)]
utf8.c: Don't use slower general-purpose function
There is a macro that accomplishes the same task for a two byte UTF-8
encoded character, and avoids the overhead of the general purpose
function call.
Karl Williamson [Sat, 6 Apr 2013 18:53:07 +0000 (12:53 -0600)]
utf8.c: Don't do ++ in macro parameter
The formal parameter gets evaluated multiple times on an EBCDIC
platform, thus incrementing more than the intended once.
Karl Williamson [Sat, 6 Apr 2013 18:50:48 +0000 (12:50 -0600)]
utf8.c: Use macro instead of duplicating code
There is a macro that accomplishes this task, and is easier to read.
Karl Williamson [Thu, 4 Apr 2013 03:59:16 +0000 (21:59 -0600)]
utf8.h: Clarify comments
Karl Williamson [Fri, 29 Mar 2013 20:56:16 +0000 (14:56 -0600)]
utf8.c: Avoid unnecessary UTF-8 conversions
This changes the code so that converting to UTF-8 is avoided unless
necessary. For such inputs, the conversion back from UTF-8 is also
avoided. The cost of doing this is that the first swatches are combined
into one that contains the values for all characters 0-255, instead of
having multiple swatches. That means when first calculating the swatch
it calculates all 256, instead of 128 (160 on EBCDIC).
This also fixes an EBCDIC bug in which characters in this range were
being translated twice.
Karl Williamson [Fri, 29 Mar 2013 19:34:59 +0000 (13:34 -0600)]
utf8.c: No need to check for UTF-8 malformations
This function assumes that the input is well-formed UTF-8, even though
until this commit, the prefatory comments didn't say so. The API does
not pass the buffer length, so there is no way it could check for
reading off the end of the buffer. One code path already calls
valid_utf8_to_uvchr(); this changes the remaining code path to correspond.
Karl Williamson [Sun, 24 Mar 2013 19:16:08 +0000 (13:16 -0600)]
utf8.c: Fix so UTF-16 to UTF-8 conversion works under EBCDIC
Karl Williamson [Sun, 24 Mar 2013 19:14:34 +0000 (13:14 -0600)]
utf8.h, utfebcdic.h: Add #define
Karl Williamson [Mon, 18 Mar 2013 17:45:06 +0000 (11:45 -0600)]
pp.c: White-space only
Make a ternary operation more clear
Karl Williamson [Mon, 18 Mar 2013 17:43:42 +0000 (11:43 -0600)]
Fix valid_utf8_to_uvchr() for EBCDIC
Karl Williamson [Mon, 18 Mar 2013 03:42:20 +0000 (21:42 -0600)]
t/test.pl: Add comment about EBCDIC
Karl Williamson [Sun, 17 Mar 2013 04:41:15 +0000 (22:41 -0600)]
Fix EBCDIC bugs in UTF8_ACUMULATE and utf8.c
Karl Williamson [Sat, 16 Mar 2013 22:52:45 +0000 (16:52 -0600)]
regcomp.c: Fix bug in EBCDIC
The POSIXA and NPOSIXA regnodes need to set the bits on only the ASCII
code points, but under EBCDIC those code points are not 0-127.
Karl Williamson [Wed, 13 Mar 2013 22:20:23 +0000 (16:20 -0600)]
toke.c: Simplify some code
We don't have to test separately for lower vs uppercase here, as
upper/lower case A-Z and a-z are not intermixed in the gaps in A-Z and
a-z under EBCDIC.
Karl Williamson [Wed, 13 Mar 2013 22:14:31 +0000 (16:14 -0600)]
sv.c: Make less ASCII-centric
Karl Williamson [Wed, 13 Mar 2013 22:05:46 +0000 (16:05 -0600)]
dump.c: Make less ASCII-centric:
This has the added advantage of being clearer as to what is going on.
Karl Williamson [Wed, 13 Mar 2013 22:02:52 +0000 (16:02 -0600)]
hv.c: Stop being ASCII-centric
This uses macros which work cross-platform. This has the added advantge
what is going on is much clearer.
Karl Williamson [Thu, 7 Mar 2013 19:08:41 +0000 (12:08 -0700)]
utfebcdic.h: Change 'unsigned char' to U8
This is for consistency with the rest of Perl
Karl Williamson [Fri, 8 Mar 2013 15:11:38 +0000 (08:11 -0700)]
regen/regcharclass.pl: Make more EBCDIC-friendly
This commit changes the code generated by the macros so that they work
right out-of-the-box on non-ASCII platforms for non-UTF-8 inputs. THEY
ARE WRONG for UTF-8, but this is good enough to get perl bootstrapped
onto the target platform, and regcharclass.pl can be run there,
generating macros with correct UTF-8.
Karl Williamson [Thu, 7 Mar 2013 04:30:01 +0000 (21:30 -0700)]
utfebcdic.h: Add (UV) cast
The operand of this macro is implicitly a UV. Make sure that it is.
Karl Williamson [Thu, 7 Mar 2013 00:04:58 +0000 (17:04 -0700)]
handy.h: Allow bootstrapping to non-ASCII platform
This adds a bunch of macros and moves things around to support
conditional compilation when Configure is called with
-DBOOTSTRAP_CHARSET. Doing so causes the usual macros that are
table-driven to not be used, since the table may not be valid when
bringing Perl up for the first time on a non-ASCII platform.
This allows it to compile using the platform's native C library ctype
functions, which should work enough to compile miniperl, and allow the
table to be changed to be valid. Then Configure can be re-run to not
bootstrap, and normal compilation can proceed
Karl Williamson [Mon, 4 Mar 2013 20:00:47 +0000 (13:00 -0700)]
toke.c: Remove EBCDIC dependency
Karl Williamson [Mon, 4 Mar 2013 16:14:25 +0000 (09:14 -0700)]
toke.c: Remove character set dependency
Instead of hard-coding the bit patterns that comprise the Byte Order
Mark in the UTF-8 or UTF-EBCDIC encodings, use the generated ones for
the current platform.
This removes some EBCDIC-only code.
Karl Williamson [Mon, 4 Mar 2013 16:10:27 +0000 (09:10 -0700)]
unicode_constants.h: Add #defines for Byte Order Mark
These will be used in future commits
Karl Williamson [Sat, 2 Mar 2013 19:33:42 +0000 (12:33 -0700)]
utfebcdic.h: Add comment
Karl Williamson [Sat, 2 Mar 2013 19:12:11 +0000 (12:12 -0700)]
utf8.h: Clean up and use START_MARK definition
The previous definition broke good encapsulation rules. UTF_START_MARK
should return something that fits in a byte; it shouldn't be the caller
that does this. So the mask is moved into the definition. This means
it can apply only to the portion that creates something larger than a
byte. Further, the EBCDIC version can be simplified, since 7 is the
largest possible number of bytes in an EBCDIC UTF8 character.
Karl Williamson [Sat, 2 Mar 2013 19:05:26 +0000 (12:05 -0700)]
utf8.h: Move #includes
These two files were only being #included for non-ebcdic compiles; they
should be included always.
John Goodyear [Sat, 2 Mar 2013 18:49:14 +0000 (11:49 -0700)]
utfebcdic.h: Remove extra parameter expansions
These two macros were improperly expanding the parameters as well as
defining the operation, leading to compile errors.
Karl Williamson [Fri, 1 Mar 2013 15:28:52 +0000 (08:28 -0700)]
utf8.h: Simplify UTF8_EIGHT_BIT_foo on EBCDIC
These macros were previously defined in terms of UTF8_TWO_BYTE_HI and
UTF8_TWO_BYTE_LO. But the EIGHT_BIT versions can use the less general
and simpler NATIVE_TO_LATIN1 instead of NATIVE_TO_UNI because the input
domain is restricted in the EIGHT_BIT. Note that on ASCII platforms,
these both expand to the same thing, so the difference matters only on
EBCDIC.
Karl Williamson [Wed, 27 Feb 2013 15:38:19 +0000 (08:38 -0700)]
handy.h: Remove extraneous parens
Karl Williamson [Tue, 26 Feb 2013 20:45:19 +0000 (13:45 -0700)]
utf8.c: Use more clearly named macro
In the case of invariants these two macros should do the same thing,
but it seems to me that the latter name more clearly indicates what is
going on.
Karl Williamson [Tue, 26 Feb 2013 20:35:12 +0000 (13:35 -0700)]
Add macro OFFUNISKIP
This means use official Unicode code point numbering, not native. Doing
this converts the existing UNISKIP calls in the code to refer to native
code points, which is what they meant anyway. The terminology is
somewhat ambiguous, but I don't think it will cause real confusion.
NATIVE_SKIP is also introduced for situations where it is important to
be precise.
Karl Williamson [Tue, 26 Feb 2013 20:22:19 +0000 (13:22 -0700)]
toke.c: white space only
Karl Williamson [Sun, 17 Feb 2013 21:00:13 +0000 (14:00 -0700)]
toke.c: Don't remap \N{} for EBCDIC
Everything but \N{U+XXXX} is now in native,
Karl Williamson [Tue, 26 Feb 2013 19:08:50 +0000 (12:08 -0700)]
utf8.c: Stop using two functions
This is in preparation for deprecating these functions, to force any
code that has been using these functions to change.
Since the Unicode tables are now stored in native order, these
functions should only rarely be needed.
However, the functionality of these is needed, and in actuality, on
ASCII platforms, the native functions are #defined to these. So what
this commit does is rename the functions to something else, and create
wrappers with the old names, so that anyone using them will get the
deprecation when it actually goes into effect: we are waiting for CPAN
files distributed with the core to change before doing the deprecation.
According to cpan.grep.me, this should affect fewer than 10 additional
CPAN distributions.
Karl Williamson [Tue, 26 Feb 2013 18:26:09 +0000 (11:26 -0700)]
Convert uvuni_to_utf8() to function
Code should almost never be dealing with non-native code points
This is in preparation for later deprecation when our CPAN modules have
been converted away from using it.
Karl Williamson [Tue, 26 Feb 2013 18:02:33 +0000 (11:02 -0700)]
Deprecate utf8_to_uni_buf()
Now that the tables are stored in native order, there is almost no need
for code to be dealing in Unicode order.
According to grep.cpan.me, there are no uses of this function in CPAN.
Karl Williamson [Tue, 26 Feb 2013 03:26:44 +0000 (20:26 -0700)]
Deprecate valid_utf8_to_uvuni()
Now that all the tables are stored in native format, there is very
little reason to use this function; and those who do need this kind of
functionality should be using the bottom level routine, so as to make it
clear they are doing nonstandard stuff.
According to grep.cpan.me, there are no uses of this function in CPAN.
Karl Williamson [Tue, 26 Feb 2013 03:14:26 +0000 (20:14 -0700)]
utf8.c: Swap which fcn wraps the other
This is in preparation for the current wrapee becoming deprecated
Karl Williamson [Tue, 26 Feb 2013 02:29:34 +0000 (19:29 -0700)]
utf8.c: Skip a no-op
Since the value is invariant under both UTF-8 and not, we already have
it in 'uv'; no need to do anything else to get it
Karl Williamson [Tue, 26 Feb 2013 02:26:50 +0000 (19:26 -0700)]
utf8.c: Move comment to where makes more sense
Karl Williamson [Tue, 26 Feb 2013 00:30:10 +0000 (17:30 -0700)]
APItest: Test native code points, instead of Unicode
Karl Williamson [Mon, 25 Feb 2013 00:23:15 +0000 (17:23 -0700)]
Don't refer to U+XXXX when mean native
These messages say the output number is Unicode, but it is really
native, so change to saying is 0xXXXX.
Karl Williamson [Sun, 24 Feb 2013 23:43:59 +0000 (16:43 -0700)]
Convert some uvuni() to uvchr()
All the tables are now based on the native character set, so using
uvuni() in almost all cases is wrong.
Karl Williamson [Sun, 24 Feb 2013 23:25:47 +0000 (16:25 -0700)]
handy.h: White space only
Karl Williamson [Sun, 24 Feb 2013 23:19:49 +0000 (16:19 -0700)]
t/test.pl: Allow native/latin1 string conversions to work on utf8.
These functions no longer have the hard-coded definitions in them,
but now end up resolving to internal functions, so that new encodings
could be added and these would automatically understand them.
Instead of using tr///, these now go character by character and
converting to/from ord, which is slower, but allows them to operate on
utf8 strings.
Peephole optimization should make these essentially no-ops on ascii
platforms.
Karl Williamson [Sun, 24 Feb 2013 23:05:55 +0000 (16:05 -0700)]
t/test.pl: Simplify ord to/from native fcns
This commit changes these functions from converting to/from a string to
calling functions which operate on ordinals instead that are in the
utf8:: namespace.
Karl Williamson [Sun, 24 Feb 2013 22:35:38 +0000 (15:35 -0700)]
Make casing tables native
These are final tables that haven't been converted to native character
set casing.
Karl Williamson [Sun, 24 Feb 2013 22:32:30 +0000 (15:32 -0700)]
utfebcdic.h: Remove trailing spaces
Karl Williamson [Sat, 23 Feb 2013 01:55:26 +0000 (18:55 -0700)]
EBCDIC has the unicode bug too
We have not had a working modern Perl on EBCDIC for some years. When I
started out, comments and code led me to conclude erroneously that
natively it supported semantics for all 256 characters 0-255. It turns
out that I was wrong; it natively (at least on some platforms) has the
same rules (essentially none) for the characters which don't correspond
to ASCII ones, as the rules for these on ASCII platforms.
A previous commit for 5.18 changed the docs about this issue. This
current commit forces ASCII rules on EBCDIC platforms (even should there
be one that natively uses all 256). To get all 256, the same things
like 'use feature "unicode_strings"' must now be done.