1 |
– |
/* $Id$ */ |
2 |
– |
|
1 |
|
/************************************************* |
2 |
|
* Perl-Compatible Regular Expressions * |
3 |
|
*************************************************/ |
4 |
|
|
5 |
< |
/*PCRE is a library of functions to support regular expressions whose syntax |
5 |
> |
/* PCRE is a library of functions to support regular expressions whose syntax |
6 |
|
and semantics are as close as possible to those of the Perl 5 language. |
7 |
|
|
8 |
|
Written by Philip Hazel |
9 |
< |
Copyright (c) 1997-2005 University of Cambridge |
9 |
> |
Copyright (c) 1997-2009 University of Cambridge |
10 |
|
|
11 |
|
----------------------------------------------------------------------------- |
12 |
|
Redistribution and use in source and binary forms, with or without |
61 |
|
Returns: 0 if data returned, negative on error |
62 |
|
*/ |
63 |
|
|
64 |
< |
EXPORT int |
64 |
> |
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION |
65 |
|
pcre_fullinfo(const pcre *argument_re, const pcre_extra *extra_data, int what, |
66 |
|
void *where) |
67 |
|
{ |
85 |
|
switch (what) |
86 |
|
{ |
87 |
|
case PCRE_INFO_OPTIONS: |
88 |
< |
*((unsigned long int *)where) = re->options & PUBLIC_OPTIONS; |
88 |
> |
*((unsigned long int *)where) = re->options & PUBLIC_COMPILE_OPTIONS; |
89 |
|
break; |
90 |
|
|
91 |
|
case PCRE_INFO_SIZE: |
106 |
|
|
107 |
|
case PCRE_INFO_FIRSTBYTE: |
108 |
|
*((int *)where) = |
109 |
< |
((re->options & PCRE_FIRSTSET) != 0)? re->first_byte : |
110 |
< |
((re->options & PCRE_STARTLINE) != 0)? -1 : -2; |
109 |
> |
((re->flags & PCRE_FIRSTSET) != 0)? re->first_byte : |
110 |
> |
((re->flags & PCRE_STARTLINE) != 0)? -1 : -2; |
111 |
|
break; |
112 |
|
|
113 |
|
/* Make sure we pass back the pointer to the bit vector in the external |
121 |
|
|
122 |
|
case PCRE_INFO_LASTLITERAL: |
123 |
|
*((int *)where) = |
124 |
< |
((re->options & PCRE_REQCHSET) != 0)? re->req_byte : -1; |
124 |
> |
((re->flags & PCRE_REQCHSET) != 0)? re->req_byte : -1; |
125 |
|
break; |
126 |
|
|
127 |
|
case PCRE_INFO_NAMEENTRYSIZE: |
140 |
|
*((const uschar **)where) = (const uschar *)(_pcre_default_tables); |
141 |
|
break; |
142 |
|
|
143 |
+ |
case PCRE_INFO_OKPARTIAL: |
144 |
+ |
*((int *)where) = (re->flags & PCRE_NOPARTIAL) == 0; |
145 |
+ |
break; |
146 |
+ |
|
147 |
+ |
case PCRE_INFO_JCHANGED: |
148 |
+ |
*((int *)where) = (re->flags & PCRE_JCHANGED) != 0; |
149 |
+ |
break; |
150 |
+ |
|
151 |
+ |
case PCRE_INFO_HASCRORLF: |
152 |
+ |
*((int *)where) = (re->flags & PCRE_HASCRORLF) != 0; |
153 |
+ |
break; |
154 |
+ |
|
155 |
|
default: return PCRE_ERROR_BADOPTION; |
156 |
|
} |
157 |
|
|