man-pages/man3/pcre_pattern_to_host_byte_order.3.html
2021-03-31 01:06:50 +01:00

77 lines
2.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of PCRE_PATTERN_TO_HOST_BYTE_ORDER</TITLE>
</HEAD><BODY>
<H1>PCRE_PATTERN_TO_HOST_BYTE_ORDER</H1>
Section: C Library Functions (3)<BR>Updated: 24 June 2012<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
PCRE - Perl-compatible regular expressions
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<B>#include &lt;<A HREF="file:///usr/include/pcre.h">pcre.h</A>&gt;</B>
<P>
<PRE>
<B>int pcre_pattern_to_host_byte_order(pcre *</B><I>code</I>,
<B> pcre_extra *</B><I>extra</I>, const unsigned char *<I>tables</I>);
<B>int pcre16_pattern_to_host_byte_order(pcre16 *</B><I>code</I>,
<B> pcre16_extra *</B><I>extra</I>, const unsigned char *<I>tables</I>);
<B>int pcre32_pattern_to_host_byte_order(pcre32 *</B><I>code</I>,
<B> pcre32_extra *</B><I>extra</I>, const unsigned char *<I>tables</I>);
</PRE>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
This function ensures that the bytes in 2-byte and 4-byte values in a compiled
pattern are in the correct order for the current host. It is useful when a
pattern that has been compiled on one host is transferred to another that might
have different endianness. The arguments are:
<P>
<BR>&nbsp;&nbsp;<I>code</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A&nbsp;compiled&nbsp;regular&nbsp;expression
<BR>&nbsp;&nbsp;<I>extra</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Points&nbsp;to&nbsp;an&nbsp;associated&nbsp;<B>pcre[16|32]_extra</B>&nbsp;structure,
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;is&nbsp;NULL
<BR>&nbsp;&nbsp;<I>tables</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pointer&nbsp;to&nbsp;character&nbsp;tables,&nbsp;or&nbsp;NULL&nbsp;to
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set&nbsp;the&nbsp;built-in&nbsp;default
<P>
The result is 0 for success, a negative PCRE_ERROR_xxx value otherwise.
<P>
There is a complete description of the PCRE native API in the
<B>pcreapi</B>
page and a description of the POSIX API in the
<B>pcreposix</B>
page.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:52 GMT, March 31, 2021
</BODY>
</HTML>