Fix [[:blank:]] handling when no isblank() on platform
authorKarl Williamson <public@khwilliamson.com>
Mon, 3 Feb 2014 18:52:24 +0000 (11:52 -0700)
committerKarl Williamson <public@khwilliamson.com>
Mon, 3 Feb 2014 19:06:41 +0000 (12:06 -0700)
commit95f34b6fc646073944e61496c615de11b8bca7da
tree810862b177e4b5bb7a2d830aaaad53ba9a03a982
parentb3a2acfa0c0e4f8e48e1f6eb4d6fd143f293d2c6
Fix [[:blank:]] handling when no isblank() on platform

isblank() is a C99 construct,  Perl tries to handle the use of this on
C89 platforms by using the standard hard-coded definition.  However,
this code was not updated to account for UTF-8 locales when handling for
those was recently added (31f05a37c), since in a UTF-8 locale the
no-break space is also considered to be a blank.

This commit fixes that.  Previously regcomp.c generated the hard-coded
definitions when there was no isblank(), using #ifdef'd code.  That
special handling was removed, and [:blank:] is always treated just like
any other POSIX class.  The specialness of it is hidden entirely in
handy.h.  This simplifies the regcomp.c code slightly.  I considered
removing the special handling for isascii(), also a C99 construct, in
the name of simplicity over the slight speed that would be lost.  But
the special handling is only a single line in two places, so I left it
in.
handy.h
regcomp.c