re_intuit_start(): introduce rx_origin var
authorDavid Mitchell <davem@iabyn.com>
Fri, 24 Jan 2014 16:39:40 +0000 (16:39 +0000)
committerDavid Mitchell <davem@iabyn.com>
Fri, 7 Feb 2014 22:39:37 +0000 (22:39 +0000)
commit0fc004dd9db5f900fa1473b62fc7ff16ac881942
treea51f1517ed33b824fd1e1bcdd02eeeb7e8aa1422
parentc8f4a6d6f25ded20e112abff39b18a562181d45b
re_intuit_start(): introduce rx_origin var

re_intuit_start() is a bit of mess. It uses two general function-scope
vars, s and t, to point at string offsets while processing. These vars
mean different things at different times. Introduce a new var, rx_origin,
which indicates the current minimum position that the regex could begin
matching at. It starts off at strpos, and gradually moves up as various
constraints are rejected. It will be the value eventually returned.

For the moment, s and/or t will continue serving that function at various
points in the code; this commit just makes rx_origin valid at the entry to
the 'restart:' block.
regexec.c