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

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

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

revision 793 by zherczeg, Wed Dec 7 14:36:26 2011 UTC revision 794 by zherczeg, Thu Dec 8 07:36:41 2011 UTC
# Line 4607  for (;; ptr++) Line 4607  for (;; ptr++)
4607        it's a length rather than a small character. */        it's a length rather than a small character. */
4608    
4609  #ifdef SUPPORT_UTF  #ifdef SUPPORT_UTF
4610  #ifdef COMPILE_PCRE8        if (utf && NOT_FIRSTCHAR(code[-1]))
       if (utf && (code[-1] & 0x80) != 0)  
 #endif /* COMPILE_PCRE8 */  
 #ifdef COMPILE_PCRE16  
       if (utf && (code[-1] & 0xfc00) == 0xdc00)  
 #endif /* COMPILE_PCRE8 */  
4611          {          {
4612          pcre_uchar *lastchar = code - 1;          pcre_uchar *lastchar = code - 1;
4613          BACKCHAR(lastchar);          BACKCHAR(lastchar);
# Line 4625  for (;; ptr++) Line 4620  for (;; ptr++)
4620    
4621        /* Handle the case of a single charater - either with no UTF support, or        /* Handle the case of a single charater - either with no UTF support, or
4622        with UTF disabled, or for a single character UTF character. */        with UTF disabled, or for a single character UTF character. */
   
4623          {          {
4624          c = code[-1];          c = code[-1];
4625          if (repeat_min > 1) reqchar = c | req_caseopt | cd->req_varyopt;          if (repeat_min > 1) reqchar = c | req_caseopt | cd->req_varyopt;
# Line 7438  while (ptr[skipatstart] == CHAR_LEFT_PAR Line 7432  while (ptr[skipatstart] == CHAR_LEFT_PAR
7432    int newnl = 0;    int newnl = 0;
7433    int newbsr = 0;    int newbsr = 0;
7434    
7435    #ifdef COMPILE_PCRE8
7436    if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UTF_RIGHTPAR, 5) == 0)    if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UTF_RIGHTPAR, 5) == 0)
7437      { skipatstart += 7; options |= PCRE_UTF8; continue; }      { skipatstart += 7; options |= PCRE_UTF8; continue; }
7438    #endif
7439    #ifdef COMPILE_PCRE16
7440      if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UTF_RIGHTPAR, 6) == 0)
7441        { skipatstart += 8; options |= PCRE_UTF16; continue; }
7442    #endif
7443    else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UCP_RIGHTPAR, 4) == 0)    else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UCP_RIGHTPAR, 4) == 0)
7444      { skipatstart += 6; options |= PCRE_UCP; continue; }      { skipatstart += 6; options |= PCRE_UCP; continue; }
7445    else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_NO_START_OPT_RIGHTPAR, 13) == 0)    else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_NO_START_OPT_RIGHTPAR, 13) == 0)

Legend:
Removed from v.793  
changed lines
  Added in v.794

  ViewVC Help
Powered by ViewVC 1.1.5