Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > ce1f17e7ec5e62f35dbe9f064c5f74d7 > files > 910

libtpcimgio-devel-1.5.10-4.fc15.i686.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"/>
<title>interfile.c 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.4 -->
<div id="top">
  <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="annotated.html"><span>Data&#160;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 id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;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="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">interfile.c File Reference</div>  </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="interfile_8h_source.html">include/interfile.h</a>&quot;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for interfile.c:</div>
<div class="dyncontent">
<div class="center"><img src="interfile_8c__incl.png" border="0" usemap="#interfile_8c" alt=""/></div>
<map name="interfile_8c" id="interfile_8c">
<area shape="rect" id="node7" href="interfile_8h.html" title="include/interfile.h" alt="" coords="179,83,299,112"/></map>
</div>
</div>
<p><a href="interfile_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfile_8c.html#aa71a22af291aec01c40578fd81837d12">interfile_read</a> (char headerName[256], char searchWord[256], char returnValue[256], char errorMessage[300])</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="aa71a22af291aec01c40578fd81837d12"></a><!-- doxytag: member="interfile.c::interfile_read" ref="aa71a22af291aec01c40578fd81837d12" args="(char headerName[256], char searchWord[256], char returnValue[256], char errorMessage[300])" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int interfile_read </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>headerName</em>[256], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>searchWord</em>[256], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>returnValue</em>[256], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>errorMessage</em>[300]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The function searches the keyword in the header and passes the value belonging to that value back to the main program. The name of the header (string 'headerName') and the requested keyword (string 'searchWord') are passed to the function. It passes back the value of the keyword (string 'returnValue') and possibly an error message or warning (string 'errorMessage'). So the values are passed back as strings. The interpretation (conversion to integer, float, time etc) is up to the programmer.</p>
<p>The interfile header has to comply to the following rules:</p>
<ul>
<li>first line in the file is '!INTERFILE'</li>
<li>maximal length of a line is 512 characters</li>
<li>A line has two fields sperated by ':=' (keyword := value)</li>
<li>maximal length of keyword and value is 256 characters.</li>
<li>no header entries after a line '!END OF INTERFILE'</li>
<li>a line starting with a semicolon ';' is a comment</li>
</ul>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">headerName</td><td>header file name </td></tr>
    <tr><td class="paramname">searchWord</td><td>keyword to look for </td></tr>
    <tr><td class="paramname">returnValue</td><td>value for keyword in header </td></tr>
    <tr><td class="paramname">errorMessage</td><td>error message/warnings. In case there is a error message it will be returnd as string in the variable 'errmsg'. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if ok, 1 keyword appears more than once in the interfile header (value of last occurence of keyword is returned), 2 keyword not found in interfile header (returned value is empty (i.e. contains '/0's only)), 3 interfile header cold not be opened for reading (returned value is empty (i.e. contains '/0's only)), 4 wrong file format?! (No '!INTERFILE' in the first line) (returned value is empty (i.e. contains '/0's only)) </dd></dl>

<p>Definition at line <a class="el" href="interfile_8c_source.html#l00070">70</a> of file <a class="el" href="interfile_8c_source.html">interfile.c</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Mon Aug 8 2011 by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>