<!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>libthai: thai/thcell.h 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.7.3 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">libthai <span id="projectnumber">0.1.14</span></div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <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 id="navrow2" class="tabs2"> <ul class="tablist"> <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="header"> <div class="summary"> <a href="#nested-classes">Data Structures</a> | <a href="#func-members">Functions</a> </div> <div class="headertitle"> <h1>thai/thcell.h File Reference</h1> </div> </div> <div class="contents"> <p>Thai string cell custering. <a href="#_details">More...</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="nested-classes"></a> Data Structures</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structthcell__t.html">thcell_t</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Thai char cell representation. <a href="structthcell__t.html#_details">More...</a><br/></td></tr> <tr><td colspan="2"><h2><a name="func-members"></a> Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="thcell_8h.html#a45e7e31d1d42b4901c4f2b4fa391cae2">th_init_cell</a> (struct <a class="el" href="structthcell__t.html">thcell_t</a> *cell)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize a Thai cell. <a href="#a45e7e31d1d42b4901c4f2b4fa391cae2"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="thcell_8h.html#abf0f4f32b9fba28c54a3f606032a1762">th_next_cell</a> (const <a class="el" href="thailib_8h.html#a75138f51cef42c2e0d8bc3e6ce691f51">thchar_t</a> *s, size_t len, struct <a class="el" href="structthcell__t.html">thcell_t</a> *cell, int is_decomp_am)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get first cell from string. <a href="#abf0f4f32b9fba28c54a3f606032a1762"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="thcell_8h.html#a07411f42d64d4988c60f935a1bbf6bed">th_prev_cell</a> (const <a class="el" href="thailib_8h.html#a75138f51cef42c2e0d8bc3e6ce691f51">thchar_t</a> *s, size_t pos, struct <a class="el" href="structthcell__t.html">thcell_t</a> *cell, int is_decomp_am)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get previous cell from string. <a href="#a07411f42d64d4988c60f935a1bbf6bed"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="thcell_8h.html#ae768895ab7b5fe369423666ae8bc011d">th_make_cells</a> (const <a class="el" href="thailib_8h.html#a75138f51cef42c2e0d8bc3e6ce691f51">thchar_t</a> *s, size_t len, struct <a class="el" href="structthcell__t.html">thcell_t</a> cells[], size_t *ncells, int is_decomp_am)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Tokenize string into cells. <a href="#ae768895ab7b5fe369423666ae8bc011d"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <div class="textblock"><p>Thai string cell custering. </p> </div><hr/><h2>Function Documentation</h2> <a class="anchor" id="a45e7e31d1d42b4901c4f2b4fa391cae2"></a><!-- doxytag: member="thcell.h::th_init_cell" ref="a45e7e31d1d42b4901c4f2b4fa391cae2" args="(struct thcell_t *cell)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void th_init_cell </td> <td>(</td> <td class="paramtype">struct <a class="el" href="structthcell__t.html">thcell_t</a> * </td> <td class="paramname"><em>cell</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Initialize a Thai cell. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">cell</td><td>: pointer to the cell to initialize</td></tr> </table> </dd> </dl> <p>Initializes values in the Thai cell struct. </p> </div> </div> <a class="anchor" id="ae768895ab7b5fe369423666ae8bc011d"></a><!-- doxytag: member="thcell.h::th_make_cells" ref="ae768895ab7b5fe369423666ae8bc011d" args="(const thchar_t *s, size_t len, struct thcell_t cells[], size_t *ncells, int is_decomp_am)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t th_make_cells </td> <td>(</td> <td class="paramtype">const <a class="el" href="thailib_8h.html#a75138f51cef42c2e0d8bc3e6ce691f51">thchar_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">struct <a class="el" href="structthcell__t.html">thcell_t</a> </td> <td class="paramname"><em>cells</em>[], </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t * </td> <td class="paramname"><em>ncells</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>is_decomp_am</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Tokenize string into cells. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">s</td><td>: the string </td></tr> <tr><td class="paramname">len</td><td>: the length of string </td></tr> <tr><td class="paramname">cells</td><td>: the array of output cells buffer </td></tr> <tr><td class="paramname">ncells</td><td>: the address of integer storing the number of cells provided by the buffer, and to keep the number of resulting cells on return </td></tr> <tr><td class="paramname">is_decomp_am</td><td>: whether SARA AM is to be decomposed into NIKHANIT and SARA AA and to be in separate cells</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>total characters consumed</dd></dl> <p>Tokenizes the string bounded by <em>s</em> and <em>len</em> into cells, and stores at most <em>*ncells</em> resulting cells in the <em>cells</em> buffer. On return, <em>*ncells</em> is also set to the total cells stored in <em>cells</em>[]. </p> </div> </div> <a class="anchor" id="abf0f4f32b9fba28c54a3f606032a1762"></a><!-- doxytag: member="thcell.h::th_next_cell" ref="abf0f4f32b9fba28c54a3f606032a1762" args="(const thchar_t *s, size_t len, struct thcell_t *cell, int is_decomp_am)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t th_next_cell </td> <td>(</td> <td class="paramtype">const <a class="el" href="thailib_8h.html#a75138f51cef42c2e0d8bc3e6ce691f51">thchar_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">struct <a class="el" href="structthcell__t.html">thcell_t</a> * </td> <td class="paramname"><em>cell</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>is_decomp_am</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Get first cell from string. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">s</td><td>: the string </td></tr> <tr><td class="paramname">len</td><td>: the length of string </td></tr> <tr><td class="paramname">cell</td><td>: the output buffer </td></tr> <tr><td class="paramname">is_decomp_am</td><td>: whether SARA AM is to be decomposed into NIKHANIT and SARA AA and to be in separate cells</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>total chars consumed by the cell</dd></dl> <p>Gets first cell from the string bounded by <em>s</em> and <em>len</em>, and, if <em>cell</em> is not null, stores the cell data in it. </p> </div> </div> <a class="anchor" id="a07411f42d64d4988c60f935a1bbf6bed"></a><!-- doxytag: member="thcell.h::th_prev_cell" ref="a07411f42d64d4988c60f935a1bbf6bed" args="(const thchar_t *s, size_t pos, struct thcell_t *cell, int is_decomp_am)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t th_prev_cell </td> <td>(</td> <td class="paramtype">const <a class="el" href="thailib_8h.html#a75138f51cef42c2e0d8bc3e6ce691f51">thchar_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>pos</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">struct <a class="el" href="structthcell__t.html">thcell_t</a> * </td> <td class="paramname"><em>cell</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>is_decomp_am</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Get previous cell from string. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">s</td><td>: the string </td></tr> <tr><td class="paramname">pos</td><td>: the position in string to get cell previous to </td></tr> <tr><td class="paramname">cell</td><td>: the output buffer </td></tr> <tr><td class="paramname">is_decomp_am</td><td>: whether SARA AM is to be decomposed into NIKHANIT and SARA AA and to be in separate cells</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>total chars consumed by the cell</dd></dl> <p>Gets last cell from the string bounded by <em>s</em> and <em>pos</em>, and if <em>cell</em> is not null, stores the cell data in it. </p> </div> </div> </div> <hr size="1"><address style="text-align: right;"><small> Generated for libthai by <a href="http://www.doxygen.org/ index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.7.3</small></address> </body> </html>