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

Diff of /code/trunk/pcre_exec.c

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

revision 1346 by ph10, Tue Jul 2 18:37:36 2013 UTC revision 1350 by ph10, Fri Jul 26 10:03:38 2013 UTC
# Line 5637  for (;;) Line 5637  for (;;)
5637            }            }
5638          }          }
5639    
5640        /* Match extended Unicode sequences. We will get here only if the        /* Match extended Unicode grapheme clusters. We will get here only if the
5641        support is in the binary; otherwise a compile-time error occurs. */        support is in the binary; otherwise a compile-time error occurs. */
5642    
5643        else if (ctype == OP_EXTUNI)        else if (ctype == OP_EXTUNI)
# Line 5670  for (;;) Line 5670  for (;;)
5670          /* eptr is now past the end of the maximum run */          /* eptr is now past the end of the maximum run */
5671    
5672          if (possessive) continue;    /* No backtracking */          if (possessive) continue;    /* No backtracking */
5673    
5674          for(;;)          for(;;)
5675            {            {
5676            if (eptr == pp) goto TAIL_RECURSE;            int lgb, rgb;
5677              PCRE_PUCHAR fptr;
5678    
5679              if (eptr == pp) goto TAIL_RECURSE;   /* At start of char run */
5680            RMATCH(eptr, ecode, offset_top, md, eptrb, RM45);            RMATCH(eptr, ecode, offset_top, md, eptrb, RM45);
5681            if (rrc != MATCH_NOMATCH) RRETURN(rrc);            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
5682    
5683              /* Backtracking over an extended grapheme cluster involves inspecting
5684              the previous two characters (if present) to see if a break is
5685              permitted between them. */
5686    
5687            eptr--;            eptr--;
5688            for (;;)                        /* Move back over one extended */            if (!utf) c = *eptr; else
5689                {
5690                BACKCHAR(eptr);
5691                GETCHAR(c, eptr);
5692                }
5693              rgb = UCD_GRAPHBREAK(c);
5694    
5695              for (;;)
5696              {              {
5697              if (!utf) c = *eptr; else              if (eptr == pp) goto TAIL_RECURSE;   /* At start of char run */
5698                fptr = eptr - 1;
5699                if (!utf) c = *fptr; else
5700                {                {
5701                BACKCHAR(eptr);                BACKCHAR(fptr);
5702                GETCHAR(c, eptr);                GETCHAR(c, fptr);
5703                }                }
5704              if (UCD_CATEGORY(c) != ucp_M) break;              lgb = UCD_GRAPHBREAK(c);
5705              eptr--;              if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
5706                eptr = fptr;
5707                rgb = lgb;
5708              }              }
5709            }            }
5710          }          }

Legend:
Removed from v.1346  
changed lines
  Added in v.1350

  ViewVC Help
Powered by ViewVC 1.1.5