mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 18:29:23 +02:00

git-svn-id: https://only.mawhrin.net/repos/FBReaderJ/trunk@1322 6a642e6f-84f6-412e-ac94-c4a38d5a04b0
780 lines
46 KiB
HTML
780 lines
46 KiB
HTML
<!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>liblinebreak: linebreak.c File Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<!-- Generated by Doxygen 1.6.1 -->
|
|
<div class="navigation" id="top">
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="contents">
|
|
<h1>linebreak.c File Reference</h1>
|
|
<p>Implementation of the line breaking algorithm as described in Unicode Standard Annex 14.
|
|
<a href="#_details">More...</a></p>
|
|
<code>#include <assert.h></code><br/>
|
|
<code>#include <stddef.h></code><br/>
|
|
<code>#include <string.h></code><br/>
|
|
<code>#include "<a class="el" href="linebreak_8h_source.html">linebreak.h</a>"</code><br/>
|
|
<code>#include "<a class="el" href="linebreakdef_8h_source.html">linebreakdef.h</a>"</code><br/>
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structLineBreakPropertiesIndex.html">LineBreakPropertiesIndex</a></td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Struct for the second-level index to the line breaking properties. <a href="structLineBreakPropertiesIndex.html#_details">More...</a><br/></td></tr>
|
|
<tr><td colspan="2"><h2>Defines</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#a0ba826ea7bf9cd9038b146bb3572dbf0">LINEBREAK_INDEX_SIZE</a> 40</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Size of the second-level index to the line breaking properties. <a href="#a0ba826ea7bf9cd9038b146bb3572dbf0"></a><br/></td></tr>
|
|
<tr><td colspan="2"><h2>Enumerations</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#a440c1a7abb9df5e3fc1d27b9a39e3a8d">BreakAction</a> { <br/>
|
|
<a class="el" href="linebreak_8c.html#a440c1a7abb9df5e3fc1d27b9a39e3a8da570708fb66d60c437dc3e8c1c784eef6">DIRECT_BRK</a>,
|
|
<a class="el" href="linebreak_8c.html#a440c1a7abb9df5e3fc1d27b9a39e3a8da246deb66413ac197d95680d31d4d5436">INDIRECT_BRK</a>,
|
|
<a class="el" href="linebreak_8c.html#a440c1a7abb9df5e3fc1d27b9a39e3a8da3e854663bba91b604d4a5f633b62c74a">CM_INDIRECT_BRK</a>,
|
|
<a class="el" href="linebreak_8c.html#a440c1a7abb9df5e3fc1d27b9a39e3a8da9ae64fb627a84203f331f718eaf942c8">CM_PROHIBITED_BRK</a>,
|
|
<br/>
|
|
<a class="el" href="linebreak_8c.html#a440c1a7abb9df5e3fc1d27b9a39e3a8dac31d10dc16c2e583ceb6c7e198fc9799">PROHIBITED_BRK</a>
|
|
<br/>
|
|
}</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight"><p>Enumeration of break actions. </p>
|
|
<a href="linebreak_8c.html#a440c1a7abb9df5e3fc1d27b9a39e3a8d">More...</a><br/></td></tr>
|
|
<tr><td colspan="2"><h2>Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#a57c2b88b7e1277cbba23cfffbc782c4f">init_linebreak</a> (void)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initializes the second-level index to the line breaking properties. <a href="#a57c2b88b7e1277cbba23cfffbc782c4f"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static struct <a class="el" href="structLineBreakProperties.html">LineBreakProperties</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#aec14ede6c9c839852210a729274c7fbc">get_lb_prop_lang</a> (const char *lang)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the language-specific line breaking properties. <a href="#aec14ede6c9c839852210a729274c7fbc"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static enum <a class="el" href="linebreakdef_8h.html#a884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#a4eb765d3c50b5be0f694f9dd875bf5bb">get_char_lb_class</a> (<a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> ch, struct <a class="el" href="structLineBreakProperties.html">LineBreakProperties</a> *lbp)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the line breaking class of a character from a line breaking properties array. <a href="#a4eb765d3c50b5be0f694f9dd875bf5bb"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static enum <a class="el" href="linebreakdef_8h.html#a884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#aa8be95ab8e6ee731e55279772b5aec91">get_char_lb_class_default</a> (<a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> ch)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the line breaking class of a character from the default line breaking properties array. <a href="#aa8be95ab8e6ee731e55279772b5aec91"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static enum <a class="el" href="linebreakdef_8h.html#a884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#a41ec5a32a31d007d60ea57caa38a2f3e">get_char_lb_class_lang</a> (<a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> ch, struct <a class="el" href="structLineBreakProperties.html">LineBreakProperties</a> *lbpLang)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the line breaking class of a character for a specific language. <a href="#a41ec5a32a31d007d60ea57caa38a2f3e"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static enum <a class="el" href="linebreakdef_8h.html#a884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#aa42b073302ff3325b087b61c78bf4841">resolve_lb_class</a> (enum <a class="el" href="linebreakdef_8h.html#a884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> lbc, const char *lang)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Resolves the line breaking class for certain ambiguous or complicated characters. <a href="#aa42b073302ff3325b087b61c78bf4841"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#a5ffc31765568becd8b9eb08a3916ab4b">lb_get_next_char_utf8</a> (const <a class="el" href="linebreak_8h.html#a6103b2105588f239c593e779e605038a">utf8_t</a> *s, size_t len, size_t *ip)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the next Unicode character in a UTF-8 sequence. <a href="#a5ffc31765568becd8b9eb08a3916ab4b"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#aa1664feb525e6bf1efbe8566547708be">lb_get_next_char_utf16</a> (const <a class="el" href="linebreak_8h.html#a4dce96cad338d9281612277b2d80950c">utf16_t</a> *s, size_t len, size_t *ip)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the next Unicode character in a UTF-16 sequence. <a href="#aa1664feb525e6bf1efbe8566547708be"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#a1f8bc7169caccfa444e75274b55e6721">lb_get_next_char_utf32</a> (const <a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> *s, size_t len, size_t *ip)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the next Unicode character in a UTF-32 sequence. <a href="#a1f8bc7169caccfa444e75274b55e6721"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#a0e86da0f08579bd9bfeb437f5fab15fe">set_linebreaks</a> (const void *s, size_t len, const char *lang, char *brks, <a class="el" href="linebreakdef_8h.html#ad76de249e1f8334f318f9ee97ccc77c3">get_next_char_t</a> get_next_char)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the line breaking information for a generic input string. <a href="#a0e86da0f08579bd9bfeb437f5fab15fe"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#ab426e9cf68117faf583a0ed54742cb28">set_linebreaks_utf8</a> (const <a class="el" href="linebreak_8h.html#a6103b2105588f239c593e779e605038a">utf8_t</a> *s, size_t len, const char *lang, char *brks)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the line breaking information for a UTF-8 input string. <a href="#ab426e9cf68117faf583a0ed54742cb28"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#a1d56bce2d32cd986052172638cec43c8">set_linebreaks_utf16</a> (const <a class="el" href="linebreak_8h.html#a4dce96cad338d9281612277b2d80950c">utf16_t</a> *s, size_t len, const char *lang, char *brks)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the line breaking information for a UTF-16 input string. <a href="#a1d56bce2d32cd986052172638cec43c8"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#a9fdce33b4ded9d586888c16228ae9e1f">set_linebreaks_utf32</a> (const <a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> *s, size_t len, const char *lang, char *brks)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the line breaking information for a UTF-32 input string. <a href="#a9fdce33b4ded9d586888c16228ae9e1f"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#a5761f60559b5ddb61bb095f00c7deb5c">is_line_breakable</a> (<a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> char1, <a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> char2, const char *lang)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Tells whether a line break can occur between two Unicode characters. <a href="#a5761f60559b5ddb61bb095f00c7deb5c"></a><br/></td></tr>
|
|
<tr><td colspan="2"><h2>Variables</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">const int </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#a0ac90a75aa79415fe87e66b95d8fd09b">linebreak_version</a> = LINEBREAK_VERSION</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Version number of the library. <a href="#a0ac90a75aa79415fe87e66b95d8fd09b"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static enum <a class="el" href="linebreak_8c.html#a440c1a7abb9df5e3fc1d27b9a39e3a8d">BreakAction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#ae334fc5c93e9d07c1f6731774cdc07d4">baTable</a> [LBP_JT][LBP_JT]</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Break action pair table. <a href="#ae334fc5c93e9d07c1f6731774cdc07d4"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static struct <br class="typebreak"/>
|
|
<a class="el" href="structLineBreakPropertiesIndex.html">LineBreakPropertiesIndex</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#a5f6f6df49c934134e8fb043ce6230931">lb_prop_index</a> [LINEBREAK_INDEX_SIZE]</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Second-level index to the line breaking properties. <a href="#a5f6f6df49c934134e8fb043ce6230931"></a><br/></td></tr>
|
|
</table>
|
|
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
|
<p>Implementation of the line breaking algorithm as described in Unicode Standard Annex 14. </p>
|
|
<dl class="version"><dt><b>Version:</b></dt><dd>1.95, 2009/11/29 </dd></dl>
|
|
<dl class="author"><dt><b>Author:</b></dt><dd>Wu Yongwei </dd></dl>
|
|
<hr/><h2>Define Documentation</h2>
|
|
<a class="anchor" id="a0ba826ea7bf9cd9038b146bb3572dbf0"></a><!-- doxytag: member="linebreak.c::LINEBREAK_INDEX_SIZE" ref="a0ba826ea7bf9cd9038b146bb3572dbf0" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define LINEBREAK_INDEX_SIZE 40</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Size of the second-level index to the line breaking properties. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/><h2>Enumeration Type Documentation</h2>
|
|
<a class="anchor" id="a440c1a7abb9df5e3fc1d27b9a39e3a8d"></a><!-- doxytag: member="linebreak.c::BreakAction" ref="a440c1a7abb9df5e3fc1d27b9a39e3a8d" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">enum <a class="el" href="linebreak_8c.html#a440c1a7abb9df5e3fc1d27b9a39e3a8d">BreakAction</a></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Enumeration of break actions. </p>
|
|
<p>They are used in the break action pair table below. </p>
|
|
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"><em><a class="anchor" id="a440c1a7abb9df5e3fc1d27b9a39e3a8da570708fb66d60c437dc3e8c1c784eef6"></a><!-- doxytag: member="DIRECT_BRK" ref="a440c1a7abb9df5e3fc1d27b9a39e3a8da570708fb66d60c437dc3e8c1c784eef6" args="" -->DIRECT_BRK</em> </td><td>
|
|
<p>Direct break opportunity. </p>
|
|
</td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" id="a440c1a7abb9df5e3fc1d27b9a39e3a8da246deb66413ac197d95680d31d4d5436"></a><!-- doxytag: member="INDIRECT_BRK" ref="a440c1a7abb9df5e3fc1d27b9a39e3a8da246deb66413ac197d95680d31d4d5436" args="" -->INDIRECT_BRK</em> </td><td>
|
|
<p>Indirect break opportunity. </p>
|
|
</td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" id="a440c1a7abb9df5e3fc1d27b9a39e3a8da3e854663bba91b604d4a5f633b62c74a"></a><!-- doxytag: member="CM_INDIRECT_BRK" ref="a440c1a7abb9df5e3fc1d27b9a39e3a8da3e854663bba91b604d4a5f633b62c74a" args="" -->CM_INDIRECT_BRK</em> </td><td>
|
|
<p>Indirect break opportunity for combining marks. </p>
|
|
</td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" id="a440c1a7abb9df5e3fc1d27b9a39e3a8da9ae64fb627a84203f331f718eaf942c8"></a><!-- doxytag: member="CM_PROHIBITED_BRK" ref="a440c1a7abb9df5e3fc1d27b9a39e3a8da9ae64fb627a84203f331f718eaf942c8" args="" -->CM_PROHIBITED_BRK</em> </td><td>
|
|
<p>Prohibited break for combining marks. </p>
|
|
</td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" id="a440c1a7abb9df5e3fc1d27b9a39e3a8dac31d10dc16c2e583ceb6c7e198fc9799"></a><!-- doxytag: member="PROHIBITED_BRK" ref="a440c1a7abb9df5e3fc1d27b9a39e3a8dac31d10dc16c2e583ceb6c7e198fc9799" args="" -->PROHIBITED_BRK</em> </td><td>
|
|
<p>Prohibited break. </p>
|
|
</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/><h2>Function Documentation</h2>
|
|
<a class="anchor" id="a4eb765d3c50b5be0f694f9dd875bf5bb"></a><!-- doxytag: member="linebreak.c::get_char_lb_class" ref="a4eb765d3c50b5be0f694f9dd875bf5bb" args="(utf32_t ch, struct LineBreakProperties *lbp)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static enum <a class="el" href="linebreakdef_8h.html#a884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> get_char_lb_class </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> </td>
|
|
<td class="paramname"> <em>ch</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">struct <a class="el" href="structLineBreakProperties.html">LineBreakProperties</a> * </td>
|
|
<td class="paramname"> <em>lbp</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td><code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Gets the line breaking class of a character from a line breaking properties array. </p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>ch</em> </td><td>character to check </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>lbp</em> </td><td>pointer to the line breaking properties array </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>the line breaking class if found; <code>LBP_XX</code> otherwise </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aa8be95ab8e6ee731e55279772b5aec91"></a><!-- doxytag: member="linebreak.c::get_char_lb_class_default" ref="aa8be95ab8e6ee731e55279772b5aec91" args="(utf32_t ch)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static enum <a class="el" href="linebreakdef_8h.html#a884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> get_char_lb_class_default </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> </td>
|
|
<td class="paramname"> <em>ch</em></td>
|
|
<td> ) </td>
|
|
<td><code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Gets the line breaking class of a character from the default line breaking properties array. </p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>ch</em> </td><td>character to check </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>the line breaking class if found; <code>LBP_XX</code> otherwise </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a41ec5a32a31d007d60ea57caa38a2f3e"></a><!-- doxytag: member="linebreak.c::get_char_lb_class_lang" ref="a41ec5a32a31d007d60ea57caa38a2f3e" args="(utf32_t ch, struct LineBreakProperties *lbpLang)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static enum <a class="el" href="linebreakdef_8h.html#a884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> get_char_lb_class_lang </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> </td>
|
|
<td class="paramname"> <em>ch</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">struct <a class="el" href="structLineBreakProperties.html">LineBreakProperties</a> * </td>
|
|
<td class="paramname"> <em>lbpLang</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td><code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Gets the line breaking class of a character for a specific language. </p>
|
|
<p>This function will check the language-specific data first, and then the default data if there is no language-specific property available for the character.</p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>ch</em> </td><td>character to check </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>lbpLang</em> </td><td>pointer to the language-specific line breaking properties array </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>the line breaking class if found; <code>LBP_XX</code> otherwise </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aec14ede6c9c839852210a729274c7fbc"></a><!-- doxytag: member="linebreak.c::get_lb_prop_lang" ref="aec14ede6c9c839852210a729274c7fbc" args="(const char *lang)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static struct <a class="el" href="structLineBreakProperties.html">LineBreakProperties</a>* get_lb_prop_lang </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"> <em>lang</em></td>
|
|
<td> ) </td>
|
|
<td><code> [static, read]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Gets the language-specific line breaking properties. </p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>lang</em> </td><td>language of the text </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to the language-specific line breaking properties array if found; <code>NULL</code> otherwise </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a57c2b88b7e1277cbba23cfffbc782c4f"></a><!-- doxytag: member="linebreak.c::init_linebreak" ref="a57c2b88b7e1277cbba23cfffbc782c4f" args="(void)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void init_linebreak </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Initializes the second-level index to the line breaking properties. </p>
|
|
<p>If it is not called, the performance of <a class="el" href="linebreak_8c.html#a41ec5a32a31d007d60ea57caa38a2f3e" title="Gets the line breaking class of a character for a specific language.">get_char_lb_class_lang</a> (and thus the main functionality) can be pretty bad, especially for big code points like those of Chinese. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a5761f60559b5ddb61bb095f00c7deb5c"></a><!-- doxytag: member="linebreak.c::is_line_breakable" ref="a5761f60559b5ddb61bb095f00c7deb5c" args="(utf32_t char1, utf32_t char2, const char *lang)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int is_line_breakable </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> </td>
|
|
<td class="paramname"> <em>char1</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> </td>
|
|
<td class="paramname"> <em>char2</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"> <em>lang</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Tells whether a line break can occur between two Unicode characters. </p>
|
|
<p>This is a wrapper function to expose a simple interface. Generally speaking, it is better to use <a class="el" href="linebreak_8h.html#a9fdce33b4ded9d586888c16228ae9e1f" title="Sets the line breaking information for a UTF-32 input string.">set_linebreaks_utf32</a> instead, since complicated cases involving combining marks, spaces, etc. cannot be correctly processed.</p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>char1</em> </td><td>the first Unicode character </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>char2</em> </td><td>the second Unicode character </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>lang</em> </td><td>language of the input </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>one of <a class="el" href="linebreak_8h.html#a367d64258fd90864a467687cd1736b77" title="Break is mandatory.">LINEBREAK_MUSTBREAK</a>, <a class="el" href="linebreak_8h.html#a229f34b0b72ccb2e53d0936a1e61a363" title="Break is allowed.">LINEBREAK_ALLOWBREAK</a>, <a class="el" href="linebreak_8h.html#add176a107633817050bedf6eb4f491cc" title="No break is possible.">LINEBREAK_NOBREAK</a>, or <a class="el" href="linebreak_8h.html#a5adf3d4831b89cb3e40e9bd31a73a39d" title="A UTF-8/16 sequence is unfinished.">LINEBREAK_INSIDEACHAR</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aa1664feb525e6bf1efbe8566547708be"></a><!-- doxytag: member="linebreak.c::lb_get_next_char_utf16" ref="aa1664feb525e6bf1efbe8566547708be" args="(const utf16_t *s, size_t len, size_t *ip)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> lb_get_next_char_utf16 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="linebreak_8h.html#a4dce96cad338d9281612277b2d80950c">utf16_t</a> * </td>
|
|
<td class="paramname"> <em>s</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>len</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t * </td>
|
|
<td class="paramname"> <em>ip</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Gets the next Unicode character in a UTF-16 sequence. </p>
|
|
<p>The index will be advanced to the next complete character, unless the end of string is reached in the middle of a UTF-16 surrogate pair.</p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>s</em> </td><td>input UTF-16 string </td></tr>
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>len</em> </td><td>length of the string in words </td></tr>
|
|
<tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>ip</em> </td><td>pointer to the index </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>the Unicode character beginning at the index; or <a class="el" href="linebreakdef_8h.html#aadbbc7b02d94a4c18646813ac8d7dec1" title="Constant value to mark the end of string.">EOS</a> if end of input is encountered </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a1f8bc7169caccfa444e75274b55e6721"></a><!-- doxytag: member="linebreak.c::lb_get_next_char_utf32" ref="a1f8bc7169caccfa444e75274b55e6721" args="(const utf32_t *s, size_t len, size_t *ip)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> lb_get_next_char_utf32 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> * </td>
|
|
<td class="paramname"> <em>s</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>len</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t * </td>
|
|
<td class="paramname"> <em>ip</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Gets the next Unicode character in a UTF-32 sequence. </p>
|
|
<p>The index will be advanced to the next character.</p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>s</em> </td><td>input UTF-32 string </td></tr>
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>len</em> </td><td>length of the string in dwords </td></tr>
|
|
<tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>ip</em> </td><td>pointer to the index </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>the Unicode character beginning at the index; or <a class="el" href="linebreakdef_8h.html#aadbbc7b02d94a4c18646813ac8d7dec1" title="Constant value to mark the end of string.">EOS</a> if end of input is encountered </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a5ffc31765568becd8b9eb08a3916ab4b"></a><!-- doxytag: member="linebreak.c::lb_get_next_char_utf8" ref="a5ffc31765568becd8b9eb08a3916ab4b" args="(const utf8_t *s, size_t len, size_t *ip)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> lb_get_next_char_utf8 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="linebreak_8h.html#a6103b2105588f239c593e779e605038a">utf8_t</a> * </td>
|
|
<td class="paramname"> <em>s</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>len</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t * </td>
|
|
<td class="paramname"> <em>ip</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Gets the next Unicode character in a UTF-8 sequence. </p>
|
|
<p>The index will be advanced to the next complete character, unless the end of string is reached in the middle of a UTF-8 sequence.</p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>s</em> </td><td>input UTF-8 string </td></tr>
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>len</em> </td><td>length of the string in bytes </td></tr>
|
|
<tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>ip</em> </td><td>pointer to the index </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>the Unicode character beginning at the index; or <a class="el" href="linebreakdef_8h.html#aadbbc7b02d94a4c18646813ac8d7dec1" title="Constant value to mark the end of string.">EOS</a> if end of input is encountered </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aa42b073302ff3325b087b61c78bf4841"></a><!-- doxytag: member="linebreak.c::resolve_lb_class" ref="aa42b073302ff3325b087b61c78bf4841" args="(enum LineBreakClass lbc, const char *lang)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static enum <a class="el" href="linebreakdef_8h.html#a884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> resolve_lb_class </td>
|
|
<td>(</td>
|
|
<td class="paramtype">enum <a class="el" href="linebreakdef_8h.html#a884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> </td>
|
|
<td class="paramname"> <em>lbc</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"> <em>lang</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td><code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Resolves the line breaking class for certain ambiguous or complicated characters. </p>
|
|
<p>They are treated in a simplistic way in this implementation.</p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>lbc</em> </td><td>line breaking class to resolve </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>lang</em> </td><td>language of the text </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>the resolved line breaking class </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a0e86da0f08579bd9bfeb437f5fab15fe"></a><!-- doxytag: member="linebreak.c::set_linebreaks" ref="a0e86da0f08579bd9bfeb437f5fab15fe" args="(const void *s, size_t len, const char *lang, char *brks, get_next_char_t get_next_char)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void set_linebreaks </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const void * </td>
|
|
<td class="paramname"> <em>s</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>len</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"> <em>lang</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">char * </td>
|
|
<td class="paramname"> <em>brks</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="linebreakdef_8h.html#ad76de249e1f8334f318f9ee97ccc77c3">get_next_char_t</a> </td>
|
|
<td class="paramname"> <em>get_next_char</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Sets the line breaking information for a generic input string. </p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>s</em> </td><td>input string </td></tr>
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>len</em> </td><td>length of the input </td></tr>
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>lang</em> </td><td>language of the input </td></tr>
|
|
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>brks</em> </td><td>pointer to the output breaking data, containing <a class="el" href="linebreak_8h.html#a367d64258fd90864a467687cd1736b77" title="Break is mandatory.">LINEBREAK_MUSTBREAK</a>, <a class="el" href="linebreak_8h.html#a229f34b0b72ccb2e53d0936a1e61a363" title="Break is allowed.">LINEBREAK_ALLOWBREAK</a>, <a class="el" href="linebreak_8h.html#add176a107633817050bedf6eb4f491cc" title="No break is possible.">LINEBREAK_NOBREAK</a>, or <a class="el" href="linebreak_8h.html#a5adf3d4831b89cb3e40e9bd31a73a39d" title="A UTF-8/16 sequence is unfinished.">LINEBREAK_INSIDEACHAR</a> </td></tr>
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>get_next_char</em> </td><td>function to get the next UTF-32 character </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a1d56bce2d32cd986052172638cec43c8"></a><!-- doxytag: member="linebreak.c::set_linebreaks_utf16" ref="a1d56bce2d32cd986052172638cec43c8" args="(const utf16_t *s, size_t len, const char *lang, char *brks)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void set_linebreaks_utf16 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="linebreak_8h.html#a4dce96cad338d9281612277b2d80950c">utf16_t</a> * </td>
|
|
<td class="paramname"> <em>s</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>len</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"> <em>lang</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">char * </td>
|
|
<td class="paramname"> <em>brks</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Sets the line breaking information for a UTF-16 input string. </p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>s</em> </td><td>input UTF-16 string </td></tr>
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>len</em> </td><td>length of the input </td></tr>
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>lang</em> </td><td>language of the input </td></tr>
|
|
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>brks</em> </td><td>pointer to the output breaking data, containing <a class="el" href="linebreak_8h.html#a367d64258fd90864a467687cd1736b77" title="Break is mandatory.">LINEBREAK_MUSTBREAK</a>, <a class="el" href="linebreak_8h.html#a229f34b0b72ccb2e53d0936a1e61a363" title="Break is allowed.">LINEBREAK_ALLOWBREAK</a>, <a class="el" href="linebreak_8h.html#add176a107633817050bedf6eb4f491cc" title="No break is possible.">LINEBREAK_NOBREAK</a>, or <a class="el" href="linebreak_8h.html#a5adf3d4831b89cb3e40e9bd31a73a39d" title="A UTF-8/16 sequence is unfinished.">LINEBREAK_INSIDEACHAR</a> </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a9fdce33b4ded9d586888c16228ae9e1f"></a><!-- doxytag: member="linebreak.c::set_linebreaks_utf32" ref="a9fdce33b4ded9d586888c16228ae9e1f" args="(const utf32_t *s, size_t len, const char *lang, char *brks)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void set_linebreaks_utf32 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="linebreak_8h.html#a4f775bae0642c213be2c526018283c25">utf32_t</a> * </td>
|
|
<td class="paramname"> <em>s</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>len</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"> <em>lang</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">char * </td>
|
|
<td class="paramname"> <em>brks</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Sets the line breaking information for a UTF-32 input string. </p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>s</em> </td><td>input UTF-32 string </td></tr>
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>len</em> </td><td>length of the input </td></tr>
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>lang</em> </td><td>language of the input </td></tr>
|
|
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>brks</em> </td><td>pointer to the output breaking data, containing <a class="el" href="linebreak_8h.html#a367d64258fd90864a467687cd1736b77" title="Break is mandatory.">LINEBREAK_MUSTBREAK</a>, <a class="el" href="linebreak_8h.html#a229f34b0b72ccb2e53d0936a1e61a363" title="Break is allowed.">LINEBREAK_ALLOWBREAK</a>, <a class="el" href="linebreak_8h.html#add176a107633817050bedf6eb4f491cc" title="No break is possible.">LINEBREAK_NOBREAK</a>, or <a class="el" href="linebreak_8h.html#a5adf3d4831b89cb3e40e9bd31a73a39d" title="A UTF-8/16 sequence is unfinished.">LINEBREAK_INSIDEACHAR</a> </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ab426e9cf68117faf583a0ed54742cb28"></a><!-- doxytag: member="linebreak.c::set_linebreaks_utf8" ref="ab426e9cf68117faf583a0ed54742cb28" args="(const utf8_t *s, size_t len, const char *lang, char *brks)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void set_linebreaks_utf8 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="linebreak_8h.html#a6103b2105588f239c593e779e605038a">utf8_t</a> * </td>
|
|
<td class="paramname"> <em>s</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>len</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"> <em>lang</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">char * </td>
|
|
<td class="paramname"> <em>brks</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Sets the line breaking information for a UTF-8 input string. </p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>s</em> </td><td>input UTF-8 string </td></tr>
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>len</em> </td><td>length of the input </td></tr>
|
|
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>lang</em> </td><td>language of the input </td></tr>
|
|
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>brks</em> </td><td>pointer to the output breaking data, containing <a class="el" href="linebreak_8h.html#a367d64258fd90864a467687cd1736b77" title="Break is mandatory.">LINEBREAK_MUSTBREAK</a>, <a class="el" href="linebreak_8h.html#a229f34b0b72ccb2e53d0936a1e61a363" title="Break is allowed.">LINEBREAK_ALLOWBREAK</a>, <a class="el" href="linebreak_8h.html#add176a107633817050bedf6eb4f491cc" title="No break is possible.">LINEBREAK_NOBREAK</a>, or <a class="el" href="linebreak_8h.html#a5adf3d4831b89cb3e40e9bd31a73a39d" title="A UTF-8/16 sequence is unfinished.">LINEBREAK_INSIDEACHAR</a> </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/><h2>Variable Documentation</h2>
|
|
<a class="anchor" id="ae334fc5c93e9d07c1f6731774cdc07d4"></a><!-- doxytag: member="linebreak.c::baTable" ref="ae334fc5c93e9d07c1f6731774cdc07d4" args="[LBP_JT][LBP_JT]" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">enum <a class="el" href="linebreak_8c.html#a440c1a7abb9df5e3fc1d27b9a39e3a8d">BreakAction</a> <a class="el" href="linebreak_8c.html#ae334fc5c93e9d07c1f6731774cdc07d4">baTable</a>[LBP_JT][LBP_JT]<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Break action pair table. </p>
|
|
<p>This is a direct mapping of Table 2 of Unicode Standard Annex 14, Revision 24. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a5f6f6df49c934134e8fb043ce6230931"></a><!-- doxytag: member="linebreak.c::lb_prop_index" ref="a5f6f6df49c934134e8fb043ce6230931" args="[LINEBREAK_INDEX_SIZE]" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">struct <a class="el" href="structLineBreakPropertiesIndex.html">LineBreakPropertiesIndex</a> <a class="el" href="linebreak_8c.html#a5f6f6df49c934134e8fb043ce6230931">lb_prop_index</a>[LINEBREAK_INDEX_SIZE]<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<b>Initial value:</b><div class="fragment"><pre class="fragment">
|
|
{
|
|
{ 0xFFFFFFFF, <a class="code" href="linebreakdata_8c.html#abbd8c6b6e4e1c8ad2da83f23f81ac29a" title="Default line breaking properties as from the Unicode Web site.">lb_prop_default</a> }
|
|
}
|
|
</pre></div>
|
|
<p>Second-level index to the line breaking properties. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a0ac90a75aa79415fe87e66b95d8fd09b"></a><!-- doxytag: member="linebreak.c::linebreak_version" ref="a0ac90a75aa79415fe87e66b95d8fd09b" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const int <a class="el" href="linebreak_8h.html#a0ac90a75aa79415fe87e66b95d8fd09b">linebreak_version</a> = LINEBREAK_VERSION</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Version number of the library. </p>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Nov 29 17:25:44 2009 for liblinebreak by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
|
|
</body>
|
|
</html>
|