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