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

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

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

revision 808 by ph10, Mon Dec 12 16:23:37 2011 UTC revision 809 by zherczeg, Mon Dec 19 11:04:45 2011 UTC
# Line 75  pcre16_fullinfo(const pcre *argument_re, Line 75  pcre16_fullinfo(const pcre *argument_re,
75    void *where)    void *where)
76  #endif  #endif
77  {  {
 real_pcre internal_re;  
 pcre_study_data internal_study;  
78  const real_pcre *re = (const real_pcre *)argument_re;  const real_pcre *re = (const real_pcre *)argument_re;
79  const pcre_study_data *study = NULL;  const pcre_study_data *study = NULL;
80    
# Line 85  if (re == NULL || where == NULL) return Line 83  if (re == NULL || where == NULL) return
83  if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_STUDY_DATA) != 0)  if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_STUDY_DATA) != 0)
84    study = (const pcre_study_data *)extra_data->study_data;    study = (const pcre_study_data *)extra_data->study_data;
85    
86    /* Check that the first field in the block is the magic number. If it is not,
87    return with PCRE_ERROR_BADMAGIC. However, if the magic number is equal to
88    REVERSED_MAGIC_NUMBER we return with PCRE_ERROR_BADENDIANNESS, which
89    means that the pattern is likely compiled with different endianness. */
90    
91  if (re->magic_number != MAGIC_NUMBER)  if (re->magic_number != MAGIC_NUMBER)
92    {    return re->magic_number == REVERSED_MAGIC_NUMBER?
93    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;  
   }  
94  if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;  if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;
95    
96  switch (what)  switch (what)

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

  ViewVC Help
Powered by ViewVC 1.1.5