/[pcre]/code/trunk/pcre_xclass.c
ViewVC logotype

Diff of /code/trunk/pcre_xclass.c

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

revision 200 by ph10, Wed Aug 1 09:10:40 2007 UTC revision 351 by ph10, Fri Jul 4 18:27:16 2008 UTC
# Line 6  Line 6 
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.
7    
8                         Written by Philip Hazel                         Written by Philip Hazel
9             Copyright (c) 1997-2007 University of Cambridge             Copyright (c) 1997-2008 University of Cambridge
10    
11  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
12  Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
# Line 44  pcre_exec() and pcre_def_exec(). */ Line 44  pcre_exec() and pcre_def_exec(). */
44    
45    
46  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
47  #include <config.h>  #include "config.h"
48  #endif  #endif
49    
50  #include "pcre_internal.h"  #include "pcre_internal.h"
# Line 104  while ((t = *data++) != XCL_END) Line 104  while ((t = *data++) != XCL_END)
104  #ifdef SUPPORT_UCP  #ifdef SUPPORT_UCP
105    else  /* XCL_PROP & XCL_NOTPROP */    else  /* XCL_PROP & XCL_NOTPROP */
106      {      {
107      int chartype, script;      const ucd_record * prop = GET_UCD(c);
     int category = _pcre_ucp_findprop(c, &chartype, &script);  
108    
109      switch(*data)      switch(*data)
110        {        {
# Line 114  while ((t = *data++) != XCL_END) Line 113  while ((t = *data++) != XCL_END)
113        break;        break;
114    
115        case PT_LAMP:        case PT_LAMP:
116        if ((chartype == ucp_Lu || chartype == ucp_Ll || chartype == ucp_Lt) ==        if ((prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || prop->chartype == ucp_Lt) ==
117            (t == XCL_PROP)) return !negated;            (t == XCL_PROP)) return !negated;
118        break;        break;
119    
120        case PT_GC:        case PT_GC:
121        if ((data[1] == category) == (t == XCL_PROP)) return !negated;        if ((data[1] == _pcre_ucp_gentype[prop->chartype]) == (t == XCL_PROP)) return !negated;
122        break;        break;
123    
124        case PT_PC:        case PT_PC:
125        if ((data[1] == chartype) == (t == XCL_PROP)) return !negated;        if ((data[1] == prop->chartype) == (t == XCL_PROP)) return !negated;
126        break;        break;
127    
128        case PT_SC:        case PT_SC:
129        if ((data[1] == script) == (t == XCL_PROP)) return !negated;        if ((data[1] == prop->script) == (t == XCL_PROP)) return !negated;
130        break;        break;
131    
132        /* This should never occur, but compilers may mutter if there is no        /* This should never occur, but compilers may mutter if there is no

Legend:
Removed from v.200  
changed lines
  Added in v.351

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12