Home | History | Annotate | Download | only in html
      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>
      8 Return to the <a href="index.html">PCRE2 index page</a>.
      9 </p>
     10 <p>
     11 This page is part of the PCRE2 HTML documentation. It was generated
     12 automatically from the original man page. If there is any nonsense in it,
     13 please consult the man page, in case the conversion went wrong.
     14 <br>
     15 <br><b>
     16 SYNOPSIS
     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>
     27 DESCRIPTION
     28 </b><br>
     29 <P>
     30 This function scans a compiled regular expression and calls the <i>callback()</i>
     31 function for each callout within the pattern. The yield of the function is zero
     32 for 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>
     38 The <i>callback()</i> function is passed a pointer to a data block containing
     39 the following fields (not necessarily in this order):
     40 <pre>
     41   uint32_t   <i>version</i>                Block version number
     42   uint32_t   <i>callout_number</i>         Number for numbered callouts
     43   PCRE2_SIZE <i>pattern_position</i>       Offset to next item in pattern
     44   PCRE2_SIZE <i>next_item_length</i>       Length of next item in pattern
     45   PCRE2_SIZE <i>callout_string_offset</i>  Offset to string within pattern
     46   PCRE2_SIZE <i>callout_string_length</i>  Length of callout string
     47   PCRE2_SPTR <i>callout_string</i>         Points to callout string or is NULL
     48 </pre>
     49 The second argument passed to the <b>callback()</b> function is the callout data
     50 that was passed to <b>pcre2_callout_enumerate()</b>. The <b>callback()</b>
     51 function must return zero for success. Any other value causes the pattern scan
     52 to stop, with the value being passed back as the result of
     53 <b>pcre2_callout_enumerate()</b>.
     54 </P>
     55 <P>
     56 There is a complete description of the PCRE2 native API in the
     57 <a href="pcre2api.html"><b>pcre2api</b></a>
     58 page and a description of the POSIX API in the
     59 <a href="pcre2posix.html"><b>pcre2posix</b></a>
     60 page.
     61 <p>
     62 Return to the <a href="index.html">PCRE2 index page</a>.
     63 </p>
     64