--- code/trunk/pcre_study.c 2007/03/08 16:53:09 111 +++ code/trunk/pcre_study.c 2008/07/09 16:20:19 359 @@ -6,7 +6,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2006 University of Cambridge + Copyright (c) 1997-2008 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -42,6 +42,10 @@ supporting functions. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "pcre_internal.h" @@ -213,6 +217,14 @@ tcode += 1 + LINK_SIZE; break; + /* SKIPZERO skips the bracket. */ + + case OP_SKIPZERO: + tcode++; + do tcode += GET(tcode,1); while (*tcode == OP_ALT); + tcode += 1 + LINK_SIZE; + break; + /* Single-char * or ? sets the bit and tries the next item */ case OP_STAR: @@ -337,6 +349,7 @@ switch(tcode[1]) { case OP_ANY: + case OP_ALLANY: return SSB_FAIL; case OP_NOT_DIGIT: @@ -491,7 +504,7 @@ NULL on error or if no optimization possible */ -PCRE_DATA_SCOPE pcre_extra * +PCRE_EXP_DEFN pcre_extra * PCRE_CALL_CONVENTION pcre_study(const pcre *external_re, int options, const char **errorptr) { uschar start_bits[32]; @@ -523,7 +536,8 @@ a multiline pattern that matches only at "line starts", no further processing at present. */ -if ((re->options & (PCRE_ANCHORED|PCRE_FIRSTSET|PCRE_STARTLINE)) != 0) +if ((re->options & PCRE_ANCHORED) != 0 || + (re->flags & (PCRE_FIRSTSET|PCRE_STARTLINE)) != 0) return NULL; /* Set the character tables in the block that is passed around */