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

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

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

revision 808 by zherczeg, Thu Dec 15 11:57:39 2011 UTC revision 809 by zherczeg, Mon Dec 19 11:04:45 2011 UTC
# Line 3019  BOOL utf, anchored, startline, firstline Line 3019  BOOL utf, anchored, startline, firstline
3019  const pcre_uchar *current_subject, *end_subject;  const pcre_uchar *current_subject, *end_subject;
3020  const pcre_uint8 *lcc;  const pcre_uint8 *lcc;
3021    
 pcre_study_data internal_study;  
3022  const pcre_study_data *study = NULL;  const pcre_study_data *study = NULL;
 real_pcre internal_re;  
3023    
3024  const pcre_uchar *req_char_ptr;  const pcre_uchar *req_char_ptr;
3025  const pcre_uint8 *start_bits = NULL;  const pcre_uint8 *start_bits = NULL;
# Line 3065  if (extra_data != NULL) Line 3063  if (extra_data != NULL)
3063    }    }
3064    
3065  /* Check that the first field in the block is the magic number. If it is not,  /* Check that the first field in the block is the magic number. If it is not,
3066  test for a regex that was compiled on a host of opposite endianness. If this is  return with PCRE_ERROR_BADMAGIC. However, if the magic number is equal to
3067  the case, flipped values are put in internal_re and internal_study if there was  REVERSED_MAGIC_NUMBER we return with PCRE_ERROR_BADENDIANNESS, which
3068  study data too. */  means that the pattern is likely compiled with different endianness. */
3069    
3070  if (re->magic_number != MAGIC_NUMBER)  if (re->magic_number != MAGIC_NUMBER)
3071    {    return re->magic_number == REVERSED_MAGIC_NUMBER?
3072    re = PRIV(try_flipped)(re, &internal_re, study, &internal_study);      PCRE_ERROR_BADENDIANNESS:PCRE_ERROR_BADMAGIC;
   if (re == NULL) return PCRE_ERROR_BADMAGIC;  
   if (study != NULL) study = &internal_study;  
   }  
3073  if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;  if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;
3074    
3075  /* Set some local values */  /* Set some local values */

Legend:
Removed from v.808  
changed lines
  Added in v.809

  ViewVC Help
Powered by ViewVC 1.1.5