Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-release > by-pkgid > 2a781e5f78e233aedaa1e51ed196dcc3 > files > 73

lib64zvbi-devel-0.2.35-5.mga6.x86_64.rpm

<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ZVBI Library: src/exp-templ.c</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ZVBI Library
   &#160;<span id="projectnumber">0.2.35</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">src/exp-templ.c</div>  </div>
</div><!--header-->
<div class="contents">
<p>Template for internal export module.</p>
<div class="fragment"><div class="line"><span class="comment">/*</span></div><div class="line"><span class="comment"> *  Template for export modules</span></div><div class="line"><span class="comment"> */</span></div><div class="line"></div><div class="line"><span class="comment">/* $Id: exp-templ.c,v 1.10 2007/11/27 18:26:32 mschimek Exp $ */</span></div><div class="line"></div><div class="line"><span class="preprocessor">#ifdef HAVE_CONFIG_H</span></div><div class="line"><span class="preprocessor">#  include &quot;config.h&quot;</span></div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;stdlib.h&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;string.h&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;errno.h&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;limits.h&gt;</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include &quot;export.h&quot;</span></div><div class="line"></div><div class="line"><span class="keyword">typedef</span> <span class="keyword">struct </span>tmpl_instance</div><div class="line">{</div><div class="line">        <span class="comment">/* Common to all export modules */</span></div><div class="line">        <a name="_a0"></a><a class="code" href="structvbi__export.html">vbi_export</a>              export;</div><div class="line"></div><div class="line">        <span class="comment">/* Our private stuff */</span></div><div class="line"></div><div class="line">        <span class="comment">/* Options */</span></div><div class="line">        <span class="keywordtype">int</span>                     flip;</div><div class="line">        <span class="keywordtype">int</span>                     day;</div><div class="line">        <span class="keywordtype">int</span>                     prime;</div><div class="line">        <span class="keywordtype">double</span>                  quality;</div><div class="line">        <span class="keywordtype">char</span> *                  comment;</div><div class="line">        <span class="keywordtype">int</span>                     weekday;</div><div class="line"></div><div class="line">        <span class="keywordtype">int</span>                     counter;</div><div class="line">} tmpl_instance;</div><div class="line"></div><div class="line"><span class="comment">/* Safer than tmpl_instance *tmpl = (tmpl_instance *)(vbi_export *) e */</span></div><div class="line"><span class="preprocessor">#define TMPL(e) PARENT(e, tmpl_instance, export);</span></div><div class="line"></div><div class="line"><span class="keyword">static</span> <a class="code" href="structvbi__export.html">vbi_export</a> *</div><div class="line">tmpl_new(<span class="keywordtype">void</span>)</div><div class="line">{</div><div class="line">        tmpl_instance *tmpl;</div><div class="line"></div><div class="line">        <span class="keywordflow">if</span> (!(tmpl = calloc(1, <span class="keyword">sizeof</span>(*tmpl))))</div><div class="line">                <span class="keywordflow">return</span> NULL;</div><div class="line"></div><div class="line">        <span class="comment">/*</span></div><div class="line"><span class="comment">         *  The caller will initialize tmpl-&gt;export.class for us</span></div><div class="line"><span class="comment">         *  and reset all options to their defaults, we only</span></div><div class="line"><span class="comment">         *  have to initialize our private stuff.</span></div><div class="line"><span class="comment">         */</span></div><div class="line"></div><div class="line">        tmpl-&gt;counter = 0;</div><div class="line"></div><div class="line">        <span class="keywordflow">return</span> &amp;tmpl-&gt;export;</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span></div><div class="line">tmpl_delete(<a class="code" href="structvbi__export.html">vbi_export</a> *e)</div><div class="line">{</div><div class="line">        tmpl_instance *tmpl = TMPL(e);</div><div class="line"></div><div class="line">        <span class="comment">/* Uninitialize our private stuff and options */</span></div><div class="line"></div><div class="line">        <span class="keywordflow">if</span> (tmpl-&gt;comment)</div><div class="line">                free(tmpl-&gt;comment);</div><div class="line"></div><div class="line">        free(tmpl);</div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">/* convenience */</span></div><div class="line"><span class="preprocessor">#define elements(array) (sizeof(array) / sizeof(array[0]))</span></div><div class="line"></div><div class="line"><span class="comment">/* N_(), _() are NLS functions, see info gettext. */</span></div><div class="line"><span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *</div><div class="line">string_menu_items[] = {</div><div class="line">        N_(<span class="stringliteral">&quot;Sunday&quot;</span>), N_(<span class="stringliteral">&quot;Monday&quot;</span>), N_(<span class="stringliteral">&quot;Tuesday&quot;</span>),</div><div class="line">        N_(<span class="stringliteral">&quot;Wednesday&quot;</span>), N_(<span class="stringliteral">&quot;Thursday&quot;</span>), N_(<span class="stringliteral">&quot;Friday&quot;</span>), N_(<span class="stringliteral">&quot;Saturday&quot;</span>)</div><div class="line">};</div><div class="line"></div><div class="line"><span class="keyword">static</span> <span class="keywordtype">int</span></div><div class="line">int_menu_items[] = {</div><div class="line">        1, 3, 5, 7, 11, 13, 17, 19</div><div class="line">};</div><div class="line"></div><div class="line"><span class="keyword">static</span> <a name="_a1"></a><a class="code" href="structvbi__option__info.html">vbi_option_info</a></div><div class="line">tmpl_options[] = {</div><div class="line">        <a name="a2"></a><a class="code" href="group__Exmod.html#ga5294e6bb3862d3e8deb85712bcc896ec">VBI_OPTION_BOOL_INITIALIZER</a></div><div class="line">          <span class="comment">/*</span></div><div class="line"><span class="comment">           *  Option keywords must be unique within their module</span></div><div class="line"><span class="comment">           *  and shall contain only &quot;AZaz09_&quot; (be filesystem safe that is).</span></div><div class="line"><span class="comment">           *  Note &quot;network&quot;, &quot;creator&quot; and &quot;reveal&quot; are reserved generic</span></div><div class="line"><span class="comment">           *  options, filtered by the export api functions.</span></div><div class="line"><span class="comment">           */</span></div><div class="line">          (<span class="stringliteral">&quot;flip&quot;</span>, N_(<span class="stringliteral">&quot;Boolean option&quot;</span>),</div><div class="line">           FALSE, N_(<span class="stringliteral">&quot;This is a boolean option&quot;</span>)),</div><div class="line">        <a name="a3"></a><a class="code" href="group__Exmod.html#ga3510330ba2eccae0e42271cf26bf8d58">VBI_OPTION_INT_RANGE_INITIALIZER</a></div><div class="line">          (<span class="stringliteral">&quot;day&quot;</span>, N_(<span class="stringliteral">&quot;Select a month day&quot;</span>),</div><div class="line">           <span class="comment">/* default, min, max, step, has no tooltip */</span></div><div class="line">              13,       1,   31,  1,      NULL),</div><div class="line">        <a name="a4"></a><a class="code" href="group__Exmod.html#ga44d7cca3a31209ab6ba9503974517f40">VBI_OPTION_INT_MENU_INITIALIZER</a></div><div class="line">          (<span class="stringliteral">&quot;prime&quot;</span>, N_(<span class="stringliteral">&quot;Select a prime&quot;</span>),</div><div class="line">           0, int_menu_items, elements(int_menu_items),</div><div class="line">           N_(<span class="stringliteral">&quot;Default is the first, &#39;1&#39;&quot;</span>)),</div><div class="line">        <a name="a5"></a><a class="code" href="group__Exmod.html#ga3769f237b0f12e2d7e66a553e3a8f89a">VBI_OPTION_REAL_RANGE_INITIALIZER</a></div><div class="line">          (<span class="stringliteral">&quot;quality&quot;</span>, N_(<span class="stringliteral">&quot;Compression quality&quot;</span>),</div><div class="line">           100, 1, 100, 0.01, NULL),</div><div class="line">        <span class="comment">/* VBI_OPTION_REAL_MENU_INITIALIZER like int */</span></div><div class="line">        <a name="a6"></a><a class="code" href="group__Exmod.html#ga0cc437cd7d695b9a4a44b7fb773443f3">VBI_OPTION_STRING_INITIALIZER</a></div><div class="line">          (<span class="stringliteral">&quot;comment&quot;</span>, N_(<span class="stringliteral">&quot;Add a comment&quot;</span>),</div><div class="line">           <span class="stringliteral">&quot;default comment&quot;</span>, N_(<span class="stringliteral">&quot;Another tooltip&quot;</span>)),</div><div class="line">        <a name="a7"></a><a class="code" href="group__Exmod.html#gaa15784af5f2ffc133575079bfb98adeb">VBI_OPTION_MENU_INITIALIZER</a></div><div class="line">          (<span class="stringliteral">&quot;weekday&quot;</span>, N_(<span class="stringliteral">&quot;Select a weekday&quot;</span>),</div><div class="line">           2, string_menu_items, 7, N_(<span class="stringliteral">&quot;Default is Tuesday&quot;</span>))</div><div class="line">};</div><div class="line"></div><div class="line"><span class="comment">/*</span></div><div class="line"><span class="comment"> *  Enumerate our options (optional if we have no options).</span></div><div class="line"><span class="comment"> *  Instead of using a table one could also dynamically create</span></div><div class="line"><span class="comment"> *  vbi_option_info&#39;s in tmpl_instance.</span></div><div class="line"><span class="comment"> */</span></div><div class="line"><span class="keyword">static</span> <a class="code" href="structvbi__option__info.html">vbi_option_info</a> *</div><div class="line">option_enum(<a class="code" href="structvbi__export.html">vbi_export</a> *e, <span class="keywordtype">int</span> index)</div><div class="line">{</div><div class="line">        e = e;</div><div class="line"></div><div class="line">        <span class="comment">/* Enumeration 0 ... n */</span></div><div class="line">        <span class="keywordflow">if</span> (index &lt; 0 || index &gt;= (<span class="keywordtype">int</span>) elements(tmpl_options))</div><div class="line">                <span class="keywordflow">return</span> NULL;</div><div class="line"></div><div class="line">        <span class="keywordflow">return</span> tmpl_options + index;</div><div class="line">}</div><div class="line"></div><div class="line"><span class="preprocessor">#define KEYWORD(str) (strcmp(keyword, str) == 0)</span></div><div class="line"></div><div class="line"><span class="comment">/*</span></div><div class="line"><span class="comment"> *  Get an option (optional if we have no options).</span></div><div class="line"><span class="comment"> */</span></div><div class="line"><span class="keyword">static</span> vbi_bool</div><div class="line">option_get(<a class="code" href="structvbi__export.html">vbi_export</a> *e, <span class="keyword">const</span> <span class="keywordtype">char</span> *keyword, <a name="_a8"></a><a class="code" href="unionvbi__option__value.html">vbi_option_value</a> *value)</div><div class="line">{</div><div class="line">        tmpl_instance *tmpl = TMPL(e);</div><div class="line"></div><div class="line">        <span class="keywordflow">if</span> (KEYWORD(<span class="stringliteral">&quot;flip&quot;</span>)) {</div><div class="line">                value-&gt;<a name="a9"></a>num = tmpl-&gt;flip;</div><div class="line">        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (KEYWORD(<span class="stringliteral">&quot;day&quot;</span>)) {</div><div class="line">                value-&gt;num = tmpl-&gt;day;</div><div class="line">        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (KEYWORD(<span class="stringliteral">&quot;prime&quot;</span>)) {</div><div class="line">                value-&gt;num = tmpl-&gt;prime;</div><div class="line">        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (KEYWORD(<span class="stringliteral">&quot;quality&quot;</span>)) {</div><div class="line">                value-&gt;<a name="a10"></a>dbl = tmpl-&gt;quality;</div><div class="line">        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (KEYWORD(<span class="stringliteral">&quot;comment&quot;</span>)) {</div><div class="line">                <span class="keywordflow">if</span> (!(value-&gt;<a name="a11"></a>str = <a name="a12"></a><a class="code" href="group__Exmod.html#gafe535f80c12fa1371386aa20239c89dc">vbi_export_strdup</a>(e, NULL,</div><div class="line">                        tmpl-&gt;comment ? tmpl-&gt;comment : <span class="stringliteral">&quot;&quot;</span>)))</div><div class="line">                        <span class="keywordflow">return</span> FALSE;</div><div class="line">        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (KEYWORD(<span class="stringliteral">&quot;weekday&quot;</span>)) {</div><div class="line">                value-&gt;num = tmpl-&gt;weekday;</div><div class="line">        } <span class="keywordflow">else</span> {</div><div class="line">                <a name="a13"></a><a class="code" href="group__Exmod.html#ga9ff019ade9574fae5cbf5af605709d41">vbi_export_unknown_option</a>(e, keyword);</div><div class="line">                <span class="keywordflow">return</span> FALSE;</div><div class="line">        }</div><div class="line"></div><div class="line">        <span class="keywordflow">return</span> TRUE; <span class="comment">/* success */</span></div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">/*</span></div><div class="line"><span class="comment"> *  Set an option (optional if we have no options).</span></div><div class="line"><span class="comment"> */</span></div><div class="line"><span class="keyword">static</span> vbi_bool</div><div class="line">option_set(<a class="code" href="structvbi__export.html">vbi_export</a> *e, <span class="keyword">const</span> <span class="keywordtype">char</span> *keyword, va_list args)</div><div class="line">{</div><div class="line">        tmpl_instance *tmpl = TMPL(e);</div><div class="line"></div><div class="line">        <span class="keywordflow">if</span> (KEYWORD(<span class="stringliteral">&quot;flip&quot;</span>)) {</div><div class="line">                tmpl-&gt;flip = !!va_arg(args, <span class="keywordtype">int</span>);</div><div class="line">        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (KEYWORD(<span class="stringliteral">&quot;day&quot;</span>)) {</div><div class="line">                <span class="keywordtype">int</span> day = va_arg(args, <span class="keywordtype">int</span>);</div><div class="line"></div><div class="line">                <span class="comment">/* or clamp */</span></div><div class="line">                <span class="keywordflow">if</span> (day &lt; 1 || day &gt; 31) {</div><div class="line">                        <a name="a14"></a><a class="code" href="group__Exmod.html#gacbceab3a49fc720f1df144e399dffb76">vbi_export_invalid_option</a>(e, keyword, day);</div><div class="line">                        <span class="keywordflow">return</span> FALSE;</div><div class="line">                }</div><div class="line"></div><div class="line">                tmpl-&gt;day = day;</div><div class="line"></div><div class="line">        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (KEYWORD(<span class="stringliteral">&quot;prime&quot;</span>)) {</div><div class="line">                <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i;</div><div class="line">                <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> d, dmin = UINT_MAX;</div><div class="line">                <span class="keywordtype">int</span> value = va_arg(args, <span class="keywordtype">int</span>);</div><div class="line"></div><div class="line">                <span class="comment">/* or return an error */</span></div><div class="line">                <span class="keywordflow">for</span> (i = 0; i &lt; elements(int_menu_items); i++)</div><div class="line">                        <span class="keywordflow">if</span> ((d = abs(int_menu_items[i] - value)) &lt; dmin) {</div><div class="line">                                tmpl-&gt;prime = int_menu_items[i];</div><div class="line">                                dmin = d;</div><div class="line">                        }</div><div class="line"></div><div class="line">        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (KEYWORD(<span class="stringliteral">&quot;quality&quot;</span>)) {</div><div class="line">                <span class="keywordtype">double</span> quality = va_arg(args, <span class="keywordtype">double</span>);</div><div class="line"></div><div class="line">                <span class="comment">/* or return an error */</span></div><div class="line">                <span class="keywordflow">if</span> (quality &lt; 1)</div><div class="line">                        quality = 1;</div><div class="line">                <span class="keywordflow">else</span> <span class="keywordflow">if</span> (quality &gt; 100)</div><div class="line">                        quality = 100;</div><div class="line"></div><div class="line">                tmpl-&gt;quality = quality;</div><div class="line">        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (KEYWORD(<span class="stringliteral">&quot;comment&quot;</span>)) {</div><div class="line">                <span class="keywordtype">char</span> *comment = va_arg(args, <span class="keywordtype">char</span> *);</div><div class="line"></div><div class="line">                <span class="comment">/* Note the option remains unchanged in case of error */</span></div><div class="line">                <span class="keywordflow">if</span> (!<a class="code" href="group__Exmod.html#gafe535f80c12fa1371386aa20239c89dc">vbi_export_strdup</a>(e, &amp;tmpl-&gt;comment, comment))</div><div class="line">                        <span class="keywordflow">return</span> FALSE;</div><div class="line">        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (KEYWORD(<span class="stringliteral">&quot;weekday&quot;</span>)) {</div><div class="line">                <span class="keywordtype">int</span> day = va_arg(args, <span class="keywordtype">int</span>);</div><div class="line"></div><div class="line">                <span class="comment">/* or return an error */</span></div><div class="line">                tmpl-&gt;weekday = day % 7;</div><div class="line">        } <span class="keywordflow">else</span> {</div><div class="line">                <a class="code" href="group__Exmod.html#ga9ff019ade9574fae5cbf5af605709d41">vbi_export_unknown_option</a>(e, keyword);</div><div class="line">                <span class="keywordflow">return</span> FALSE;</div><div class="line">        }</div><div class="line"></div><div class="line">        <span class="keywordflow">return</span> TRUE; <span class="comment">/* success */</span></div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">/*</span></div><div class="line"><span class="comment"> *  The output function, mandatory.</span></div><div class="line"><span class="comment"> */</span></div><div class="line"><span class="keyword">static</span> vbi_bool</div><div class="line">export(<a class="code" href="structvbi__export.html">vbi_export</a> *e, <a name="_a15"></a><a class="code" href="structvbi__page.html">vbi_page</a> *pg)</div><div class="line">{</div><div class="line">        tmpl_instance *tmpl = TMPL(e);</div><div class="line"></div><div class="line">        <span class="comment">/* Write pg to target, that&#39;s all. */</span></div><div class="line">        vbi_export_printf (e, <span class="stringliteral">&quot;Page %x.%x\n&quot;</span>, pg-&gt;<a name="a16"></a><a class="code" href="structvbi__page.html#a7633883c5732103d8048c9db0e250358">pgno</a>, pg-&gt;<a name="a17"></a><a class="code" href="structvbi__page.html#a741ccb9357e542ff47b12baa4ee0de8c">subno</a>);</div><div class="line"></div><div class="line">        tmpl-&gt;counter++; <span class="comment">/* just for fun */</span></div><div class="line"></div><div class="line">        <span class="comment">/*</span></div><div class="line"><span class="comment">         *  Should any of the module functions return unsuccessful</span></div><div class="line"><span class="comment">         *  they better post a description of the problem.</span></div><div class="line"><span class="comment">         *  Parameters like printf, no linefeeds &#39;\n&#39; please.</span></div><div class="line"><span class="comment">         */</span></div><div class="line">        <span class="comment">/*</span></div><div class="line"><span class="comment">        vbi_export_error_printf(_(&quot;Writing failed: %s&quot;), strerror(errno));</span></div><div class="line"><span class="comment">         */</span></div><div class="line"></div><div class="line">        <span class="keywordflow">return</span> FALSE; <span class="comment">/* no success (since we didn&#39;t write anything) */</span></div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">/*</span></div><div class="line"><span class="comment"> *  Let&#39;s describe us.</span></div><div class="line"><span class="comment"> *  You can leave away assignments unless mandatory.</span></div><div class="line"><span class="comment"> */</span></div><div class="line"><span class="keyword">static</span> <a name="_a18"></a><a class="code" href="structvbi__export__info.html">vbi_export_info</a></div><div class="line">info_tmpl = {</div><div class="line">        <span class="comment">/* The mandatory keyword must be unique and shall</span></div><div class="line"><span class="comment">           contain only &quot;AZaz09_&quot; */</span></div><div class="line">        .<a name="a19"></a><a class="code" href="structvbi__export__info.html#a2c61a88b646d4a83e80d2ce4c74014e9">keyword</a>        = <span class="stringliteral">&quot;templ&quot;</span>,</div><div class="line">        <span class="comment">/* When omitted this module can still be used by</span></div><div class="line"><span class="comment">           libzvbi clients but won&#39;t be listed in a UI. */</span></div><div class="line">        .label          = N_(<span class="stringliteral">&quot;Template&quot;</span>),</div><div class="line">        .tooltip        = N_(<span class="stringliteral">&quot;This is just an export template&quot;</span>),</div><div class="line"></div><div class="line">        .mime_type      = <span class="stringliteral">&quot;misc/example&quot;</span>,</div><div class="line">        .extension      = <span class="stringliteral">&quot;tmpl&quot;</span>,</div><div class="line">};</div><div class="line"></div><div class="line"><a name="_a20"></a><a class="code" href="structvbi__export__class.html">vbi_export_class</a></div><div class="line">vbi_export_class_tmpl = {</div><div class="line">        .<a name="a21"></a>_public                = &amp;info_tmpl,</div><div class="line"></div><div class="line">        <span class="comment">/* Functions to allocate and free a tmpl_class vbi_export instance.</span></div><div class="line"><span class="comment">           When you omit these, libzvbi will allocate a bare struct vbi_export */</span></div><div class="line">        ._new                   = tmpl_new,</div><div class="line">        ._delete                = tmpl_delete,</div><div class="line"></div><div class="line">        <span class="comment">/* Functions to enumerate, read and write options */</span></div><div class="line">        .option_enum            = option_enum,</div><div class="line">        .option_get             = option_get,</div><div class="line">        .option_set             = option_set,</div><div class="line"></div><div class="line">        <span class="comment">/* Function to export a page, mandatory */</span></div><div class="line">        .export                 = export</div><div class="line">};</div><div class="line"></div><div class="line"><span class="comment">/*</span></div><div class="line"><span class="comment"> *  This is a constructor calling vbi_register_export_module().</span></div><div class="line"><span class="comment"> *  (Commented out since we don&#39;t want to register the example module.)</span></div><div class="line"><span class="comment"> */</span></div><div class="line"><span class="preprocessor">#if 0</span></div><div class="line"><a name="a22"></a><a class="code" href="group__Exmod.html#gac39fe176dadc4d377e693192e2018a38">VBI_AUTOREG_EXPORT_MODULE</a>(vbi_export_class_tmpl)</div><div class="line"><span class="preprocessor">#endif</span></div><div class="line"></div><div class="line"><span class="comment">/*</span></div><div class="line"><span class="comment">Local variables:</span></div><div class="line"><span class="comment">c-set-style: K&amp;R</span></div><div class="line"><span class="comment">c-basic-offset: 8</span></div><div class="line"><span class="comment">End:</span></div><div class="line"><span class="comment">*/</span></div></div><!-- fragment --> </div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>