xref: /freebsd/crypto/heimdal/doc/doxyout/wind/html/group__wind.html (revision 6a068746777241722b2b32c5d0bc443a2a64d80b)
1ae771770SStanislav Sedov<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2ae771770SStanislav Sedov<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3ae771770SStanislav Sedov<title>Heimdalwindlibrary: Heimdal wind library</title>
4ae771770SStanislav Sedov<link href="doxygen.css" rel="stylesheet" type="text/css">
5ae771770SStanislav Sedov<link href="tabs.css" rel="stylesheet" type="text/css">
6ae771770SStanislav Sedov</head><body>
7ae771770SStanislav Sedov<p>
8ae771770SStanislav Sedov<a href="http://www.h5l.org/"><img src="http://www.h5l.org/keyhole-heimdal.png" alt="keyhole logo"/></a>
9ae771770SStanislav Sedov</p>
10ae771770SStanislav Sedov<!-- end of header marker -->
11ae771770SStanislav Sedov<!-- Generated by Doxygen 1.5.6 -->
12ae771770SStanislav Sedov<div class="navigation" id="top">
13ae771770SStanislav Sedov  <div class="tabs">
14ae771770SStanislav Sedov    <ul>
15ae771770SStanislav Sedov      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
16ae771770SStanislav Sedov      <li><a href="modules.html"><span>Modules</span></a></li>
17ae771770SStanislav Sedov    </ul>
18ae771770SStanislav Sedov  </div>
19ae771770SStanislav Sedov</div>
20ae771770SStanislav Sedov<div class="contents">
21ae771770SStanislav Sedov<h1>Heimdal wind library</h1><table border="0" cellpadding="0" cellspacing="0">
22ae771770SStanislav Sedov<tr><td></td></tr>
23ae771770SStanislav Sedov<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
24ae771770SStanislav Sedov<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#gcd005d89adeb764c77c97f1c4d2e1d82">wind_punycode_label_toascii</a> (const uint32_t *in, size_t in_len, char *out, size_t *out_len)</td></tr>
25ae771770SStanislav Sedov
26ae771770SStanislav Sedov<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#gdc7260aad792625f5e4d59f5d645bfaa">wind_stringprep</a> (const uint32_t *in, size_t in_len, uint32_t *out, size_t *out_len, wind_profile_flags flags)</td></tr>
27ae771770SStanislav Sedov
28ae771770SStanislav Sedov<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#ga4d80a988cf7d0cc8c15c1652516ec72">wind_profile</a> (const char *name, wind_profile_flags *flags)</td></tr>
29ae771770SStanislav Sedov
30ae771770SStanislav Sedov<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g31f62f5e3ca885bd8afce415c9e83c4c">wind_utf8ucs4</a> (const char *in, uint32_t *out, size_t *out_len)</td></tr>
31ae771770SStanislav Sedov
32ae771770SStanislav Sedov<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#gbeccc02ed5f1f90684b10a6f892e89d3">wind_utf8ucs4_length</a> (const char *in, size_t *out_len)</td></tr>
33ae771770SStanislav Sedov
34ae771770SStanislav Sedov<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g502199d8981249373095da43bb5d256d">wind_ucs4utf8</a> (const uint32_t *in, size_t in_len, char *out, size_t *out_len)</td></tr>
35ae771770SStanislav Sedov
36ae771770SStanislav Sedov<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g44d8951aee3e12f1812ef193bad738ef">wind_ucs4utf8_length</a> (const uint32_t *in, size_t in_len, size_t *out_len)</td></tr>
37ae771770SStanislav Sedov
38ae771770SStanislav Sedov<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g15a41f929d8b1be8528e3ecbdf8264f0">wind_ucs2read</a> (const void *ptr, size_t len, unsigned int *flags, uint16_t *out, size_t *out_len)</td></tr>
39ae771770SStanislav Sedov
40ae771770SStanislav Sedov<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g20668242d9ab39011edbcae295ee9348">wind_ucs2write</a> (const uint16_t *in, size_t in_len, unsigned int *flags, void *ptr, size_t *out_len)</td></tr>
41ae771770SStanislav Sedov
42ae771770SStanislav Sedov<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g736f8b06adc2b70bd32ce2ed2397b5f5">wind_utf8ucs2</a> (const char *in, uint16_t *out, size_t *out_len)</td></tr>
43ae771770SStanislav Sedov
44ae771770SStanislav Sedov<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g4d94c57c6fc46b7af71d37d507bcdbf8">wind_utf8ucs2_length</a> (const char *in, size_t *out_len)</td></tr>
45ae771770SStanislav Sedov
46ae771770SStanislav Sedov<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g2e43e4a99781db965162b9a9c6333307">wind_ucs2utf8</a> (const uint16_t *in, size_t in_len, char *out, size_t *out_len)</td></tr>
47ae771770SStanislav Sedov
48ae771770SStanislav Sedov<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wind.html#g53b8caa6437d7f903d819c76450be3c1">wind_ucs2utf8_length</a> (const uint16_t *in, size_t in_len, size_t *out_len)</td></tr>
49ae771770SStanislav Sedov
50ae771770SStanislav Sedov</table>
51ae771770SStanislav Sedov<hr><a name="_details"></a><h2>Detailed Description</h2>
52ae771770SStanislav Sedov<hr><h2>Function Documentation</h2>
53ae771770SStanislav Sedov<a class="anchor" name="ga4d80a988cf7d0cc8c15c1652516ec72"></a><!-- doxytag: member="stringprep.c::wind_profile" ref="ga4d80a988cf7d0cc8c15c1652516ec72" args="(const char *name, wind_profile_flags *flags)" -->
54ae771770SStanislav Sedov<div class="memitem">
55ae771770SStanislav Sedov<div class="memproto">
56ae771770SStanislav Sedov      <table class="memname">
57ae771770SStanislav Sedov        <tr>
58ae771770SStanislav Sedov          <td class="memname">int wind_profile           </td>
59ae771770SStanislav Sedov          <td>(</td>
60ae771770SStanislav Sedov          <td class="paramtype">const char *&nbsp;</td>
61ae771770SStanislav Sedov          <td class="paramname"> <em>name</em>, </td>
62ae771770SStanislav Sedov        </tr>
63ae771770SStanislav Sedov        <tr>
64ae771770SStanislav Sedov          <td class="paramkey"></td>
65ae771770SStanislav Sedov          <td></td>
66ae771770SStanislav Sedov          <td class="paramtype">wind_profile_flags *&nbsp;</td>
67ae771770SStanislav Sedov          <td class="paramname"> <em>flags</em></td><td>&nbsp;</td>
68ae771770SStanislav Sedov        </tr>
69ae771770SStanislav Sedov        <tr>
70ae771770SStanislav Sedov          <td></td>
71ae771770SStanislav Sedov          <td>)</td>
72ae771770SStanislav Sedov          <td></td><td></td><td></td>
73ae771770SStanislav Sedov        </tr>
74ae771770SStanislav Sedov      </table>
75ae771770SStanislav Sedov</div>
76ae771770SStanislav Sedov<div class="memdoc">
77ae771770SStanislav Sedov
78ae771770SStanislav Sedov<p>
79ae771770SStanislav SedovTry to find the profile given a name.<p>
80ae771770SStanislav Sedov<dl compact><dt><b>Parameters:</b></dt><dd>
81ae771770SStanislav Sedov  <table border="0" cellspacing="2" cellpadding="0">
82ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>name of the profile. </td></tr>
83ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>the resulting profile.</td></tr>
84ae771770SStanislav Sedov  </table>
85ae771770SStanislav Sedov</dl>
86ae771770SStanislav Sedov<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl>
87ae771770SStanislav Sedov
88ae771770SStanislav Sedov</div>
89ae771770SStanislav Sedov</div><p>
90ae771770SStanislav Sedov<a class="anchor" name="gcd005d89adeb764c77c97f1c4d2e1d82"></a><!-- doxytag: member="punycode.c::wind_punycode_label_toascii" ref="gcd005d89adeb764c77c97f1c4d2e1d82" args="(const uint32_t *in, size_t in_len, char *out, size_t *out_len)" -->
91ae771770SStanislav Sedov<div class="memitem">
92ae771770SStanislav Sedov<div class="memproto">
93ae771770SStanislav Sedov      <table class="memname">
94ae771770SStanislav Sedov        <tr>
95ae771770SStanislav Sedov          <td class="memname">int wind_punycode_label_toascii           </td>
96ae771770SStanislav Sedov          <td>(</td>
97ae771770SStanislav Sedov          <td class="paramtype">const uint32_t *&nbsp;</td>
98ae771770SStanislav Sedov          <td class="paramname"> <em>in</em>, </td>
99ae771770SStanislav Sedov        </tr>
100ae771770SStanislav Sedov        <tr>
101ae771770SStanislav Sedov          <td class="paramkey"></td>
102ae771770SStanislav Sedov          <td></td>
103ae771770SStanislav Sedov          <td class="paramtype">size_t&nbsp;</td>
104ae771770SStanislav Sedov          <td class="paramname"> <em>in_len</em>, </td>
105ae771770SStanislav Sedov        </tr>
106ae771770SStanislav Sedov        <tr>
107ae771770SStanislav Sedov          <td class="paramkey"></td>
108ae771770SStanislav Sedov          <td></td>
109ae771770SStanislav Sedov          <td class="paramtype">char *&nbsp;</td>
110ae771770SStanislav Sedov          <td class="paramname"> <em>out</em>, </td>
111ae771770SStanislav Sedov        </tr>
112ae771770SStanislav Sedov        <tr>
113ae771770SStanislav Sedov          <td class="paramkey"></td>
114ae771770SStanislav Sedov          <td></td>
115ae771770SStanislav Sedov          <td class="paramtype">size_t *&nbsp;</td>
116ae771770SStanislav Sedov          <td class="paramname"> <em>out_len</em></td><td>&nbsp;</td>
117ae771770SStanislav Sedov        </tr>
118ae771770SStanislav Sedov        <tr>
119ae771770SStanislav Sedov          <td></td>
120ae771770SStanislav Sedov          <td>)</td>
121ae771770SStanislav Sedov          <td></td><td></td><td></td>
122ae771770SStanislav Sedov        </tr>
123ae771770SStanislav Sedov      </table>
124ae771770SStanislav Sedov</div>
125ae771770SStanislav Sedov<div class="memdoc">
126ae771770SStanislav Sedov
127ae771770SStanislav Sedov<p>
128ae771770SStanislav SedovConvert an UCS4 string to a puny-coded DNS label string suitable when combined with delimiters and other labels for DNS lookup.<p>
129ae771770SStanislav Sedov<dl compact><dt><b>Parameters:</b></dt><dd>
130ae771770SStanislav Sedov  <table border="0" cellspacing="2" cellpadding="0">
131ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in</em>&nbsp;</td><td>an UCS4 string to convert </td></tr>
132ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in_len</em>&nbsp;</td><td>the length of in. </td></tr>
133ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out</em>&nbsp;</td><td>the resulting puny-coded string. The string is not NUL terminatied. </td></tr>
134ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out_len</em>&nbsp;</td><td>before processing out_len should be the length of the out variable, after processing it will be the length of the out string.</td></tr>
135ae771770SStanislav Sedov  </table>
136ae771770SStanislav Sedov</dl>
137ae771770SStanislav Sedov<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl>
138ae771770SStanislav Sedov
139ae771770SStanislav Sedov</div>
140ae771770SStanislav Sedov</div><p>
141ae771770SStanislav Sedov<a class="anchor" name="gdc7260aad792625f5e4d59f5d645bfaa"></a><!-- doxytag: member="stringprep.c::wind_stringprep" ref="gdc7260aad792625f5e4d59f5d645bfaa" args="(const uint32_t *in, size_t in_len, uint32_t *out, size_t *out_len, wind_profile_flags flags)" -->
142ae771770SStanislav Sedov<div class="memitem">
143ae771770SStanislav Sedov<div class="memproto">
144ae771770SStanislav Sedov      <table class="memname">
145ae771770SStanislav Sedov        <tr>
146ae771770SStanislav Sedov          <td class="memname">int wind_stringprep           </td>
147ae771770SStanislav Sedov          <td>(</td>
148ae771770SStanislav Sedov          <td class="paramtype">const uint32_t *&nbsp;</td>
149ae771770SStanislav Sedov          <td class="paramname"> <em>in</em>, </td>
150ae771770SStanislav Sedov        </tr>
151ae771770SStanislav Sedov        <tr>
152ae771770SStanislav Sedov          <td class="paramkey"></td>
153ae771770SStanislav Sedov          <td></td>
154ae771770SStanislav Sedov          <td class="paramtype">size_t&nbsp;</td>
155ae771770SStanislav Sedov          <td class="paramname"> <em>in_len</em>, </td>
156ae771770SStanislav Sedov        </tr>
157ae771770SStanislav Sedov        <tr>
158ae771770SStanislav Sedov          <td class="paramkey"></td>
159ae771770SStanislav Sedov          <td></td>
160ae771770SStanislav Sedov          <td class="paramtype">uint32_t *&nbsp;</td>
161ae771770SStanislav Sedov          <td class="paramname"> <em>out</em>, </td>
162ae771770SStanislav Sedov        </tr>
163ae771770SStanislav Sedov        <tr>
164ae771770SStanislav Sedov          <td class="paramkey"></td>
165ae771770SStanislav Sedov          <td></td>
166ae771770SStanislav Sedov          <td class="paramtype">size_t *&nbsp;</td>
167ae771770SStanislav Sedov          <td class="paramname"> <em>out_len</em>, </td>
168ae771770SStanislav Sedov        </tr>
169ae771770SStanislav Sedov        <tr>
170ae771770SStanislav Sedov          <td class="paramkey"></td>
171ae771770SStanislav Sedov          <td></td>
172ae771770SStanislav Sedov          <td class="paramtype">wind_profile_flags&nbsp;</td>
173ae771770SStanislav Sedov          <td class="paramname"> <em>flags</em></td><td>&nbsp;</td>
174ae771770SStanislav Sedov        </tr>
175ae771770SStanislav Sedov        <tr>
176ae771770SStanislav Sedov          <td></td>
177ae771770SStanislav Sedov          <td>)</td>
178ae771770SStanislav Sedov          <td></td><td></td><td></td>
179ae771770SStanislav Sedov        </tr>
180ae771770SStanislav Sedov      </table>
181ae771770SStanislav Sedov</div>
182ae771770SStanislav Sedov<div class="memdoc">
183ae771770SStanislav Sedov
184ae771770SStanislav Sedov<p>
185ae771770SStanislav SedovProcess a input UCS4 string according a string-prep profile.<p>
186ae771770SStanislav Sedov<dl compact><dt><b>Parameters:</b></dt><dd>
187ae771770SStanislav Sedov  <table border="0" cellspacing="2" cellpadding="0">
188ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in</em>&nbsp;</td><td>input UCS4 string to process </td></tr>
189ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in_len</em>&nbsp;</td><td>length of the input string </td></tr>
190ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out</em>&nbsp;</td><td>output UCS4 string </td></tr>
191ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out_len</em>&nbsp;</td><td>length of the output string. </td></tr>
192ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>stringprep profile.</td></tr>
193ae771770SStanislav Sedov  </table>
194ae771770SStanislav Sedov</dl>
195ae771770SStanislav Sedov<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl>
196ae771770SStanislav Sedov
197ae771770SStanislav Sedov</div>
198ae771770SStanislav Sedov</div><p>
199ae771770SStanislav Sedov<a class="anchor" name="g15a41f929d8b1be8528e3ecbdf8264f0"></a><!-- doxytag: member="utf8.c::wind_ucs2read" ref="g15a41f929d8b1be8528e3ecbdf8264f0" args="(const void *ptr, size_t len, unsigned int *flags, uint16_t *out, size_t *out_len)" -->
200ae771770SStanislav Sedov<div class="memitem">
201ae771770SStanislav Sedov<div class="memproto">
202ae771770SStanislav Sedov      <table class="memname">
203ae771770SStanislav Sedov        <tr>
204ae771770SStanislav Sedov          <td class="memname">int wind_ucs2read           </td>
205ae771770SStanislav Sedov          <td>(</td>
206ae771770SStanislav Sedov          <td class="paramtype">const void *&nbsp;</td>
207ae771770SStanislav Sedov          <td class="paramname"> <em>ptr</em>, </td>
208ae771770SStanislav Sedov        </tr>
209ae771770SStanislav Sedov        <tr>
210ae771770SStanislav Sedov          <td class="paramkey"></td>
211ae771770SStanislav Sedov          <td></td>
212ae771770SStanislav Sedov          <td class="paramtype">size_t&nbsp;</td>
213ae771770SStanislav Sedov          <td class="paramname"> <em>len</em>, </td>
214ae771770SStanislav Sedov        </tr>
215ae771770SStanislav Sedov        <tr>
216ae771770SStanislav Sedov          <td class="paramkey"></td>
217ae771770SStanislav Sedov          <td></td>
218ae771770SStanislav Sedov          <td class="paramtype">unsigned int *&nbsp;</td>
219ae771770SStanislav Sedov          <td class="paramname"> <em>flags</em>, </td>
220ae771770SStanislav Sedov        </tr>
221ae771770SStanislav Sedov        <tr>
222ae771770SStanislav Sedov          <td class="paramkey"></td>
223ae771770SStanislav Sedov          <td></td>
224ae771770SStanislav Sedov          <td class="paramtype">uint16_t *&nbsp;</td>
225ae771770SStanislav Sedov          <td class="paramname"> <em>out</em>, </td>
226ae771770SStanislav Sedov        </tr>
227ae771770SStanislav Sedov        <tr>
228ae771770SStanislav Sedov          <td class="paramkey"></td>
229ae771770SStanislav Sedov          <td></td>
230ae771770SStanislav Sedov          <td class="paramtype">size_t *&nbsp;</td>
231ae771770SStanislav Sedov          <td class="paramname"> <em>out_len</em></td><td>&nbsp;</td>
232ae771770SStanislav Sedov        </tr>
233ae771770SStanislav Sedov        <tr>
234ae771770SStanislav Sedov          <td></td>
235ae771770SStanislav Sedov          <td>)</td>
236ae771770SStanislav Sedov          <td></td><td></td><td></td>
237ae771770SStanislav Sedov        </tr>
238ae771770SStanislav Sedov      </table>
239ae771770SStanislav Sedov</div>
240ae771770SStanislav Sedov<div class="memdoc">
241ae771770SStanislav Sedov
242ae771770SStanislav Sedov<p>
243ae771770SStanislav SedovRead in an UCS2 from a buffer.<p>
244ae771770SStanislav Sedov<dl compact><dt><b>Parameters:</b></dt><dd>
245ae771770SStanislav Sedov  <table border="0" cellspacing="2" cellpadding="0">
246ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>ptr</em>&nbsp;</td><td>The input buffer to read from. </td></tr>
247ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>the length of the input buffer. </td></tr>
248ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>Flags to control the behavior of the function. </td></tr>
249ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out</em>&nbsp;</td><td>the output UCS2, the array must be at least out/2 long. </td></tr>
250ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out_len</em>&nbsp;</td><td>the output length</td></tr>
251ae771770SStanislav Sedov  </table>
252ae771770SStanislav Sedov</dl>
253ae771770SStanislav Sedov<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise. </dd></dl>
254ae771770SStanislav Sedov
255ae771770SStanislav Sedov<p>
256ae771770SStanislav Sedovif len is zero, flags are unchanged<p>
257ae771770SStanislav Sedovif len is odd, WIND_ERR_LENGTH_NOT_MOD2 is returned<p>
258ae771770SStanislav SedovIf the flags WIND_RW_BOM is set, check for BOM. If not BOM is found, check is LE/BE flag is already and use that otherwise fail with WIND_ERR_NO_BOM. When done, clear WIND_RW_BOM and the LE/BE flag and set the resulting LE/BE flag.
259ae771770SStanislav Sedov</div>
260ae771770SStanislav Sedov</div><p>
261ae771770SStanislav Sedov<a class="anchor" name="g2e43e4a99781db965162b9a9c6333307"></a><!-- doxytag: member="utf8.c::wind_ucs2utf8" ref="g2e43e4a99781db965162b9a9c6333307" args="(const uint16_t *in, size_t in_len, char *out, size_t *out_len)" -->
262ae771770SStanislav Sedov<div class="memitem">
263ae771770SStanislav Sedov<div class="memproto">
264ae771770SStanislav Sedov      <table class="memname">
265ae771770SStanislav Sedov        <tr>
266ae771770SStanislav Sedov          <td class="memname">int wind_ucs2utf8           </td>
267ae771770SStanislav Sedov          <td>(</td>
268ae771770SStanislav Sedov          <td class="paramtype">const uint16_t *&nbsp;</td>
269ae771770SStanislav Sedov          <td class="paramname"> <em>in</em>, </td>
270ae771770SStanislav Sedov        </tr>
271ae771770SStanislav Sedov        <tr>
272ae771770SStanislav Sedov          <td class="paramkey"></td>
273ae771770SStanislav Sedov          <td></td>
274ae771770SStanislav Sedov          <td class="paramtype">size_t&nbsp;</td>
275ae771770SStanislav Sedov          <td class="paramname"> <em>in_len</em>, </td>
276ae771770SStanislav Sedov        </tr>
277ae771770SStanislav Sedov        <tr>
278ae771770SStanislav Sedov          <td class="paramkey"></td>
279ae771770SStanislav Sedov          <td></td>
280ae771770SStanislav Sedov          <td class="paramtype">char *&nbsp;</td>
281ae771770SStanislav Sedov          <td class="paramname"> <em>out</em>, </td>
282ae771770SStanislav Sedov        </tr>
283ae771770SStanislav Sedov        <tr>
284ae771770SStanislav Sedov          <td class="paramkey"></td>
285ae771770SStanislav Sedov          <td></td>
286ae771770SStanislav Sedov          <td class="paramtype">size_t *&nbsp;</td>
287ae771770SStanislav Sedov          <td class="paramname"> <em>out_len</em></td><td>&nbsp;</td>
288ae771770SStanislav Sedov        </tr>
289ae771770SStanislav Sedov        <tr>
290ae771770SStanislav Sedov          <td></td>
291ae771770SStanislav Sedov          <td>)</td>
292ae771770SStanislav Sedov          <td></td><td></td><td></td>
293ae771770SStanislav Sedov        </tr>
294ae771770SStanislav Sedov      </table>
295ae771770SStanislav Sedov</div>
296ae771770SStanislav Sedov<div class="memdoc">
297ae771770SStanislav Sedov
298ae771770SStanislav Sedov<p>
299ae771770SStanislav SedovConvert an UCS2 string to a UTF-8 string.<p>
300ae771770SStanislav Sedov<dl compact><dt><b>Parameters:</b></dt><dd>
301ae771770SStanislav Sedov  <table border="0" cellspacing="2" cellpadding="0">
302ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in</em>&nbsp;</td><td>an UCS2 string to convert. </td></tr>
303ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in_len</em>&nbsp;</td><td>the length of the in UCS2 string. </td></tr>
304ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out</em>&nbsp;</td><td>the resulting UTF-8 strint, must be at least <a class="el" href="group__wind.html#g53b8caa6437d7f903d819c76450be3c1">wind_ucs2utf8_length()</a> long. If out is NULL, the function will calculate the needed space for the out variable (just like <a class="el" href="group__wind.html#g53b8caa6437d7f903d819c76450be3c1">wind_ucs2utf8_length()</a>). </td></tr>
305ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out_len</em>&nbsp;</td><td>before processing out_len should be the length of the out variable, after processing it will be the length of the out string.</td></tr>
306ae771770SStanislav Sedov  </table>
307ae771770SStanislav Sedov</dl>
308ae771770SStanislav Sedov<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl>
309ae771770SStanislav Sedov
310ae771770SStanislav Sedov</div>
311ae771770SStanislav Sedov</div><p>
312ae771770SStanislav Sedov<a class="anchor" name="g53b8caa6437d7f903d819c76450be3c1"></a><!-- doxytag: member="utf8.c::wind_ucs2utf8_length" ref="g53b8caa6437d7f903d819c76450be3c1" args="(const uint16_t *in, size_t in_len, size_t *out_len)" -->
313ae771770SStanislav Sedov<div class="memitem">
314ae771770SStanislav Sedov<div class="memproto">
315ae771770SStanislav Sedov      <table class="memname">
316ae771770SStanislav Sedov        <tr>
317ae771770SStanislav Sedov          <td class="memname">int wind_ucs2utf8_length           </td>
318ae771770SStanislav Sedov          <td>(</td>
319ae771770SStanislav Sedov          <td class="paramtype">const uint16_t *&nbsp;</td>
320ae771770SStanislav Sedov          <td class="paramname"> <em>in</em>, </td>
321ae771770SStanislav Sedov        </tr>
322ae771770SStanislav Sedov        <tr>
323ae771770SStanislav Sedov          <td class="paramkey"></td>
324ae771770SStanislav Sedov          <td></td>
325ae771770SStanislav Sedov          <td class="paramtype">size_t&nbsp;</td>
326ae771770SStanislav Sedov          <td class="paramname"> <em>in_len</em>, </td>
327ae771770SStanislav Sedov        </tr>
328ae771770SStanislav Sedov        <tr>
329ae771770SStanislav Sedov          <td class="paramkey"></td>
330ae771770SStanislav Sedov          <td></td>
331ae771770SStanislav Sedov          <td class="paramtype">size_t *&nbsp;</td>
332ae771770SStanislav Sedov          <td class="paramname"> <em>out_len</em></td><td>&nbsp;</td>
333ae771770SStanislav Sedov        </tr>
334ae771770SStanislav Sedov        <tr>
335ae771770SStanislav Sedov          <td></td>
336ae771770SStanislav Sedov          <td>)</td>
337ae771770SStanislav Sedov          <td></td><td></td><td></td>
338ae771770SStanislav Sedov        </tr>
339ae771770SStanislav Sedov      </table>
340ae771770SStanislav Sedov</div>
341ae771770SStanislav Sedov<div class="memdoc">
342ae771770SStanislav Sedov
343ae771770SStanislav Sedov<p>
344ae771770SStanislav SedovCalculate the length of from converting a UCS2 string to an UTF-8 string.<p>
345ae771770SStanislav Sedov<dl compact><dt><b>Parameters:</b></dt><dd>
346ae771770SStanislav Sedov  <table border="0" cellspacing="2" cellpadding="0">
347ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in</em>&nbsp;</td><td>an UCS2 string to convert. </td></tr>
348ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in_len</em>&nbsp;</td><td>an UCS2 string length to convert. </td></tr>
349ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out_len</em>&nbsp;</td><td>the length of the resulting UTF-8 string.</td></tr>
350ae771770SStanislav Sedov  </table>
351ae771770SStanislav Sedov</dl>
352ae771770SStanislav Sedov<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl>
353ae771770SStanislav Sedov
354ae771770SStanislav Sedov</div>
355ae771770SStanislav Sedov</div><p>
356ae771770SStanislav Sedov<a class="anchor" name="g20668242d9ab39011edbcae295ee9348"></a><!-- doxytag: member="utf8.c::wind_ucs2write" ref="g20668242d9ab39011edbcae295ee9348" args="(const uint16_t *in, size_t in_len, unsigned int *flags, void *ptr, size_t *out_len)" -->
357ae771770SStanislav Sedov<div class="memitem">
358ae771770SStanislav Sedov<div class="memproto">
359ae771770SStanislav Sedov      <table class="memname">
360ae771770SStanislav Sedov        <tr>
361ae771770SStanislav Sedov          <td class="memname">int wind_ucs2write           </td>
362ae771770SStanislav Sedov          <td>(</td>
363ae771770SStanislav Sedov          <td class="paramtype">const uint16_t *&nbsp;</td>
364ae771770SStanislav Sedov          <td class="paramname"> <em>in</em>, </td>
365ae771770SStanislav Sedov        </tr>
366ae771770SStanislav Sedov        <tr>
367ae771770SStanislav Sedov          <td class="paramkey"></td>
368ae771770SStanislav Sedov          <td></td>
369ae771770SStanislav Sedov          <td class="paramtype">size_t&nbsp;</td>
370ae771770SStanislav Sedov          <td class="paramname"> <em>in_len</em>, </td>
371ae771770SStanislav Sedov        </tr>
372ae771770SStanislav Sedov        <tr>
373ae771770SStanislav Sedov          <td class="paramkey"></td>
374ae771770SStanislav Sedov          <td></td>
375ae771770SStanislav Sedov          <td class="paramtype">unsigned int *&nbsp;</td>
376ae771770SStanislav Sedov          <td class="paramname"> <em>flags</em>, </td>
377ae771770SStanislav Sedov        </tr>
378ae771770SStanislav Sedov        <tr>
379ae771770SStanislav Sedov          <td class="paramkey"></td>
380ae771770SStanislav Sedov          <td></td>
381ae771770SStanislav Sedov          <td class="paramtype">void *&nbsp;</td>
382ae771770SStanislav Sedov          <td class="paramname"> <em>ptr</em>, </td>
383ae771770SStanislav Sedov        </tr>
384ae771770SStanislav Sedov        <tr>
385ae771770SStanislav Sedov          <td class="paramkey"></td>
386ae771770SStanislav Sedov          <td></td>
387ae771770SStanislav Sedov          <td class="paramtype">size_t *&nbsp;</td>
388ae771770SStanislav Sedov          <td class="paramname"> <em>out_len</em></td><td>&nbsp;</td>
389ae771770SStanislav Sedov        </tr>
390ae771770SStanislav Sedov        <tr>
391ae771770SStanislav Sedov          <td></td>
392ae771770SStanislav Sedov          <td>)</td>
393ae771770SStanislav Sedov          <td></td><td></td><td></td>
394ae771770SStanislav Sedov        </tr>
395ae771770SStanislav Sedov      </table>
396ae771770SStanislav Sedov</div>
397ae771770SStanislav Sedov<div class="memdoc">
398ae771770SStanislav Sedov
399ae771770SStanislav Sedov<p>
400ae771770SStanislav SedovWrite an UCS2 string to a buffer.<p>
401ae771770SStanislav Sedov<dl compact><dt><b>Parameters:</b></dt><dd>
402ae771770SStanislav Sedov  <table border="0" cellspacing="2" cellpadding="0">
403ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in</em>&nbsp;</td><td>The input UCS2 string. </td></tr>
404ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in_len</em>&nbsp;</td><td>the length of the input buffer. </td></tr>
405ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>Flags to control the behavior of the function. </td></tr>
406ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>ptr</em>&nbsp;</td><td>The input buffer to write to, the array must be at least (in + 1) * 2 bytes long. </td></tr>
407ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out_len</em>&nbsp;</td><td>the output length</td></tr>
408ae771770SStanislav Sedov  </table>
409ae771770SStanislav Sedov</dl>
410ae771770SStanislav Sedov<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise. </dd></dl>
411ae771770SStanislav Sedov
412ae771770SStanislav Sedov<p>
413ae771770SStanislav SedovIf in buffer is not of length be mod 2, WIND_ERR_LENGTH_NOT_MOD2 is returned<p>
414ae771770SStanislav SedovOn zero input length, flags are preserved<p>
415ae771770SStanislav SedovIf flags have WIND_RW_BOM set, the byte order mark is written first to the output data<p>
416ae771770SStanislav SedovIf the output wont fit into out_len, WIND_ERR_OVERRUN is returned
417ae771770SStanislav Sedov</div>
418ae771770SStanislav Sedov</div><p>
419ae771770SStanislav Sedov<a class="anchor" name="g502199d8981249373095da43bb5d256d"></a><!-- doxytag: member="utf8.c::wind_ucs4utf8" ref="g502199d8981249373095da43bb5d256d" args="(const uint32_t *in, size_t in_len, char *out, size_t *out_len)" -->
420ae771770SStanislav Sedov<div class="memitem">
421ae771770SStanislav Sedov<div class="memproto">
422ae771770SStanislav Sedov      <table class="memname">
423ae771770SStanislav Sedov        <tr>
424ae771770SStanislav Sedov          <td class="memname">int wind_ucs4utf8           </td>
425ae771770SStanislav Sedov          <td>(</td>
426ae771770SStanislav Sedov          <td class="paramtype">const uint32_t *&nbsp;</td>
427ae771770SStanislav Sedov          <td class="paramname"> <em>in</em>, </td>
428ae771770SStanislav Sedov        </tr>
429ae771770SStanislav Sedov        <tr>
430ae771770SStanislav Sedov          <td class="paramkey"></td>
431ae771770SStanislav Sedov          <td></td>
432ae771770SStanislav Sedov          <td class="paramtype">size_t&nbsp;</td>
433ae771770SStanislav Sedov          <td class="paramname"> <em>in_len</em>, </td>
434ae771770SStanislav Sedov        </tr>
435ae771770SStanislav Sedov        <tr>
436ae771770SStanislav Sedov          <td class="paramkey"></td>
437ae771770SStanislav Sedov          <td></td>
438ae771770SStanislav Sedov          <td class="paramtype">char *&nbsp;</td>
439ae771770SStanislav Sedov          <td class="paramname"> <em>out</em>, </td>
440ae771770SStanislav Sedov        </tr>
441ae771770SStanislav Sedov        <tr>
442ae771770SStanislav Sedov          <td class="paramkey"></td>
443ae771770SStanislav Sedov          <td></td>
444ae771770SStanislav Sedov          <td class="paramtype">size_t *&nbsp;</td>
445ae771770SStanislav Sedov          <td class="paramname"> <em>out_len</em></td><td>&nbsp;</td>
446ae771770SStanislav Sedov        </tr>
447ae771770SStanislav Sedov        <tr>
448ae771770SStanislav Sedov          <td></td>
449ae771770SStanislav Sedov          <td>)</td>
450ae771770SStanislav Sedov          <td></td><td></td><td></td>
451ae771770SStanislav Sedov        </tr>
452ae771770SStanislav Sedov      </table>
453ae771770SStanislav Sedov</div>
454ae771770SStanislav Sedov<div class="memdoc">
455ae771770SStanislav Sedov
456ae771770SStanislav Sedov<p>
457ae771770SStanislav SedovConvert an UCS4 string to a UTF-8 string.<p>
458ae771770SStanislav Sedov<dl compact><dt><b>Parameters:</b></dt><dd>
459ae771770SStanislav Sedov  <table border="0" cellspacing="2" cellpadding="0">
460ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in</em>&nbsp;</td><td>an UCS4 string to convert. </td></tr>
461ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in_len</em>&nbsp;</td><td>the length input array.</td></tr>
462ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out</em>&nbsp;</td><td>the resulting UTF-8 strint, must be at least <a class="el" href="group__wind.html#g44d8951aee3e12f1812ef193bad738ef">wind_ucs4utf8_length()</a> + 1 long (the extra char for the NUL). If out is NULL, the function will calculate the needed space for the out variable (just like <a class="el" href="group__wind.html#g44d8951aee3e12f1812ef193bad738ef">wind_ucs4utf8_length()</a>).</td></tr>
463ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out_len</em>&nbsp;</td><td>before processing out_len should be the length of the out variable, after processing it will be the length of the out string.</td></tr>
464ae771770SStanislav Sedov  </table>
465ae771770SStanislav Sedov</dl>
466ae771770SStanislav Sedov<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl>
467ae771770SStanislav Sedov
468ae771770SStanislav Sedov</div>
469ae771770SStanislav Sedov</div><p>
470ae771770SStanislav Sedov<a class="anchor" name="g44d8951aee3e12f1812ef193bad738ef"></a><!-- doxytag: member="utf8.c::wind_ucs4utf8_length" ref="g44d8951aee3e12f1812ef193bad738ef" args="(const uint32_t *in, size_t in_len, size_t *out_len)" -->
471ae771770SStanislav Sedov<div class="memitem">
472ae771770SStanislav Sedov<div class="memproto">
473ae771770SStanislav Sedov      <table class="memname">
474ae771770SStanislav Sedov        <tr>
475ae771770SStanislav Sedov          <td class="memname">int wind_ucs4utf8_length           </td>
476ae771770SStanislav Sedov          <td>(</td>
477ae771770SStanislav Sedov          <td class="paramtype">const uint32_t *&nbsp;</td>
478ae771770SStanislav Sedov          <td class="paramname"> <em>in</em>, </td>
479ae771770SStanislav Sedov        </tr>
480ae771770SStanislav Sedov        <tr>
481ae771770SStanislav Sedov          <td class="paramkey"></td>
482ae771770SStanislav Sedov          <td></td>
483ae771770SStanislav Sedov          <td class="paramtype">size_t&nbsp;</td>
484ae771770SStanislav Sedov          <td class="paramname"> <em>in_len</em>, </td>
485ae771770SStanislav Sedov        </tr>
486ae771770SStanislav Sedov        <tr>
487ae771770SStanislav Sedov          <td class="paramkey"></td>
488ae771770SStanislav Sedov          <td></td>
489ae771770SStanislav Sedov          <td class="paramtype">size_t *&nbsp;</td>
490ae771770SStanislav Sedov          <td class="paramname"> <em>out_len</em></td><td>&nbsp;</td>
491ae771770SStanislav Sedov        </tr>
492ae771770SStanislav Sedov        <tr>
493ae771770SStanislav Sedov          <td></td>
494ae771770SStanislav Sedov          <td>)</td>
495ae771770SStanislav Sedov          <td></td><td></td><td></td>
496ae771770SStanislav Sedov        </tr>
497ae771770SStanislav Sedov      </table>
498ae771770SStanislav Sedov</div>
499ae771770SStanislav Sedov<div class="memdoc">
500ae771770SStanislav Sedov
501ae771770SStanislav Sedov<p>
502ae771770SStanislav SedovCalculate the length of from converting a UCS4 string to an UTF-8 string.<p>
503ae771770SStanislav Sedov<dl compact><dt><b>Parameters:</b></dt><dd>
504ae771770SStanislav Sedov  <table border="0" cellspacing="2" cellpadding="0">
505ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in</em>&nbsp;</td><td>an UCS4 string to convert. </td></tr>
506ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in_len</em>&nbsp;</td><td>the length of UCS4 string to convert. </td></tr>
507ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out_len</em>&nbsp;</td><td>the length of the resulting UTF-8 string.</td></tr>
508ae771770SStanislav Sedov  </table>
509ae771770SStanislav Sedov</dl>
510ae771770SStanislav Sedov<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl>
511ae771770SStanislav Sedov
512ae771770SStanislav Sedov</div>
513ae771770SStanislav Sedov</div><p>
514ae771770SStanislav Sedov<a class="anchor" name="g736f8b06adc2b70bd32ce2ed2397b5f5"></a><!-- doxytag: member="utf8.c::wind_utf8ucs2" ref="g736f8b06adc2b70bd32ce2ed2397b5f5" args="(const char *in, uint16_t *out, size_t *out_len)" -->
515ae771770SStanislav Sedov<div class="memitem">
516ae771770SStanislav Sedov<div class="memproto">
517ae771770SStanislav Sedov      <table class="memname">
518ae771770SStanislav Sedov        <tr>
519ae771770SStanislav Sedov          <td class="memname">int wind_utf8ucs2           </td>
520ae771770SStanislav Sedov          <td>(</td>
521ae771770SStanislav Sedov          <td class="paramtype">const char *&nbsp;</td>
522ae771770SStanislav Sedov          <td class="paramname"> <em>in</em>, </td>
523ae771770SStanislav Sedov        </tr>
524ae771770SStanislav Sedov        <tr>
525ae771770SStanislav Sedov          <td class="paramkey"></td>
526ae771770SStanislav Sedov          <td></td>
527ae771770SStanislav Sedov          <td class="paramtype">uint16_t *&nbsp;</td>
528ae771770SStanislav Sedov          <td class="paramname"> <em>out</em>, </td>
529ae771770SStanislav Sedov        </tr>
530ae771770SStanislav Sedov        <tr>
531ae771770SStanislav Sedov          <td class="paramkey"></td>
532ae771770SStanislav Sedov          <td></td>
533ae771770SStanislav Sedov          <td class="paramtype">size_t *&nbsp;</td>
534ae771770SStanislav Sedov          <td class="paramname"> <em>out_len</em></td><td>&nbsp;</td>
535ae771770SStanislav Sedov        </tr>
536ae771770SStanislav Sedov        <tr>
537ae771770SStanislav Sedov          <td></td>
538ae771770SStanislav Sedov          <td>)</td>
539ae771770SStanislav Sedov          <td></td><td></td><td></td>
540ae771770SStanislav Sedov        </tr>
541ae771770SStanislav Sedov      </table>
542ae771770SStanislav Sedov</div>
543ae771770SStanislav Sedov<div class="memdoc">
544ae771770SStanislav Sedov
545ae771770SStanislav Sedov<p>
546ae771770SStanislav SedovConvert an UTF-8 string to an UCS2 string.<p>
547ae771770SStanislav Sedov<dl compact><dt><b>Parameters:</b></dt><dd>
548ae771770SStanislav Sedov  <table border="0" cellspacing="2" cellpadding="0">
549ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in</em>&nbsp;</td><td>an UTF-8 string to convert. </td></tr>
550ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out</em>&nbsp;</td><td>the resulting UCS2 strint, must be at least <a class="el" href="group__wind.html#g4d94c57c6fc46b7af71d37d507bcdbf8">wind_utf8ucs2_length()</a> long. If out is NULL, the function will calculate the needed space for the out variable (just like <a class="el" href="group__wind.html#g4d94c57c6fc46b7af71d37d507bcdbf8">wind_utf8ucs2_length()</a>). </td></tr>
551ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out_len</em>&nbsp;</td><td>before processing out_len should be the length of the out variable, after processing it will be the length of the out string.</td></tr>
552ae771770SStanislav Sedov  </table>
553ae771770SStanislav Sedov</dl>
554ae771770SStanislav Sedov<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl>
555ae771770SStanislav Sedov
556ae771770SStanislav Sedov</div>
557ae771770SStanislav Sedov</div><p>
558ae771770SStanislav Sedov<a class="anchor" name="g4d94c57c6fc46b7af71d37d507bcdbf8"></a><!-- doxytag: member="utf8.c::wind_utf8ucs2_length" ref="g4d94c57c6fc46b7af71d37d507bcdbf8" args="(const char *in, size_t *out_len)" -->
559ae771770SStanislav Sedov<div class="memitem">
560ae771770SStanislav Sedov<div class="memproto">
561ae771770SStanislav Sedov      <table class="memname">
562ae771770SStanislav Sedov        <tr>
563ae771770SStanislav Sedov          <td class="memname">int wind_utf8ucs2_length           </td>
564ae771770SStanislav Sedov          <td>(</td>
565ae771770SStanislav Sedov          <td class="paramtype">const char *&nbsp;</td>
566ae771770SStanislav Sedov          <td class="paramname"> <em>in</em>, </td>
567ae771770SStanislav Sedov        </tr>
568ae771770SStanislav Sedov        <tr>
569ae771770SStanislav Sedov          <td class="paramkey"></td>
570ae771770SStanislav Sedov          <td></td>
571ae771770SStanislav Sedov          <td class="paramtype">size_t *&nbsp;</td>
572ae771770SStanislav Sedov          <td class="paramname"> <em>out_len</em></td><td>&nbsp;</td>
573ae771770SStanislav Sedov        </tr>
574ae771770SStanislav Sedov        <tr>
575ae771770SStanislav Sedov          <td></td>
576ae771770SStanislav Sedov          <td>)</td>
577ae771770SStanislav Sedov          <td></td><td></td><td></td>
578ae771770SStanislav Sedov        </tr>
579ae771770SStanislav Sedov      </table>
580ae771770SStanislav Sedov</div>
581ae771770SStanislav Sedov<div class="memdoc">
582ae771770SStanislav Sedov
583ae771770SStanislav Sedov<p>
584ae771770SStanislav SedovCalculate the length of from converting a UTF-8 string to a UCS2 string.<p>
585ae771770SStanislav Sedov<dl compact><dt><b>Parameters:</b></dt><dd>
586ae771770SStanislav Sedov  <table border="0" cellspacing="2" cellpadding="0">
587ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in</em>&nbsp;</td><td>an UTF-8 string to convert. </td></tr>
588ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out_len</em>&nbsp;</td><td>the length of the resulting UCS4 string.</td></tr>
589ae771770SStanislav Sedov  </table>
590ae771770SStanislav Sedov</dl>
591ae771770SStanislav Sedov<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl>
592ae771770SStanislav Sedov
593ae771770SStanislav Sedov</div>
594ae771770SStanislav Sedov</div><p>
595ae771770SStanislav Sedov<a class="anchor" name="g31f62f5e3ca885bd8afce415c9e83c4c"></a><!-- doxytag: member="utf8.c::wind_utf8ucs4" ref="g31f62f5e3ca885bd8afce415c9e83c4c" args="(const char *in, uint32_t *out, size_t *out_len)" -->
596ae771770SStanislav Sedov<div class="memitem">
597ae771770SStanislav Sedov<div class="memproto">
598ae771770SStanislav Sedov      <table class="memname">
599ae771770SStanislav Sedov        <tr>
600ae771770SStanislav Sedov          <td class="memname">int wind_utf8ucs4           </td>
601ae771770SStanislav Sedov          <td>(</td>
602ae771770SStanislav Sedov          <td class="paramtype">const char *&nbsp;</td>
603ae771770SStanislav Sedov          <td class="paramname"> <em>in</em>, </td>
604ae771770SStanislav Sedov        </tr>
605ae771770SStanislav Sedov        <tr>
606ae771770SStanislav Sedov          <td class="paramkey"></td>
607ae771770SStanislav Sedov          <td></td>
608ae771770SStanislav Sedov          <td class="paramtype">uint32_t *&nbsp;</td>
609ae771770SStanislav Sedov          <td class="paramname"> <em>out</em>, </td>
610ae771770SStanislav Sedov        </tr>
611ae771770SStanislav Sedov        <tr>
612ae771770SStanislav Sedov          <td class="paramkey"></td>
613ae771770SStanislav Sedov          <td></td>
614ae771770SStanislav Sedov          <td class="paramtype">size_t *&nbsp;</td>
615ae771770SStanislav Sedov          <td class="paramname"> <em>out_len</em></td><td>&nbsp;</td>
616ae771770SStanislav Sedov        </tr>
617ae771770SStanislav Sedov        <tr>
618ae771770SStanislav Sedov          <td></td>
619ae771770SStanislav Sedov          <td>)</td>
620ae771770SStanislav Sedov          <td></td><td></td><td></td>
621ae771770SStanislav Sedov        </tr>
622ae771770SStanislav Sedov      </table>
623ae771770SStanislav Sedov</div>
624ae771770SStanislav Sedov<div class="memdoc">
625ae771770SStanislav Sedov
626ae771770SStanislav Sedov<p>
627ae771770SStanislav SedovConvert an UTF-8 string to an UCS4 string.<p>
628ae771770SStanislav Sedov<dl compact><dt><b>Parameters:</b></dt><dd>
629ae771770SStanislav Sedov  <table border="0" cellspacing="2" cellpadding="0">
630ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in</em>&nbsp;</td><td>an UTF-8 string to convert. </td></tr>
631ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out</em>&nbsp;</td><td>the resulting UCS4 strint, must be at least <a class="el" href="group__wind.html#gbeccc02ed5f1f90684b10a6f892e89d3">wind_utf8ucs4_length()</a> long. If out is NULL, the function will calculate the needed space for the out variable (just like <a class="el" href="group__wind.html#gbeccc02ed5f1f90684b10a6f892e89d3">wind_utf8ucs4_length()</a>). </td></tr>
632ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out_len</em>&nbsp;</td><td>before processing out_len should be the length of the out variable, after processing it will be the length of the out string.</td></tr>
633ae771770SStanislav Sedov  </table>
634ae771770SStanislav Sedov</dl>
635ae771770SStanislav Sedov<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl>
636ae771770SStanislav Sedov
637ae771770SStanislav Sedov</div>
638ae771770SStanislav Sedov</div><p>
639ae771770SStanislav Sedov<a class="anchor" name="gbeccc02ed5f1f90684b10a6f892e89d3"></a><!-- doxytag: member="utf8.c::wind_utf8ucs4_length" ref="gbeccc02ed5f1f90684b10a6f892e89d3" args="(const char *in, size_t *out_len)" -->
640ae771770SStanislav Sedov<div class="memitem">
641ae771770SStanislav Sedov<div class="memproto">
642ae771770SStanislav Sedov      <table class="memname">
643ae771770SStanislav Sedov        <tr>
644ae771770SStanislav Sedov          <td class="memname">int wind_utf8ucs4_length           </td>
645ae771770SStanislav Sedov          <td>(</td>
646ae771770SStanislav Sedov          <td class="paramtype">const char *&nbsp;</td>
647ae771770SStanislav Sedov          <td class="paramname"> <em>in</em>, </td>
648ae771770SStanislav Sedov        </tr>
649ae771770SStanislav Sedov        <tr>
650ae771770SStanislav Sedov          <td class="paramkey"></td>
651ae771770SStanislav Sedov          <td></td>
652ae771770SStanislav Sedov          <td class="paramtype">size_t *&nbsp;</td>
653ae771770SStanislav Sedov          <td class="paramname"> <em>out_len</em></td><td>&nbsp;</td>
654ae771770SStanislav Sedov        </tr>
655ae771770SStanislav Sedov        <tr>
656ae771770SStanislav Sedov          <td></td>
657ae771770SStanislav Sedov          <td>)</td>
658ae771770SStanislav Sedov          <td></td><td></td><td></td>
659ae771770SStanislav Sedov        </tr>
660ae771770SStanislav Sedov      </table>
661ae771770SStanislav Sedov</div>
662ae771770SStanislav Sedov<div class="memdoc">
663ae771770SStanislav Sedov
664ae771770SStanislav Sedov<p>
665ae771770SStanislav SedovCalculate the length of from converting a UTF-8 string to a UCS4 string.<p>
666ae771770SStanislav Sedov<dl compact><dt><b>Parameters:</b></dt><dd>
667ae771770SStanislav Sedov  <table border="0" cellspacing="2" cellpadding="0">
668ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>in</em>&nbsp;</td><td>an UTF-8 string to convert. </td></tr>
669ae771770SStanislav Sedov    <tr><td valign="top"></td><td valign="top"><em>out_len</em>&nbsp;</td><td>the length of the resulting UCS4 string.</td></tr>
670ae771770SStanislav Sedov  </table>
671ae771770SStanislav Sedov</dl>
672ae771770SStanislav Sedov<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns 0 on success, an wind error code otherwise </dd></dl>
673ae771770SStanislav Sedov
674ae771770SStanislav Sedov</div>
675ae771770SStanislav Sedov</div><p>
676ae771770SStanislav Sedov</div>
677ae771770SStanislav Sedov<hr size="1"><address style="text-align: right;"><small>
678*cf771f22SStanislav SedovGenerated on Wed Jan 11 14:07:51 2012 for Heimdalwindlibrary by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address>
679ae771770SStanislav Sedov</body>
680ae771770SStanislav Sedov</html>
681