"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "doc/pcreapi.3" between
pcre-8.43.tar.bz2 and pcre-8.44.tar.bz2

About: The PCRE library implements Perl compatible regular expression pattern matching.

pcreapi.3  (pcre-8.43.tar.bz2):pcreapi.3  (pcre-8.44.tar.bz2)
skipping to change at line 923 skipping to change at line 923
yield of the function is zero for success, or one of the following negati ve numbers: yield of the function is zero for success, or one of the following negati ve numbers:
PCRE_ERROR_NULL the argument code was NULL PCRE_ERROR_NULL the argument code was NULL
the argument where was NULL the argument where was NULL
PCRE_ERROR_BADMAGIC the "magic number" was not found PCRE_ERROR_BADMAGIC the "magic number" was not found
PCRE_ERROR_BADENDIANNESS the pattern was compiled with different PCRE_ERROR_BADENDIANNESS the pattern was compiled with different
endianness endianness
PCRE_ERROR_BADOPTION the value of what was invalid PCRE_ERROR_BADOPTION the value of what was invalid
PCRE_ERROR_UNSET the requested field is not set PCRE_ERROR_UNSET the requested field is not set
The "magic number" is placed at the start of each compiled pattern as an simple check against passing an The "magic number" is placed at the start of each compiled pattern as a simple check against passing an
arbitrary memory pointer. The endianness error can occur if a compiled pa ttern is saved and reloaded on a arbitrary memory pointer. The endianness error can occur if a compiled pa ttern is saved and reloaded on a
different host. Here is a typical call of pcre_fullinfo(), to obtain the length of the compiled pattern: different host. Here is a typical call of pcre_fullinfo(), to obtain the length of the compiled pattern:
int rc; int rc;
size_t length; size_t length;
rc = pcre_fullinfo( rc = pcre_fullinfo(
re, /* result of pcre_compile() */ re, /* result of pcre_compile() */
sd, /* result of pcre_study(), or NULL */ sd, /* result of pcre_study(), or NULL */
PCRE_INFO_SIZE, /* what is required */ PCRE_INFO_SIZE, /* what is required */
&length); /* where to put the data */ &length); /* where to put the data */
skipping to change at line 978 skipping to change at line 978
(b) every branch of the pattern starts with ".*" and PCRE_DOTALL is not set (if it were set, the pattern (b) every branch of the pattern starts with ".*" and PCRE_DOTALL is not set (if it were set, the pattern
would be anchored), would be anchored),
-1 is returned, indicating that the pattern matches only at the start of a subject string or after any -1 is returned, indicating that the pattern matches only at the start of a subject string or after any
newline within the string. Otherwise -2 is returned. For anchored pattern s, -2 is returned. newline within the string. Otherwise -2 is returned. For anchored pattern s, -2 is returned.
PCRE_INFO_FIRSTCHARACTER PCRE_INFO_FIRSTCHARACTER
Return the value of the first data unit (non-UTF character) of any match ed string in the situation where Return the value of the first data unit (non-UTF character) of any match ed string in the situation where
PCRE_INFO_FIRSTCHARACTERFLAGS returns 1; otherwise return 0. The fourth PCRE_INFO_FIRSTCHARACTERFLAGS returns 1; otherwise return 0. The fourth a
argument should point to an rgument should point to a uint_t
uint_t variable. variable.
In the 8-bit library, the value is always less than 256. In the 16-bi t library the value can be up to In the 8-bit library, the value is always less than 256. In the 16-bi t library the value can be up to
0xffff. In the 32-bit library in UTF-32 mode the value can be up to 0x10f fff, and up to 0xffffffff when 0xffff. In the 32-bit library in UTF-32 mode the value can be up to 0x10f fff, and up to 0xffffffff when
not using UTF-32 mode. not using UTF-32 mode.
PCRE_INFO_FIRSTCHARACTERFLAGS PCRE_INFO_FIRSTCHARACTERFLAGS
Return information about the first data unit of any matched string, for a non-anchored pattern. The Return information about the first data unit of any matched string, for a non-anchored pattern. The
fourth argument should point to an int variable. fourth argument should point to an int variable.
skipping to change at line 1182 skipping to change at line 1182
its start. The fourth argument should point to an int variable. If th ere is no such value, 0 is its start. The fourth argument should point to an int variable. If th ere is no such value, 0 is
returned. If returning 1, the character value itself can be retrieved usi ng PCRE_INFO_REQUIREDCHAR. returned. If returning 1, the character value itself can be retrieved usi ng PCRE_INFO_REQUIREDCHAR.
For anchored patterns, a last literal value is recorded only if it follo ws something of variable length. For anchored patterns, a last literal value is recorded only if it follo ws something of variable length.
For example, for the pattern /^a\d+z\d+/ the returned value 1 (with "z" r eturned from PCRE_INFO_REQUIRED- For example, for the pattern /^a\d+z\d+/ the returned value 1 (with "z" r eturned from PCRE_INFO_REQUIRED-
CHAR), but for /^a\dz\d/ the returned value is 0. CHAR), but for /^a\dz\d/ the returned value is 0.
PCRE_INFO_REQUIREDCHAR PCRE_INFO_REQUIREDCHAR
Return the value of the rightmost literal data unit that must exist in a ny matched string, other than at Return the value of the rightmost literal data unit that must exist in a ny matched string, other than at
its start, if such a value has been recorded. The fourth argument should its start, if such a value has been recorded. The fourth argument should
point to an uint32_t variable. point to a uint32_t variable. If
If there is no such value, 0 is returned. there is no such value, 0 is returned.
REFERENCE COUNTS REFERENCE COUNTS
int pcre_refcount(pcre *code, int adjust); int pcre_refcount(pcre *code, int adjust);
The pcre_refcount() function is used to maintain a reference count in the data block that contains a com- The pcre_refcount() function is used to maintain a reference count in the data block that contains a com-
piled pattern. It is provided for the benefit of applications that operat e in an object-oriented manner, piled pattern. It is provided for the benefit of applications that operat e in an object-oriented manner,
where different parts of the application may be using the same compiled p attern, but you want to free the where different parts of the application may be using the same compiled p attern, but you want to free the
block when they are all done. block when they are all done.
 End of changes. 3 change blocks. 
7 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)