/[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 200 by ph10, Wed Aug 1 09:10:40 2007 UTC revision 236 by ph10, Tue Sep 11 12:57:06 2007 UTC
# Line 43  information about a compiled pattern. */ Line 43  information about a compiled pattern. */
43    
44    
45  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
46  #include <config.h>  #include "config.h"
47  #endif  #endif
48    
49  #include "pcre_internal.h"  #include "pcre_internal.h"
# Line 110  switch (what) Line 110  switch (what)
110    
111    case PCRE_INFO_FIRSTBYTE:    case PCRE_INFO_FIRSTBYTE:
112    *((int *)where) =    *((int *)where) =
113      ((re->options & PCRE_FIRSTSET) != 0)? re->first_byte :      ((re->flags & PCRE_FIRSTSET) != 0)? re->first_byte :
114      ((re->options & PCRE_STARTLINE) != 0)? -1 : -2;      ((re->flags & PCRE_STARTLINE) != 0)? -1 : -2;
115    break;    break;
116    
117    /* Make sure we pass back the pointer to the bit vector in the external    /* Make sure we pass back the pointer to the bit vector in the external
# Line 125  switch (what) Line 125  switch (what)
125    
126    case PCRE_INFO_LASTLITERAL:    case PCRE_INFO_LASTLITERAL:
127    *((int *)where) =    *((int *)where) =
128      ((re->options & PCRE_REQCHSET) != 0)? re->req_byte : -1;      ((re->flags & PCRE_REQCHSET) != 0)? re->req_byte : -1;
129    break;    break;
130    
131    case PCRE_INFO_NAMEENTRYSIZE:    case PCRE_INFO_NAMEENTRYSIZE:
# Line 145  switch (what) Line 145  switch (what)
145    break;    break;
146    
147    case PCRE_INFO_OKPARTIAL:    case PCRE_INFO_OKPARTIAL:
148    *((int *)where) = (re->options & PCRE_NOPARTIAL) == 0;    *((int *)where) = (re->flags & PCRE_NOPARTIAL) == 0;
149    break;    break;
150    
151    case PCRE_INFO_JCHANGED:    case PCRE_INFO_JCHANGED:
152    *((int *)where) = (re->options & PCRE_JCHANGED) != 0;    *((int *)where) = (re->flags & PCRE_JCHANGED) != 0;
153      break;
154    
155      case PCRE_INFO_HASCRORLF:
156      *((int *)where) = (re->flags & PCRE_HASCRORLF) != 0;
157    break;    break;
158    
159    default: return PCRE_ERROR_BADOPTION;    default: return PCRE_ERROR_BADOPTION;

Legend:
Removed from v.200  
changed lines
  Added in v.236

  ViewVC Help
Powered by ViewVC 1.1.5