about summary refs log tree commit diff stats
path: root/html/003trace.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-08-06 19:15:57 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-08-06 19:15:57 -0700
commiteaeb955212eb3b133fd98d98457f17bfea8891d1 (patch)
tree4dbf20c0a79c460ea0ed129594670c58818a2dd4 /html/003trace.cc.html
parent5d1699c2c75adc9670bf14404466c8056910b709 (diff)
downloadmu-eaeb955212eb3b133fd98d98457f17bfea8891d1.tar.gz
1949
Diffstat (limited to 'html/003trace.cc.html')
-rw-r--r--html/003trace.cc.html161
1 files changed, 81 insertions, 80 deletions
diff --git a/html/003trace.cc.html b/html/003trace.cc.html
index 22764804..6894ecfc 100644
--- a/html/003trace.cc.html
+++ b/html/003trace.cc.html
@@ -13,9 +13,10 @@
 pre { white-space: pre-wrap; font-family: monospace; color: #eeeeee; background-color: #080808; }
 body { font-family: monospace; color: #eeeeee; background-color: #080808; }
 * { font-size: 1.05em; }
-.cSpecial { color: #008000; }
 .Constant { color: #00a0a0; }
+.cSpecial { color: #008000; }
 .PreProc { color: #c000c0; }
+.Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; }
 .Comment { color: #9090ff; }
 .Delimiter { color: #a04060; }
 .CommentedCode { color: #6c6c6c; }
@@ -114,64 +115,64 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; }
 <span class="Comment">// End Tracing  // hack to ensure most code in this layer comes before anything else</span>
 
 <span class="Delimiter">:(before &quot;End Tracing&quot;)</span>
-bool Hide_warnings = <span class="Constant">false</span><span class="Delimiter">;</span>
+<span class="Normal">bool</span> Hide_warnings = <span class="Constant">false</span><span class="Delimiter">;</span>
 <span class="Delimiter">:(before &quot;End Setup&quot;)</span>
 <span class="CommentedCode">//? cerr &lt;&lt; &quot;AAA setup\n&quot;; //? 2</span>
 Hide_warnings = <span class="Constant">false</span><span class="Delimiter">;</span>
 
 <span class="Delimiter">:(before &quot;End Types&quot;)</span>
-struct trace_line <span class="Delimiter">{</span>
-  int depth<span class="Delimiter">;</span>  <span class="Comment">// optional field just to help browse traces later</span>
+<span class="Normal">struct</span> trace_line <span class="Delimiter">{</span>
+  <span class="Normal">int</span> depth<span class="Delimiter">;</span>  <span class="Comment">// optional field just to help browse traces later</span>
   string label<span class="Delimiter">;</span>
   string contents<span class="Delimiter">;</span>
   trace_line<span class="Delimiter">(</span>string l<span class="Delimiter">,</span> string c<span class="Delimiter">)</span> :depth<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">),</span> label<span class="Delimiter">(</span>l<span class="Delimiter">),</span> contents<span class="Delimiter">(</span>c<span class="Delimiter">)</span> <span class="Delimiter">{}</span>
-  trace_line<span class="Delimiter">(</span>int d<span class="Delimiter">,</span> string l<span class="Delimiter">,</span> string c<span class="Delimiter">)</span> :depth<span class="Delimiter">(</span>d<span class="Delimiter">),</span> label<span class="Delimiter">(</span>l<span class="Delimiter">),</span> contents<span class="Delimiter">(</span>c<span class="Delimiter">)</span> <span class="Delimiter">{}</span>
+  trace_line<span class="Delimiter">(</span><span class="Normal">int</span> d<span class="Delimiter">,</span> string l<span class="Delimiter">,</span> string c<span class="Delimiter">)</span> :depth<span class="Delimiter">(</span>d<span class="Delimiter">),</span> label<span class="Delimiter">(</span>l<span class="Delimiter">),</span> contents<span class="Delimiter">(</span>c<span class="Delimiter">)</span> <span class="Delimiter">{}</span>
 <span class="Delimiter">};</span>
 
 <span class="Delimiter">:(before &quot;End Tracing&quot;)</span>
-struct trace_stream <span class="Delimiter">{</span>
+<span class="Normal">struct</span> trace_stream <span class="Delimiter">{</span>
   vector&lt;trace_line&gt; past_lines<span class="Delimiter">;</span>
   <span class="Comment">// accumulator for current line</span>
   ostringstream* curr_stream<span class="Delimiter">;</span>
   string curr_layer<span class="Delimiter">;</span>
-  int curr_depth<span class="Delimiter">;</span>
+  <span class="Normal">int</span> curr_depth<span class="Delimiter">;</span>
   string dump_layer<span class="Delimiter">;</span>
   set&lt;string&gt; collect_layers<span class="Delimiter">;</span>  <span class="Comment">// if not empty, ignore all absent layers</span>
   ofstream null_stream<span class="Delimiter">;</span>  <span class="Comment">// never opens a file, so writes silently fail</span>
   trace_stream<span class="Delimiter">()</span> :curr_stream<span class="Delimiter">(</span><span class="Constant">NULL</span><span class="Delimiter">),</span> curr_depth<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{}</span>
-  ~trace_stream<span class="Delimiter">()</span> <span class="Delimiter">{</span> if <span class="Delimiter">(</span>curr_stream<span class="Delimiter">)</span> delete curr_stream<span class="Delimiter">;</span> <span class="Delimiter">}</span>
+  ~trace_stream<span class="Delimiter">()</span> <span class="Delimiter">{</span> <span class="Normal">if</span> <span class="Delimiter">(</span>curr_stream<span class="Delimiter">)</span> <span class="Normal">delete</span> curr_stream<span class="Delimiter">;</span> <span class="Delimiter">}</span>
 
   ostream&amp; stream<span class="Delimiter">(</span>string layer<span class="Delimiter">)</span> <span class="Delimiter">{</span>
     <span class="Identifier">return</span> stream<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">,</span> layer<span class="Delimiter">);</span>
   <span class="Delimiter">}</span>
 
-  ostream&amp; stream<span class="Delimiter">(</span>int depth<span class="Delimiter">,</span> string layer<span class="Delimiter">)</span> <span class="Delimiter">{</span>
-    if <span class="Delimiter">(</span>!is_collecting<span class="Delimiter">(</span>layer<span class="Delimiter">))</span> <span class="Identifier">return</span> null_stream<span class="Delimiter">;</span>
-    curr_stream = new ostringstream<span class="Delimiter">;</span>
+  ostream&amp; stream<span class="Delimiter">(</span><span class="Normal">int</span> depth<span class="Delimiter">,</span> string layer<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>!is_collecting<span class="Delimiter">(</span>layer<span class="Delimiter">))</span> <span class="Identifier">return</span> null_stream<span class="Delimiter">;</span>
+    curr_stream = <span class="Normal">new</span> ostringstream<span class="Delimiter">;</span>
     curr_layer = layer<span class="Delimiter">;</span>
     curr_depth = depth<span class="Delimiter">;</span>
     <span class="Identifier">return</span> *curr_stream<span class="Delimiter">;</span>
   <span class="Delimiter">}</span>
 
-  bool is_collecting<span class="Delimiter">(</span>const string&amp; layer<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  <span class="Normal">bool</span> is_collecting<span class="Delimiter">(</span><span class="Normal">const</span> string&amp; layer<span class="Delimiter">)</span> <span class="Delimiter">{</span>
     <span class="Identifier">return</span> collect_layers<span class="Delimiter">.</span>empty<span class="Delimiter">()</span> || collect_layers<span class="Delimiter">.</span>find<span class="Delimiter">(</span>layer<span class="Delimiter">)</span> != collect_layers<span class="Delimiter">.</span>end<span class="Delimiter">();</span>
   <span class="Delimiter">}</span>
 
-  bool is_narrowly_collecting<span class="Delimiter">(</span>const string&amp; layer<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  <span class="Normal">bool</span> is_narrowly_collecting<span class="Delimiter">(</span><span class="Normal">const</span> string&amp; layer<span class="Delimiter">)</span> <span class="Delimiter">{</span>
     <span class="Identifier">return</span> collect_layers<span class="Delimiter">.</span>find<span class="Delimiter">(</span>layer<span class="Delimiter">)</span> != collect_layers<span class="Delimiter">.</span>end<span class="Delimiter">();</span>
   <span class="Delimiter">}</span>
 
   <span class="Comment">// be sure to call this before messing with curr_stream or curr_layer</span>
-  void newline<span class="Delimiter">()</span> <span class="Delimiter">{</span>
-    if <span class="Delimiter">(</span>!curr_stream<span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Delimiter">;</span>
+  <span class="Normal">void</span> newline<span class="Delimiter">()</span> <span class="Delimiter">{</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>!curr_stream<span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Delimiter">;</span>
     string curr_contents = curr_stream<span class="Delimiter">-&gt;</span>str<span class="Delimiter">();</span>
-    if <span class="Delimiter">(</span>curr_contents<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>curr_contents<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span>
     past_lines<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>trace_line<span class="Delimiter">(</span>curr_depth<span class="Delimiter">,</span> trim<span class="Delimiter">(</span>curr_layer<span class="Delimiter">),</span> curr_contents<span class="Delimiter">));</span>  <span class="Comment">// preserve indent in contents</span>
-    if <span class="Delimiter">(</span>curr_layer == dump_layer || curr_layer == <span class="Constant">&quot;dump&quot;</span> || dump_layer == <span class="Constant">&quot;all&quot;</span> ||
+    <span class="Normal">if</span> <span class="Delimiter">(</span>curr_layer == dump_layer || curr_layer == <span class="Constant">&quot;dump&quot;</span> || dump_layer == <span class="Constant">&quot;all&quot;</span> ||
         <span class="Delimiter">(</span>!Hide_warnings &amp;&amp; curr_layer == <span class="Constant">&quot;warn&quot;</span><span class="Delimiter">))</span>
 <span class="CommentedCode">//?     if (dump_layer == &quot;all&quot; &amp;&amp; (Current_routine-&gt;id == 3 || curr_layer == &quot;schedule&quot;)) //? 1</span>
       cerr &lt;&lt; curr_layer &lt;&lt; <span class="Constant">&quot;: &quot;</span> &lt;&lt; curr_contents &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
-    delete curr_stream<span class="Delimiter">;</span>
+    <span class="Normal">delete</span> curr_stream<span class="Delimiter">;</span>
     curr_stream = <span class="Constant">NULL</span><span class="Delimiter">;</span>
     curr_layer<span class="Delimiter">.</span>clear<span class="Delimiter">();</span>
     curr_depth = <span class="Constant">0</span><span class="Delimiter">;</span>
@@ -181,9 +182,9 @@ struct trace_stream <span class="Delimiter">{</span>
   string readable_contents<span class="Delimiter">(</span>string layer<span class="Delimiter">)</span> <span class="Delimiter">{</span>  <span class="Comment">// missing layer = everything</span>
     ostringstream output<span class="Delimiter">;</span>
     layer = trim<span class="Delimiter">(</span>layer<span class="Delimiter">);</span>
-    for <span class="Delimiter">(</span>vector&lt;trace_line&gt;::iterator p = past_lines<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != past_lines<span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++p<span class="Delimiter">)</span>
-      if <span class="Delimiter">(</span>layer<span class="Delimiter">.</span>empty<span class="Delimiter">()</span> || layer == p<span class="Delimiter">-&gt;</span>label<span class="Delimiter">)</span> <span class="Delimiter">{</span>
-        if <span class="Delimiter">(</span>p<span class="Delimiter">-&gt;</span>depth<span class="Delimiter">)</span>
+    <span class="Normal">for</span> <span class="Delimiter">(</span>vector&lt;trace_line&gt;::iterator p = past_lines<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != past_lines<span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++p<span class="Delimiter">)</span>
+      <span class="Normal">if</span> <span class="Delimiter">(</span>layer<span class="Delimiter">.</span>empty<span class="Delimiter">()</span> || layer == p<span class="Delimiter">-&gt;</span>label<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+        <span class="Normal">if</span> <span class="Delimiter">(</span>p<span class="Delimiter">-&gt;</span>depth<span class="Delimiter">)</span>
           output &lt;&lt; std::setw<span class="Delimiter">(</span><span class="Constant">4</span><span class="Delimiter">)</span> &lt;&lt; p<span class="Delimiter">-&gt;</span>depth &lt;&lt; <span class="Constant">' '</span><span class="Delimiter">;</span>
         output &lt;&lt; p<span class="Delimiter">-&gt;</span>label &lt;&lt; <span class="Constant">&quot;: &quot;</span> &lt;&lt; p<span class="Delimiter">-&gt;</span>contents &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
       <span class="Delimiter">}</span>
@@ -202,34 +203,34 @@ trace_stream* Trace_stream = <span class="Constant">NULL</span><span class="Deli
 <span class="PreProc">#define raise  ((!Trace_stream || !Hide_warnings) ? (tb_shutdown()</span><span class="Delimiter">,</span><span class="PreProc">cerr) </span><span class="Comment">/*</span><span class="Comment">do print</span><span class="Comment">*/</span><span class="PreProc"> : Trace_stream</span><span class="Delimiter">-&gt;</span><span class="PreProc">stream(</span><span class="Constant">&quot;warn&quot;</span><span class="PreProc">))</span>
 
 <span class="Delimiter">:(before &quot;End Types&quot;)</span>
-struct end <span class="Delimiter">{};</span>
+<span class="Normal">struct</span> end <span class="Delimiter">{};</span>
 <span class="Delimiter">:(before &quot;End Tracing&quot;)</span>
-ostream&amp; operator&lt;&lt;<span class="Delimiter">(</span>ostream&amp; os<span class="Delimiter">,</span> unused end<span class="Delimiter">)</span> <span class="Delimiter">{</span>
-  if <span class="Delimiter">(</span>Trace_stream<span class="Delimiter">)</span> Trace_stream<span class="Delimiter">-&gt;</span>newline<span class="Delimiter">();</span>
+ostream&amp; <span class="Normal">operator</span>&lt;&lt;<span class="Delimiter">(</span>ostream&amp; os<span class="Delimiter">,</span> unused end<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  <span class="Normal">if</span> <span class="Delimiter">(</span>Trace_stream<span class="Delimiter">)</span> Trace_stream<span class="Delimiter">-&gt;</span>newline<span class="Delimiter">();</span>
   <span class="Identifier">return</span> os<span class="Delimiter">;</span>
 <span class="Delimiter">}</span>
 
-<span class="PreProc">#define CLEAR_TRACE  </span>delete<span class="PreProc"> Trace_stream</span><span class="Delimiter">,</span><span class="PreProc"> Trace_stream = </span>new<span class="PreProc"> trace_stream</span><span class="Delimiter">;</span>
+<span class="PreProc">#define CLEAR_TRACE  </span><span class="Normal">delete</span><span class="PreProc"> Trace_stream</span><span class="Delimiter">,</span><span class="PreProc"> Trace_stream = </span><span class="Normal">new</span><span class="PreProc"> trace_stream</span><span class="Delimiter">;</span>
 
-<span class="PreProc">#define DUMP(layer)  </span>if<span class="PreProc"> (Trace_stream) cerr &lt;&lt; Trace_stream</span><span class="Delimiter">-&gt;</span><span class="PreProc">readable_contents(layer)</span><span class="Delimiter">;</span>
+<span class="PreProc">#define DUMP(layer)  </span><span class="Normal">if</span><span class="PreProc"> (Trace_stream) cerr &lt;&lt; Trace_stream</span><span class="Delimiter">-&gt;</span><span class="PreProc">readable_contents(layer)</span><span class="Delimiter">;</span>
 
 <span class="Comment">// All scenarios save their traces in the repo, just like code. This gives</span>
 <span class="Comment">// future readers more meat when they try to make sense of a new project.</span>
-static string Trace_dir = <span class="Constant">&quot;.traces/&quot;</span><span class="Delimiter">;</span>
+<span class="Normal">static</span> string Trace_dir = <span class="Constant">&quot;.traces/&quot;</span><span class="Delimiter">;</span>
 string Trace_file<span class="Delimiter">;</span>
 
 <span class="Comment">// Trace_stream is a resource, lease_tracer uses RAII to manage it.</span>
-struct lease_tracer <span class="Delimiter">{</span>
-  lease_tracer<span class="Delimiter">()</span> <span class="Delimiter">{</span> Trace_stream = new trace_stream<span class="Delimiter">;</span> <span class="Delimiter">}</span>
+<span class="Normal">struct</span> lease_tracer <span class="Delimiter">{</span>
+  lease_tracer<span class="Delimiter">()</span> <span class="Delimiter">{</span> Trace_stream = <span class="Normal">new</span> trace_stream<span class="Delimiter">;</span> <span class="Delimiter">}</span>
   ~lease_tracer<span class="Delimiter">()</span> <span class="Delimiter">{</span>
 <span class="CommentedCode">//?     cerr &lt;&lt; &quot;write to file? &quot; &lt;&lt; Trace_file &lt;&lt; &quot;$\n&quot;; //? 2</span>
-    if <span class="Delimiter">(</span>!Trace_file<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>!Trace_file<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span>
 <span class="CommentedCode">//?       cerr &lt;&lt; &quot;writing\n&quot;; //? 2</span>
       ofstream fout<span class="Delimiter">((</span>Trace_dir+Trace_file<span class="Delimiter">).</span>c_str<span class="Delimiter">());</span>
       fout &lt;&lt; Trace_stream<span class="Delimiter">-&gt;</span>readable_contents<span class="Delimiter">(</span><span class="Constant">&quot;&quot;</span><span class="Delimiter">);</span>
       fout<span class="Delimiter">.</span>close<span class="Delimiter">();</span>
     <span class="Delimiter">}</span>
-    delete Trace_stream<span class="Delimiter">,</span> Trace_stream = <span class="Constant">NULL</span><span class="Delimiter">,</span> Trace_file = <span class="Constant">&quot;&quot;</span><span class="Delimiter">;</span>
+    <span class="Normal">delete</span> Trace_stream<span class="Delimiter">,</span> Trace_stream = <span class="Constant">NULL</span><span class="Delimiter">,</span> Trace_file = <span class="Constant">&quot;&quot;</span><span class="Delimiter">;</span>
   <span class="Delimiter">}</span>
 <span class="Delimiter">};</span>
 
@@ -241,47 +242,47 @@ START_TRACING_UNTIL_END_OF_SCOPE
 <span class="PreProc">#define CHECK_TRACE_CONTENTS(</span><span class="Delimiter">...</span><span class="PreProc">)  check_trace_contents(__FUNCTION__</span><span class="Delimiter">,</span><span class="PreProc"> </span><span class="Constant">__FILE__</span><span class="Delimiter">,</span><span class="PreProc"> </span><span class="Constant">__LINE__</span><span class="Delimiter">,</span><span class="PreProc"> __VA_ARGS__)</span>
 
 <span class="Delimiter">:(before &quot;End Tracing&quot;)</span>
-bool check_trace_contents<span class="Delimiter">(</span>string FUNCTION<span class="Delimiter">,</span> string FILE<span class="Delimiter">,</span> int LINE<span class="Delimiter">,</span> string expected<span class="Delimiter">)</span> <span class="Delimiter">{</span>  <span class="Comment">// missing layer == anywhere</span>
+<span class="Normal">bool</span> check_trace_contents<span class="Delimiter">(</span>string FUNCTION<span class="Delimiter">,</span> string <span class="Normal">FILE</span><span class="Delimiter">,</span> <span class="Normal">int</span> LINE<span class="Delimiter">,</span> string expected<span class="Delimiter">)</span> <span class="Delimiter">{</span>  <span class="Comment">// missing layer == anywhere</span>
   vector&lt;string&gt; expected_lines = split<span class="Delimiter">(</span>expected<span class="Delimiter">,</span> <span class="Constant">&quot;^D&quot;</span><span class="Delimiter">);</span>
-  long long int curr_expected_line = <span class="Constant">0</span><span class="Delimiter">;</span>
-  while <span class="Delimiter">(</span>curr_expected_line &lt; SIZE<span class="Delimiter">(</span>expected_lines<span class="Delimiter">)</span> &amp;&amp; expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>empty<span class="Delimiter">())</span>
+  <span class="Normal">long</span> <span class="Normal">long</span> <span class="Normal">int</span> curr_expected_line = <span class="Constant">0</span><span class="Delimiter">;</span>
+  <span class="Normal">while</span> <span class="Delimiter">(</span>curr_expected_line &lt; SIZE<span class="Delimiter">(</span>expected_lines<span class="Delimiter">)</span> &amp;&amp; expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>empty<span class="Delimiter">())</span>
     ++curr_expected_line<span class="Delimiter">;</span>
-  if <span class="Delimiter">(</span>curr_expected_line == SIZE<span class="Delimiter">(</span>expected_lines<span class="Delimiter">))</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span>
+  <span class="Normal">if</span> <span class="Delimiter">(</span>curr_expected_line == SIZE<span class="Delimiter">(</span>expected_lines<span class="Delimiter">))</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span>
   string layer<span class="Delimiter">,</span> contents<span class="Delimiter">;</span>
   split_layer_contents<span class="Delimiter">(</span>expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">),</span> &amp;layer<span class="Delimiter">,</span> &amp;contents<span class="Delimiter">);</span>
-  for <span class="Delimiter">(</span>vector&lt;trace_line&gt;::iterator p = Trace_stream<span class="Delimiter">-&gt;</span>past_lines<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Trace_stream<span class="Delimiter">-&gt;</span>past_lines<span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  <span class="Normal">for</span> <span class="Delimiter">(</span>vector&lt;trace_line&gt;::iterator p = Trace_stream<span class="Delimiter">-&gt;</span>past_lines<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Trace_stream<span class="Delimiter">-&gt;</span>past_lines<span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span class="CommentedCode">//?     cerr &lt;&lt; &quot;AAA &quot; &lt;&lt; layer &lt;&lt; ' ' &lt;&lt; p-&gt;label &lt;&lt; '\n'; //? 1</span>
-    if <span class="Delimiter">(</span>layer != p<span class="Delimiter">-&gt;</span>label<span class="Delimiter">)</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>layer != p<span class="Delimiter">-&gt;</span>label<span class="Delimiter">)</span>
       <span class="Identifier">continue</span><span class="Delimiter">;</span>
 
 <span class="CommentedCode">//?     cerr &lt;&lt; &quot;BBB ^&quot; &lt;&lt; contents &lt;&lt; &quot;$ ^&quot; &lt;&lt; p-&gt;contents &lt;&lt; &quot;$\n&quot;; //? 1</span>
-    if <span class="Delimiter">(</span>contents != trim<span class="Delimiter">(</span>p<span class="Delimiter">-&gt;</span>contents<span class="Delimiter">))</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>contents != trim<span class="Delimiter">(</span>p<span class="Delimiter">-&gt;</span>contents<span class="Delimiter">))</span>
       <span class="Identifier">continue</span><span class="Delimiter">;</span>
 
 <span class="CommentedCode">//?     cerr &lt;&lt; &quot;CCC\n&quot;; //? 1</span>
     ++curr_expected_line<span class="Delimiter">;</span>
-    while <span class="Delimiter">(</span>curr_expected_line &lt; SIZE<span class="Delimiter">(</span>expected_lines<span class="Delimiter">)</span> &amp;&amp; expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>empty<span class="Delimiter">())</span>
+    <span class="Normal">while</span> <span class="Delimiter">(</span>curr_expected_line &lt; SIZE<span class="Delimiter">(</span>expected_lines<span class="Delimiter">)</span> &amp;&amp; expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>empty<span class="Delimiter">())</span>
       ++curr_expected_line<span class="Delimiter">;</span>
-    if <span class="Delimiter">(</span>curr_expected_line == SIZE<span class="Delimiter">(</span>expected_lines<span class="Delimiter">))</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>curr_expected_line == SIZE<span class="Delimiter">(</span>expected_lines<span class="Delimiter">))</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span>
     split_layer_contents<span class="Delimiter">(</span>expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">),</span> &amp;layer<span class="Delimiter">,</span> &amp;contents<span class="Delimiter">);</span>
   <span class="Delimiter">}</span>
 
   ++Num_failures<span class="Delimiter">;</span>
-  cerr &lt;&lt; <span class="Constant">&quot;</span><span class="cSpecial">\n</span><span class="Constant">F - &quot;</span> &lt;&lt; FUNCTION &lt;&lt; <span class="Constant">&quot;(&quot;</span> &lt;&lt; FILE &lt;&lt; <span class="Constant">&quot;:&quot;</span> &lt;&lt; LINE &lt;&lt; <span class="Constant">&quot;): missing [&quot;</span> &lt;&lt; contents &lt;&lt; <span class="Constant">&quot;] in trace:</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span><span class="Delimiter">;</span>
+  cerr &lt;&lt; <span class="Constant">&quot;</span><span class="cSpecial">\n</span><span class="Constant">F - &quot;</span> &lt;&lt; FUNCTION &lt;&lt; <span class="Constant">&quot;(&quot;</span> &lt;&lt; <span class="Normal">FILE</span> &lt;&lt; <span class="Constant">&quot;:&quot;</span> &lt;&lt; LINE &lt;&lt; <span class="Constant">&quot;): missing [&quot;</span> &lt;&lt; contents &lt;&lt; <span class="Constant">&quot;] in trace:</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span><span class="Delimiter">;</span>
   DUMP<span class="Delimiter">(</span>layer<span class="Delimiter">);</span>
 <span class="CommentedCode">//?   exit(0); //? 1</span>
   Passed = <span class="Constant">false</span><span class="Delimiter">;</span>
   <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span>
 <span class="Delimiter">}</span>
 
-void split_layer_contents<span class="Delimiter">(</span>const string&amp; s<span class="Delimiter">,</span> string* layer<span class="Delimiter">,</span> string* contents<span class="Delimiter">)</span> <span class="Delimiter">{</span>
-  static const string delim<span class="Delimiter">(</span><span class="Constant">&quot;: &quot;</span><span class="Delimiter">);</span>
-  size_t pos = s<span class="Delimiter">.</span>find<span class="Delimiter">(</span>delim<span class="Delimiter">);</span>
-  if <span class="Delimiter">(</span>pos == string::npos<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+<span class="Normal">void</span> split_layer_contents<span class="Delimiter">(</span><span class="Normal">const</span> string&amp; s<span class="Delimiter">,</span> string* layer<span class="Delimiter">,</span> string* contents<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  <span class="Normal">static</span> <span class="Normal">const</span> string delim<span class="Delimiter">(</span><span class="Constant">&quot;: &quot;</span><span class="Delimiter">);</span>
+  <span class="Normal">size_t</span> pos = s<span class="Delimiter">.</span>find<span class="Delimiter">(</span>delim<span class="Delimiter">);</span>
+  <span class="Normal">if</span> <span class="Delimiter">(</span>pos == string::npos<span class="Delimiter">)</span> <span class="Delimiter">{</span>
     *layer = <span class="Constant">&quot;&quot;</span><span class="Delimiter">;</span>
     *contents = trim<span class="Delimiter">(</span>s<span class="Delimiter">);</span>
   <span class="Delimiter">}</span>
-  else <span class="Delimiter">{</span>
+  <span class="Normal">else</span> <span class="Delimiter">{</span>
     *layer = trim<span class="Delimiter">(</span>s<span class="Delimiter">.</span>substr<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">,</span> pos<span class="Delimiter">));</span>
     *contents = trim<span class="Delimiter">(</span>s<span class="Delimiter">.</span>substr<span class="Delimiter">(</span>pos+SIZE<span class="Delimiter">(</span>delim<span class="Delimiter">)));</span>
   <span class="Delimiter">}</span>
@@ -289,17 +290,17 @@ void split_layer_contents<span class="Delimiter">(</span>const string&amp; s<spa
 
 ^L
 
-int trace_count<span class="Delimiter">(</span>string layer<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+<span class="Normal">int</span> trace_count<span class="Delimiter">(</span>string layer<span class="Delimiter">)</span> <span class="Delimiter">{</span>
   <span class="Identifier">return</span> trace_count<span class="Delimiter">(</span>layer<span class="Delimiter">,</span> <span class="Constant">&quot;&quot;</span><span class="Delimiter">);</span>
 <span class="Delimiter">}</span>
 
-int trace_count<span class="Delimiter">(</span>string layer<span class="Delimiter">,</span> string line<span class="Delimiter">)</span> <span class="Delimiter">{</span>
-  long result = <span class="Constant">0</span><span class="Delimiter">;</span>
-  for <span class="Delimiter">(</span>vector&lt;trace_line&gt;::iterator p = Trace_stream<span class="Delimiter">-&gt;</span>past_lines<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Trace_stream<span class="Delimiter">-&gt;</span>past_lines<span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span>
-    if <span class="Delimiter">(</span>layer == p<span class="Delimiter">-&gt;</span>label<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+<span class="Normal">int</span> trace_count<span class="Delimiter">(</span>string layer<span class="Delimiter">,</span> string line<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  <span class="Normal">long</span> result = <span class="Constant">0</span><span class="Delimiter">;</span>
+  <span class="Normal">for</span> <span class="Delimiter">(</span>vector&lt;trace_line&gt;::iterator p = Trace_stream<span class="Delimiter">-&gt;</span>past_lines<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Trace_stream<span class="Delimiter">-&gt;</span>past_lines<span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>layer == p<span class="Delimiter">-&gt;</span>label<span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span class="CommentedCode">//?       cerr &lt;&lt; &quot;a: &quot; &lt;&lt; line &lt;&lt; &quot;$\n&quot;; //? 1</span>
 <span class="CommentedCode">//?       cerr &lt;&lt; &quot;b: &quot; &lt;&lt; trim(p-&gt;contents) &lt;&lt; &quot;$\n&quot;; //? 1</span>
-      if <span class="Delimiter">(</span>line == <span class="Constant">&quot;&quot;</span> || line == trim<span class="Delimiter">(</span>p<span class="Delimiter">-&gt;</span>contents<span class="Delimiter">))</span>
+      <span class="Normal">if</span> <span class="Delimiter">(</span>line == <span class="Constant">&quot;&quot;</span> || line == trim<span class="Delimiter">(</span>p<span class="Delimiter">-&gt;</span>contents<span class="Delimiter">))</span>
         ++result<span class="Delimiter">;</span>
     <span class="Delimiter">}</span>
   <span class="Delimiter">}</span>
@@ -308,7 +309,7 @@ int trace_count<span class="Delimiter">(</span>string layer<span class="Delimite
 
 <span class="PreProc">#define CHECK_TRACE_WARNS()  CHECK(trace_count(</span><span class="Constant">&quot;warn&quot;</span><span class="PreProc">) &gt; </span><span class="Constant">0</span><span class="PreProc">)</span>
 <span class="PreProc">#define CHECK_TRACE_DOESNT_WARN() \</span>
-<span class="PreProc">  </span>if<span class="PreProc"> (trace_count(</span><span class="Constant">&quot;warn&quot;</span><span class="PreProc">) &gt; </span><span class="Constant">0</span><span class="PreProc">) </span><span class="Delimiter">{</span><span class="PreProc"> \</span>
+<span class="PreProc">  </span><span class="Normal">if</span><span class="PreProc"> (trace_count(</span><span class="Constant">&quot;warn&quot;</span><span class="PreProc">) &gt; </span><span class="Constant">0</span><span class="PreProc">) </span><span class="Delimiter">{</span><span class="PreProc"> \</span>
 <span class="PreProc">    ++Num_failures</span><span class="Delimiter">;</span><span class="PreProc"> \</span>
 <span class="PreProc">    cerr &lt;&lt; </span><span class="Constant">&quot;</span><span class="cSpecial">\n</span><span class="Constant">F - &quot;</span><span class="PreProc"> &lt;&lt; __FUNCTION__ &lt;&lt; </span><span class="Constant">&quot;(&quot;</span><span class="PreProc"> &lt;&lt; </span><span class="Constant">__FILE__</span><span class="PreProc"> &lt;&lt; </span><span class="Constant">&quot;:&quot;</span><span class="PreProc"> &lt;&lt; </span><span class="Constant">__LINE__</span><span class="PreProc"> &lt;&lt; </span><span class="Constant">&quot;): unexpected warnings</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span><span class="Delimiter">;</span><span class="PreProc"> \</span>
 <span class="PreProc">    DUMP(</span><span class="Constant">&quot;warn&quot;</span><span class="PreProc">)</span><span class="Delimiter">;</span><span class="PreProc"> \</span>
@@ -316,11 +317,11 @@ int trace_count<span class="Delimiter">(</span>string layer<span class="Delimite
 <span class="PreProc">    </span><span class="Identifier">return</span><span class="Delimiter">;</span><span class="PreProc"> \</span>
 <span class="PreProc">  </span><span class="Delimiter">}</span>
 
-bool trace_doesnt_contain<span class="Delimiter">(</span>string layer<span class="Delimiter">,</span> string line<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+<span class="Normal">bool</span> trace_doesnt_contain<span class="Delimiter">(</span>string layer<span class="Delimiter">,</span> string line<span class="Delimiter">)</span> <span class="Delimiter">{</span>
   <span class="Identifier">return</span> trace_count<span class="Delimiter">(</span>layer<span class="Delimiter">,</span> line<span class="Delimiter">)</span> == <span class="Constant">0</span><span class="Delimiter">;</span>
 <span class="Delimiter">}</span>
 
-bool trace_doesnt_contain<span class="Delimiter">(</span>string expected<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+<span class="Normal">bool</span> trace_doesnt_contain<span class="Delimiter">(</span>string expected<span class="Delimiter">)</span> <span class="Delimiter">{</span>
   vector&lt;string&gt; tmp = split<span class="Delimiter">(</span>expected<span class="Delimiter">,</span> <span class="Constant">&quot;: &quot;</span><span class="Delimiter">);</span>
   <span class="Identifier">return</span> trace_doesnt_contain<span class="Delimiter">(</span>tmp<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">),</span> tmp<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">));</span>
 <span class="Delimiter">}</span>
@@ -331,9 +332,9 @@ bool trace_doesnt_contain<span class="Delimiter">(</span>string expected<span cl
 
 vector&lt;string&gt; split<span class="Delimiter">(</span>string s<span class="Delimiter">,</span> string delim<span class="Delimiter">)</span> <span class="Delimiter">{</span>
   vector&lt;string&gt; result<span class="Delimiter">;</span>
-  size_t begin=<span class="Constant">0</span><span class="Delimiter">,</span> end=s<span class="Delimiter">.</span>find<span class="Delimiter">(</span>delim<span class="Delimiter">);</span>
-  while <span class="Delimiter">(</span><span class="Constant">true</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
-    if <span class="Delimiter">(</span>end == string::npos<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  <span class="Normal">size_t</span> begin=<span class="Constant">0</span><span class="Delimiter">,</span> end=s<span class="Delimiter">.</span>find<span class="Delimiter">(</span>delim<span class="Delimiter">);</span>
+  <span class="Normal">while</span> <span class="Delimiter">(</span><span class="Constant">true</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>end == string::npos<span class="Delimiter">)</span> <span class="Delimiter">{</span>
       result<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>string<span class="Delimiter">(</span>s<span class="Delimiter">,</span> begin<span class="Delimiter">,</span> string::npos<span class="Delimiter">));</span>
       <span class="Identifier">break</span><span class="Delimiter">;</span>
     <span class="Delimiter">}</span>
@@ -344,14 +345,14 @@ vector&lt;string&gt; split<span class="Delimiter">(</span>string s<span class="D
   <span class="Identifier">return</span> result<span class="Delimiter">;</span>
 <span class="Delimiter">}</span>
 
-string trim<span class="Delimiter">(</span>const string&amp; s<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+string trim<span class="Delimiter">(</span><span class="Normal">const</span> string&amp; s<span class="Delimiter">)</span> <span class="Delimiter">{</span>
   string::const_iterator first = s<span class="Delimiter">.</span>begin<span class="Delimiter">();</span>
-  while <span class="Delimiter">(</span>first != s<span class="Delimiter">.</span>end<span class="Delimiter">()</span> &amp;&amp; isspace<span class="Delimiter">(</span>*first<span class="Delimiter">))</span>
+  <span class="Normal">while</span> <span class="Delimiter">(</span>first != s<span class="Delimiter">.</span>end<span class="Delimiter">()</span> &amp;&amp; isspace<span class="Delimiter">(</span>*first<span class="Delimiter">))</span>
     ++first<span class="Delimiter">;</span>
-  if <span class="Delimiter">(</span>first == s<span class="Delimiter">.</span>end<span class="Delimiter">())</span> <span class="Identifier">return</span> <span class="Constant">&quot;&quot;</span><span class="Delimiter">;</span>
+  <span class="Normal">if</span> <span class="Delimiter">(</span>first == s<span class="Delimiter">.</span>end<span class="Delimiter">())</span> <span class="Identifier">return</span> <span class="Constant">&quot;&quot;</span><span class="Delimiter">;</span>
 
   string::const_iterator last = --s<span class="Delimiter">.</span>end<span class="Delimiter">();</span>
-  while <span class="Delimiter">(</span>last != s<span class="Delimiter">.</span>begin<span class="Delimiter">()</span> &amp;&amp; isspace<span class="Delimiter">(</span>*last<span class="Delimiter">))</span>
+  <span class="Normal">while</span> <span class="Delimiter">(</span>last != s<span class="Delimiter">.</span>begin<span class="Delimiter">()</span> &amp;&amp; isspace<span class="Delimiter">(</span>*last<span class="Delimiter">))</span>
     --last<span class="Delimiter">;</span>
   ++last<span class="Delimiter">;</span>
   <span class="Identifier">return</span> string<span class="Delimiter">(</span>first<span class="Delimiter">,</span> last<span class="Delimiter">);</span>
@@ -359,30 +360,30 @@ string trim<span class="Delimiter">(</span>const string&amp; s<span class="Delim
 
 <span class="Delimiter">:(before &quot;End Includes&quot;)</span>
 <span class="PreProc">#include</span><span class="Constant">&lt;vector&gt;</span>
-using std::vector<span class="Delimiter">;</span>
+<span class="Normal">using</span> std::vector<span class="Delimiter">;</span>
 <span class="PreProc">#include</span><span class="Constant">&lt;list&gt;</span>
-using std::list<span class="Delimiter">;</span>
+<span class="Normal">using</span> std::list<span class="Delimiter">;</span>
 <span class="PreProc">#include</span><span class="Constant">&lt;map&gt;</span>
-using std::map<span class="Delimiter">;</span>
+<span class="Normal">using</span> std::map<span class="Delimiter">;</span>
 <span class="PreProc">#include</span><span class="Constant">&lt;set&gt;</span>
-using std::set<span class="Delimiter">;</span>
+<span class="Normal">using</span> std::set<span class="Delimiter">;</span>
 <span class="PreProc">#include</span><span class="Constant">&lt;algorithm&gt;</span>
 
 <span class="PreProc">#include</span><span class="Constant">&lt;iostream&gt;</span>
-using std::istream<span class="Delimiter">;</span>
-using std::ostream<span class="Delimiter">;</span>
-using std::cin<span class="Delimiter">;</span>
-using std::cout<span class="Delimiter">;</span>
-using std::cerr<span class="Delimiter">;</span>
+<span class="Normal">using</span> std::istream<span class="Delimiter">;</span>
+<span class="Normal">using</span> std::ostream<span class="Delimiter">;</span>
+<span class="Normal">using</span> std::cin<span class="Delimiter">;</span>
+<span class="Normal">using</span> std::cout<span class="Delimiter">;</span>
+<span class="Normal">using</span> std::cerr<span class="Delimiter">;</span>
 <span class="PreProc">#include</span><span class="Constant">&lt;iomanip&gt;</span>
 
 <span class="PreProc">#include</span><span class="Constant">&lt;sstream&gt;</span>
-using std::istringstream<span class="Delimiter">;</span>
-using std::ostringstream<span class="Delimiter">;</span>
+<span class="Normal">using</span> std::istringstream<span class="Delimiter">;</span>
+<span class="Normal">using</span> std::ostringstream<span class="Delimiter">;</span>
 
 <span class="PreProc">#include</span><span class="Constant">&lt;fstream&gt;</span>
-using std::ifstream<span class="Delimiter">;</span>
-using std::ofstream<span class="Delimiter">;</span>
+<span class="Normal">using</span> std::ifstream<span class="Delimiter">;</span>
+<span class="Normal">using</span> std::ofstream<span class="Delimiter">;</span>
 
 <span class="PreProc">#include</span><span class="Constant">&quot;termbox/termbox.h&quot;</span>
 
@@ -393,18 +394,18 @@ using std::ofstream<span class="Delimiter">;</span>
 <span class="Comment">//:</span>
 <span class="Comment">//: Mu 'applications' will be able to use depths 1-99 as they like.</span>
 <span class="Comment">//: Depth 100 will be for scheduling (more on that later).</span>
-const int Scheduling_depth = <span class="Constant">100</span><span class="Delimiter">;</span>
+<span class="Normal">const</span> <span class="Normal">int</span> Scheduling_depth = <span class="Constant">100</span><span class="Delimiter">;</span>
 <span class="Comment">//: Primitive statements will occupy 101-9998</span>
-const int Initial_callstack_depth = <span class="Constant">101</span><span class="Delimiter">;</span>
-const int Max_callstack_depth = <span class="Constant">9998</span><span class="Delimiter">;</span>
+<span class="Normal">const</span> <span class="Normal">int</span> Initial_callstack_depth = <span class="Constant">101</span><span class="Delimiter">;</span>
+<span class="Normal">const</span> <span class="Normal">int</span> Max_callstack_depth = <span class="Constant">9998</span><span class="Delimiter">;</span>
 <span class="Comment">//: (ignore this until the call layer)</span>
 <span class="Delimiter">:(before &quot;End Globals&quot;)</span>
-int Callstack_depth = <span class="Constant">0</span><span class="Delimiter">;</span>
+<span class="Normal">int</span> Callstack_depth = <span class="Constant">0</span><span class="Delimiter">;</span>
 <span class="Delimiter">:(before &quot;End Setup&quot;)</span>
 Callstack_depth = <span class="Constant">0</span><span class="Delimiter">;</span>
 <span class="Comment">//: Finally, details of primitive mu statements will occupy depth 9999 (more on that later as well)</span>
 <span class="Delimiter">:(before &quot;End Globals&quot;)</span>
-const int Primitive_recipe_depth = <span class="Constant">9999</span><span class="Delimiter">;</span>
+<span class="Normal">const</span> <span class="Normal">int</span> Primitive_recipe_depth = <span class="Constant">9999</span><span class="Delimiter">;</span>
 <span class="Comment">//:</span>
 <span class="Comment">//: This framework should help us hide some details at each level, mixing</span>
 <span class="Comment">//: static ideas like layers with the dynamic notion of call-stack depth.</span>