mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-06 03:50:19 +02:00

added liblinebreak sources and a stub for java liblinebreak bindings git-svn-id: https://only.mawhrin.net/repos/FBReaderJ/trunk@1002 6a642e6f-84f6-412e-ac94-c4a38d5a04b0
800 lines
47 KiB
HTML
800 lines
47 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;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.5.9 -->
|
|
<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="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>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></td></tr>
|
|
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap 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"><br><h2>Defines</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#0ba826ea7bf9cd9038b146bb3572dbf0">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="#0ba826ea7bf9cd9038b146bb3572dbf0"></a><br></td></tr>
|
|
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#440c1a7abb9df5e3fc1d27b9a39e3a8d">BreakAction</a> { <br>
|
|
<a class="el" href="linebreak_8c.html#440c1a7abb9df5e3fc1d27b9a39e3a8d570708fb66d60c437dc3e8c1c784eef6">DIRECT_BRK</a>,
|
|
<a class="el" href="linebreak_8c.html#440c1a7abb9df5e3fc1d27b9a39e3a8d246deb66413ac197d95680d31d4d5436">INDIRECT_BRK</a>,
|
|
<a class="el" href="linebreak_8c.html#440c1a7abb9df5e3fc1d27b9a39e3a8d3e854663bba91b604d4a5f633b62c74a">CM_INDIRECT_BRK</a>,
|
|
<a class="el" href="linebreak_8c.html#440c1a7abb9df5e3fc1d27b9a39e3a8d9ae64fb627a84203f331f718eaf942c8">CM_PROHIBITED_BRK</a>,
|
|
<br>
|
|
<a class="el" href="linebreak_8c.html#440c1a7abb9df5e3fc1d27b9a39e3a8dc31d10dc16c2e583ceb6c7e198fc9799">PROHIBITED_BRK</a>
|
|
<br>
|
|
}</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enumeration of break actions. <a href="linebreak_8c.html#440c1a7abb9df5e3fc1d27b9a39e3a8d">More...</a><br></td></tr>
|
|
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#57c2b88b7e1277cbba23cfffbc782c4f">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="#57c2b88b7e1277cbba23cfffbc782c4f"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap 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#ec14ede6c9c839852210a729274c7fbc">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="#ec14ede6c9c839852210a729274c7fbc"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">static enum <a class="el" href="linebreakdef_8h.html#884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#4eb765d3c50b5be0f694f9dd875bf5bb">get_char_lb_class</a> (<a class="el" href="linebreak_8h.html#4f775bae0642c213be2c526018283c25">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="#4eb765d3c50b5be0f694f9dd875bf5bb"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">static enum <a class="el" href="linebreakdef_8h.html#884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#a8be95ab8e6ee731e55279772b5aec91">get_char_lb_class_default</a> (<a class="el" href="linebreak_8h.html#4f775bae0642c213be2c526018283c25">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="#a8be95ab8e6ee731e55279772b5aec91"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">static enum <a class="el" href="linebreakdef_8h.html#884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#41ec5a32a31d007d60ea57caa38a2f3e">get_char_lb_class_lang</a> (<a class="el" href="linebreak_8h.html#4f775bae0642c213be2c526018283c25">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="#41ec5a32a31d007d60ea57caa38a2f3e"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">static enum <a class="el" href="linebreakdef_8h.html#884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#a42b073302ff3325b087b61c78bf4841">resolve_lb_class</a> (enum <a class="el" href="linebreakdef_8h.html#884b6565d87a81bbf549980bbdd04070">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="#a42b073302ff3325b087b61c78bf4841"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="linebreak_8h.html#4f775bae0642c213be2c526018283c25">utf32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#d6e67ab4880e304d6ac730d545027a7f">get_next_char_utf8</a> (const <a class="el" href="linebreak_8h.html#6103b2105588f239c593e779e605038a">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="#d6e67ab4880e304d6ac730d545027a7f"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="linebreak_8h.html#4f775bae0642c213be2c526018283c25">utf32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#1358bfc18e5c58f3bf86d41da9915964">get_next_char_utf16</a> (const <a class="el" href="linebreak_8h.html#4dce96cad338d9281612277b2d80950c">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="#1358bfc18e5c58f3bf86d41da9915964"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="linebreak_8h.html#4f775bae0642c213be2c526018283c25">utf32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#b436dc6eadd1cfe258159ac671798653">get_next_char_utf32</a> (const <a class="el" href="linebreak_8h.html#4f775bae0642c213be2c526018283c25">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="#b436dc6eadd1cfe258159ac671798653"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#0e86da0f08579bd9bfeb437f5fab15fe">set_linebreaks</a> (const void *s, size_t len, const char *lang, char *brks, <a class="el" href="linebreakdef_8h.html#d76de249e1f8334f318f9ee97ccc77c3">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="#0e86da0f08579bd9bfeb437f5fab15fe"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#b426e9cf68117faf583a0ed54742cb28">set_linebreaks_utf8</a> (const <a class="el" href="linebreak_8h.html#6103b2105588f239c593e779e605038a">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="#b426e9cf68117faf583a0ed54742cb28"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#1d56bce2d32cd986052172638cec43c8">set_linebreaks_utf16</a> (const <a class="el" href="linebreak_8h.html#4dce96cad338d9281612277b2d80950c">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="#1d56bce2d32cd986052172638cec43c8"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#9fdce33b4ded9d586888c16228ae9e1f">set_linebreaks_utf32</a> (const <a class="el" href="linebreak_8h.html#4f775bae0642c213be2c526018283c25">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="#9fdce33b4ded9d586888c16228ae9e1f"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#22abef1024a6392cf2bd2281fc1bd151">is_breakable</a> (<a class="el" href="linebreak_8h.html#4f775bae0642c213be2c526018283c25">utf32_t</a> char1, <a class="el" href="linebreak_8h.html#4f775bae0642c213be2c526018283c25">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="#22abef1024a6392cf2bd2281fc1bd151"></a><br></td></tr>
|
|
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">static enum <a class="el" href="linebreak_8c.html#440c1a7abb9df5e3fc1d27b9a39e3a8d">BreakAction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="linebreak_8c.html#e334fc5c93e9d07c1f6731774cdc07d4">baTable</a> [LBP_JT][LBP_JT]</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Break action pair table. <a href="#e334fc5c93e9d07c1f6731774cdc07d4"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap 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#5f6f6df49c934134e8fb043ce6230931">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="#5f6f6df49c934134e8fb043ce6230931"></a><br></td></tr>
|
|
</table>
|
|
<hr><h2>Detailed Description</h2>
|
|
Implementation of the line breaking algorithm as described in Unicode Standard Annex 14.
|
|
<p>
|
|
<dl class="version" compact><dt><b>Version:</b></dt><dd>1.2, 2009/04/29 </dd></dl>
|
|
<dl class="author" compact><dt><b>Author:</b></dt><dd>Wu Yongwei </dd></dl>
|
|
<hr><h2>Define Documentation</h2>
|
|
<a class="anchor" name="0ba826ea7bf9cd9038b146bb3572dbf0"></a><!-- doxytag: member="linebreak.c::LINEBREAK_INDEX_SIZE" ref="0ba826ea7bf9cd9038b146bb3572dbf0" 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><p>
|
|
<hr><h2>Enumeration Type Documentation</h2>
|
|
<a class="anchor" name="440c1a7abb9df5e3fc1d27b9a39e3a8d"></a><!-- doxytag: member="linebreak.c::BreakAction" ref="440c1a7abb9df5e3fc1d27b9a39e3a8d" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">enum <a class="el" href="linebreak_8c.html#440c1a7abb9df5e3fc1d27b9a39e3a8d">BreakAction</a> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Enumeration of break actions.
|
|
<p>
|
|
They are used in the break action pair table below. <dl compact><dt><b>Enumerator: </b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"><em><a class="anchor" name="440c1a7abb9df5e3fc1d27b9a39e3a8d570708fb66d60c437dc3e8c1c784eef6"></a><!-- doxytag: member="DIRECT_BRK" ref="440c1a7abb9df5e3fc1d27b9a39e3a8d570708fb66d60c437dc3e8c1c784eef6" args="" -->DIRECT_BRK</em> </td><td>
|
|
Direct break opportunity. </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="440c1a7abb9df5e3fc1d27b9a39e3a8d246deb66413ac197d95680d31d4d5436"></a><!-- doxytag: member="INDIRECT_BRK" ref="440c1a7abb9df5e3fc1d27b9a39e3a8d246deb66413ac197d95680d31d4d5436" args="" -->INDIRECT_BRK</em> </td><td>
|
|
Indirect break opportunity. </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="440c1a7abb9df5e3fc1d27b9a39e3a8d3e854663bba91b604d4a5f633b62c74a"></a><!-- doxytag: member="CM_INDIRECT_BRK" ref="440c1a7abb9df5e3fc1d27b9a39e3a8d3e854663bba91b604d4a5f633b62c74a" args="" -->CM_INDIRECT_BRK</em> </td><td>
|
|
Indirect break opportunity for combining marks. </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="440c1a7abb9df5e3fc1d27b9a39e3a8d9ae64fb627a84203f331f718eaf942c8"></a><!-- doxytag: member="CM_PROHIBITED_BRK" ref="440c1a7abb9df5e3fc1d27b9a39e3a8d9ae64fb627a84203f331f718eaf942c8" args="" -->CM_PROHIBITED_BRK</em> </td><td>
|
|
Prohibited break for combining marks. </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="440c1a7abb9df5e3fc1d27b9a39e3a8dc31d10dc16c2e583ceb6c7e198fc9799"></a><!-- doxytag: member="PROHIBITED_BRK" ref="440c1a7abb9df5e3fc1d27b9a39e3a8dc31d10dc16c2e583ceb6c7e198fc9799" args="" -->PROHIBITED_BRK</em> </td><td>
|
|
Prohibited break. </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<hr><h2>Function Documentation</h2>
|
|
<a class="anchor" name="4eb765d3c50b5be0f694f9dd875bf5bb"></a><!-- doxytag: member="linebreak.c::get_char_lb_class" ref="4eb765d3c50b5be0f694f9dd875bf5bb" 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#884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> get_char_lb_class </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="linebreak_8h.html#4f775bae0642c213be2c526018283c25">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 compact><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>
|
|
</dl>
|
|
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the line breaking class if found; <code>LBP_XX</code> otherwise </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="a8be95ab8e6ee731e55279772b5aec91"></a><!-- doxytag: member="linebreak.c::get_char_lb_class_default" ref="a8be95ab8e6ee731e55279772b5aec91" 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#884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> get_char_lb_class_default </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="linebreak_8h.html#4f775bae0642c213be2c526018283c25">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 compact><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>
|
|
</dl>
|
|
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the line breaking class if found; <code>LBP_XX</code> otherwise </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="41ec5a32a31d007d60ea57caa38a2f3e"></a><!-- doxytag: member="linebreak.c::get_char_lb_class_lang" ref="41ec5a32a31d007d60ea57caa38a2f3e" 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#884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> get_char_lb_class_lang </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="linebreak_8h.html#4f775bae0642c213be2c526018283c25">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>
|
|
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 compact><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>
|
|
</dl>
|
|
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the line breaking class if found; <code>LBP_XX</code> otherwise </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="ec14ede6c9c839852210a729274c7fbc"></a><!-- doxytag: member="linebreak.c::get_lb_prop_lang" ref="ec14ede6c9c839852210a729274c7fbc" 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 compact><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>
|
|
</dl>
|
|
<dl class="return" compact><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><p>
|
|
<a class="anchor" name="1358bfc18e5c58f3bf86d41da9915964"></a><!-- doxytag: member="linebreak.c::get_next_char_utf16" ref="1358bfc18e5c58f3bf86d41da9915964" 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#4f775bae0642c213be2c526018283c25">utf32_t</a> get_next_char_utf16 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="linebreak_8h.html#4dce96cad338d9281612277b2d80950c">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>
|
|
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 compact><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>
|
|
</dl>
|
|
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the Unicode character beginning at the index; or <a class="el" href="linebreakdef_8h.html#adbbc7b02d94a4c18646813ac8d7dec1" title="Constant value to mark the end of string.">EOS</a> if end of input is encountered</dd></dl>
|
|
<dl class="deprecated" compact><dt><b><a class="el" href="deprecated.html#_deprecated000002">Deprecated:</a></b></dt><dd>This function will be prefixed with <code>lb_</code> in the future. </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="b436dc6eadd1cfe258159ac671798653"></a><!-- doxytag: member="linebreak.c::get_next_char_utf32" ref="b436dc6eadd1cfe258159ac671798653" 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#4f775bae0642c213be2c526018283c25">utf32_t</a> get_next_char_utf32 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="linebreak_8h.html#4f775bae0642c213be2c526018283c25">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>
|
|
The index will be advanced to the next character.<p>
|
|
<dl compact><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>
|
|
</dl>
|
|
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the Unicode character beginning at the index; or <a class="el" href="linebreakdef_8h.html#adbbc7b02d94a4c18646813ac8d7dec1" title="Constant value to mark the end of string.">EOS</a> if end of input is encountered</dd></dl>
|
|
<dl class="deprecated" compact><dt><b><a class="el" href="deprecated.html#_deprecated000003">Deprecated:</a></b></dt><dd>This function will be prefixed with <code>lb_</code> in the future. </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="d6e67ab4880e304d6ac730d545027a7f"></a><!-- doxytag: member="linebreak.c::get_next_char_utf8" ref="d6e67ab4880e304d6ac730d545027a7f" 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#4f775bae0642c213be2c526018283c25">utf32_t</a> get_next_char_utf8 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="linebreak_8h.html#6103b2105588f239c593e779e605038a">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>
|
|
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 compact><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>
|
|
</dl>
|
|
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the Unicode character beginning at the index; or <a class="el" href="linebreakdef_8h.html#adbbc7b02d94a4c18646813ac8d7dec1" title="Constant value to mark the end of string.">EOS</a> if end of input is encountered</dd></dl>
|
|
<dl class="deprecated" compact><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>This function will be prefixed with <code>lb_</code> in the future. </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="57c2b88b7e1277cbba23cfffbc782c4f"></a><!-- doxytag: member="linebreak.c::init_linebreak" ref="57c2b88b7e1277cbba23cfffbc782c4f" 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>
|
|
If it is not called, the performance of <a class="el" href="linebreak_8c.html#41ec5a32a31d007d60ea57caa38a2f3e" 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.
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="22abef1024a6392cf2bd2281fc1bd151"></a><!-- doxytag: member="linebreak.c::is_breakable" ref="22abef1024a6392cf2bd2281fc1bd151" 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_breakable </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="linebreak_8h.html#4f775bae0642c213be2c526018283c25">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#4f775bae0642c213be2c526018283c25">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>
|
|
This is a wrapper function to expose a simple interface. Generally speaking, it is better to use <a class="el" href="linebreak_8h.html#9fdce33b4ded9d586888c16228ae9e1f" 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 compact><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>
|
|
</dl>
|
|
<dl class="return" compact><dt><b>Returns:</b></dt><dd>one of <a class="el" href="linebreak_8h.html#367d64258fd90864a467687cd1736b77" title="Break is mandatory.">LINEBREAK_MUSTBREAK</a>, <a class="el" href="linebreak_8h.html#229f34b0b72ccb2e53d0936a1e61a363" title="Break is allowed.">LINEBREAK_ALLOWBREAK</a>, <a class="el" href="linebreak_8h.html#dd176a107633817050bedf6eb4f491cc" title="No break is possible.">LINEBREAK_NOBREAK</a>, or <a class="el" href="linebreak_8h.html#5adf3d4831b89cb3e40e9bd31a73a39d" title="A UTF-8/16 sequence is unfinished.">LINEBREAK_INSIDEACHAR</a></dd></dl>
|
|
<dl class="deprecated" compact><dt><b><a class="el" href="deprecated.html#_deprecated000004">Deprecated:</a></b></dt><dd>This function will be renamed to <a class="el" href="linebreak_8h.html#9d54c1b18d4fc526a66ef64d9de9c63a" title="Replacement form for the deprecated function is_breakable.">is_line_breakable</a> in the future. The name is already defined as a macro—please use it. </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="a42b073302ff3325b087b61c78bf4841"></a><!-- doxytag: member="linebreak.c::resolve_lb_class" ref="a42b073302ff3325b087b61c78bf4841" 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#884b6565d87a81bbf549980bbdd04070">LineBreakClass</a> resolve_lb_class </td>
|
|
<td>(</td>
|
|
<td class="paramtype">enum <a class="el" href="linebreakdef_8h.html#884b6565d87a81bbf549980bbdd04070">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>
|
|
They are treated in a simplistic way in this implementation.<p>
|
|
<dl compact><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>
|
|
</dl>
|
|
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the resolved line breaking class </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="0e86da0f08579bd9bfeb437f5fab15fe"></a><!-- doxytag: member="linebreak.c::set_linebreaks" ref="0e86da0f08579bd9bfeb437f5fab15fe" 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#d76de249e1f8334f318f9ee97ccc77c3">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 compact><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#367d64258fd90864a467687cd1736b77" title="Break is mandatory.">LINEBREAK_MUSTBREAK</a>, <a class="el" href="linebreak_8h.html#229f34b0b72ccb2e53d0936a1e61a363" title="Break is allowed.">LINEBREAK_ALLOWBREAK</a>, <a class="el" href="linebreak_8h.html#dd176a107633817050bedf6eb4f491cc" title="No break is possible.">LINEBREAK_NOBREAK</a>, or <a class="el" href="linebreak_8h.html#5adf3d4831b89cb3e40e9bd31a73a39d" 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>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="1d56bce2d32cd986052172638cec43c8"></a><!-- doxytag: member="linebreak.c::set_linebreaks_utf16" ref="1d56bce2d32cd986052172638cec43c8" 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#4dce96cad338d9281612277b2d80950c">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 compact><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#367d64258fd90864a467687cd1736b77" title="Break is mandatory.">LINEBREAK_MUSTBREAK</a>, <a class="el" href="linebreak_8h.html#229f34b0b72ccb2e53d0936a1e61a363" title="Break is allowed.">LINEBREAK_ALLOWBREAK</a>, <a class="el" href="linebreak_8h.html#dd176a107633817050bedf6eb4f491cc" title="No break is possible.">LINEBREAK_NOBREAK</a>, or <a class="el" href="linebreak_8h.html#5adf3d4831b89cb3e40e9bd31a73a39d" title="A UTF-8/16 sequence is unfinished.">LINEBREAK_INSIDEACHAR</a> </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="9fdce33b4ded9d586888c16228ae9e1f"></a><!-- doxytag: member="linebreak.c::set_linebreaks_utf32" ref="9fdce33b4ded9d586888c16228ae9e1f" 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#4f775bae0642c213be2c526018283c25">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 compact><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#367d64258fd90864a467687cd1736b77" title="Break is mandatory.">LINEBREAK_MUSTBREAK</a>, <a class="el" href="linebreak_8h.html#229f34b0b72ccb2e53d0936a1e61a363" title="Break is allowed.">LINEBREAK_ALLOWBREAK</a>, <a class="el" href="linebreak_8h.html#dd176a107633817050bedf6eb4f491cc" title="No break is possible.">LINEBREAK_NOBREAK</a>, or <a class="el" href="linebreak_8h.html#5adf3d4831b89cb3e40e9bd31a73a39d" title="A UTF-8/16 sequence is unfinished.">LINEBREAK_INSIDEACHAR</a> </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="b426e9cf68117faf583a0ed54742cb28"></a><!-- doxytag: member="linebreak.c::set_linebreaks_utf8" ref="b426e9cf68117faf583a0ed54742cb28" 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#6103b2105588f239c593e779e605038a">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 compact><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#367d64258fd90864a467687cd1736b77" title="Break is mandatory.">LINEBREAK_MUSTBREAK</a>, <a class="el" href="linebreak_8h.html#229f34b0b72ccb2e53d0936a1e61a363" title="Break is allowed.">LINEBREAK_ALLOWBREAK</a>, <a class="el" href="linebreak_8h.html#dd176a107633817050bedf6eb4f491cc" title="No break is possible.">LINEBREAK_NOBREAK</a>, or <a class="el" href="linebreak_8h.html#5adf3d4831b89cb3e40e9bd31a73a39d" title="A UTF-8/16 sequence is unfinished.">LINEBREAK_INSIDEACHAR</a> </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<hr><h2>Variable Documentation</h2>
|
|
<a class="anchor" name="e334fc5c93e9d07c1f6731774cdc07d4"></a><!-- doxytag: member="linebreak.c::baTable" ref="e334fc5c93e9d07c1f6731774cdc07d4" 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#440c1a7abb9df5e3fc1d27b9a39e3a8d">BreakAction</a> <a class="el" href="linebreak_8c.html#e334fc5c93e9d07c1f6731774cdc07d4">baTable</a>[LBP_JT][LBP_JT]<code> [static]</code> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Break action pair table.
|
|
<p>
|
|
This is a direct mapping of Table 2 of Unicode Standard Annex 14, Revision 22.
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="5f6f6df49c934134e8fb043ce6230931"></a><!-- doxytag: member="linebreak.c::lb_prop_index" ref="5f6f6df49c934134e8fb043ce6230931" 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#5f6f6df49c934134e8fb043ce6230931">lb_prop_index</a>[LINEBREAK_INDEX_SIZE]<code> [static]</code> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
<b>Initial value:</b><div class="fragment"><pre class="fragment">
|
|
{
|
|
{ 0xFFFFFFFF, <a class="code" href="linebreakdata_8c.html#bbd8c6b6e4e1c8ad2da83f23f81ac29a" title="Default line breaking properties as from the Unicode Web site.">lb_prop_default</a> }
|
|
}
|
|
</pre></div>Second-level index to the line breaking properties.
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
</div>
|
|
<hr size="1"><address style="text-align: right;"><small>Generated on Sun May 3 13:20:57 2009 for liblinebreak by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
|
|
</body>
|
|
</html>
|