/[pcre]/code/trunk/pcre_fullinfo.c
ViewVC logotype

Diff of /code/trunk/pcre_fullinfo.c

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

revision 305 by ph10, Sun Jan 20 20:07:32 2008 UTC revision 455 by ph10, Sat Sep 26 19:12:32 2009 UTC
# Line 6  Line 6 
6  and semantics are as close as possible to those of the Perl 5 language.  and semantics are as close as possible to those of the Perl 5 language.
7    
8                         Written by Philip Hazel                         Written by Philip Hazel
9             Copyright (c) 1997-2008 University of Cambridge             Copyright (c) 1997-2009 University of Cambridge
10    
11  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
12  Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
# Line 65  Arguments: Line 65  Arguments:
65  Returns:           0 if data returned, negative on error  Returns:           0 if data returned, negative on error
66  */  */
67    
68  PCRE_EXP_DEFN int  PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
69  pcre_fullinfo(const pcre *argument_re, const pcre_extra *extra_data, int what,  pcre_fullinfo(const pcre *argument_re, const pcre_extra *extra_data, int what,
70    void *where)    void *where)
71  {  {
# Line 89  if (re->magic_number != MAGIC_NUMBER) Line 89  if (re->magic_number != MAGIC_NUMBER)
89  switch (what)  switch (what)
90    {    {
91    case PCRE_INFO_OPTIONS:    case PCRE_INFO_OPTIONS:
92    *((unsigned long int *)where) = re->options & PUBLIC_OPTIONS;    *((unsigned long int *)where) = re->options & PUBLIC_COMPILE_OPTIONS;
93    break;    break;
94    
95    case PCRE_INFO_SIZE:    case PCRE_INFO_SIZE:
# Line 119  switch (what) Line 119  switch (what)
119    
120    case PCRE_INFO_FIRSTTABLE:    case PCRE_INFO_FIRSTTABLE:
121    *((const uschar **)where) =    *((const uschar **)where) =
122      (study != NULL && (study->options & PCRE_STUDY_MAPPED) != 0)?      (study != NULL && (study->flags & PCRE_STUDY_MAPPED) != 0)?
123        ((const pcre_study_data *)extra_data->study_data)->start_bits : NULL;        ((const pcre_study_data *)extra_data->study_data)->start_bits : NULL;
124    break;    break;
125    
126      case PCRE_INFO_MINLENGTH:
127      *((int *)where) =
128        (study != NULL && (study->flags & PCRE_STUDY_MINLEN) != 0)?
129          study->minlength : -1;
130      break;
131    
132    case PCRE_INFO_LASTLITERAL:    case PCRE_INFO_LASTLITERAL:
133    *((int *)where) =    *((int *)where) =
# Line 144  switch (what) Line 150  switch (what)
150    *((const uschar **)where) = (const uschar *)(_pcre_default_tables);    *((const uschar **)where) = (const uschar *)(_pcre_default_tables);
151    break;    break;
152    
153      /* From release 8.00 this will always return TRUE because NOPARTIAL is
154      no longer ever set (the restrictions have been removed). */
155    
156    case PCRE_INFO_OKPARTIAL:    case PCRE_INFO_OKPARTIAL:
157    *((int *)where) = (re->flags & PCRE_NOPARTIAL) == 0;    *((int *)where) = (re->flags & PCRE_NOPARTIAL) == 0;
158    break;    break;

Legend:
Removed from v.305  
changed lines
  Added in v.455

  ViewVC Help
Powered by ViewVC 1.1.5