/[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 1607 by ph10, Tue Nov 17 17:27:17 2015 UTC revision 1608 by ph10, Fri Nov 20 17:34:16 2015 UTC
# Line 4940  for (;; ptr++) Line 4940  for (;; ptr++)
4940        (which is on the stack). We have to remember that there was XCLASS data,        (which is on the stack). We have to remember that there was XCLASS data,
4941        however. */        however. */
4942    
4943          if (class_uchardata > class_uchardata_base) xclass = TRUE;
4944    
4945        if (lengthptr != NULL && class_uchardata > class_uchardata_base)        if (lengthptr != NULL && class_uchardata > class_uchardata_base)
4946          {          {
         xclass = TRUE;  
4947          *lengthptr += (int)(class_uchardata - class_uchardata_base);          *lengthptr += (int)(class_uchardata - class_uchardata_base);
4948          class_uchardata = class_uchardata_base;          class_uchardata = class_uchardata_base;
4949          }          }
# Line 5045  for (;; ptr++) Line 5046  for (;; ptr++)
5046              ptr = tempptr + 1;              ptr = tempptr + 1;
5047              continue;              continue;
5048    
5049              /* For all other POSIX classes, no special action is taken in UCP              /* For the other POSIX classes (ascii, xdigit) we are going to fall
5050              mode. Fall through to the non_UCP case. */              through to the non-UCP case and build a bit map for characters with
5051                code points less than 256. If we are in a negated POSIX class
5052                within a non-negated overall class, characters with code points
5053                greater than 255 must all match. In the special case where we have
5054                not yet generated any xclass data, and this is the final item in
5055                the overall class, we need do nothing: later on, the opcode
5056                OP_NCLASS will be used to indicate that characters greater than 255
5057                are acceptable. If we have already seen an xclass item or one may
5058                follow (we have to assume that it might if this is not the end of
5059                the class), explicitly match all wide codepoints. */
5060    
5061              default:              default:
5062                if (!negate_class && local_negate &&
5063                    (xclass || tempptr[2] != CHAR_RIGHT_SQUARE_BRACKET))
5064                  {
5065                  *class_uchardata++ = XCL_RANGE;
5066                  class_uchardata += PRIV(ord2utf)(0x100, class_uchardata);
5067                  class_uchardata += PRIV(ord2utf)(0x10ffff, class_uchardata);
5068                  }
5069              break;              break;
5070              }              }
5071            }            }

Legend:
Removed from v.1607  
changed lines
  Added in v.1608

  ViewVC Help
Powered by ViewVC 1.1.5