/[pcre]/code/branches/pcre16/pcre_xclass.c
ViewVC logotype

Diff of /code/branches/pcre16/pcre_xclass.c

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

revision 763 by ph10, Mon Nov 21 10:48:42 2011 UTC revision 764 by zherczeg, Wed Nov 23 17:23:20 2011 UTC
# Line 64  Returns:      TRUE if character matches, Line 64  Returns:      TRUE if character matches,
64  */  */
65    
66  BOOL  BOOL
67  _pcre_xclass(int c, const pcre_uchar *data)  PRIV(xclass)(int c, const pcre_uchar *data)
68  {  {
69  int t;  int t;
70  BOOL negated = (*data & XCL_NOT) != 0;  BOOL negated = (*data & XCL_NOT) != 0;
# Line 117  while ((t = *data++) != XCL_END) Line 117  while ((t = *data++) != XCL_END)
117        break;        break;
118    
119        case PT_GC:        case PT_GC:
120        if ((data[1] == _pcre_ucp_gentype[prop->chartype]) == (t == XCL_PROP))        if ((data[1] == PRIV(ucp_gentype)[prop->chartype]) == (t == XCL_PROP))
121          return !negated;          return !negated;
122        break;        break;
123    
# Line 130  while ((t = *data++) != XCL_END) Line 130  while ((t = *data++) != XCL_END)
130        break;        break;
131    
132        case PT_ALNUM:        case PT_ALNUM:
133        if ((_pcre_ucp_gentype[prop->chartype] == ucp_L ||        if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
134             _pcre_ucp_gentype[prop->chartype] == ucp_N) == (t == XCL_PROP))             PRIV(ucp_gentype)[prop->chartype] == ucp_N) == (t == XCL_PROP))
135          return !negated;          return !negated;
136        break;        break;
137    
138        case PT_SPACE:    /* Perl space */        case PT_SPACE:    /* Perl space */
139        if ((_pcre_ucp_gentype[prop->chartype] == ucp_Z ||        if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
140             c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR)             c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR)
141               == (t == XCL_PROP))               == (t == XCL_PROP))
142          return !negated;          return !negated;
143        break;        break;
144    
145        case PT_PXSPACE:  /* POSIX space */        case PT_PXSPACE:  /* POSIX space */
146        if ((_pcre_ucp_gentype[prop->chartype] == ucp_Z ||        if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
147             c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||             c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||
148             c == CHAR_FF || c == CHAR_CR) == (t == XCL_PROP))             c == CHAR_FF || c == CHAR_CR) == (t == XCL_PROP))
149          return !negated;          return !negated;
150        break;        break;
151    
152        case PT_WORD:        case PT_WORD:
153        if ((_pcre_ucp_gentype[prop->chartype] == ucp_L ||        if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
154             _pcre_ucp_gentype[prop->chartype] == ucp_N || c == CHAR_UNDERSCORE)             PRIV(ucp_gentype)[prop->chartype] == ucp_N || c == CHAR_UNDERSCORE)
155               == (t == XCL_PROP))               == (t == XCL_PROP))
156          return !negated;          return !negated;
157        break;        break;

Legend:
Removed from v.763  
changed lines
  Added in v.764

  ViewVC Help
Powered by ViewVC 1.1.5