perl5
perl5 copied to clipboard
op.c: Improve invmap_dump output
An inversion map is a basic data structure for handling Unicode. Currently the only place where it is output from C is in op.c. This code had problems with keeping columns vertically aligned. This commit fixes that, and makes the output look more generally harmonious
Here's an example before this commit:
[0] 0x0000 .. 0x0060 TR_UNLISTED
[1] 0x0061 .. 0x007A 0x0061
[2] 0x007B .. 0x007F TR_UNLISTED
[3] 0x0080 .. 0x07FF TR_UNLISTED
[4] 0x0800 .. 0xFFFF TR_UNLISTED
[5] 0x10000 .. 0x1FFFFF TR_UNLISTED
[6] 0x200000 .. 0x3FFFFFF TR_UNLISTED
[7] 0x4000000 .. 0x7FFFFFFF TR_UNLISTED
[8] 0x80000000 .. 0xFFFFFFFFF TR_UNLISTED
[9] 0x1000000000 .. INFTY TR_UNLISTED
and after:
[0] 0 .. 0x60 TR_UNLISTED
[1] 0x61 .. 0x7A 0x61
[2] 0x7B .. 0x7F TR_UNLISTED
[3] 0x80 .. 0x7FF TR_UNLISTED
[4] 0x800 .. 0xFFFF TR_UNLISTED
[5] 0x10000 .. 0x1FFFFF TR_UNLISTED
[6] 0x200000 .. 0x3FFFFFF TR_UNLISTED
[7] 0x4000000 .. 0x7FFFFFFF TR_UNLISTED
[8] 0x80000000 .. 0xFFFFFFFFF TR_UNLISTED
[9] 0x1000000000 .. INFINITY TR_UNLISTED
How would one trigger this (before/after) with perl at the command-line?
On a DEBUGGING build, run something with tr///, like t/op/tr.t using the -Dy or -Dyv options