~ubuntu-branches/ubuntu/trusty/pcre3/trusty

« back to all changes in this revision

Viewing changes to pcre_info.c

  • Committer: Package Import Robot
  • Author(s): Mark Baker
  • Date: 2012-03-23 22:34:54 UTC
  • mfrom: (23.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20120323223454-grhqqolk8a7x1h24
Tags: 1:8.30-4
* Reluctantly using an epoch, as it seems the funny version number with
  extra dots causes problems
* Bumped standard version to 3.9.3. No changes needed
* Converted to use new source format / quilt
* Put back obsolete pcre_info() API that upstream have dropped (Closes:
  #665300, #665356)
* Don't include pcregrep binary in debug package

Thanks to Elimar Riesebieter for the conversion to the new source format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
76
76
pcre_info(const pcre *argument_re, int *optptr, int *first_byte)
77
77
{
78
 
real_pcre internal_re;
79
78
const real_pcre *re = (const real_pcre *)argument_re;
80
79
if (re == NULL) return PCRE_ERROR_NULL;
81
80
if (re->magic_number != MAGIC_NUMBER)
82
 
  {
83
 
  re = _pcre_try_flipped(re, &internal_re, NULL, NULL);
84
 
  if (re == NULL) return PCRE_ERROR_BADMAGIC;
85
 
  }
 
81
  return PCRE_ERROR_BADMAGIC;
 
82
 
86
83
if (optptr != NULL) *optptr = (int)(re->options & PUBLIC_COMPILE_OPTIONS);
87
84
if (first_byte != NULL)
88
 
  *first_byte = ((re->flags & PCRE_FIRSTSET) != 0)? re->first_byte :
 
85
  *first_byte = ((re->flags & PCRE_FIRSTSET) != 0)? re->first_char :
89
86
     ((re->flags & PCRE_STARTLINE) != 0)? -1 : -2;
90
87
return re->top_bracket;
91
88
}