regcomp.c: Refactor so can remove duplicate code
authorKarl Williamson <public@khwilliamson.com>
Fri, 25 May 2012 04:14:04 +0000 (22:14 -0600)
committerKarl Williamson <public@khwilliamson.com>
Thu, 2 Aug 2012 15:24:51 +0000 (09:24 -0600)
commit271751d1fca6da3c69c097271351815757c2eb3e
tree953f9f94e1df6d848d3a179641867b02ca0b8a3f
parent3972af9b5a9bdbb7274475d476ce6bc8818d1964
regcomp.c: Refactor so can remove duplicate code

This commit prepares the way for a later commit to remove a chunk of
essentially duplicate code.  It does this at the cost of an extra
test of a boolean each time through the loop.  But, it saves calculating
the fold unless necessary, a potentially expensive operation.  When the
next input is a quantifier that calculated fold is discarded, unused.
This commit avoids doing that calculation when the next input is a
quantifier.
regcomp.c