<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;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.5.8 --> <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>thai/thcell.h File Reference</h1>Thai string cell custering. <a href="#_details">More...</a> <p> <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="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"><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="thcell_8h.html#45e7e31d1d42b4901c4f2b4fa391cae2">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="#45e7e31d1d42b4901c4f2b4fa391cae2"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="thcell_8h.html#bf0f4f32b9fba28c54a3f606032a1762">th_next_cell</a> (const <a class="el" href="thailib_8h.html#75138f51cef42c2e0d8bc3e6ce691f51">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="#bf0f4f32b9fba28c54a3f606032a1762"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="thcell_8h.html#07411f42d64d4988c60f935a1bbf6bed">th_prev_cell</a> (const <a class="el" href="thailib_8h.html#75138f51cef42c2e0d8bc3e6ce691f51">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="#07411f42d64d4988c60f935a1bbf6bed"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="thcell_8h.html#e768895ab7b5fe369423666ae8bc011d">th_make_cells</a> (const <a class="el" href="thailib_8h.html#75138f51cef42c2e0d8bc3e6ce691f51">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="#e768895ab7b5fe369423666ae8bc011d"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Thai string cell custering. <p> <hr><h2>Function Documentation</h2> <a class="anchor" name="45e7e31d1d42b4901c4f2b4fa391cae2"></a><!-- doxytag: member="thcell.h::th_init_cell" ref="45e7e31d1d42b4901c4f2b4fa391cae2" 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 compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>cell</em> </td><td>: pointer to the cell to initialize</td></tr> </table> </dl> Initializes values in the Thai cell struct. </div> </div><p> <a class="anchor" name="e768895ab7b5fe369423666ae8bc011d"></a><!-- doxytag: member="thcell.h::th_make_cells" ref="e768895ab7b5fe369423666ae8bc011d" 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#75138f51cef42c2e0d8bc3e6ce691f51">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><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Tokenize string into cells. <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>s</em> </td><td>: the string </td></tr> <tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>: the length of string </td></tr> <tr><td valign="top"></td><td valign="top"><em>cells</em> </td><td>: the array of output cells buffer </td></tr> <tr><td valign="top"></td><td valign="top"><em>ncells</em> </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 valign="top"></td><td valign="top"><em>is_decomp_am</em> </td><td>: whether SARA AM is to be decomposed into NIKHANIT and SARA AA and to be in separate cells</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>total characters consumed</dd></dl> 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>[]. </div> </div><p> <a class="anchor" name="bf0f4f32b9fba28c54a3f606032a1762"></a><!-- doxytag: member="thcell.h::th_next_cell" ref="bf0f4f32b9fba28c54a3f606032a1762" 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#75138f51cef42c2e0d8bc3e6ce691f51">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><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Get first cell from string. <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>s</em> </td><td>: the string </td></tr> <tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>: the length of string </td></tr> <tr><td valign="top"></td><td valign="top"><em>cell</em> </td><td>: the output buffer </td></tr> <tr><td valign="top"></td><td valign="top"><em>is_decomp_am</em> </td><td>: whether SARA AM is to be decomposed into NIKHANIT and SARA AA and to be in separate cells</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>total chars consumed by the cell</dd></dl> 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. </div> </div><p> <a class="anchor" name="07411f42d64d4988c60f935a1bbf6bed"></a><!-- doxytag: member="thcell.h::th_prev_cell" ref="07411f42d64d4988c60f935a1bbf6bed" 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#75138f51cef42c2e0d8bc3e6ce691f51">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><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Get previous cell from string. <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>s</em> </td><td>: the string </td></tr> <tr><td valign="top"></td><td valign="top"><em>pos</em> </td><td>: the position in string to get cell previous to </td></tr> <tr><td valign="top"></td><td valign="top"><em>cell</em> </td><td>: the output buffer </td></tr> <tr><td valign="top"></td><td valign="top"><em>is_decomp_am</em> </td><td>: whether SARA AM is to be decomposed into NIKHANIT and SARA AA and to be in separate cells</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>total chars consumed by the cell</dd></dl> 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. </div> </div><p> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 16 10:00:17 2010 for libthai by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> </body> </html>