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

Diff of /code/trunk/pcre_dfa_exec.c

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

revision 850 by zherczeg, Wed Jan 4 17:29:11 2012 UTC revision 894 by ph10, Fri Jan 20 11:58:19 2012 UTC
# Line 2557  for (;;) Line 2557  for (;;)
2557              cb.version          = 1;   /* Version 1 of the callout block */              cb.version          = 1;   /* Version 1 of the callout block */
2558              cb.callout_number   = code[LINK_SIZE+2];              cb.callout_number   = code[LINK_SIZE+2];
2559              cb.offset_vector    = offsets;              cb.offset_vector    = offsets;
2560    #ifdef COMPILE_PCRE8
2561              cb.subject          = (PCRE_SPTR)start_subject;              cb.subject          = (PCRE_SPTR)start_subject;
2562    #else
2563                cb.subject          = (PCRE_SPTR16)start_subject;
2564    #endif
2565              cb.subject_length   = (int)(end_subject - start_subject);              cb.subject_length   = (int)(end_subject - start_subject);
2566              cb.start_match      = (int)(current_subject - start_subject);              cb.start_match      = (int)(current_subject - start_subject);
2567              cb.current_position = (int)(ptr - start_subject);              cb.current_position = (int)(ptr - start_subject);
# Line 2686  for (;;) Line 2690  for (;;)
2690            {            {
2691            for (rc = rc*2 - 2; rc >= 0; rc -= 2)            for (rc = rc*2 - 2; rc >= 0; rc -= 2)
2692              {              {
             const pcre_uchar *p = start_subject + local_offsets[rc];  
             const pcre_uchar *pp = start_subject + local_offsets[rc+1];  
2693              int charcount = local_offsets[rc+1] - local_offsets[rc];              int charcount = local_offsets[rc+1] - local_offsets[rc];
2694  #ifdef SUPPORT_UTF  #ifdef SUPPORT_UTF
2695                const pcre_uchar *p = start_subject + local_offsets[rc];
2696                const pcre_uchar *pp = start_subject + local_offsets[rc+1];
2697              while (p < pp) if (NOT_FIRSTCHAR(*p++)) charcount--;              while (p < pp) if (NOT_FIRSTCHAR(*p++)) charcount--;
2698  #endif  #endif
2699              if (charcount > 0)              if (charcount > 0)
# Line 2896  for (;;) Line 2900  for (;;)
2900          cb.version          = 1;   /* Version 1 of the callout block */          cb.version          = 1;   /* Version 1 of the callout block */
2901          cb.callout_number   = code[1];          cb.callout_number   = code[1];
2902          cb.offset_vector    = offsets;          cb.offset_vector    = offsets;
2903    #ifdef COMPILE_PCRE8
2904          cb.subject          = (PCRE_SPTR)start_subject;          cb.subject          = (PCRE_SPTR)start_subject;
2905    #else
2906            cb.subject          = (PCRE_SPTR16)start_subject;
2907    #endif
2908          cb.subject_length   = (int)(end_subject - start_subject);          cb.subject_length   = (int)(end_subject - start_subject);
2909          cb.start_match      = (int)(current_subject - start_subject);          cb.start_match      = (int)(current_subject - start_subject);
2910          cb.current_position = (int)(ptr - start_subject);          cb.current_position = (int)(ptr - start_subject);
# Line 3013  pcre_dfa_exec(const pcre *argument_re, c Line 3021  pcre_dfa_exec(const pcre *argument_re, c
3021    int offsetcount, int *workspace, int wscount)    int offsetcount, int *workspace, int wscount)
3022  #else  #else
3023  PCRE_EXP_DEFN int PCRE_CALL_CONVENTION  PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
3024  pcre16_dfa_exec(const pcre *argument_re, const pcre16_extra *extra_data,  pcre16_dfa_exec(const pcre16 *argument_re, const pcre16_extra *extra_data,
3025    PCRE_SPTR16 subject, int length, int start_offset, int options, int *offsets,    PCRE_SPTR16 subject, int length, int start_offset, int options, int *offsets,
3026    int offsetcount, int *workspace, int wscount)    int offsetcount, int *workspace, int wscount)
3027  #endif  #endif
3028  {  {
3029  real_pcre *re = (real_pcre *)argument_re;  REAL_PCRE *re = (REAL_PCRE *)argument_re;
3030  dfa_match_data match_block;  dfa_match_data match_block;
3031  dfa_match_data *md = &match_block;  dfa_match_data *md = &match_block;
3032  BOOL utf, anchored, startline, firstline;  BOOL utf, anchored, startline, firstline;
3033  const pcre_uchar *current_subject, *end_subject;  const pcre_uchar *current_subject, *end_subject;
 const pcre_uint8 *lcc;  
   
3034  const pcre_study_data *study = NULL;  const pcre_study_data *study = NULL;
3035    
3036  const pcre_uchar *req_char_ptr;  const pcre_uchar *req_char_ptr;
# Line 3186  in other programs later. */ Line 3192  in other programs later. */
3192    
3193  if (md->tables == NULL) md->tables = PRIV(default_tables);  if (md->tables == NULL) md->tables = PRIV(default_tables);
3194    
3195  /* The lower casing table and the "must be at the start of a line" flag are  /* The "must be at the start of a line" flags are used in a loop when finding
3196  used in a loop when finding where to start. */  where to start. */
3197    
 lcc = md->tables + lcc_offset;  
3198  startline = (re->flags & PCRE_STARTLINE) != 0;  startline = (re->flags & PCRE_STARTLINE) != 0;
3199  firstline = (re->options & PCRE_FIRSTLINE) != 0;  firstline = (re->options & PCRE_FIRSTLINE) != 0;
3200    

Legend:
Removed from v.850  
changed lines
  Added in v.894

  ViewVC Help
Powered by ViewVC 1.1.5