rather than enumerating all the anchor flag combos where ml_anch *isn't*
true, enumerate the flags for which is *is* true. This is slighly simpler
logic, and involves once less negation, which makes it easier to
understand.
}
check = prog->check_substr;
}
+
if (prog->intflags & PREGf_ANCH) { /* Match at \G, beg-of-str or after \n */
- ml_anch = !( (prog->intflags & (PREGf_ANCH_SBOL|PREGf_ANCH_GPOS))
- || ( (prog->intflags & PREGf_ANCH_BOL)
- && !multiline ) ); /* Check after \n? */
+ /* Check after \n? */
+ ml_anch = ( (prog->intflags & PREGf_ANCH_MBOL)
+ || ((prog->intflags & PREGf_ANCH_BOL) && multiline));
if (!ml_anch) {
/* we are only allowed to match at BOS or \G */