Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > aaf33964de706a538481c929c1da6a44 > files > 3596

faust-doc-0.9.10-5mdv2010.1.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"/>
<title>FAUST compiler: enrobage.hh 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.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</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&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>enrobage.hh File Reference</h1><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &lt;string&gt;</code><br/>
<code>#include &lt;fstream&gt;</code><br/>
<code>#include &lt;iostream&gt;</code><br/>
<div class="dynheader">
Include dependency graph for enrobage.hh:</div>
<div class="dynsection">
</div>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dynsection">
</div>

<p><a href="enrobage_8hh_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="enrobage_8hh.html#a3888f6859ebeb088f0085edbaff0c923">copyFirstHalf</a> (FILE *file, FILE *dst)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="enrobage_8hh.html#a54215bef04fa2b1ed141d0a6a175a06a">copySecondHalf</a> (FILE *file, FILE *dst)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="enrobage_8hh.html#aea62cf1c837a29228397762c30501bda">copyZeroHalf</a> (FILE *file, FILE *dst)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="enrobage_8hh.html#a2fad638c7f506cc88275ddf756e99d0c">copyFile</a> (FILE *file, FILE *dst)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="enrobage_8hh.html#a5f5bd14f70f4edf37e76608dab1a6bd2">streamCopyUntil</a> (istream &amp;src, ostream &amp;dst, const string &amp;until)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy src to dst until specific line.  <a href="#a5f5bd14f70f4edf37e76608dab1a6bd2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="enrobage_8hh.html#af1ac810ee8c704632447ef8650c8dc20">streamCopyUntilEnd</a> (istream &amp;src, ostream &amp;dst)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy src to dst until end.  <a href="#af1ac810ee8c704632447ef8650c8dc20"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="enrobage_8hh.html#aeea853d479ea9c4fbf204795c0334e9d">streamCopy</a> (istream &amp;src, ostream &amp;dst)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy src to dst.  <a href="#aeea853d479ea9c4fbf204795c0334e9d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ifstream *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="enrobage_8hh.html#a901a730cc8136f70a2073da23fafa61e">open_arch_stream</a> (const char *filename)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Try to open an architecture file searching in various directories.  <a href="#a901a730cc8136f70a2073da23fafa61e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">FILE *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="enrobage_8hh.html#a1c21ab6ec8fa85af26fc2a335e294d50">fopensearch</a> (const char *filename, string &amp;fullpath)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Try to open the file &lt;filename&gt; searching in various directories.  <a href="#a1c21ab6ec8fa85af26fc2a335e294d50"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="enrobage_8hh.html#af611c72db7e5426b9cab1268d3f5869b">check_file</a> (const char *filename)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if a file exists.  <a href="#af611c72db7e5426b9cab1268d3f5869b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="enrobage_8hh.html#a73496d20a5f06ebb81a3ce1cc6d39877">filebasename</a> (const char *name)</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="af611c72db7e5426b9cab1268d3f5869b"></a><!-- doxytag: member="enrobage.hh::check_file" ref="af611c72db7e5426b9cab1268d3f5869b" args="(const char *filename)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool check_file </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>filename</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check if a file exists. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the file exist, false otherwise </dd></dl>

<p>Definition at line <a class="el" href="enrobage_8cpp_source.html#l00124">124</a> of file <a class="el" href="enrobage_8cpp_source.html">enrobage.cpp</a>.</p>

<p>Referenced by <a class="el" href="main_8cpp_source.html#l00160">process_cmdline()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00125"></a>00125 {
<a name="l00126"></a>00126     FILE* f = fopen(filename, <span class="stringliteral">&quot;r&quot;</span>);
<a name="l00127"></a>00127     
<a name="l00128"></a>00128     <span class="keywordflow">if</span> (f == NULL) {
<a name="l00129"></a>00129         fprintf(stderr, <span class="stringliteral">&quot;faust: &quot;</span>); perror(filename);
<a name="l00130"></a>00130     } <span class="keywordflow">else</span> {
<a name="l00131"></a>00131         fclose(f);
<a name="l00132"></a>00132     }
<a name="l00133"></a>00133     <span class="keywordflow">return</span> f != NULL;
<a name="l00134"></a>00134 }
</pre></div></p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
</div>
</p>

</div>
</div>
<a class="anchor" id="a2fad638c7f506cc88275ddf756e99d0c"></a><!-- doxytag: member="enrobage.hh::copyFile" ref="a2fad638c7f506cc88275ddf756e99d0c" args="(FILE *file, FILE *dst)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void copyFile </td>
          <td>(</td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>dst</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a3888f6859ebeb088f0085edbaff0c923"></a><!-- doxytag: member="enrobage.hh::copyFirstHalf" ref="a3888f6859ebeb088f0085edbaff0c923" args="(FILE *file, FILE *dst)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void copyFirstHalf </td>
          <td>(</td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>dst</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a54215bef04fa2b1ed141d0a6a175a06a"></a><!-- doxytag: member="enrobage.hh::copySecondHalf" ref="a54215bef04fa2b1ed141d0a6a175a06a" args="(FILE *file, FILE *dst)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void copySecondHalf </td>
          <td>(</td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>dst</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aea62cf1c837a29228397762c30501bda"></a><!-- doxytag: member="enrobage.hh::copyZeroHalf" ref="aea62cf1c837a29228397762c30501bda" args="(FILE *file, FILE *dst)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void copyZeroHalf </td>
          <td>(</td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>dst</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a73496d20a5f06ebb81a3ce1cc6d39877"></a><!-- doxytag: member="enrobage.hh::filebasename" ref="a73496d20a5f06ebb81a3ce1cc6d39877" args="(const char *name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* filebasename </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="enrobage_8cpp_source.html#l00316">316</a> of file <a class="el" href="enrobage_8cpp_source.html">enrobage.cpp</a>.</p>

<p>References <a class="el" href="enrobage_8cpp_source.html#l00310">IS_DIR_SEPARATOR</a>.</p>

<p>Referenced by <a class="el" href="doc_8cpp_source.html#l01015">copyFaustSources()</a>, and <a class="el" href="doc_8cpp_source.html#l00360">printfaustlisting()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00317"></a>00317 {
<a name="l00318"></a>00318 <span class="preprocessor">#if defined (HAVE_DOS_BASED_FILE_SYSTEM)</span>
<a name="l00319"></a>00319 <span class="preprocessor"></span>    <span class="comment">/* Skip over the disk name in MSDOS pathnames. */</span>
<a name="l00320"></a>00320     <span class="keywordflow">if</span> (isalpha(<a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>[0]) &amp;&amp; <a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>[1] == <span class="charliteral">&#39;:&#39;</span>) 
<a name="l00321"></a>00321         <a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a> += 2;
<a name="l00322"></a>00322 <span class="preprocessor">#endif</span>
<a name="l00323"></a>00323 <span class="preprocessor"></span>
<a name="l00324"></a>00324     <span class="keyword">const</span> <span class="keywordtype">char</span>* base;
<a name="l00325"></a>00325     <span class="keywordflow">for</span> (base = <a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>; *<a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>; <a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>++)
<a name="l00326"></a>00326     {
<a name="l00327"></a>00327         <span class="keywordflow">if</span> (<a class="code" href="enrobage_8cpp.html#a9062ad017719f7653eb498d61ed41d55">IS_DIR_SEPARATOR</a> (*<a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>))
<a name="l00328"></a>00328         {
<a name="l00329"></a>00329             base = <a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a> + 1;
<a name="l00330"></a>00330         }
<a name="l00331"></a>00331     }
<a name="l00332"></a>00332     <span class="keywordflow">return</span> base;
<a name="l00333"></a>00333 }
</pre></div></p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
</div>
</p>

</div>
</div>
<a class="anchor" id="a1c21ab6ec8fa85af26fc2a335e294d50"></a><!-- doxytag: member="enrobage.hh::fopensearch" ref="a1c21ab6ec8fa85af26fc2a335e294d50" args="(const char *filename, string &amp;fullpath)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FILE* fopensearch </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string &amp;&nbsp;</td>
          <td class="paramname"> <em>fullpath</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Try to open the file &lt;filename&gt; searching in various directories. </p>
<p>If succesful place its full pathname in the string &lt;fullpath&gt; </p>

<p>Definition at line <a class="el" href="enrobage_8cpp_source.html#l00258">258</a> of file <a class="el" href="enrobage_8cpp_source.html">enrobage.cpp</a>.</p>

<p>References <a class="el" href="enrobage_8cpp_source.html#l00216">buildFullPathname()</a>, <a class="el" href="enrobage_8cpp_source.html#l00141">fopenat()</a>, <a class="el" href="main_8cpp_source.html#l00099">gFaustDirectory</a>, <a class="el" href="main_8cpp_source.html#l00098">gFaustSuperDirectory</a>, <a class="el" href="main_8cpp_source.html#l00097">gFaustSuperSuperDirectory</a>, and <a class="el" href="main_8cpp_source.html#l00101">gMasterDirectory</a>.</p>

<p>Referenced by <a class="el" href="sourcereader_8cpp_source.html#l00186">SourceReader::parse()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00259"></a>00259 {   
<a name="l00260"></a>00260     FILE* f;
<a name="l00261"></a>00261 
<a name="l00262"></a>00262 
<a name="l00263"></a>00263     <span class="keywordflow">if</span> ((f = fopen(filename, <span class="stringliteral">&quot;r&quot;</span>))) { 
<a name="l00264"></a>00264         <a class="code" href="enrobage_8cpp.html#ab6796e82ccd882d69cc1fbb28f537d01" title="Build a full pathname of &amp;lt;filename&amp;gt;.">buildFullPathname</a>(fullpath, filename); 
<a name="l00265"></a>00265         <span class="keywordflow">return</span> f;
<a name="l00266"></a>00266     }
<a name="l00267"></a>00267     <span class="keywordflow">if</span> ((f = <a class="code" href="enrobage_8cpp.html#a41d4dcc54245881ea5690627e56c7f4c" title="Try to open the file &amp;#39;&amp;lt;dir&amp;gt;/&amp;lt;filename&amp;gt;&amp;#39;.">fopenat</a>(fullpath, <a class="code" href="main_8cpp.html#aea493812dd4a239a7c0d354d5a07e191">gMasterDirectory</a>, filename))) { 
<a name="l00268"></a>00268         <span class="keywordflow">return</span> f;
<a name="l00269"></a>00269     }
<a name="l00270"></a>00270     <span class="keywordflow">if</span> ((f = <a class="code" href="enrobage_8cpp.html#a41d4dcc54245881ea5690627e56c7f4c" title="Try to open the file &amp;#39;&amp;lt;dir&amp;gt;/&amp;lt;filename&amp;gt;&amp;#39;.">fopenat</a>(fullpath, <a class="code" href="doc_8cpp.html#a320fc936026f318a3fc46f47ef379713">gFaustDirectory</a>, <span class="stringliteral">&quot;architecture&quot;</span>, filename))) { 
<a name="l00271"></a>00271         <span class="keywordflow">return</span> f;
<a name="l00272"></a>00272     }
<a name="l00273"></a>00273     <span class="keywordflow">if</span> ((f = <a class="code" href="enrobage_8cpp.html#a41d4dcc54245881ea5690627e56c7f4c" title="Try to open the file &amp;#39;&amp;lt;dir&amp;gt;/&amp;lt;filename&amp;gt;&amp;#39;.">fopenat</a>(fullpath, <a class="code" href="doc_8cpp.html#a2529dab7cac84bd8f69c14ee8a3cbfe2">gFaustSuperDirectory</a>, <span class="stringliteral">&quot;architecture&quot;</span>, filename))) { 
<a name="l00274"></a>00274         <span class="keywordflow">return</span> f;
<a name="l00275"></a>00275     }
<a name="l00276"></a>00276     <span class="keywordflow">if</span> ((f = <a class="code" href="enrobage_8cpp.html#a41d4dcc54245881ea5690627e56c7f4c" title="Try to open the file &amp;#39;&amp;lt;dir&amp;gt;/&amp;lt;filename&amp;gt;&amp;#39;.">fopenat</a>(fullpath, <a class="code" href="doc_8cpp.html#a09fc40a224a32f929decbac5a21140ef">gFaustSuperSuperDirectory</a>, <span class="stringliteral">&quot;architecture&quot;</span>, filename))) { 
<a name="l00277"></a>00277         <span class="keywordflow">return</span> f;
<a name="l00278"></a>00278     }
<a name="l00279"></a>00279     <span class="keywordflow">if</span> ((f = <a class="code" href="enrobage_8cpp.html#a41d4dcc54245881ea5690627e56c7f4c" title="Try to open the file &amp;#39;&amp;lt;dir&amp;gt;/&amp;lt;filename&amp;gt;&amp;#39;.">fopenat</a>(fullpath, <span class="stringliteral">&quot;/usr/local/lib/faust&quot;</span>, filename))) { 
<a name="l00280"></a>00280         <span class="keywordflow">return</span> f;
<a name="l00281"></a>00281     }
<a name="l00282"></a>00282     <span class="keywordflow">if</span> ((f = <a class="code" href="enrobage_8cpp.html#a41d4dcc54245881ea5690627e56c7f4c" title="Try to open the file &amp;#39;&amp;lt;dir&amp;gt;/&amp;lt;filename&amp;gt;&amp;#39;.">fopenat</a>(fullpath, <span class="stringliteral">&quot;/usr/lib/faust&quot;</span>, filename))) { 
<a name="l00283"></a>00283         <span class="keywordflow">return</span> f;
<a name="l00284"></a>00284     }
<a name="l00285"></a>00285     <span class="keywordflow">return</span> 0;
<a name="l00286"></a>00286 }
</pre></div></p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
</div>
</p>

</div>
</div>
<a class="anchor" id="a901a730cc8136f70a2073da23fafa61e"></a><!-- doxytag: member="enrobage.hh::open_arch_stream" ref="a901a730cc8136f70a2073da23fafa61e" args="(const char *filename)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ifstream* open_arch_stream </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>filename</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Try to open an architecture file searching in various directories. </p>

<p>Definition at line <a class="el" href="enrobage_8cpp_source.html#l00069">69</a> of file <a class="el" href="enrobage_8cpp_source.html">enrobage.cpp</a>.</p>

<p>References <a class="el" href="compatibility_8hh_source.html#l00052">FAUST_PATH_MAX</a>, <a class="el" href="main_8cpp_source.html#l00099">gFaustDirectory</a>, <a class="el" href="main_8cpp_source.html#l00098">gFaustSuperDirectory</a>, and <a class="el" href="main_8cpp_source.html#l00097">gFaustSuperSuperDirectory</a>.</p>

<p>Referenced by <a class="el" href="main_8cpp_source.html#l00475">main()</a>, and <a class="el" href="doc_8cpp_source.html#l00941">openArchFile()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00070"></a>00070 {
<a name="l00071"></a>00071     <span class="keywordtype">char</span>    buffer[<a class="code" href="compatibility_8hh.html#a3bf18fd70de2efe183049cb028875fe2">FAUST_PATH_MAX</a>];
<a name="l00072"></a>00072     <span class="keywordtype">char</span>*   old = getcwd (buffer, <a class="code" href="compatibility_8hh.html#a3bf18fd70de2efe183049cb028875fe2">FAUST_PATH_MAX</a>);
<a name="l00073"></a>00073     <span class="keywordtype">int</span>     err;
<a name="l00074"></a>00074 
<a name="l00075"></a>00075     {
<a name="l00076"></a>00076         ifstream* f = <span class="keyword">new</span> ifstream();
<a name="l00077"></a>00077         f-&gt;open(filename, ifstream::in); <span class="keywordflow">if</span> (f-&gt;is_open()) <span class="keywordflow">return</span> f; <span class="keywordflow">else</span> <span class="keyword">delete</span> f;
<a name="l00078"></a>00078     }
<a name="l00079"></a>00079     <span class="keywordflow">if</span> ( (chdir(<a class="code" href="doc_8cpp.html#a320fc936026f318a3fc46f47ef379713">gFaustDirectory</a>.c_str())==0) &amp;&amp; (chdir(<span class="stringliteral">&quot;architecture&quot;</span>)==0) ) {
<a name="l00080"></a>00080         <span class="comment">//cout &lt;&lt; &quot;enrobage.cpp : &#39;architecture&#39; directory found in gFaustDirectory&quot; &lt;&lt; endl;</span>
<a name="l00081"></a>00081         ifstream* f = <span class="keyword">new</span> ifstream();
<a name="l00082"></a>00082         f-&gt;open(filename, ifstream::in);
<a name="l00083"></a>00083         <span class="keywordflow">if</span> (f-&gt;good()) <span class="keywordflow">return</span> f; <span class="keywordflow">else</span> <span class="keyword">delete</span> f;
<a name="l00084"></a>00084     }
<a name="l00085"></a>00085     err = chdir(old);
<a name="l00086"></a>00086     <span class="keywordflow">if</span> ((chdir(<a class="code" href="doc_8cpp.html#a2529dab7cac84bd8f69c14ee8a3cbfe2">gFaustSuperDirectory</a>.c_str())==0) &amp;&amp; (chdir(<span class="stringliteral">&quot;architecture&quot;</span>)==0) ) {
<a name="l00087"></a>00087         <span class="comment">//cout &lt;&lt; &quot;enrobage.cpp : &#39;architecture&#39; directory found in gFaustSuperDirectory&quot; &lt;&lt; endl;</span>
<a name="l00088"></a>00088         ifstream* f = <span class="keyword">new</span> ifstream();
<a name="l00089"></a>00089         f-&gt;open(filename, ifstream::in);
<a name="l00090"></a>00090         <span class="keywordflow">if</span> (f-&gt;good()) <span class="keywordflow">return</span> f; <span class="keywordflow">else</span> <span class="keyword">delete</span> f;
<a name="l00091"></a>00091     }
<a name="l00092"></a>00092     err = chdir(old);
<a name="l00093"></a>00093     <span class="keywordflow">if</span> ((chdir(<a class="code" href="doc_8cpp.html#a09fc40a224a32f929decbac5a21140ef">gFaustSuperSuperDirectory</a>.c_str())==0) &amp;&amp; (chdir(<span class="stringliteral">&quot;architecture&quot;</span>)==0) ) {
<a name="l00094"></a>00094         <span class="comment">//cout &lt;&lt; &quot;enrobage.cpp : &#39;architecture&#39; directory found in gFaustSuperSuperDirectory&quot; &lt;&lt; endl;</span>
<a name="l00095"></a>00095         ifstream* f = <span class="keyword">new</span> ifstream();
<a name="l00096"></a>00096         f-&gt;open(filename, ifstream::in);
<a name="l00097"></a>00097         <span class="keywordflow">if</span> (f-&gt;good()) <span class="keywordflow">return</span> f; <span class="keywordflow">else</span> <span class="keyword">delete</span> f;
<a name="l00098"></a>00098     }
<a name="l00099"></a>00099     err = chdir(old);
<a name="l00100"></a>00100     <span class="keywordflow">if</span> (chdir(<span class="stringliteral">&quot;/usr/local/lib/faust&quot;</span>)==0) {
<a name="l00101"></a>00101         ifstream* f = <span class="keyword">new</span> ifstream();
<a name="l00102"></a>00102         f-&gt;open(filename); 
<a name="l00103"></a>00103         <span class="keywordflow">if</span> (f-&gt;good()) <span class="keywordflow">return</span> f; <span class="keywordflow">else</span> <span class="keyword">delete</span> f;
<a name="l00104"></a>00104     }
<a name="l00105"></a>00105     err = chdir(old);
<a name="l00106"></a>00106     <span class="keywordflow">if</span> (chdir(<span class="stringliteral">&quot;/usr/lib/faust&quot;</span>)==0) {
<a name="l00107"></a>00107         ifstream* f = <span class="keyword">new</span> ifstream();
<a name="l00108"></a>00108         f-&gt;open(filename); 
<a name="l00109"></a>00109         <span class="keywordflow">if</span> (f-&gt;good()) <span class="keywordflow">return</span> f; <span class="keywordflow">else</span> <span class="keyword">delete</span> f;
<a name="l00110"></a>00110     }
<a name="l00111"></a>00111     
<a name="l00112"></a>00112     <span class="keywordflow">return</span> 0;
<a name="l00113"></a>00113 }
</pre></div></p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
</div>
</p>

</div>
</div>
<a class="anchor" id="aeea853d479ea9c4fbf204795c0334e9d"></a><!-- doxytag: member="enrobage.hh::streamCopy" ref="aeea853d479ea9c4fbf204795c0334e9d" args="(istream &amp;src, ostream &amp;dst)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void streamCopy </td>
          <td>(</td>
          <td class="paramtype">istream &amp;&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ostream &amp;&nbsp;</td>
          <td class="paramname"> <em>dst</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copy src to dst. </p>

<p>Definition at line <a class="el" href="enrobage_8cpp_source.html#l00050">50</a> of file <a class="el" href="enrobage_8cpp_source.html">enrobage.cpp</a>.</p>

<p>Referenced by <a class="el" href="main_8cpp_source.html#l00475">main()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00051"></a>00051 { 
<a name="l00052"></a>00052     <span class="keywordtype">string</span>  s;
<a name="l00053"></a>00053     <span class="keywordflow">while</span> ( getline(src,s)) dst &lt;&lt; s &lt;&lt; endl;
<a name="l00054"></a>00054 }
</pre></div></p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
</div>
</p>

</div>
</div>
<a class="anchor" id="a5f5bd14f70f4edf37e76608dab1a6bd2"></a><!-- doxytag: member="enrobage.hh::streamCopyUntil" ref="a5f5bd14f70f4edf37e76608dab1a6bd2" args="(istream &amp;src, ostream &amp;dst, const string &amp;until)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void streamCopyUntil </td>
          <td>(</td>
          <td class="paramtype">istream &amp;&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ostream &amp;&nbsp;</td>
          <td class="paramname"> <em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&nbsp;</td>
          <td class="paramname"> <em>until</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copy src to dst until specific line. </p>

<p>Definition at line <a class="el" href="enrobage_8cpp_source.html#l00041">41</a> of file <a class="el" href="enrobage_8cpp_source.html">enrobage.cpp</a>.</p>

<p>Referenced by <a class="el" href="main_8cpp_source.html#l00475">main()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00042"></a>00042 { 
<a name="l00043"></a>00043     <span class="keywordtype">string</span>  s;
<a name="l00044"></a>00044     <span class="keywordflow">while</span> ( getline(src,s) &amp;&amp; (s != until) ) dst &lt;&lt; s &lt;&lt; endl;
<a name="l00045"></a>00045 }
</pre></div></p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
</div>
</p>

</div>
</div>
<a class="anchor" id="af1ac810ee8c704632447ef8650c8dc20"></a><!-- doxytag: member="enrobage.hh::streamCopyUntilEnd" ref="af1ac810ee8c704632447ef8650c8dc20" args="(istream &amp;src, ostream &amp;dst)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void streamCopyUntilEnd </td>
          <td>(</td>
          <td class="paramtype">istream &amp;&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ostream &amp;&nbsp;</td>
          <td class="paramname"> <em>dst</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copy src to dst until end. </p>

<p>Definition at line <a class="el" href="enrobage_8cpp_source.html#l00059">59</a> of file <a class="el" href="enrobage_8cpp_source.html">enrobage.cpp</a>.</p>

<p>Referenced by <a class="el" href="main_8cpp_source.html#l00475">main()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00060"></a>00060 { 
<a name="l00061"></a>00061     <span class="keywordtype">string</span>  s;
<a name="l00062"></a>00062     <span class="keywordflow">while</span> ( getline(src,s) ) dst &lt;&lt; s &lt;&lt; endl;
<a name="l00063"></a>00063 }
</pre></div></p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
</div>
</p>

</div>
</div>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Apr 29 00:00:05 2010 for FAUST compiler by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>