Eliminate test from generated cp macros
authorYves Orton <demerphq@gmail.com>
Sat, 17 Nov 2012 11:58:12 +0000 (12:58 +0100)
committerYves Orton <demerphq@gmail.com>
Sat, 17 Nov 2012 11:58:12 +0000 (12:58 +0100)
commitee98d22d3f83f14ecaaaefd176f9630c0f262afd
tree74968e13ed853b793cd2aa2ad5596ffb552ea412
parentba593adc2b8b59175ac3c28b7b41aef7a74908e2
Eliminate test from generated cp macros

Sayeth Karl:
In the _cp macros, the final test can be simplified:

/*** GENERATED CODE ***/
#define is_VERTWS_cp(cp)     \
( ( 0x0A <= cp && cp <= 0x0D ) || ( 0x0D < cp &&     \
( 0x85 == cp || ( 0x85 < cp &&     \
( 0x2028 == cp || ( 0x2028 < cp &&     \
0x2029 == cp ) ) ) ) ) )

That 0x2028 < cp can be omitted and it will still mean the same thing.

And So Be It.
regcharclass.h
regen/regcharclass.pl