/[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 974 by ph10, Fri May 4 13:03:39 2012 UTC revision 975 by ph10, Sat Jun 2 11:03:06 2012 UTC
# Line 490  static const char error_texts[] = Line 490  static const char error_texts[] =
490    "disallowed Unicode code point (>= 0xd800 && <= 0xdfff)\0"    "disallowed Unicode code point (>= 0xd800 && <= 0xdfff)\0"
491    "invalid UTF-16 string\0"    "invalid UTF-16 string\0"
492    /* 75 */    /* 75 */
493    "name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)\0"    "name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)\0"
494    ;    ;
495    
496  /* Table to identify digits and hex digits. This is used when compiling  /* Table to identify digits and hex digits. This is used when compiling
# Line 4518  for (;; ptr++) Line 4518  for (;; ptr++)
4518        LONE_SINGLE_CHARACTER:        LONE_SINGLE_CHARACTER:
4519    
4520        /* Only the value of 1 matters for class_single_char. */        /* Only the value of 1 matters for class_single_char. */
4521    
4522        if (class_single_char < 2) class_single_char++;        if (class_single_char < 2) class_single_char++;
4523    
4524        /* If class_charcount is 1, we saw precisely one character. As long as        /* If class_charcount is 1, we saw precisely one character. As long as
# Line 4813  for (;; ptr++) Line 4813  for (;; ptr++)
4813      if (*previous == OP_CHAR || *previous == OP_CHARI      if (*previous == OP_CHAR || *previous == OP_CHARI
4814          || *previous == OP_NOT || *previous == OP_NOTI)          || *previous == OP_NOT || *previous == OP_NOTI)
4815        {        {
4816        switch (*previous)        switch (*previous)
4817          {          {
4818          default: /* Make compiler happy. */          default: /* Make compiler happy. */
4819          case OP_CHAR:  op_type = OP_STAR - OP_STAR; break;          case OP_CHAR:  op_type = OP_STAR - OP_STAR; break;
# Line 5593  for (;; ptr++) Line 5593  for (;; ptr++)
5593        ptr++;        ptr++;
5594        while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_letter) != 0) ptr++;        while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_letter) != 0) ptr++;
5595        namelen = (int)(ptr - name);        namelen = (int)(ptr - name);
5596    
5597        /* It appears that Perl allows any characters whatsoever, other than        /* It appears that Perl allows any characters whatsoever, other than
5598        a closing parenthesis, to appear in arguments, so we no longer insist on        a closing parenthesis, to appear in arguments, so we no longer insist on
5599        letters, digits, and underscores. */        letters, digits, and underscores. */
# Line 5607  for (;; ptr++) Line 5607  for (;; ptr++)
5607            {            {
5608            *errorcodeptr = ERR75;            *errorcodeptr = ERR75;
5609            goto FAILED;            goto FAILED;
5610            }            }
5611          }          }
5612    
5613        if (*ptr != CHAR_RIGHT_PARENTHESIS)        if (*ptr != CHAR_RIGHT_PARENTHESIS)
# Line 6859  for (;; ptr++) Line 6859  for (;; ptr++)
6859        /* For the rest (including \X when Unicode properties are supported), we        /* For the rest (including \X when Unicode properties are supported), we
6860        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
6861        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
6862        Unicode property tests. Note that \b and \B do a one-character        Unicode property tests. Note that \b and \B do a one-character
6863        lookbehind. */        lookbehind. */
6864    
6865        else        else
6866          {          {
6867          if ((-c == ESC_b || -c == ESC_B) && cd->max_lookbehind == 0)          if ((-c == ESC_b || -c == ESC_B) && cd->max_lookbehind == 0)
6868            cd->max_lookbehind = 1;            cd->max_lookbehind = 1;
6869  #ifdef SUPPORT_UCP  #ifdef SUPPORT_UCP
6870          if (-c >= ESC_DU && -c <= ESC_wu)          if (-c >= ESC_DU && -c <= ESC_wu)
6871            {            {
# Line 7173  for (;;) Line 7173  for (;;)
7173          *ptrptr = ptr;          *ptrptr = ptr;
7174          return FALSE;          return FALSE;
7175          }          }
7176        else        else
7177          {          {
7178          if (fixed_length > cd->max_lookbehind)          if (fixed_length > cd->max_lookbehind)
7179            cd->max_lookbehind = fixed_length;            cd->max_lookbehind = fixed_length;
7180          PUT(reverse_count, 0, fixed_length);          PUT(reverse_count, 0, fixed_length);
7181          }          }
7182        }        }
7183      }      }

Legend:
Removed from v.974  
changed lines
  Added in v.975

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12