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

Diff of /code/trunk/pcre_study.c

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

revision 1220 by zherczeg, Sat Oct 20 20:52:52 2012 UTC revision 1221 by ph10, Sun Nov 11 20:27:03 2012 UTC
# Line 572  if (utf && c > 127) Line 572  if (utf && c > 127)
572    return p;    return p;
573    }    }
574  #else   /* Not SUPPORT_UTF */  #else   /* Not SUPPORT_UTF */
575  (void)(utf);   /* Stops warning for unused parameter */  (void)(utf);   /* Stops warning for unused parameter */
576  #endif  /* SUPPORT_UTF */  #endif  /* SUPPORT_UTF */
577    
578  /* Not UTF-8 mode, or character is less than 127. */  /* Not UTF-8 mode, or character is less than 127. */
# Line 605  if (utf && c > 127) Line 605  if (utf && c > 127)
605    return p;    return p;
606    }    }
607  #else   /* Not SUPPORT_UTF */  #else   /* Not SUPPORT_UTF */
608  (void)(utf);   /* Stops warning for unused parameter */  (void)(utf);   /* Stops warning for unused parameter */
609  #endif  /* SUPPORT_UTF */  #endif  /* SUPPORT_UTF */
610    
611  if (caseless && (cd->ctypes[c] & ctype_letter) != 0) SET_BIT(cd->fcc[c]);  if (caseless && (cd->ctypes[c] & ctype_letter) != 0) SET_BIT(cd->fcc[c]);
# Line 1012  do Line 1012  do
1012        else        else
1013  #endif /* SUPPORT_UTF */  #endif /* SUPPORT_UTF */
1014          {          {
1015  #ifndef EBCDIC  #ifndef EBCDIC
1016          SET_BIT(0xA0);          SET_BIT(0xA0);
1017  #endif  /* Not EBCDIC */  #endif  /* Not EBCDIC */
1018  #if defined COMPILE_PCRE16 || defined COMPILE_PCRE32  #if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
1019          SET_BIT(0xFF);  /* For characters > 255 */          SET_BIT(0xFF);  /* For characters > 255 */
1020  #endif  /* COMPILE_PCRE[16|32] */  #endif  /* COMPILE_PCRE[16|32] */
# Line 1066  do Line 1066  do
1066        break;        break;
1067    
1068        /* The cbit_space table has vertical tab as whitespace; we have to        /* The cbit_space table has vertical tab as whitespace; we have to
1069        ensure it is set as not whitespace. Luckily, the code value is the same        ensure it is set as not whitespace. Luckily, the code value is the same
1070        (0x0b) in ASCII and EBCDIC, so we can just adjust the appropriate bit. */        (0x0b) in ASCII and EBCDIC, so we can just adjust the appropriate bit. */
1071    
1072        case OP_NOT_WHITESPACE:        case OP_NOT_WHITESPACE:
# Line 1150  do Line 1150  do
1150  #endif /* SUPPORT_UTF */  #endif /* SUPPORT_UTF */
1151  #ifndef EBCDIC  #ifndef EBCDIC
1152            SET_BIT(0xA0);            SET_BIT(0xA0);
1153  #endif  /* Not EBCDIC */  #endif  /* Not EBCDIC */
1154          break;          break;
1155    
1156          case OP_ANYNL:          case OP_ANYNL:
# Line 1430  switch(min = find_minlength(code, code, Line 1430  switch(min = find_minlength(code, code,
1430    }    }
1431    
1432  /* If a set of starting bytes has been identified, or if the minimum length is  /* If a set of starting bytes has been identified, or if the minimum length is
1433  greater than zero, or if JIT optimization has been requested, or if  greater than zero, or if JIT optimization has been requested, or if
1434  PCRE_STUDY_EXTRA_NEEDED is set, get a pcre[16]_extra block and a  PCRE_STUDY_EXTRA_NEEDED is set, get a pcre[16]_extra block and a
1435  pcre_study_data block. The study data is put in the latter, which is pointed to  pcre_study_data block. The study data is put in the latter, which is pointed to
1436  by the former, which may also get additional data set later by the calling  by the former, which may also get additional data set later by the calling
# Line 1441  becomes variable in the future, we don't Line 1441  becomes variable in the future, we don't
1441  if (bits_set || min > 0 || (options & (  if (bits_set || min > 0 || (options & (
1442  #ifdef SUPPORT_JIT  #ifdef SUPPORT_JIT
1443      PCRE_STUDY_JIT_COMPILE | PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE |      PCRE_STUDY_JIT_COMPILE | PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE |
1444      PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE |      PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE |
1445  #endif  #endif
1446      PCRE_STUDY_EXTRA_NEEDED)) != 0)      PCRE_STUDY_EXTRA_NEEDED)) != 0)
1447    {    {
# Line 1497  if (bits_set || min > 0 || (options & ( Line 1497  if (bits_set || min > 0 || (options & (
1497    
1498    /* If JIT support was compiled and requested, attempt the JIT compilation.    /* If JIT support was compiled and requested, attempt the JIT compilation.
1499    If no starting bytes were found, and the minimum length is zero, and JIT    If no starting bytes were found, and the minimum length is zero, and JIT
1500    compilation fails, abandon the extra block and return NULL, unless    compilation fails, abandon the extra block and return NULL, unless
1501    PCRE_STUDY_EXTRA_NEEDED is set. */    PCRE_STUDY_EXTRA_NEEDED is set. */
1502    
1503  #ifdef SUPPORT_JIT  #ifdef SUPPORT_JIT

Legend:
Removed from v.1220  
changed lines
  Added in v.1221

  ViewVC Help
Powered by ViewVC 1.1.5