• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<title>pcre2_callout_enumerate specification</title>
4</head>
5<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
6<h1>pcre2_callout_enumerate man page</h1>
7<p>
8Return to the <a href="index.html">PCRE2 index page</a>.
9</p>
10<p>
11This page is part of the PCRE2 HTML documentation. It was generated
12automatically from the original man page. If there is any nonsense in it,
13please consult the man page, in case the conversion went wrong.
14<br>
15<br><b>
16SYNOPSIS
17</b><br>
18<P>
19<b>#include &#60;pcre2.h&#62;</b>
20</P>
21<P>
22<b>int pcre2_callout_enumerate(const pcre2_code *<i>code</i>,</b>
23<b>  int (*<i>callback</i>)(pcre2_callout_enumerate_block *, void *),</b>
24<b>  void *<i>callout_data</i>);</b>
25</P>
26<br><b>
27DESCRIPTION
28</b><br>
29<P>
30This function scans a compiled regular expression and calls the <i>callback()</i>
31function for each callout within the pattern. The yield of the function is zero
32for success and non-zero otherwise. The arguments are:
33<pre>
34  <i>code</i>           Points to the compiled pattern
35  <i>callback</i>       The callback function
36  <i>callout_data</i>   User data that is passed to the callback
37</pre>
38The <i>callback()</i> function is passed a pointer to a data block containing
39the following fields:
40<pre>
41  <i>version</i>                Block version number
42  <i>pattern_position</i>       Offset to next item in pattern
43  <i>next_item_length</i>       Length of next item in pattern
44  <i>callout_number</i>         Number for numbered callouts
45  <i>callout_string_offset</i>  Offset to string within pattern
46  <i>callout_string_length</i>  Length of callout string
47  <i>callout_string</i>         Points to callout string or is NULL
48</pre>
49The second argument is the callout data that was passed to
50<b>pcre2_callout_enumerate()</b>. The <b>callback()</b> function must return zero
51for success. Any other value causes the pattern scan to stop, with the value
52being passed back as the result of <b>pcre2_callout_enumerate()</b>.
53</P>
54<P>
55There is a complete description of the PCRE2 native API in the
56<a href="pcre2api.html"><b>pcre2api</b></a>
57page and a description of the POSIX API in the
58<a href="pcre2posix.html"><b>pcre2posix</b></a>
59page.
60<p>
61Return to the <a href="index.html">PCRE2 index page</a>.
62</p>
63