<!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>libpst.so.4: libpst/vbuf.h Source File</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="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_b70fe5ddb0cf22452a64074199c6435e.html">libpst</a>
  </div>
</div>
<div class="contents">
<h1>vbuf.h</h1><a href="vbuf_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00002"></a>00002 <span class="preprocessor">#ifndef __PST_VBUF_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span><span class="preprocessor">#define __PST_VBUF_H</span>
<a name="l00004"></a>00004 <span class="preprocessor"></span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &quot;<a class="code" href="common_8h.html">common.h</a>&quot;</span>
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 <span class="comment">// Variable-length buffers</span>
<a name="l00009"></a><a class="code" href="structpst__varbuf.html">00009</a> <span class="keyword">struct </span><a class="code" href="structpst__varbuf.html">pst_varbuf</a> {
<a name="l00010"></a><a class="code" href="structpst__varbuf.html#aa308264a87b31a7b38dd1384c81e9d7d">00010</a>     <span class="keywordtype">size_t</span> <a class="code" href="structpst__varbuf.html#aa308264a87b31a7b38dd1384c81e9d7d">dlen</a>;    <span class="comment">//length of data stored in buffer</span>
<a name="l00011"></a><a class="code" href="structpst__varbuf.html#af17585e4393bd710acf0399bbddd2c09">00011</a>     <span class="keywordtype">size_t</span> <a class="code" href="structpst__varbuf.html#af17585e4393bd710acf0399bbddd2c09">blen</a>;    <span class="comment">//length of buffer</span>
<a name="l00012"></a><a class="code" href="structpst__varbuf.html#aebeafb40438282a084f73a1798f7514f">00012</a>     <span class="keywordtype">char</span> *<a class="code" href="structpst__varbuf.html#aebeafb40438282a084f73a1798f7514f">buf</a>;      <span class="comment">//buffer</span>
<a name="l00013"></a><a class="code" href="structpst__varbuf.html#a41add60a1e6cd0d6aec24116927e5dd0">00013</a>     <span class="keywordtype">char</span> *<a class="code" href="structpst__varbuf.html#a41add60a1e6cd0d6aec24116927e5dd0">b</a>;        <span class="comment">//start of stored data</span>
<a name="l00014"></a>00014 };
<a name="l00015"></a>00015 
<a name="l00016"></a>00016 
<a name="l00017"></a><a class="code" href="vbuf_8h.html#aaa1dee6fbcaea8e1108159d4f17ab23e">00017</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structpst__varbuf.html">pst_varbuf</a> <a class="code" href="structpst__varbuf.html">pst_vbuf</a>;
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 <a class="code" href="structpst__varbuf.html">pst_vbuf</a>  *<a class="code" href="vbuf_8h.html#a8faefe0cac6a2fa6b3ab49714005927b">pst_vballoc</a>(<span class="keywordtype">size_t</span> len);
<a name="l00020"></a>00020 <span class="keywordtype">void</span>       <a class="code" href="vbuf_8h.html#a7c0093c16ca48161ae5e028c84da4d8f">pst_vbgrow</a>(<a class="code" href="structpst__varbuf.html">pst_vbuf</a> *vb, <span class="keywordtype">size_t</span> len);    <span class="comment">// grow buffer by len bytes, data are preserved</span>
<a name="l00021"></a>00021 <span class="keywordtype">void</span>       <a class="code" href="vbuf_8h.html#a61fa92419f63297cedc2e2234b740293">pst_vbset</a>(<a class="code" href="structpst__varbuf.html">pst_vbuf</a> *vb, <span class="keywordtype">void</span> *data, <span class="keywordtype">size_t</span> len);
<a name="l00022"></a>00022 <span class="keywordtype">void</span>       <a class="code" href="vbuf_8h.html#a17620fb77cc01f2949ca0ca48e5af8fd">pst_vbappend</a>(<a class="code" href="structpst__varbuf.html">pst_vbuf</a> *vb, <span class="keywordtype">void</span> *data, <span class="keywordtype">size_t</span> length);
<a name="l00023"></a>00023 <span class="keywordtype">void</span>       <a class="code" href="vbuf_8h.html#acac0ab240cfa50ebe0950c9b1a409a56">pst_unicode_init</a>();
<a name="l00024"></a>00024 <span class="keywordtype">size_t</span>     <a class="code" href="vbuf_8h.html#a750cb3dc289c2ba8348dc3234607d5a0">pst_vb_utf16to8</a>(<a class="code" href="structpst__varbuf.html">pst_vbuf</a> *dest, <span class="keyword">const</span> <span class="keywordtype">char</span> *inbuf, <span class="keywordtype">int</span> iblen);
<a name="l00025"></a>00025 <span class="keywordtype">size_t</span>     <a class="code" href="vbuf_8h.html#acbb9b73b82b6c1552fbd23f84982b142">pst_vb_utf8to8bit</a>(<a class="code" href="structpst__varbuf.html">pst_vbuf</a> *dest, <span class="keyword">const</span> <span class="keywordtype">char</span> *inbuf, <span class="keywordtype">int</span> iblen, <span class="keyword">const</span> <span class="keywordtype">char</span>* charset);
<a name="l00026"></a>00026 <span class="keywordtype">size_t</span>     <a class="code" href="vbuf_8h.html#a0fdf2eef1097ae8e76c72975ad8b9827">pst_vb_8bit2utf8</a>(<a class="code" href="structpst__varbuf.html">pst_vbuf</a> *dest, <span class="keyword">const</span> <span class="keywordtype">char</span> *inbuf, <span class="keywordtype">int</span> iblen, <span class="keyword">const</span> <span class="keywordtype">char</span>* charset);
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated on 12 Jun 2013 for libpst.so.4 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>
