/[pcre]/code/branches/oldtrunk8/pcre_ucp_searchfuncs.c
ViewVC logotype

Diff of /code/branches/oldtrunk8/pcre_ucp_searchfuncs.c

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

code/trunk/pcre_ucp_searchfuncs.c revision 96 by nigel, Fri Mar 2 13:10:43 2007 UTC code/branches/oldtrunk8/pcre_ucp_searchfuncs.c revision 834 by ph10, Wed Dec 28 15:53:12 2011 UTC
# Line 1  Line 1 
1    ############################################################
2    ############################################################
3    ## As of PCRE 8.0 this file is OBSOLETE. A different way  ##
4    ## of handling Unicode property data is now used. See the ##
5    ## maint/README document.                                 ##
6    ## PH 02 July 2008                                        ##
7    ############################################################
8    ############################################################
9    
10  /*************************************************  /*************************************************
11  *      Perl-Compatible Regular Expressions       *  *      Perl-Compatible Regular Expressions       *
12  *************************************************/  *************************************************/
# Line 6  Line 15 
15  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.
16    
17                         Written by Philip Hazel                         Written by Philip Hazel
18             Copyright (c) 1997-2006 University of Cambridge             Copyright (c) 1997-2008 University of Cambridge
19    
20  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
21  Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
# Line 41  POSSIBILITY OF SUCH DAMAGE. Line 50  POSSIBILITY OF SUCH DAMAGE.
50  /* This module contains code for searching the table of Unicode character  /* This module contains code for searching the table of Unicode character
51  properties. */  properties. */
52    
53    #ifdef HAVE_CONFIG_H
54    #include "config.h"
55    #endif
56    
57  #include "pcre_internal.h"  #include "pcre_internal.h"
58    
59  #include "ucp.h"               /* Category definitions */  #include "ucp.h"               /* Category definitions */
60  #include "ucpinternal.h"       /* Internal table details */  #include "ucpinternal.h"       /* Internal table details */
61  #include "ucptable.c"          /* The table itself */  #include "ucptable.h"          /* The table itself */
62    
63    
64  /* Table to translate from particular type value to the general value. */  /* Table to translate from particular type value to the general value. */
65    
66  static int ucp_gentype[] = {  static const int ucp_gentype[] = {
67    ucp_C, ucp_C, ucp_C, ucp_C, ucp_C,  /* Cc, Cf, Cn, Co, Cs */    ucp_C, ucp_C, ucp_C, ucp_C, ucp_C,  /* Cc, Cf, Cn, Co, Cs */
68    ucp_L, ucp_L, ucp_L, ucp_L, ucp_L,  /* Ll, Lu, Lm, Lo, Lt */    ucp_L, ucp_L, ucp_L, ucp_L, ucp_L,  /* Ll, Lu, Lm, Lo, Lt */
69    ucp_M, ucp_M, ucp_M,                /* Mc, Me, Mn */    ucp_M, ucp_M, ucp_M,                /* Mc, Me, Mn */
# Line 148  makes things a lot slower. */ Line 161  makes things a lot slower. */
161    
162  for (;;)  for (;;)
163    {    {
164    if (top <= bot) return -1;    if (top <= bot) return (unsigned int)(-1);
165    mid = (bot + top) >> 1;    mid = (bot + top) >> 1;
166    if (c == (ucp_table[mid].f0 & f0_charmask)) break;    if (c == (ucp_table[mid].f0 & f0_charmask)) break;
167    if (c < (ucp_table[mid].f0 & f0_charmask)) top = mid;    if (c < (ucp_table[mid].f0 & f0_charmask)) top = mid;

Legend:
Removed from v.96  
changed lines
  Added in v.834

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12