/[pcre]/code/trunk/pcre_compile.c
ViewVC logotype

Diff of /code/trunk/pcre_compile.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 359 by ph10, Wed Jul 9 16:20:19 2008 UTC revision 360 by ph10, Wed Jul 9 20:00:28 2008 UTC
# Line 4920  we set the flag only if there is a liter Line 4920  we set the flag only if there is a liter
4920          both phases.          both phases.
4921    
4922          If we are not at the pattern start, compile code to change the ims          If we are not at the pattern start, compile code to change the ims
4923          options if this setting actually changes any of them. We also pass the          options if this setting actually changes any of them, and reset the
4924          new setting back so that it can be put at the start of any following          greedy defaults and the case value for firstbyte and reqbyte. */
         branches, and when this group ends (if we are in a group), a resetting  
         item can be compiled. */  
4925    
4926          if (*ptr == ')')          if (*ptr == ')')
4927            {            {
# Line 4931  we set the flag only if there is a liter Line 4929  we set the flag only if there is a liter
4929                 (lengthptr == NULL || *lengthptr == 2 + 2*LINK_SIZE))                 (lengthptr == NULL || *lengthptr == 2 + 2*LINK_SIZE))
4930              {              {
4931              cd->external_options = newoptions;              cd->external_options = newoptions;
             options = newoptions;  
4932              }              }
4933           else           else
4934              {              {
# Line 4940  we set the flag only if there is a liter Line 4937  we set the flag only if there is a liter
4937                *code++ = OP_OPT;                *code++ = OP_OPT;
4938                *code++ = newoptions & PCRE_IMS;                *code++ = newoptions & PCRE_IMS;
4939                }                }
   
             /* Change options at this level, and pass them back for use  
             in subsequent branches. Reset the greedy defaults and the case  
             value for firstbyte and reqbyte. */  
   
             *optionsptr = options = newoptions;  
4940              greedy_default = ((newoptions & PCRE_UNGREEDY) != 0);              greedy_default = ((newoptions & PCRE_UNGREEDY) != 0);
4941              greedy_non_default = greedy_default ^ 1;              greedy_non_default = greedy_default ^ 1;
4942              req_caseopt = ((options & PCRE_CASELESS) != 0)? REQ_CASELESS : 0;              req_caseopt = ((newoptions & PCRE_CASELESS) != 0)? REQ_CASELESS : 0;
4943              }              }
4944    
4945              /* Change options at this level, and pass them back for use
4946              in subsequent branches. When not at the start of the pattern, this
4947              information is also necessary so that a resetting item can be
4948              compiled at the end of a group (if we are in a group). */
4949    
4950              *optionsptr = options = newoptions;
4951            previous = NULL;       /* This item can't be repeated */            previous = NULL;       /* This item can't be repeated */
4952            continue;              /* It is complete */            continue;              /* It is complete */
4953            }            }

Legend:
Removed from v.359  
changed lines
  Added in v.360

  ViewVC Help
Powered by ViewVC 1.1.5