about summary refs log tree commit diff stats
path: root/html/029tools.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-12-15 14:32:47 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-12-15 14:32:47 -0800
commit67db19a05335c7fbea3ad6737303c8848fd39e74 (patch)
tree00d9585bf4de231254867d8c7515386934bb3d3f /html/029tools.cc.html
parent62a390ca0a27daa80ce4b6b17934d8d067db8631 (diff)
downloadmu-67db19a05335c7fbea3ad6737303c8848fd39e74.tar.gz
2545
update html
Diffstat (limited to 'html/029tools.cc.html')
-rw-r--r--html/029tools.cc.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/html/029tools.cc.html b/html/029tools.cc.html
index 4b78fe12..5355d922 100644
--- a/html/029tools.cc.html
+++ b/html/029tools.cc.html
@@ -16,6 +16,7 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; }
 .traceContains { color: #008000; }
 .SalientComment { color: #00ffff; }
 .cSpecial { color: #008000; }
+.CommentedCode { color: #6c6c6c; }
 .Comment { color: #9090ff; }
 .Delimiter { color: #a04060; }
 .Special { color: #ff6060; }
@@ -335,6 +336,32 @@ case _DUMP_MEMORY: <span class="Delimiter">{</span>
   dump_memory<span class="Delimiter">();</span>
   <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span class="Delimiter">}</span>
+
+<span class="Comment">//: In times of real extremis we need to create a whole new modality for debug</span>
+<span class="Comment">//: logs, independent of other changes to the screen or Trace_stream.</span>
+
+<span class="Delimiter">:(before &quot;End Globals&quot;)</span>
+ofstream LOG<span class="Delimiter">;</span>
+<span class="Delimiter">:(before &quot;End One-time Setup&quot;)</span>
+<span class="CommentedCode">//? LOG.open(&quot;log&quot;);</span>
+
+<span class="Delimiter">:(before &quot;End Primitive Recipe Declarations&quot;)</span>
+_LOG<span class="Delimiter">,</span>
+<span class="Delimiter">:(before &quot;End Primitive Recipe Numbers&quot;)</span>
+put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">&quot;$log&quot;</span><span class="Delimiter">,</span> _LOG<span class="Delimiter">);</span>
+<span class="Delimiter">:(before &quot;End Primitive Recipe Checks&quot;)</span>
+case _LOG: <span class="Delimiter">{</span>
+  <span class="Identifier">break</span><span class="Delimiter">;</span>
+<span class="Delimiter">}</span>
+<span class="Delimiter">:(before &quot;End Primitive Recipe Implementations&quot;)</span>
+case _LOG: <span class="Delimiter">{</span>
+  ostringstream out<span class="Delimiter">;</span>
+  for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+    out &lt;&lt; print_mu<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">),</span> ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span>
+  <span class="Delimiter">}</span>
+  LOG &lt;&lt; out<span class="Delimiter">.</span>str<span class="Delimiter">()</span> &lt;&lt; <span class="Constant">&quot;(length: &quot;</span> &lt;&lt; get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">&quot;length&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">'/'</span> &lt;&lt; contains_key<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">&quot;length&quot;</span><span class="Delimiter">))</span> &lt;&lt; <span class="Constant">&quot;)</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span><span class="Delimiter">;</span>
+  <span class="Identifier">break</span><span class="Delimiter">;</span>
+<span class="Delimiter">}</span>
 </pre>
 </body>
 </html>