1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
|
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libidn-pr29">
<refmeta>
<refentrytitle role="top_of_page" id="libidn-pr29.top_of_page">pr29</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBIDN Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>pr29</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsynopsisdiv id="libidn-pr29.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>
<synopsis>
#define <link linkend="IDNAPI--CAPS">IDNAPI</link>
enum <link linkend="Pr29-rc">Pr29_rc</link>;
const <link linkend="char">char</link> * <link linkend="pr29-strerror">pr29_strerror</link> (<link linkend="Pr29-rc">Pr29_rc</link> rc);
<link linkend="int">int</link> <link linkend="pr29-4">pr29_4</link> (const <link linkend="uint32-t">uint32_t</link> *in,
<link linkend="size-t">size_t</link> len);
<link linkend="int">int</link> <link linkend="pr29-4z">pr29_4z</link> (const <link linkend="uint32-t">uint32_t</link> *in);
<link linkend="int">int</link> <link linkend="pr29-8z">pr29_8z</link> (const <link linkend="char">char</link> *in);
</synopsis>
</refsynopsisdiv>
<refsect1 id="libidn-pr29.description" role="desc">
<title role="desc.title">Description</title>
<para>
</para>
</refsect1>
<refsect1 id="libidn-pr29.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="IDNAPI--CAPS" role="macro">
<title>IDNAPI</title>
<indexterm zone="IDNAPI--CAPS"><primary sortas="IDNAPI">IDNAPI</primary></indexterm><programlisting>#define IDNAPI</programlisting>
<para>
</para></refsect2>
<refsect2 id="Pr29-rc" role="enum">
<title>enum Pr29_rc</title>
<indexterm zone="Pr29-rc"><primary sortas="Pr29_rc">Pr29_rc</primary></indexterm><programlisting> typedef enum
{
PR29_SUCCESS = 0,
PR29_PROBLEM = 1, /* String is a problem sequence. */
PR29_STRINGPREP_ERROR = 2 /* Charset conversion failed (p29_8*). */
} Pr29_rc;
</programlisting>
<para>
Enumerated return codes for <link linkend="pr29-4"><function>pr29_4()</function></link>, <link linkend="pr29-4z"><function>pr29_4z()</function></link>, <link linkend="pr29-8z"><function>pr29_8z()</function></link>. The
value 0 is guaranteed to always correspond to success.</para>
<para>
</para><variablelist role="enum">
<varlistentry id="PR29-SUCCESS--CAPS" role="constant">
<term><literal>PR29_SUCCESS</literal></term>
<listitem><simpara> Successful operation. This value is guaranteed to
always be zero, the remaining ones are only guaranteed to hold
non-zero values, for logical comparison purposes.
</simpara></listitem>
</varlistentry>
<varlistentry id="PR29-PROBLEM--CAPS" role="constant">
<term><literal>PR29_PROBLEM</literal></term>
<listitem><simpara> A problem sequence was encountered.
</simpara></listitem>
</varlistentry>
<varlistentry id="PR29-STRINGPREP-ERROR--CAPS" role="constant">
<term><literal>PR29_STRINGPREP_ERROR</literal></term>
<listitem><simpara> The character set conversion failed (only
for <link linkend="pr29-8"><function>pr29_8()</function></link> and <link linkend="pr29-8z"><function>pr29_8z()</function></link>).
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="pr29-strerror" role="function">
<title>pr29_strerror ()</title>
<indexterm zone="pr29-strerror"><primary sortas="pr29_strerror">pr29_strerror</primary></indexterm><programlisting>const <link linkend="char">char</link> * pr29_strerror (<link linkend="Pr29-rc">Pr29_rc</link> rc);</programlisting>
<para>
Convert a return code integer to a text string. This string can be
used to output a diagnostic message to the user.
</para>
<para>
PR29_SUCCESS: Successful operation. This value is guaranteed to
always be zero, the remaining ones are only guaranteed to hold
non-zero values, for logical comparison purposes.
PR29_PROBLEM: A problem sequence was encountered.
PR29_STRINGPREP_ERROR: The character set conversion failed (only
for <link linkend="pr29-8"><function>pr29_8()</function></link> and <link linkend="pr29-8z"><function>pr29_8z()</function></link>).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>rc</parameter> :</term>
<listitem><simpara> an <link linkend="Pr29-rc"><type>Pr29_rc</type></link> return code.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Returns a pointer to a statically allocated string
containing a description of the error with the return code <parameter>rc</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pr29-4" role="function">
<title>pr29_4 ()</title>
<indexterm zone="pr29-4"><primary sortas="pr29_4">pr29_4</primary></indexterm><programlisting><link linkend="int">int</link> pr29_4 (const <link linkend="uint32-t">uint32_t</link> *in,
<link linkend="size-t">size_t</link> len);</programlisting>
<para>
Check the input to see if it may be normalized into different
strings by different NFKC implementations, due to an anomaly in the
NFKC specifications.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>in</parameter> :</term>
<listitem><simpara> input array with unicode code points.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>len</parameter> :</term>
<listitem><simpara> length of input array with unicode code points.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Returns the <link linkend="Pr29-rc"><type>Pr29_rc</type></link> value <link linkend="PR29-SUCCESS--CAPS"><literal>PR29_SUCCESS</literal></link> on success,
and <link linkend="PR29-PROBLEM--CAPS"><literal>PR29_PROBLEM</literal></link> if the input sequence is a "problem sequence"
(i.e., may be normalized into different strings by different
implementations).
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pr29-4z" role="function">
<title>pr29_4z ()</title>
<indexterm zone="pr29-4z"><primary sortas="pr29_4z">pr29_4z</primary></indexterm><programlisting><link linkend="int">int</link> pr29_4z (const <link linkend="uint32-t">uint32_t</link> *in);</programlisting>
<para>
Check the input to see if it may be normalized into different
strings by different NFKC implementations, due to an anomaly in the
NFKC specifications.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>in</parameter> :</term>
<listitem><simpara> zero terminated array of Unicode code points.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Returns the <link linkend="Pr29-rc"><type>Pr29_rc</type></link> value <link linkend="PR29-SUCCESS--CAPS"><literal>PR29_SUCCESS</literal></link> on success,
and <link linkend="PR29-PROBLEM--CAPS"><literal>PR29_PROBLEM</literal></link> if the input sequence is a "problem sequence"
(i.e., may be normalized into different strings by different
implementations).
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="pr29-8z" role="function">
<title>pr29_8z ()</title>
<indexterm zone="pr29-8z"><primary sortas="pr29_8z">pr29_8z</primary></indexterm><programlisting><link linkend="int">int</link> pr29_8z (const <link linkend="char">char</link> *in);</programlisting>
<para>
Check the input to see if it may be normalized into different
strings by different NFKC implementations, due to an anomaly in the
NFKC specifications.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>in</parameter> :</term>
<listitem><simpara> zero terminated input UTF-8 string.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Returns the <link linkend="Pr29-rc"><type>Pr29_rc</type></link> value <link linkend="PR29-SUCCESS--CAPS"><literal>PR29_SUCCESS</literal></link> on success,
and <link linkend="PR29-PROBLEM--CAPS"><literal>PR29_PROBLEM</literal></link> if the input sequence is a "problem sequence"
(i.e., may be normalized into different strings by different
implementations), or <link linkend="PR29-STRINGPREP-ERROR--CAPS"><literal>PR29_STRINGPREP_ERROR</literal></link> if there was a
problem converting the string from UTF-8 to UCS-4.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>
|