123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <html>
- <head>
- <title>pcre2_callout_enumerate specification</title>
- </head>
- <body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
- <h1>pcre2_callout_enumerate man page</h1>
- <p>
- Return to the <a href="index.html">PCRE2 index page</a>.
- </p>
- <p>
- This page is part of the PCRE2 HTML documentation. It was generated
- automatically from the original man page. If there is any nonsense in it,
- please consult the man page, in case the conversion went wrong.
- <br>
- <br><b>
- SYNOPSIS
- </b><br>
- <P>
- <b>#include <pcre2.h></b>
- </P>
- <P>
- <b>int pcre2_callout_enumerate(const pcre2_code *<i>code</i>,</b>
- <b> int (*<i>callback</i>)(pcre2_callout_enumerate_block *, void *),</b>
- <b> void *<i>callout_data</i>);</b>
- </P>
- <br><b>
- DESCRIPTION
- </b><br>
- <P>
- This function scans a compiled regular expression and calls the <i>callback()</i>
- function for each callout within the pattern. The yield of the function is zero
- for success and non-zero otherwise. The arguments are:
- <pre>
- <i>code</i> Points to the compiled pattern
- <i>callback</i> The callback function
- <i>callout_data</i> User data that is passed to the callback
- </pre>
- The <i>callback()</i> function is passed a pointer to a data block containing
- the following fields (not necessarily in this order):
- <pre>
- uint32_t <i>version</i> Block version number
- uint32_t <i>callout_number</i> Number for numbered callouts
- PCRE2_SIZE <i>pattern_position</i> Offset to next item in pattern
- PCRE2_SIZE <i>next_item_length</i> Length of next item in pattern
- PCRE2_SIZE <i>callout_string_offset</i> Offset to string within pattern
- PCRE2_SIZE <i>callout_string_length</i> Length of callout string
- PCRE2_SPTR <i>callout_string</i> Points to callout string or is NULL
- </pre>
- The second argument passed to the <b>callback()</b> function is the callout data
- that was passed to <b>pcre2_callout_enumerate()</b>. The <b>callback()</b>
- function must return zero for success. Any other value causes the pattern scan
- to stop, with the value being passed back as the result of
- <b>pcre2_callout_enumerate()</b>.
- </P>
- <P>
- There is a complete description of the PCRE2 native API in the
- <a href="pcre2api.html"><b>pcre2api</b></a>
- page and a description of the POSIX API in the
- <a href="pcre2posix.html"><b>pcre2posix</b></a>
- page.
- <p>
- Return to the <a href="index.html">PCRE2 index page</a>.
- </p>
|