improved indentation and whitespace for markdown code blocks

All code blocks in markdown have been intended by at least 4 spaces.

We add `--tab-stop=8` to all `pandoc(1)` executions in order to set
a better tab stop indentation, especially for tab intended code blocks.

Changed `bin/pandoc-wrapper.sh` VERSION from "1.5.3 2024-03-26"
to "1.6 2024-03-31".

Fixed `1991/brnstnd/sorta.README.md` so that the sorta code
is code blocks.

Removed unneeded paragraph group in copyright in `inc/footer.default.html`.

Fixed excess whitespace after list Author on entry `index.html` page.

Changed `bin/output-index-author.sh` VERSION from "1.5.2 2024-03-26"
to "1.6 2024-03-31".

Performed `make www` to perform the above and test under macOS.

TODO: Fix the problem of the initial line of code being extra intended.
TODO: Fix excess whitespace around code that is inline.
This commit is contained in:
Landon Curt Noll committed 2024-04-01 04:48:48 -07:00
1 parent b84c27ce02
commit a996f8d2b8
734 files changed
+16723 -16963

No files matched your search

+20 -21
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Don_Yang">Don Yang</a><br>
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
<br><br></li>
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -142,15 +141,15 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<h2 id="to-build">To build:</h2>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
<h2 id="to-use">To use:</h2>
<p>The author suggested that after compilation one should look at the generated
files. For instance:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">less</span> generated1.c</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="fu">less</span> generated2.c</span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="fu">less</span> generated3.c</span></code></pre></div>
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">less</span> generated1.c</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">less</span> generated2.c</span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">less</span> generated3.c</span></code></pre></div>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Code should be readable in any direction! This tool will help you rotate your
code so you don’t have to stare at it sideways or even upside down. Rotating
@@ -165,21 +164,21 @@ reveal messages and one more tool that can be used to reveal the final message
hidden in the original source. All of these can be created using combinations
of <code>./left</code>, <code>./right</code> and <code>./shift</code> and the additionally generated programs.</p>
<p>The final message can be revealed using</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./msg9</span> <span class="op">&lt;</span> prog.c</span></code></pre></div>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./msg9</span> <span class="op">&lt;</span> prog.c</span></code></pre></div>
<p>But what combinations will generate <code>./msg3</code>, <code>./msg4</code>, <code>./msg5</code>, <code>./msg6</code>,
<code>./msg7</code>, <code>./msg8</code> and finally <code>./msg9</code>?</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="tools-usage">Tools’ usage:</h3>
<p><code>Nuko</code> is a text rotator: given some text in <code>stdin</code>, <code>Nuko</code> will write the
same text to <code>stdout</code>, but rotated 90 degrees counterclockwise.</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> prog.c <span class="at">-o</span> left</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./left</span> <span class="op">&lt;</span> input.txt <span class="op">&gt;</span> rotated_counterclockwise.txt</span></code></pre></div>
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> prog.c <span class="at">-o</span> left</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./left</span> <span class="op">&lt;</span> input.txt <span class="op">&gt;</span> rotated_counterclockwise.txt</span></code></pre></div>
<p>Due to static memory allocation, only the first 1K columns by 1K rows
are rotated, the rest are silently ignored. But fear not, a separate
tool with dynamic memory allocation is included:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./left</span> <span class="op">&lt;</span> prog.c <span class="op">&gt;</span> r1.c</span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> r1.c <span class="at">-o</span> right</span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./right</span> <span class="op">&lt;</span> input.txt <span class="op">&gt;</span> rotated_clockwise.txt</span></code></pre></div>
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./left</span> <span class="op">&lt;</span> prog.c <span class="op">&gt;</span> r1.c</span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> r1.c <span class="at">-o</span> right</span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./right</span> <span class="op">&lt;</span> input.txt <span class="op">&gt;</span> rotated_clockwise.txt</span></code></pre></div>
<p>For variety, this second tool rotates clockwise instead of
counterclockwise. Also, it can handle files larger than 1024x1024,
depending on how much memory you have.</p>
@@ -187,14 +186,14 @@ depending on how much memory you have.</p>
rotate counterclockwise once more, we get another program. This
program outputs a single message to <code>stdout</code>, which is the name of the
series that <code>Nuko</code> came from.</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./left</span> <span class="op">&lt;</span> prog.c <span class="kw">|</span> <span class="ex">./left</span> <span class="op">&gt;</span> r2.c</span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> r2.c <span class="at">-o</span> msg0</span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./msg0</span></span></code></pre></div>
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./left</span> <span class="op">&lt;</span> prog.c <span class="kw">|</span> <span class="ex">./left</span> <span class="op">&gt;</span> r2.c</span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> r2.c <span class="at">-o</span> msg0</span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./msg0</span></span></code></pre></div>
<p>There is one final rotation, which produces a tool that removes
leading whitespaces:</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./left</span> <span class="op">&lt;</span> prog.c <span class="kw">|</span> <span class="ex">./left</span> <span class="kw">|</span> <span class="ex">./left</span> <span class="op">&gt;</span> r3.c</span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> r3.c <span class="at">-o</span> shift</span>
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./shift</span> <span class="op">&lt;</span> input.txt <span class="op">&gt;</span> no_leading_space.txt</span></code></pre></div>
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./left</span> <span class="op">&lt;</span> prog.c <span class="kw">|</span> <span class="ex">./left</span> <span class="kw">|</span> <span class="ex">./left</span> <span class="op">&gt;</span> r3.c</span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> r3.c <span class="at">-o</span> shift</span>
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./shift</span> <span class="op">&lt;</span> input.txt <span class="op">&gt;</span> no_leading_space.txt</span></code></pre></div>
<p>Where this might be useful, besides ruining the formatting of certain
files, is that it completes the set of tools needed to solve the
puzzle that is embedded in <a href="prog.c">prog.c</a>.</p>
@@ -205,8 +204,8 @@ toward one of those notches (and create a new notch on the other
side). This shifted code behaves slightly different from the original
program. For example, here are two more messages that can be
produced:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./shift</span> <span class="op">&lt;</span> prog.c <span class="kw">|</span> <span class="ex">./right</span> <span class="op">&gt;</span> msg1.c <span class="kw">&amp;&amp;</span> <span class="fu">gcc</span> msg1.c <span class="at">-o</span> msg1 <span class="kw">&amp;&amp;</span> <span class="ex">./msg1</span></span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./shift</span> <span class="op">&lt;</span> prog.c <span class="kw">|</span> <span class="ex">./left</span> <span class="op">&gt;</span> msg2.c <span class="kw">&amp;&amp;</span> <span class="fu">gcc</span> msg2.c <span class="at">-o</span> msg2 <span class="kw">&amp;&amp;</span> <span class="ex">./msg2</span></span></code></pre></div>
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./shift</span> <span class="op">&lt;</span> prog.c <span class="kw">|</span> <span class="ex">./right</span> <span class="op">&gt;</span> msg1.c <span class="kw">&amp;&amp;</span> <span class="fu">gcc</span> msg1.c <span class="at">-o</span> msg1 <span class="kw">&amp;&amp;</span> <span class="ex">./msg1</span></span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./shift</span> <span class="op">&lt;</span> prog.c <span class="kw">|</span> <span class="ex">./left</span> <span class="op">&gt;</span> msg2.c <span class="kw">&amp;&amp;</span> <span class="fu">gcc</span> msg2.c <span class="at">-o</span> msg2 <span class="kw">&amp;&amp;</span> <span class="ex">./msg2</span></span></code></pre></div>
<p>In total, there are 9 embedded strings that can be produced via a
sequence of rotates and shifts, one of which can be used to extract
the 10th final string from <a href="prog.c">prog.c</a>. The intent is to simulate those