Diff for /embedaddon/pcre/pcre_xclass.c between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2012/02/21 23:50:25 version 1.1.1.3, 2013/07/22 08:25:55
Line 6 Line 6
 and semantics are as close as possible to those of the Perl 5 language.  and semantics are as close as possible to those of the Perl 5 language.
   
                        Written by Philip Hazel                         Written by Philip Hazel
           Copyright (c) 1997-2012 University of Cambridge           Copyright (c) 1997-2013 University of Cambridge
   
 -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
Line 64  Returns:      TRUE if character matches, else FALSE Line 64  Returns:      TRUE if character matches, else FALSE
 */  */
   
 BOOL  BOOL
PRIV(xclass)(int c, const pcre_uchar *data, BOOL utf)PRIV(xclass)(pcre_uint32 c, const pcre_uchar *data, BOOL utf)
 {  {
int t;pcre_uchar t;
 BOOL negated = (*data & XCL_NOT) != 0;  BOOL negated = (*data & XCL_NOT) != 0;
   
 (void)utf;  (void)utf;
Line 94  if ((*data++ & XCL_MAP) != 0) data += 32 / sizeof(pcre Line 94  if ((*data++ & XCL_MAP) != 0) data += 32 / sizeof(pcre
   
 while ((t = *data++) != XCL_END)  while ((t = *data++) != XCL_END)
   {    {
  int x, y;  pcre_uint32 x, y;
   if (t == XCL_SINGLE)    if (t == XCL_SINGLE)
     {      {
 #ifdef SUPPORT_UTF  #ifdef SUPPORT_UTF
Line 178  while ((t = *data++) != XCL_END) Line 178  while ((t = *data++) != XCL_END)
            PRIV(ucp_gentype)[prop->chartype] == ucp_N || c == CHAR_UNDERSCORE)             PRIV(ucp_gentype)[prop->chartype] == ucp_N || c == CHAR_UNDERSCORE)
              == (t == XCL_PROP))               == (t == XCL_PROP))
         return !negated;          return !negated;
         break;
   
         case PT_UCNC:
         if (c < 0xa0)
           {
           if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
                c == CHAR_GRAVE_ACCENT) == (t == XCL_PROP))
             return !negated;
           }
         else
           {
           if ((c < 0xd800 || c > 0xdfff) == (t == XCL_PROP))
             return !negated;
           }
       break;        break;
   
       /* This should never occur, but compilers may mutter if there is no        /* This should never occur, but compilers may mutter if there is no

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>