/[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 1529 by ph10, Mon Mar 2 17:09:58 2015 UTC revision 1532 by ph10, Fri Mar 6 11:59:39 2015 UTC
# Line 4002  while ((ptr = (pcre_uchar *)find_recurse Line 4002  while ((ptr = (pcre_uchar *)find_recurse
4002    /* See if this recursion is on the forward reference list. If so, adjust the    /* See if this recursion is on the forward reference list. If so, adjust the
4003    reference. */    reference. */
4004    
4005    for (hc = (pcre_uchar *)cd->start_workspace + save_hwm_offset; hc < cd->hwm;    for (hc = (pcre_uchar *)cd->start_workspace + save_hwm_offset; hc < cd->hwm;
4006         hc += LINK_SIZE)         hc += LINK_SIZE)
4007      {      {
4008      offset = (int)GET(hc, 0);      offset = (int)GET(hc, 0);
# Line 4208  if ((options & PCRE_CASELESS) != 0) Line 4208  if ((options & PCRE_CASELESS) != 0)
4208        range. Otherwise, use a recursive call to add the additional range. */        range. Otherwise, use a recursive call to add the additional range. */
4209    
4210        else if (oc < start && od >= start - 1) start = oc; /* Extend downwards */        else if (oc < start && od >= start - 1) start = oc; /* Extend downwards */
4211        else if (od > end && oc <= end + 1) end = od;       /* Extend upwards */        else if (od > end && oc <= end + 1)
4212            {
4213            end = od;       /* Extend upwards */
4214            if (end > classbits_end) classbits_end = (end <= 0xff ? end : 0xff);
4215            }
4216        else n8 += add_to_class(classbits, uchardptr, options, cd, oc, od);        else n8 += add_to_class(classbits, uchardptr, options, cd, oc, od);
4217        }        }
4218      }      }
# Line 6052  for (;; ptr++) Line 6056  for (;; ptr++)
6056                memcpy(code, previous, IN_UCHARS(len));                memcpy(code, previous, IN_UCHARS(len));
6057    
6058                while (cd->hwm > cd->start_workspace + cd->workspace_size -                while (cd->hwm > cd->start_workspace + cd->workspace_size -
6059                       WORK_SIZE_SAFETY_MARGIN -                       WORK_SIZE_SAFETY_MARGIN -
6060                       (this_hwm_offset - save_hwm_offset))                       (this_hwm_offset - save_hwm_offset))
6061                  {                  {
6062                  *errorcodeptr = expand_workspace(cd);                  *errorcodeptr = expand_workspace(cd);
6063                  if (*errorcodeptr != 0) goto FAILED;                  if (*errorcodeptr != 0) goto FAILED;
6064                  }                  }
6065    
6066                for (hc = (pcre_uchar *)cd->start_workspace + save_hwm_offset;                for (hc = (pcre_uchar *)cd->start_workspace + save_hwm_offset;
6067                     hc < (pcre_uchar *)cd->start_workspace + this_hwm_offset;                     hc < (pcre_uchar *)cd->start_workspace + this_hwm_offset;
6068                     hc += LINK_SIZE)                     hc += LINK_SIZE)
6069                  {                  {
6070                  PUT(cd->hwm, 0, GET(hc, 0) + len);                  PUT(cd->hwm, 0, GET(hc, 0) + len);
# Line 6133  for (;; ptr++) Line 6137  for (;; ptr++)
6137            copying them. */            copying them. */
6138    
6139            while (cd->hwm > cd->start_workspace + cd->workspace_size -            while (cd->hwm > cd->start_workspace + cd->workspace_size -
6140                   WORK_SIZE_SAFETY_MARGIN -                   WORK_SIZE_SAFETY_MARGIN -
6141                   (this_hwm_offset - save_hwm_offset))                   (this_hwm_offset - save_hwm_offset))
6142              {              {
6143              *errorcodeptr = expand_workspace(cd);              *errorcodeptr = expand_workspace(cd);
6144              if (*errorcodeptr != 0) goto FAILED;              if (*errorcodeptr != 0) goto FAILED;
6145              }              }
6146    
6147            for (hc = (pcre_uchar *)cd->start_workspace + save_hwm_offset;            for (hc = (pcre_uchar *)cd->start_workspace + save_hwm_offset;
6148                 hc < (pcre_uchar *)cd->start_workspace + this_hwm_offset;                 hc < (pcre_uchar *)cd->start_workspace + this_hwm_offset;
6149                 hc += LINK_SIZE)                 hc += LINK_SIZE)
6150              {              {
6151              PUT(cd->hwm, 0, GET(hc, 0) + len + ((i != 0)? 2+LINK_SIZE : 1));              PUT(cd->hwm, 0, GET(hc, 0) + len + ((i != 0)? 2+LINK_SIZE : 1));

Legend:
Removed from v.1529  
changed lines
  Added in v.1532

  ViewVC Help
Powered by ViewVC 1.1.5