about summary refs log tree commit diff stats
path: root/html/072scenario_screen.cc.html
diff options
context:
space:
mode:
Diffstat (limited to 'html/072scenario_screen.cc.html')
-rw-r--r--html/072scenario_screen.cc.html127
1 files changed, 106 insertions, 21 deletions
diff --git a/html/072scenario_screen.cc.html b/html/072scenario_screen.cc.html
index ecf37ed3..093a0173 100644
--- a/html/072scenario_screen.cc.html
+++ b/html/072scenario_screen.cc.html
@@ -10,17 +10,17 @@
 <meta name="colorscheme" content="minimal">
 <style type="text/css">
 <!--
-pre { white-space: pre-wrap; font-family: monospace; color: #d0d0d0; background-color: #000000; }
-body { font-family: monospace; color: #d0d0d0; background-color: #000000; }
+pre { white-space: pre-wrap; font-family: monospace; color: #d0d0d0; background-color: #080808; }
+body { font-family: monospace; color: #d0d0d0; background-color: #080808; }
 * { font-size: 1em; }
+.traceContains { color: #008000; }
 .cSpecial { color: #008000; }
-.Identifier { color: #008080; }
 .Constant { color: #008080; }
 .Comment { color: #8080ff; }
 .Delimiter { color: #c000c0; }
 .Special { color: #ff6060; }
 .CommentedCode { color: #6c6c6c; }
-.traceContains { color: #008000; }
+.Identifier { color: #008080; }
 -->
 </style>
 
@@ -35,12 +35,13 @@ body { font-family: monospace; color: #d0d0d0; background-color: #000000; }
 <span class="Comment">//: Clean syntax to manipulate and check the screen in scenarios.</span>
 <span class="Comment">//: Instructions 'assume-screen' and 'screen-should-contain' implicitly create</span>
 <span class="Comment">//: a variable called 'screen' that is accessible inside other 'run'</span>
-<span class="Comment">//: instructions in the scenario.</span>
+<span class="Comment">//: instructions in the scenario. 'screen-should-contain' can check unicode</span>
+<span class="Comment">//: characters in the fake screen</span>
 
 <span class="Delimiter">:(scenarios run_mu_scenario)</span>
 <span class="Delimiter">:(scenario screen_in_scenario)</span>
 scenario screen-in-scenario [
-<span class="CommentedCode">#?   $start-tracing</span>
+<span class="CommentedCode">#?   $start-tracing #? 2</span>
   assume-screen <span class="Constant">5</span>:literal/width<span class="Delimiter">,</span> <span class="Constant">3</span>:literal/height
   run [
     screen:address<span class="Special"> &lt;- </span>print-character screen:address<span class="Delimiter">,</span> <span class="Constant">97</span>:literal  <span class="Comment"># 'a'</span>
@@ -51,18 +52,51 @@ scenario screen-in-scenario [
     <span class="Delimiter">.</span>     <span class="Delimiter">.</span>
     <span class="Delimiter">.</span>     <span class="Delimiter">.</span>
   ]
-<span class="CommentedCode">#?   $exit</span>
+<span class="CommentedCode">#?   $exit #? 1</span>
 ]
 
 <span class="Delimiter">:(scenario screen_in_scenario_unicode)</span>
+scenario screen-in-scenario-unicode-color [
+  assume-screen <span class="Constant">5</span>:literal/width<span class="Delimiter">,</span> <span class="Constant">3</span>:literal/height
+  run [
+    screen:address<span class="Special"> &lt;- </span>print-character screen:address<span class="Delimiter">,</span> <span class="Constant">955</span>:literal/greek-small-lambda<span class="Delimiter">,</span> <span class="Constant">1</span>:literal/red
+    screen:address<span class="Special"> &lt;- </span>print-character screen:address<span class="Delimiter">,</span> <span class="Constant">97</span>:literal/a
+  ]
+  screen-should-contain [
+  <span class="Comment">#  01234</span>
+    <span class="Delimiter">.</span>λa   <span class="Delimiter">.</span>
+    <span class="Delimiter">.</span>     <span class="Delimiter">.</span>
+    <span class="Delimiter">.</span>     <span class="Delimiter">.</span>
+  ]
+<span class="CommentedCode">#?   $exit</span>
+]
+
+<span class="Delimiter">:(scenario screen_in_scenario_color)</span>
 <span class="Comment"># screen-should-contain can check unicode characters in the fake screen</span>
-scenario screen-in-scenario [
+scenario screen-in-scenario-color [
   assume-screen <span class="Constant">5</span>:literal/width<span class="Delimiter">,</span> <span class="Constant">3</span>:literal/height
   run [
-    screen:address<span class="Special"> &lt;- </span>print-character screen:address<span class="Delimiter">,</span> <span class="Constant">955</span>:literal  <span class="Comment"># 'λ'</span>
+    screen:address<span class="Special"> &lt;- </span>print-character screen:address<span class="Delimiter">,</span> <span class="Constant">955</span>:literal/greek-small-lambda<span class="Delimiter">,</span> <span class="Constant">1</span>:literal/red
+    screen:address<span class="Special"> &lt;- </span>print-character screen:address<span class="Delimiter">,</span> <span class="Constant">97</span>:literal/a<span class="Delimiter">,</span> <span class="Constant">7</span>:literal/white
   ]
+  <span class="Comment"># screen-should-contain shows everything</span>
   screen-should-contain [
   <span class="Comment">#  01234</span>
+    <span class="Delimiter">.</span>λa   <span class="Delimiter">.</span>
+    <span class="Delimiter">.</span>     <span class="Delimiter">.</span>
+    <span class="Delimiter">.</span>     <span class="Delimiter">.</span>
+  ]
+  <span class="Comment"># screen-should-contain-in-color filters out everything except the given</span>
+  <span class="Comment"># color, all you see is the 'a' in white.</span>
+  screen-should-contain-in-color <span class="Constant">7</span>:literal/white<span class="Delimiter">,</span> [
+  <span class="Comment">#  01234</span>
+    <span class="Delimiter">.</span> a   <span class="Delimiter">.</span>
+    <span class="Delimiter">.</span>     <span class="Delimiter">.</span>
+    <span class="Delimiter">.</span>     <span class="Delimiter">.</span>
+  ]
+  <span class="Comment"># ..and the λ in red.</span>
+  screen-should-contain-in-color <span class="Constant">1</span>:literal/red<span class="Delimiter">,</span> [
+  <span class="Comment">#  01234</span>
     <span class="Delimiter">.</span>λ    <span class="Delimiter">.</span>
     <span class="Delimiter">.</span>     <span class="Delimiter">.</span>
     <span class="Delimiter">.</span>     <span class="Delimiter">.</span>
@@ -71,7 +105,6 @@ scenario screen-in-scenario [
 ]
 
 <span class="Delimiter">:(scenario screen_in_scenario_error)</span>
-<span class="CommentedCode">#? % cerr &lt;&lt; &quot;AAA\n&quot;;</span>
 <span class="Special">% Hide_warnings = true;</span>
 scenario screen-in-scenario-error [
   assume-screen <span class="Constant">5</span>:literal/width<span class="Delimiter">,</span> <span class="Constant">3</span>:literal/height
@@ -87,6 +120,23 @@ scenario screen-in-scenario-error [
 ]
 <span class="traceContains">+warn: expected screen location (0, 0) to contain 98 ('b') instead of 97 ('a')</span>
 
+<span class="Delimiter">:(scenario screen_in_scenario_color_error)</span>
+<span class="Special">% Hide_warnings = true;</span>
+<span class="Comment"># screen-should-contain can check unicode characters in the fake screen</span>
+scenario screen-in-scenario-color [
+  assume-screen <span class="Constant">5</span>:literal/width<span class="Delimiter">,</span> <span class="Constant">3</span>:literal/height
+  run [
+    screen:address<span class="Special"> &lt;- </span>print-character screen:address<span class="Delimiter">,</span> <span class="Constant">97</span>:literal/a<span class="Delimiter">,</span> <span class="Constant">1</span>:literal/red
+  ]
+  screen-should-contain-in-color <span class="Constant">2</span>:literal/green<span class="Delimiter">,</span> [
+  <span class="Comment">#  01234</span>
+    <span class="Delimiter">.</span>a    <span class="Delimiter">.</span>
+    <span class="Delimiter">.</span>     <span class="Delimiter">.</span>
+    <span class="Delimiter">.</span>     <span class="Delimiter">.</span>
+  ]
+]
+<span class="traceContains">+warn: expected screen location (0, 0) to be in color 2 instead of 1</span>
+
 <span class="Comment">//: allow naming just for 'screen'</span>
 <span class="Delimiter">:(before &quot;End is_special_name Cases&quot;)</span>
 if <span class="Delimiter">(</span>s == <span class="Constant">&quot;screen&quot;</span><span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span>
@@ -132,8 +182,20 @@ SCREEN_SHOULD_CONTAIN<span class="Delimiter">,</span>
 Recipe_number[<span class="Constant">&quot;screen-should-contain&quot;</span>] = SCREEN_SHOULD_CONTAIN<span class="Delimiter">;</span>
 <span class="Delimiter">:(before &quot;End Primitive Recipe Implementations&quot;)</span>
 case SCREEN_SHOULD_CONTAIN: <span class="Delimiter">{</span>
-<span class="CommentedCode">//?   cout &lt;&lt; &quot;AAA\n&quot;; //? 1</span>
-  check_screen<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>name<span class="Delimiter">);</span>
+  if <span class="Delimiter">(</span>!Passed<span class="Delimiter">)</span> <span class="Identifier">break</span><span class="Delimiter">;</span>
+  check_screen<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>name<span class="Delimiter">,</span> -<span class="Constant">1</span><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 Declarations&quot;)</span>
+SCREEN_SHOULD_CONTAIN_IN_COLOR<span class="Delimiter">,</span>
+<span class="Delimiter">:(before &quot;End Primitive Recipe Numbers&quot;)</span>
+Recipe_number[<span class="Constant">&quot;screen-should-contain-in-color&quot;</span>] = SCREEN_SHOULD_CONTAIN_IN_COLOR<span class="Delimiter">;</span>
+<span class="Delimiter">:(before &quot;End Primitive Recipe Implementations&quot;)</span>
+case SCREEN_SHOULD_CONTAIN_IN_COLOR: <span class="Delimiter">{</span>
+  if <span class="Delimiter">(</span>!Passed<span class="Delimiter">)</span> <span class="Identifier">break</span><span class="Delimiter">;</span>
+  assert<span class="Delimiter">(</span>scalar<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)));</span>
+  check_screen<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>name<span class="Delimiter">,</span> ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">));</span>
   <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span class="Delimiter">}</span>
 
@@ -152,8 +214,8 @@ struct raw_string_stream <span class="Delimiter">{</span>
 <span class="Delimiter">};</span>
 
 <span class="Delimiter">:(code)</span>
-void check_screen<span class="Delimiter">(</span>const string&amp; expected_contents<span class="Delimiter">)</span> <span class="Delimiter">{</span>
-<span class="CommentedCode">//?   cerr &lt;&lt; &quot;Checking screen\n&quot;; //? 1</span>
+void check_screen<span class="Delimiter">(</span>const string&amp; expected_contents<span class="Delimiter">,</span> const int color<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+<span class="CommentedCode">//?   cerr &lt;&lt; &quot;Checking screen for color &quot; &lt;&lt; color &lt;&lt; &quot;\n&quot;; //? 2</span>
   assert<span class="Delimiter">(</span>!Current_routine<span class="Delimiter">-&gt;</span>calls<span class="Delimiter">.</span>front<span class="Delimiter">().</span>default_space<span class="Delimiter">);</span>  <span class="Comment">// not supported</span>
   long long int screen_location = Memory[SCREEN]<span class="Delimiter">;</span>
   int data_offset = find_element_name<span class="Delimiter">(</span>Type_number[<span class="Constant">&quot;screen&quot;</span>]<span class="Delimiter">,</span> <span class="Constant">&quot;data&quot;</span><span class="Delimiter">);</span>
@@ -171,26 +233,49 @@ void check_screen<span class="Delimiter">(</span>const string&amp; expected_cont
     cursor<span class="Delimiter">.</span>skip_whitespace_and_comments<span class="Delimiter">();</span>
     if <span class="Delimiter">(</span>cursor<span class="Delimiter">.</span>at_end<span class="Delimiter">())</span> <span class="Identifier">break</span><span class="Delimiter">;</span>
     assert<span class="Delimiter">(</span>cursor<span class="Delimiter">.</span>get<span class="Delimiter">()</span> == <span class="Constant">'.'</span><span class="Delimiter">);</span>
-    for <span class="Delimiter">(</span>long long int column = <span class="Constant">0</span><span class="Delimiter">;</span>  column &lt; screen_width<span class="Delimiter">;</span>  ++column<span class="Delimiter">,</span> ++addr<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+    for <span class="Delimiter">(</span>long long int column = <span class="Constant">0</span><span class="Delimiter">;</span>  column &lt; screen_width<span class="Delimiter">;</span>  ++column<span class="Delimiter">,</span> addr+= <span class="Comment">/*</span><span class="Comment">size of screen-cell</span><span class="Comment">*/</span><span class="Constant">2</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+      const int cell_color_offset = <span class="Constant">1</span><span class="Delimiter">;</span>
       uint32_t curr = cursor<span class="Delimiter">.</span>get<span class="Delimiter">();</span>
       if <span class="Delimiter">(</span>Memory[addr] == <span class="Constant">0</span> &amp;&amp; isspace<span class="Delimiter">(</span>curr<span class="Delimiter">))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span>
-      if <span class="Delimiter">(</span>Memory[addr] != <span class="Constant">0</span> &amp;&amp; Memory[addr] == curr<span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span>
-      <span class="Comment">// mismatch</span>
+<span class="CommentedCode">//?       cerr &lt;&lt; color &lt;&lt; &quot; vs &quot; &lt;&lt; Memory[addr+1] &lt;&lt; '\n'; //? 1</span>
+      if <span class="Delimiter">(</span>curr == <span class="Constant">' '</span> &amp;&amp; color != -<span class="Constant">1</span> &amp;&amp; color != Memory[addr+cell_color_offset]<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+        <span class="Comment">// filter out other colors</span>
+        <span class="Identifier">continue</span><span class="Delimiter">;</span>
+      <span class="Delimiter">}</span>
+      if <span class="Delimiter">(</span>Memory[addr] != <span class="Constant">0</span> &amp;&amp; Memory[addr] == curr<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+        if <span class="Delimiter">(</span>color == -<span class="Constant">1</span> || color == Memory[addr+cell_color_offset]<span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span>
+        <span class="Comment">// contents match but color is off</span>
+        if <span class="Delimiter">(</span>Current_scenario &amp;&amp; !Hide_warnings<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+          <span class="Comment">// genuine test in a mu file</span>
+          raise &lt;&lt; <span class="Constant">&quot;</span><span class="cSpecial">\n</span><span class="Constant">F - &quot;</span> &lt;&lt; Current_scenario<span class="Delimiter">-&gt;</span>name &lt;&lt; <span class="Constant">&quot;: expected screen location (&quot;</span> &lt;&lt; row &lt;&lt; <span class="Constant">&quot;, &quot;</span> &lt;&lt; column &lt;&lt; <span class="Constant">&quot;, address &quot;</span> &lt;&lt; addr &lt;&lt; <span class="Constant">&quot;, value &quot;</span> &lt;&lt; Memory[addr] &lt;&lt; <span class="Constant">&quot;) to be in color &quot;</span> &lt;&lt; color &lt;&lt; <span class="Constant">&quot; instead of &quot;</span> &lt;&lt; Memory[addr+cell_color_offset] &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span><span class="Delimiter">;</span>
+        <span class="Delimiter">}</span>
+        else <span class="Delimiter">{</span>
+          <span class="Comment">// just testing check_screen</span>
+          raise &lt;&lt; <span class="Constant">&quot;expected screen location (&quot;</span> &lt;&lt; row &lt;&lt; <span class="Constant">&quot;, &quot;</span> &lt;&lt; column &lt;&lt; <span class="Constant">&quot;) to be in color &quot;</span> &lt;&lt; color &lt;&lt; <span class="Constant">&quot; instead of &quot;</span> &lt;&lt; Memory[addr+cell_color_offset] &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
+        <span class="Delimiter">}</span>
+        if <span class="Delimiter">(</span>!Hide_warnings<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+          Passed = <span class="Constant">false</span><span class="Delimiter">;</span>
+          ++Num_failures<span class="Delimiter">;</span>
+        <span class="Delimiter">}</span>
+        <span class="Identifier">return</span><span class="Delimiter">;</span>
+      <span class="Delimiter">}</span>
+
+      <span class="Comment">// really a mismatch</span>
       <span class="Comment">// can't print multi-byte unicode characters in warnings just yet. not very useful for debugging anyway.</span>
       char expected_pretty[<span class="Constant">10</span>] = <span class="Delimiter">{</span><span class="Constant">0</span><span class="Delimiter">};</span>
-      if <span class="Delimiter">(</span>curr &lt; <span class="Constant">256</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+      if <span class="Delimiter">(</span>curr &lt; <span class="Constant">256</span> &amp;&amp; !iscntrl<span class="Delimiter">(</span>curr<span class="Delimiter">))</span> <span class="Delimiter">{</span>
         <span class="Comment">// &quot; ('&lt;curr&gt;')&quot;</span>
         expected_pretty[<span class="Constant">0</span>] = <span class="Constant">' '</span><span class="Delimiter">,</span> expected_pretty[<span class="Constant">1</span>] = <span class="Constant">'('</span><span class="Delimiter">,</span> expected_pretty[<span class="Constant">2</span>] = <span class="cSpecial">'\''</span><span class="Delimiter">,</span> expected_pretty[<span class="Constant">3</span>] = static_cast&lt;unsigned char&gt;<span class="Delimiter">(</span>curr<span class="Delimiter">),</span> expected_pretty[<span class="Constant">4</span>] = <span class="cSpecial">'\''</span><span class="Delimiter">,</span> expected_pretty[<span class="Constant">5</span>] = <span class="Constant">')'</span><span class="Delimiter">,</span> expected_pretty[<span class="Constant">6</span>] = <span class="cSpecial">'\0'</span><span class="Delimiter">;</span>
       <span class="Delimiter">}</span>
       char actual_pretty[<span class="Constant">10</span>] = <span class="Delimiter">{</span><span class="Constant">0</span><span class="Delimiter">};</span>
-      if <span class="Delimiter">(</span>Memory[addr] &lt; <span class="Constant">256</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+      if <span class="Delimiter">(</span>Memory[addr] &lt; <span class="Constant">256</span> &amp;&amp; !iscntrl<span class="Delimiter">(</span>Memory[addr]<span class="Delimiter">))</span> <span class="Delimiter">{</span>
         <span class="Comment">// &quot; ('&lt;curr&gt;')&quot;</span>
         actual_pretty[<span class="Constant">0</span>] = <span class="Constant">' '</span><span class="Delimiter">,</span> actual_pretty[<span class="Constant">1</span>] = <span class="Constant">'('</span><span class="Delimiter">,</span> actual_pretty[<span class="Constant">2</span>] = <span class="cSpecial">'\''</span><span class="Delimiter">,</span> actual_pretty[<span class="Constant">3</span>] = static_cast&lt;unsigned char&gt;<span class="Delimiter">(</span>Memory[addr]<span class="Delimiter">),</span> actual_pretty[<span class="Constant">4</span>] = <span class="cSpecial">'\''</span><span class="Delimiter">,</span> actual_pretty[<span class="Constant">5</span>] = <span class="Constant">')'</span><span class="Delimiter">,</span> actual_pretty[<span class="Constant">6</span>] = <span class="cSpecial">'\0'</span><span class="Delimiter">;</span>
       <span class="Delimiter">}</span>
 
       if <span class="Delimiter">(</span>Current_scenario &amp;&amp; !Hide_warnings<span class="Delimiter">)</span> <span class="Delimiter">{</span>
         <span class="Comment">// genuine test in a mu file</span>
-        raise &lt;&lt; <span class="Constant">&quot;</span><span class="cSpecial">\n</span><span class="Constant">F - &quot;</span> &lt;&lt; Current_scenario<span class="Delimiter">-&gt;</span>name &lt;&lt; <span class="Constant">&quot;: expected screen location (&quot;</span> &lt;&lt; row &lt;&lt; <span class="Constant">&quot;, &quot;</span> &lt;&lt; column &lt;&lt; <span class="Constant">&quot;) to contain &quot;</span> &lt;&lt; curr &lt;&lt; expected_pretty &lt;&lt; <span class="Constant">&quot; instead of &quot;</span> &lt;&lt; Memory[addr] &lt;&lt; actual_pretty &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span><span class="Delimiter">;</span>
+        raise &lt;&lt; <span class="Constant">&quot;</span><span class="cSpecial">\n</span><span class="Constant">F - &quot;</span> &lt;&lt; Current_scenario<span class="Delimiter">-&gt;</span>name &lt;&lt; <span class="Constant">&quot;: expected screen location (&quot;</span> &lt;&lt; row &lt;&lt; <span class="Constant">&quot;, &quot;</span> &lt;&lt; column &lt;&lt; <span class="Constant">&quot;) to contain &quot;</span> &lt;&lt; curr &lt;&lt; expected_pretty &lt;&lt; <span class="Constant">&quot; instead of &quot;</span> &lt;&lt; Memory[addr] &lt;&lt; actual_pretty &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
         dump_screen<span class="Delimiter">();</span>
       <span class="Delimiter">}</span>
       else <span class="Delimiter">{</span>
@@ -278,7 +363,7 @@ void dump_screen<span class="Delimiter">()</span> <span class="Delimiter">{</spa
 <span class="CommentedCode">//?     cerr &lt;&lt; curr &lt;&lt; &quot;:\n&quot;; //? 1</span>
     for <span class="Delimiter">(</span>long long int col = <span class="Constant">0</span><span class="Delimiter">;</span> col &lt; screen_width<span class="Delimiter">;</span> ++col<span class="Delimiter">)</span> <span class="Delimiter">{</span>
       cerr &lt;&lt; static_cast&lt;char&gt;<span class="Delimiter">(</span>Memory[curr]<span class="Delimiter">);</span>
-      ++curr<span class="Delimiter">;</span>
+      curr += <span class="Comment">/*</span><span class="Comment">size of screen-cell</span><span class="Comment">*/</span><span class="Constant">2</span><span class="Delimiter">;</span>
     <span class="Delimiter">}</span>
     cerr &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
   <span class="Delimiter">}</span>