1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>OpenCT: buffer.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.1 -->
<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 id="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="dirs.html"><span>Directories</span></a></li>
</ul></div>
<div class="nav">
<a class="el" href="dir_48ff4d8e84c7d8bdad9110a7da283b5f.html">src</a> » <a class="el" href="dir_877fe36415f52529fd2e180217ad90f9.html">include</a> » <a class="el" href="dir_be5e542b2ca1305501268904b0410904.html">openct</a></div>
<h1>buffer.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Buffer handling functions of the IFD handler library</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2003, Olaf Kirch <okir@suse.de></span>
<a name="l00005"></a>00005 <span class="comment"> */</span>
<a name="l00006"></a>00006
<a name="l00007"></a>00007 <span class="preprocessor">#ifndef OPENCT_BUFFER_H</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span><span class="preprocessor">#define OPENCT_BUFFER_H</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span>
<a name="l00010"></a>00010 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
<a name="l00012"></a>00012 <span class="preprocessor">#endif</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span>
<a name="l00014"></a>00014 <span class="preprocessor">#include <sys/types.h></span>
<a name="l00015"></a>00015
<a name="l00016"></a><a class="code" href="structct__buf.html">00016</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structct__buf.html">ct_buf</a> {
<a name="l00017"></a><a class="code" href="structct__buf.html#929ce0ad1fcad3654ff8f858a537c154">00017</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * <a class="code" href="structct__buf.html#929ce0ad1fcad3654ff8f858a537c154">base</a>;
<a name="l00018"></a><a class="code" href="structct__buf.html#ed4b66f547f38661f8758a176f7b4c70">00018</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structct__buf.html#bdfdba722e9da01f8ef92bca039f230b">head</a>, <a class="code" href="structct__buf.html#ed4b66f547f38661f8758a176f7b4c70">tail</a>, <a class="code" href="structct__buf.html#3d06ded1a17b026fac5f459aff24073a">size</a>;
<a name="l00019"></a><a class="code" href="structct__buf.html#bc99d5a29d1bcb482168401237c7428b">00019</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structct__buf.html#bc99d5a29d1bcb482168401237c7428b">overrun</a>;
<a name="l00020"></a>00020 } <a class="code" href="structct__buf.html">ct_buf_t</a>;
<a name="l00021"></a>00021
<a name="l00022"></a>00022 <span class="keyword">extern</span> <span class="keywordtype">void</span> ct_buf_init(<a class="code" href="structct__buf.html">ct_buf_t</a> *, <span class="keywordtype">void</span> *, size_t);
<a name="l00023"></a>00023 <span class="keyword">extern</span> <span class="keywordtype">void</span> ct_buf_set(<a class="code" href="structct__buf.html">ct_buf_t</a> *, <span class="keywordtype">void</span> *, size_t);
<a name="l00024"></a>00024 <span class="keyword">extern</span> <span class="keywordtype">void</span> ct_buf_clear(<a class="code" href="structct__buf.html">ct_buf_t</a> *);
<a name="l00025"></a>00025 <span class="keyword">extern</span> <span class="keywordtype">int</span> ct_buf_get(<a class="code" href="structct__buf.html">ct_buf_t</a> *, <span class="keywordtype">void</span> *, size_t);
<a name="l00026"></a>00026 <span class="keyword">extern</span> <span class="keywordtype">int</span> ct_buf_gets(<a class="code" href="structct__buf.html">ct_buf_t</a> *, <span class="keywordtype">char</span> *, size_t);
<a name="l00027"></a>00027 <span class="keyword">extern</span> <span class="keywordtype">int</span> ct_buf_put(<a class="code" href="structct__buf.html">ct_buf_t</a> *, <span class="keyword">const</span> <span class="keywordtype">void</span> *, size_t);
<a name="l00028"></a>00028 <span class="keyword">extern</span> <span class="keywordtype">int</span> ct_buf_putc(<a class="code" href="structct__buf.html">ct_buf_t</a> *, <span class="keywordtype">int</span>);
<a name="l00029"></a>00029 <span class="keyword">extern</span> <span class="keywordtype">int</span> ct_buf_puts(<a class="code" href="structct__buf.html">ct_buf_t</a> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *);
<a name="l00030"></a>00030 <span class="keyword">extern</span> <span class="keywordtype">int</span> ct_buf_push(<a class="code" href="structct__buf.html">ct_buf_t</a> *, <span class="keyword">const</span> <span class="keywordtype">void</span> *, size_t);
<a name="l00031"></a>00031 <span class="keyword">extern</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> ct_buf_avail(<a class="code" href="structct__buf.html">ct_buf_t</a> *);
<a name="l00032"></a>00032 <span class="keyword">extern</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> ct_buf_tailroom(<a class="code" href="structct__buf.html">ct_buf_t</a> *);
<a name="l00033"></a>00033 <span class="keyword">extern</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> ct_buf_size(<a class="code" href="structct__buf.html">ct_buf_t</a> *);
<a name="l00034"></a>00034 <span class="keyword">extern</span> <span class="keywordtype">void</span> * ct_buf_head(<a class="code" href="structct__buf.html">ct_buf_t</a> *);
<a name="l00035"></a>00035 <span class="keyword">extern</span> <span class="keywordtype">void</span> * ct_buf_tail(<a class="code" href="structct__buf.html">ct_buf_t</a> *);
<a name="l00036"></a>00036 <span class="keyword">extern</span> <span class="keywordtype">int</span> ct_buf_read(<a class="code" href="structct__buf.html">ct_buf_t</a> *, <span class="keywordtype">int</span>);
<a name="l00037"></a>00037 <span class="keyword">extern</span> <span class="keywordtype">void</span> ct_buf_compact(<a class="code" href="structct__buf.html">ct_buf_t</a> *);
<a name="l00038"></a>00038 <span class="keyword">extern</span> <span class="keywordtype">int</span> ct_buf_overrun(<a class="code" href="structct__buf.html">ct_buf_t</a> *);
<a name="l00039"></a>00039
<a name="l00040"></a>00040 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span>}
<a name="l00042"></a>00042 <span class="preprocessor">#endif</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span>
<a name="l00044"></a>00044 <span class="preprocessor">#endif </span><span class="comment">/* OPENCT_BUFFER_H */</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
</body>
</html>
|