/[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 927 by ph10, Wed Feb 22 15:15:08 2012 UTC revision 932 by ph10, Fri Feb 24 18:54:43 2012 UTC
# Line 6852  for (;; ptr++) Line 6852  for (;; ptr++)
6852        /* For the rest (including \X when Unicode properties are supported), we        /* For the rest (including \X when Unicode properties are supported), we
6853        can obtain the OP value by negating the escape value in the default        can obtain the OP value by negating the escape value in the default
6854        situation when PCRE_UCP is not set. When it *is* set, we substitute        situation when PCRE_UCP is not set. When it *is* set, we substitute
6855        Unicode property tests. */        Unicode property tests. Note that \b and \B do a one-character
6856          lookbehind. */
6857    
6858        else        else
6859          {          {
6860            if ((-c == ESC_b || -c == ESC_B) && cd->max_lookbehind == 0)
6861              cd->max_lookbehind = 1;
6862  #ifdef SUPPORT_UCP  #ifdef SUPPORT_UCP
6863          if (-c >= ESC_DU && -c <= ESC_wu)          if (-c >= ESC_DU && -c <= ESC_wu)
6864            {            {
# Line 7163  for (;;) Line 7166  for (;;)
7166          *ptrptr = ptr;          *ptrptr = ptr;
7167          return FALSE;          return FALSE;
7168          }          }
7169        else { PUT(reverse_count, 0, fixed_length); }        else
7170            {
7171            if (fixed_length > cd->max_lookbehind)
7172              cd->max_lookbehind = fixed_length;
7173            PUT(reverse_count, 0, fixed_length);
7174            }
7175        }        }
7176      }      }
7177    
# Line 7833  cd->start_pattern = (const pcre_uchar *) Line 7841  cd->start_pattern = (const pcre_uchar *)
7841  cd->end_pattern = (const pcre_uchar *)(pattern + STRLEN_UC((const pcre_uchar *)pattern));  cd->end_pattern = (const pcre_uchar *)(pattern + STRLEN_UC((const pcre_uchar *)pattern));
7842  cd->req_varyopt = 0;  cd->req_varyopt = 0;
7843  cd->assert_depth = 0;  cd->assert_depth = 0;
7844    cd->max_lookbehind = 0;
7845  cd->external_options = options;  cd->external_options = options;
7846  cd->external_flags = 0;  cd->external_flags = 0;
7847  cd->open_caps = NULL;  cd->open_caps = NULL;
# Line 7883  re->magic_number = MAGIC_NUMBER; Line 7892  re->magic_number = MAGIC_NUMBER;
7892  re->size = (int)size;  re->size = (int)size;
7893  re->options = cd->external_options;  re->options = cd->external_options;
7894  re->flags = cd->external_flags;  re->flags = cd->external_flags;
 re->dummy1 = 0;  
7895  re->first_char = 0;  re->first_char = 0;
7896  re->req_char = 0;  re->req_char = 0;
7897  re->name_table_offset = sizeof(REAL_PCRE) / sizeof(pcre_uchar);  re->name_table_offset = sizeof(REAL_PCRE) / sizeof(pcre_uchar);
# Line 7903  field; this time it's used for rememberi Line 7911  field; this time it's used for rememberi
7911  cd->final_bracount = cd->bracount;  /* Save for checking forward references */  cd->final_bracount = cd->bracount;  /* Save for checking forward references */
7912  cd->assert_depth = 0;  cd->assert_depth = 0;
7913  cd->bracount = 0;  cd->bracount = 0;
7914    cd->max_lookbehind = 0;
7915  cd->names_found = 0;  cd->names_found = 0;
7916  cd->name_table = (pcre_uchar *)re + re->name_table_offset;  cd->name_table = (pcre_uchar *)re + re->name_table_offset;
7917  codestart = cd->name_table + re->name_entry_size * re->name_count;  codestart = cd->name_table + re->name_entry_size * re->name_count;
# Line 7924  code = (pcre_uchar *)codestart; Line 7933  code = (pcre_uchar *)codestart;
7933    &firstchar, &reqchar, NULL, cd, NULL);    &firstchar, &reqchar, NULL, cd, NULL);
7934  re->top_bracket = cd->bracount;  re->top_bracket = cd->bracount;
7935  re->top_backref = cd->top_backref;  re->top_backref = cd->top_backref;
7936    re->max_lookbehind = cd->max_lookbehind;
7937  re->flags = cd->external_flags | PCRE_MODE;  re->flags = cd->external_flags | PCRE_MODE;
7938    
7939  if (cd->had_accept) reqchar = REQ_NONE;   /* Must disable after (*ACCEPT) */  if (cd->had_accept) reqchar = REQ_NONE;   /* Must disable after (*ACCEPT) */
# Line 8011  if (cd->check_lookbehind) Line 8021  if (cd->check_lookbehind)
8021                      (fixed_length == -4)? ERR70 : ERR25;                      (fixed_length == -4)? ERR70 : ERR25;
8022          break;          break;
8023          }          }
8024          if (fixed_length > cd->max_lookbehind) cd->max_lookbehind = fixed_length;
8025        PUT(cc, 1, fixed_length);        PUT(cc, 1, fixed_length);
8026        }        }
8027      cc += 1 + LINK_SIZE;      cc += 1 + LINK_SIZE;

Legend:
Removed from v.927  
changed lines
  Added in v.932

  ViewVC Help
Powered by ViewVC 1.1.5