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 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2004
National Institute of Advanced Industrial Science and Technology (AIST)
This file is part of the m17n library documentation.
See the end for copying conditions.
-->
<html><head><meta http-equiv="Content-Type" content="text/html;charset="UTF-8">
<title>The m17n Library</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff">
<a name="top-of-page"></a>
<hr><center>
<a class="qindex" href="index.html">Main Page</a>
<a class="qindex" href="modules.html">Modules</a>
<!-- <a class="qindex" href="classes.html">Alphabetical List</a> -->
<a class="qindex" href="annotated.html">Data Structures</a>
<!-- <a class="qindex" href="files.html">File List</a> -->
<!-- <a class="qindex" href="functions.html">Data Fields</a> -->
<a class="qindex" href="globals.html">Globals</a>
<a class="qindex" href="pages.html">Appendix</a>
</center>
<hr>
<!-- Generated by Doxygen 1.3.9.1 -->
<h1>MConverter Struct Reference<br>
<small>
[<a class="el" href="group__m17nConv.html">Code Conversion</a>]</small>
</h1>Structure to be used in code conversion.
<a href="#_details">More...</a>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structMConverter.html#o0">lenient</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structMConverter.html#o1">last_block</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="structMConverter.html#o2">at_most</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structMConverter.html#o3">nchars</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structMConverter.html#o4">nbytes</a></td></tr>
<tr><td class="memItemLeft" nowrap>union {</td></tr>
<tr><td class="memItemLeft" nowrap> void * <a class="el" href="structMConverter.html#o5">ptr</a></td></tr>
<tr><td class="memItemLeft" nowrap> double <a class="el" href="structMConverter.html#o6">dbl</a></td></tr>
<tr><td class="memItemLeft" nowrap> char <a class="el" href="structMConverter.html#o7">c</a> [256]</td></tr>
<tr><td class="memItemLeft" nowrap valign="top">} </td><td class="memItemRight" valign="bottom"><a class="el" href="structMConverter.html#o8">status</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="structMConverter.html#o9">internal_info</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Structure to be used in code conversion. The first three members are to control the conversion.
<p>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="o0" doxytag="MConverter::lenient"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int <a class="el" href="structMConverter.html#o0">MConverter::lenient</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Set the value to nonzero if the conversion should be lenient. By default, the conversion is strict (i.e. not lenient).<p>
If the conversion is strict, the converter stops at the first invalid byte (on decoding) or at the first character not supported by the coding system (on encoding). If this happens, <code>MConverter->result</code> is set to <code>MCONVERSION_RESULT_INVALID_BYTE</code> or <code>MCONVERSION_RESULT_INVALID_CHAR</code> accordingly.<p>
If the conversion is lenient, on decoding, an invalid byte is kept per se, and on encoding, an invalid character is replaced with "<U+XXXX>" (if the character is a Unicode character) or with "<M+XXXXXX>" (otherwise). </td>
</tr>
</table>
<a class="anchor" name="o1" doxytag="MConverter::last_block"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int <a class="el" href="structMConverter.html#o1">MConverter::last_block</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Set the value to nonzero before decoding or encoding the last block of the byte sequence or the character sequence respectively. The value influences the conversion as below.<p>
On decoding, in the case that the last few bytes are too short to form a valid byte sequence:<p>
If the value is nonzero, the conversion terminates by error (MCONVERSION_RESULT_INVALID_BYTE) at the first byte of the sequence.<p>
If the value is zero, the conversion terminates successfully. Those bytes are stored in the converter as carryover and are prepended to the byte sequence of the further conversion.<p>
On encoding, in the case that the coding system is context dependent:<p>
If the value is nonzero, the conversion may produce a byte sequence at the end to reset the context to the initial state even if the source characters are zero.<p>
If the value is zero, the conversion never produce such a byte sequence at the end. </td>
</tr>
</table>
<a class="anchor" name="o2" doxytag="MConverter::at_most"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">unsigned <a class="el" href="structMConverter.html#o2">MConverter::at_most</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
If the value is nonzero, it specifies at most how many characters to convert. </td>
</tr>
</table>
<a class="anchor" name="o3" doxytag="MConverter::nchars"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int <a class="el" href="structMConverter.html#o3">MConverter::nchars</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The following three members are to report the result of the conversion.<p>
Number of characters most recently decoded or encoded. </td>
</tr>
</table>
<a class="anchor" name="o4" doxytag="MConverter::nbytes"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int <a class="el" href="structMConverter.html#o4">MConverter::nbytes</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Number of bytes recently decoded or encoded. </td>
</tr>
</table>
<a class="anchor" name="o5" doxytag="MConverter::ptr"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void* <a class="el" href="structMConverter.html#o5">MConverter::ptr</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o6" doxytag="MConverter::dbl"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">double <a class="el" href="structMConverter.html#o6">MConverter::dbl</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o7" doxytag="MConverter::c"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">char <a class="el" href="structMConverter.html#o7">MConverter::c</a>[256] </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o8" doxytag="MConverter::status"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">union { ... } <a class="el" href="structMConverter.html#o8">MConverter::status</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Various information about the status of code conversion. The contents depend on the type of coding system. It is assured that <code>status</code> is aligned so that any type of casting is safe and at least 256 bytes of memory space can be used. </td>
</tr>
</table>
<a class="anchor" name="o9" doxytag="MConverter::internal_info"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void* <a class="el" href="structMConverter.html#o9">MConverter::internal_info</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
This member is for internally use only. An application program should never touch it. </td>
</tr>
</table>
<hr>
<center>
<a href="#top-of-page">Top of this page</a><br><br>
<a class="qindex" href="index.html">Main Page</a>
<a class="qindex" href="modules.html">Modules</a>
<!-- <a class="qindex" href="classes.html">Alphabetical List</a> -->
<a class="qindex" href="annotated.html">Data Structures</a>
<!-- <a class="qindex" href="files.html">File List</a> -->
<!-- <a class="qindex" href="functions.html">Data Fields</a> -->
<a class="qindex" href="globals.html">Globals</a>
<a class="qindex" href="pages.html">Appendix</a>
</center>
<hr>
<ADDRESS>
<a href="http://www.m17n.org/m17n-lib/index.html" target="mulewindow"><img src="parrot.png" align=bottom alt="mulemark" border=0></a>
<A HREF="mailto:mule-aist@m17n.org">mule-aist@m17n.org</a>
</ADDRESS>
</body>
</HTML>
<!-- Copyright information
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2004
National Institute of Advanced Industrial Science and Technology (AIST)
This file is part of the m17n library documentation.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Section, Front-Cover Texts "The m17n library documentation",
and no Back-Cover Texts. A copy of the license is included in the
appendix entitled "GNU Free Documentation License".
-->
|