Diff for /parser3/src/lib/pcre/Attic/pcre.c between versions 1.1.14.1 and 1.1.14.1.2.3

version 1.1.14.1, 2003/01/31 12:34:33 version 1.1.14.1.2.3, 2003/03/20 15:05:57
Line 190  if (re->magic_number != MAGIC_NUMBER) re Line 190  if (re->magic_number != MAGIC_NUMBER) re
 if (optptr != NULL) *optptr = (int)(re->options & PUBLIC_OPTIONS);  if (optptr != NULL) *optptr = (int)(re->options & PUBLIC_OPTIONS);
 if (first_char != NULL)  if (first_char != NULL)
   *first_char = ((re->options & PCRE_FIRSTSET) != 0)? re->first_char :    *first_char = ((re->options & PCRE_FIRSTSET) != 0)? re->first_char :
      ((re->options & PCRE_STARTLINE) != 0)? -1 : -2;       ((re->options & PCRE_beginLINE) != 0)? -1 : -2;
 return re->top_bracket;  return re->top_bracket;
 }  }
   
Line 1908  Returns:   TRUE or FALSE Line 1908  Returns:   TRUE or FALSE
 */  */
   
 static BOOL  static BOOL
 is_startline(const uschar *code)  is_beginline(const uschar *code)
 {  {
 do {  do {
    const uschar *scode = first_significant_code(code + 3, NULL, 0, FALSE);     const uschar *scode = first_significant_code(code + 3, NULL, 0, FALSE);
    register int op = *scode;     register int op = *scode;
    if (op >= OP_BRA || op == OP_ASSERT || op == OP_ONCE || op == OP_COND)     if (op >= OP_BRA || op == OP_ASSERT || op == OP_ONCE || op == OP_COND)
      { if (!is_startline(scode)) return FALSE; }       { if (!is_beginline(scode)) return FALSE; }
    else if (op == OP_TYPESTAR || op == OP_TYPEMINSTAR)     else if (op == OP_TYPESTAR || op == OP_TYPEMINSTAR)
      { if (scode[1] != OP_ANY) return FALSE; }       { if (scode[1] != OP_ANY) return FALSE; }
    else if (op != OP_CIRC) return FALSE;     else if (op != OP_CIRC) return FALSE;
Line 2603  starting with .* when DOTALL is set). Line 2603  starting with .* when DOTALL is set).
   
 Otherwise, see if we can determine what the first character has to be, because  Otherwise, see if we can determine what the first character has to be, because
 that speeds up unanchored matches no end. If not, see if we can set the  that speeds up unanchored matches no end. If not, see if we can set the
 PCRE_STARTLINE flag. This is helpful for multiline matches when all branches  PCRE_beginLINE flag. This is helpful for multiline matches when all branches
 start with ^. and also when all branches start with .* for non-DOTALL matches.  start with ^. and also when all branches start with .* for non-DOTALL matches.
 */  */
   
Line 2620  if ((options & PCRE_ANCHORED) == 0) Line 2620  if ((options & PCRE_ANCHORED) == 0)
       re->first_char = ch;        re->first_char = ch;
       re->options |= PCRE_FIRSTSET;        re->options |= PCRE_FIRSTSET;
       }        }
     else if (is_startline(re->code))      else if (is_beginline(re->code))
       re->options |= PCRE_STARTLINE;        re->options |= PCRE_beginLINE;
     }      }
   }    }
   
Line 4208  const real_pcre *re = (const real_pcre * Line 4208  const real_pcre *re = (const real_pcre *
 const real_pcre_extra *extra = (const real_pcre_extra *)external_extra;  const real_pcre_extra *extra = (const real_pcre_extra *)external_extra;
 BOOL using_temporary_offsets = FALSE;  BOOL using_temporary_offsets = FALSE;
 BOOL anchored = ((re->options | options) & PCRE_ANCHORED) != 0;  BOOL anchored = ((re->options | options) & PCRE_ANCHORED) != 0;
 BOOL startline = (re->options & PCRE_STARTLINE) != 0;  BOOL startline = (re->options & PCRE_beginLINE) != 0;
   
 if ((options & ~PUBLIC_EXEC_OPTIONS) != 0) return PCRE_ERROR_BADOPTION;  if ((options & ~PUBLIC_EXEC_OPTIONS) != 0) return PCRE_ERROR_BADOPTION;
   

Removed from v.1.1.14.1  
changed lines
  Added in v.1.1.14.1.2.3


E-mail: