Back to index

php5  5.3.10
Functions
pcre_info.c File Reference
#include "config.h"
#include "pcre_internal.h"

Go to the source code of this file.

Functions

PCRE_EXP_DEFN int
PCRE_CALL_CONVENTION 
pcre_info (const pcre *argument_re, int *optptr, int *first_byte)

Function Documentation

PCRE_EXP_DEFN int PCRE_CALL_CONVENTION pcre_info ( const pcre *  argument_re,
int optptr,
int first_byte 
)

Definition at line 74 of file pcre_info.c.

{
real_pcre internal_re;
const real_pcre *re = (const real_pcre *)argument_re;
if (re == NULL) return PCRE_ERROR_NULL;
if (re->magic_number != MAGIC_NUMBER)
  {
  re = _pcre_try_flipped(re, &internal_re, NULL, NULL);
  if (re == NULL) return PCRE_ERROR_BADMAGIC;
  }
if (optptr != NULL) *optptr = (int)(re->options & PUBLIC_COMPILE_OPTIONS);
if (first_byte != NULL)
  *first_byte = ((re->flags & PCRE_FIRSTSET) != 0)? re->first_byte :
     ((re->flags & PCRE_STARTLINE) != 0)? -1 : -2;
return re->top_bracket;
}