/[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 1417 by ph10, Tue Dec 24 18:03:06 2013 UTC revision 1438 by ph10, Fri Jan 10 16:13:10 2014 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-2013 University of Cambridge             Copyright (c) 1997-2014 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 4077  for (c = *cptr; c <= d; c++) Line 4077  for (c = *cptr; c <= d; c++)
4077    
4078  if (c > d) return -1;  /* Reached end of range */  if (c > d) return -1;  /* Reached end of range */
4079    
4080    /* Found a character that has a single other case. Search for the end of the
4081    range, which is either the end of the input range, or a character that has zero
4082    or more than one other cases. */
4083    
4084  *ocptr = othercase;  *ocptr = othercase;
4085  next = othercase + 1;  next = othercase + 1;
4086    
4087  for (++c; c <= d; c++)  for (++c; c <= d; c++)
4088    {    {
4089    if (UCD_OTHERCASE(c) != next) break;    if ((co = UCD_CASESET(c)) != 0 || UCD_OTHERCASE(c) != next) break;
4090    next++;    next++;
4091    }    }
4092    
# Line 4138  if ((options & PCRE_CASELESS) != 0) Line 4142  if ((options & PCRE_CASELESS) != 0)
4142    
4143      options &= ~PCRE_CASELESS;   /* Remove for recursive calls */      options &= ~PCRE_CASELESS;   /* Remove for recursive calls */
4144      c = start;      c = start;
4145    
4146      while ((rc = get_othercase_range(&c, end, &oc, &od)) >= 0)      while ((rc = get_othercase_range(&c, end, &oc, &od)) >= 0)
4147        {        {
4148        /* Handle a single character that has more than one other case. */        /* Handle a single character that has more than one other case. */
# Line 4201  for (c = start; c <= classbits_end; c++) Line 4205  for (c = start; c <= classbits_end; c++)
4205  #if defined SUPPORT_UTF || !defined COMPILE_PCRE8  #if defined SUPPORT_UTF || !defined COMPILE_PCRE8
4206  if (start <= 0xff) start = 0xff + 1;  if (start <= 0xff) start = 0xff + 1;
4207    
4208  if (end >= start) {  if (end >= start)
4209      {
4210    pcre_uchar *uchardata = *uchardptr;    pcre_uchar *uchardata = *uchardptr;
   
4211  #ifdef SUPPORT_UTF  #ifdef SUPPORT_UTF
4212    if ((options & PCRE_UTF8) != 0)  /* All UTFs use the same flag bit */    if ((options & PCRE_UTF8) != 0)  /* All UTFs use the same flag bit */
4213      {      {

Legend:
Removed from v.1417  
changed lines
  Added in v.1438

  ViewVC Help
Powered by ViewVC 1.1.5