about summary refs log tree commit diff stats
path: root/html/001help.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-11-29 14:18:52 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-11-29 14:18:52 -0800
commitdb1f56c8449d2ea3d158753fe37bac5a750a2566 (patch)
tree508a24c522c040498dbe7d60036035f3c4ae440a /html/001help.cc.html
parent3670fb87f6d38c9ba4fcbb1eaa6439b4007a194e (diff)
downloadmu-db1f56c8449d2ea3d158753fe37bac5a750a2566.tar.gz
2611
Diffstat (limited to 'html/001help.cc.html')
-rw-r--r--html/001help.cc.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/html/001help.cc.html b/html/001help.cc.html
index a6a34cdd..eaa49b8b 100644
--- a/html/001help.cc.html
+++ b/html/001help.cc.html
@@ -49,6 +49,9 @@ if <span class="Delimiter">(</span>argc &lt;= <span class="Constant">1</span> ||
        &lt;&lt; <span class="Constant">&quot;You can test directories just like files.</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span>
        &lt;&lt; <span class="Constant">&quot;To pass ingredients to a mu program, provide them after '--':</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span>
        &lt;&lt; <span class="Constant">&quot;  mu file_or_dir1 file_or_dir2 ... -- ingredient1 ingredient2 ...</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span>
+       &lt;&lt; <span class="Constant">&quot;</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span>
+       &lt;&lt; <span class="Constant">&quot;To browse a trace generated by a previous run:</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span>
+       &lt;&lt; <span class="Constant">&quot;  mu browse-trace file</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span>
        <span class="Delimiter">;</span>
   <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span>
 <span class="Delimiter">}</span>
@@ -146,6 +149,13 @@ template&lt;typename T&gt; typename T::mapped_type&amp; get_or_insert<span class
 <span class="Delimiter">}</span>
 <span class="Comment">//: The contract: any container that relies on get_or_insert should never call</span>
 <span class="Comment">//: contains_key.</span>
+<span class="Comment">//:</span>
+<span class="Comment">//: 7. istreams are a royal pain in the arse. You have to be careful about</span>
+<span class="Comment">//: what subclass you try to putback into. You have to watch out for the pesky</span>
+<span class="Comment">//: failbit and badbit. Just avoid eof() and use this helper instead.</span>
+bool has_data<span class="Delimiter">(</span>istream&amp; in<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  <span class="Identifier">return</span> in &amp;&amp; !in<span class="Delimiter">.</span>eof<span class="Delimiter">();</span>
+<span class="Delimiter">}</span>
 
 <span class="Delimiter">:(before &quot;End Includes&quot;)</span>
 <span class="PreProc">#include</span><span class="Constant">&lt;assert.h&gt;</span>