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
|
<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>The m17n Library: MConverter Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<img id="MSearchSelect" src="search/search.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</div>
</li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
<li><a href="functions.html"><span>Data Fields</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>MConverter Struct Reference<br/>
<small>
[<a class="el" href="group__m17nConv.html">Code Conversion</a>]</small>
</h1><!-- doxytag: class="MConverter" -->
<p>Structure to be used in code conversion.
<a href="#_details">More...</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structMConverter.html#a1e6ac361d7ec9fc7b8e6471641b8df05">lenient</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structMConverter.html#a25e07110149579b8867e4795b280e868">last_block</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="structMConverter.html#a99e6c2a37b8f4313960b9006fcf3ddc2">at_most</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structMConverter.html#a6b7c87d3ce21346ff6543e7afadab693">nchars</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structMConverter.html#a70d38d3bda2a382e037fbe72f7e46be1">nbytes</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum <a class="el" href="group__m17nConv.html#gafef05a0f12fd162f58fb750a2f1fbec7">MConversionResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structMConverter.html#a10d13721702b68bfa1ecf16a877dd640">result</a></td></tr>
<tr><td class="memItemLeft" >union {</td></tr>
<tr><td class="memItemLeft" > void * <a class="el" href="structMConverter.html#ad5b2106ccda2ff7146717234462f3653">ptr</a></td></tr>
<tr><td class="memItemLeft" > double <a class="el" href="structMConverter.html#a32be6c26106bc428e5517d4b64b8e5cf">dbl</a></td></tr>
<tr><td class="memItemLeft" > char <a class="el" href="structMConverter.html#ad88907a7a365905704cf01f5da5b7a59">c</a> [256]</td></tr>
<tr><td class="memItemLeft" valign="top">} </td><td class="memItemRight" valign="bottom"><a class="el" href="structMConverter.html#a6900c286637b8bd870c4357b9cdc9d33">status</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="structMConverter.html#a0316d9ad5f6ea12f166b4db59dc5ab3d">internal_info</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Structure to be used in code conversion. </p>
<p>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" id="a1e6ac361d7ec9fc7b8e6471641b8df05"></a><!-- doxytag: member="MConverter::lenient" ref="a1e6ac361d7ec9fc7b8e6471641b8df05" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="structMConverter.html#a1e6ac361d7ec9fc7b8e6471641b8df05">MConverter::lenient</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the value to nonzero if the conversion should be lenient. By default, the conversion is strict (i.e. not lenient).</p>
<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>
<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). </p>
</div>
</div>
<a class="anchor" id="a25e07110149579b8867e4795b280e868"></a><!-- doxytag: member="MConverter::last_block" ref="a25e07110149579b8867e4795b280e868" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="structMConverter.html#a25e07110149579b8867e4795b280e868">MConverter::last_block</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<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>
<p>On decoding, in the case that the last few bytes are too short to form a valid byte sequence:</p>
<p>If the value is nonzero, the conversion terminates by error (MCONVERSION_RESULT_INVALID_BYTE) at the first byte of the sequence.</p>
<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>
<p>On encoding, in the case that the coding system is context dependent:</p>
<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>
<p>If the value is zero, the conversion never produce such a byte sequence at the end. </p>
</div>
</div>
<a class="anchor" id="a99e6c2a37b8f4313960b9006fcf3ddc2"></a><!-- doxytag: member="MConverter::at_most" ref="a99e6c2a37b8f4313960b9006fcf3ddc2" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned <a class="el" href="structMConverter.html#a99e6c2a37b8f4313960b9006fcf3ddc2">MConverter::at_most</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>If the value is nonzero, it specifies at most how many characters to convert. </p>
</div>
</div>
<a class="anchor" id="a6b7c87d3ce21346ff6543e7afadab693"></a><!-- doxytag: member="MConverter::nchars" ref="a6b7c87d3ce21346ff6543e7afadab693" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="structMConverter.html#a6b7c87d3ce21346ff6543e7afadab693">MConverter::nchars</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The following three members are to report the result of the conversion.</p>
<p>Number of characters most recently decoded or encoded. </p>
</div>
</div>
<a class="anchor" id="a70d38d3bda2a382e037fbe72f7e46be1"></a><!-- doxytag: member="MConverter::nbytes" ref="a70d38d3bda2a382e037fbe72f7e46be1" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="structMConverter.html#a70d38d3bda2a382e037fbe72f7e46be1">MConverter::nbytes</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Number of bytes recently decoded or encoded. </p>
</div>
</div>
<a class="anchor" id="a10d13721702b68bfa1ecf16a877dd640"></a><!-- doxytag: member="MConverter::result" ref="a10d13721702b68bfa1ecf16a877dd640" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="group__m17nConv.html#gafef05a0f12fd162f58fb750a2f1fbec7">MConversionResult</a> <a class="el" href="structMConverter.html#a10d13721702b68bfa1ecf16a877dd640">MConverter::result</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Result code of the conversion. </p>
</div>
</div>
<a class="anchor" id="ad5b2106ccda2ff7146717234462f3653"></a><!-- doxytag: member="MConverter::ptr" ref="ad5b2106ccda2ff7146717234462f3653" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* <a class="el" href="structMConverter.html#ad5b2106ccda2ff7146717234462f3653">MConverter::ptr</a></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="a32be6c26106bc428e5517d4b64b8e5cf"></a><!-- doxytag: member="MConverter::dbl" ref="a32be6c26106bc428e5517d4b64b8e5cf" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double <a class="el" href="structMConverter.html#a32be6c26106bc428e5517d4b64b8e5cf">MConverter::dbl</a></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="ad88907a7a365905704cf01f5da5b7a59"></a><!-- doxytag: member="MConverter::c" ref="ad88907a7a365905704cf01f5da5b7a59" args="[256]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char <a class="el" href="structMConverter.html#ad88907a7a365905704cf01f5da5b7a59">MConverter::c</a>[256]</td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="a6900c286637b8bd870c4357b9cdc9d33"></a><!-- doxytag: member="MConverter::status" ref="a6900c286637b8bd870c4357b9cdc9d33" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">union { ... } <a class="el" href="structMConverter.html#a6900c286637b8bd870c4357b9cdc9d33">MConverter::status</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<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. </p>
</div>
</div>
<a class="anchor" id="a0316d9ad5f6ea12f166b4db59dc5ab3d"></a><!-- doxytag: member="MConverter::internal_info" ref="a0316d9ad5f6ea12f166b4db59dc5ab3d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* <a class="el" href="structMConverter.html#a0316d9ad5f6ea12f166b4db59dc5ab3d">MConverter::internal_info</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This member is for internally use only. An application program should never touch it. </p>
</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr>
<ADDRESS>
<a href="http://www.m17n.org/m17n-lib-en/index.html" target="mulewindow"><img src="parrot.png" align=bottom alt="m17n-lib Home" border=0></a>
</ADDRESS>
</body>
</HTML>
<!-- Copyright information
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2011
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, no Front-Cover Texts,
and no Back-Cover Texts. A copy of the license is included in the
appendix entitled "GNU Free Documentation License".
-->
|