Sync regex code with Tcl 8.6.4.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 16 Sep 2015 19:25:25 +0000 (15:25 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 16 Sep 2015 19:25:25 +0000 (15:25 -0400)
commitb44d92b67b65a76f92448b5a282aae72820ac676
tree87c231de73f255181c2a96795617638c4b7b1b44
parentd0f18cde7e40f1f6412bb35e8645888cd620682f
Sync regex code with Tcl 8.6.4.

Sync our regex code with upstream changes since last time we did this,
which was Tcl 8.5.11 (see commit 08fd6ff37f71485e2fc04bc6ce07d2a483c36702).

The only functional change here is to disbelieve that an octal escape is
three digits long if it would exceed \377.  That's a bug fix, but it's
a minor one and could change the interpretation of working regexes, so
don't back-patch.

In addition to that, s/INFINITY/DUPINF/ to eliminate the risk of collisions
with <math.h>'s macro, and s/LOCAL/NOPROP/ because that also seems like
an unnecessarily collision-prone macro name.

There were some other cosmetic changes in their copy that I did not adopt,
notably a rather half-hearted attempt at renaming some of the C functions
in a more verbose style.  (I'm not necessarily against the concept, but
renaming just a few functions in the package is not an improvement.)
src/backend/regex/regc_lex.c
src/backend/regex/regcomp.c
src/backend/regex/regexec.c
src/include/regex/regguts.h