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

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

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

revision 774 by zherczeg, Thu Dec 1 06:08:45 2011 UTC revision 785 by zherczeg, Mon Dec 5 20:12:24 2011 UTC
# Line 72  Returns:        number of capturing subp Line 72  Returns:        number of capturing subp
72                  or negative values on error                  or negative values on error
73  */  */
74    
75    #ifdef COMPILE_PCRE8
76  PCRE_EXP_DEFN int PCRE_CALL_CONVENTION  PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
77  pcre_info(const pcre *argument_re, int *optptr, int *first_byte)  pcre_info(const pcre *argument_re, int *optptr, int *first_char)
78    #else
79    PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
80    pcre16_info(const pcre *argument_re, int *optptr, int *first_char)
81    #endif
82  {  {
83  real_pcre internal_re;  real_pcre internal_re;
84  const real_pcre *re = (const real_pcre *)argument_re;  const real_pcre *re = (const real_pcre *)argument_re;
# Line 84  if (re->magic_number != MAGIC_NUMBER) Line 89  if (re->magic_number != MAGIC_NUMBER)
89    if (re == NULL) return PCRE_ERROR_BADMAGIC;    if (re == NULL) return PCRE_ERROR_BADMAGIC;
90    }    }
91  if (optptr != NULL) *optptr = (int)(re->options & PUBLIC_COMPILE_OPTIONS);  if (optptr != NULL) *optptr = (int)(re->options & PUBLIC_COMPILE_OPTIONS);
92  if (first_byte != NULL)  if (first_char != NULL)
93    *first_byte = ((re->flags & PCRE_FIRSTSET) != 0)? re->first_char :    *first_char = ((re->flags & PCRE_FIRSTSET) != 0)? re->first_char :
94       ((re->flags & PCRE_STARTLINE) != 0)? -1 : -2;       ((re->flags & PCRE_STARTLINE) != 0)? -1 : -2;
95  return re->top_bracket;  return re->top_bracket;
96  }  }

Legend:
Removed from v.774  
changed lines
  Added in v.785

  ViewVC Help
Powered by ViewVC 1.1.5