regex substrs: record index of check substr
authorDavid Mitchell <davem@iabyn.com>
Sun, 26 Jan 2014 14:19:47 +0000 (14:19 +0000)
committerDavid Mitchell <davem@iabyn.com>
Fri, 7 Feb 2014 22:39:37 +0000 (22:39 +0000)
commit6480a6c448dec40aad54025b06ea6b8bdbc54527
tree57714ab372465d985a65377bf003c9c65bf52919
parent3043e7b49611b7462047bf3742511470995b98bd
regex substrs: record index of check substr

Currently prog->substrs->data[] is a 3 element array of structures.
Elements 0 and 1 record the longest anchored and floating substrings,
while element 2 ('check'), is a copy of the longest of 0 and 1.

Record in a new field, prog->substrs->check_ix, the index of which element
was copied. (Eventually I intend to remove the copy altogether.)

Also for the anchored substr, set max_offset equal to min offset.
Previously it was left as zero and ignored, although if copied to check,
the check copy of max *was* set equal to min. Having this always set will
allow us to make the code simpler.
regcomp.c
regexec.c
regexp.h