set pandoc 8 character tab stops for HTML conversion

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 "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`.

Performed `make www` to perform the above and test under macOS.
This commit is contained in:
Landon Curt Noll committed 2024-03-31 23:55:08 -07:00
1 parent 7141a1b808
commit b84c27ce02
402 files changed
+2414 -2396

No files matched your search

+4 -4
View File
@@ -517,7 +517,7 @@ which was exactly 75 years from the day that the person responsible for the
<a href="https://en.wikipedia.org/wiki/World_War_II">Second World War</a>, Adolf Hitler,
ended his life. (I later made a bug fix but I consider this inconsequential).</p>
<p>As for <a href="recode.c">recode.c</a> though I really love this:</p>
<div class="sourceCode" id="cb22"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a> <span class="op">/</span>\</span>
<div class="sourceCode" id="cb22"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a> <span class="op">/</span>\</span>
<span id="cb22-2"><a href="#cb22-2" aria-hidden="true" tabindex="-1"></a> <span class="op">/</span> This is <span class="op">*</span>not<span class="op">*</span> what you think<span class="op">:</span></span></code></pre></div>
<p>…because it seems so wrong in C code at first glance. Also what does the
‘this’ refer to?</p>
@@ -799,11 +799,11 @@ email but I’m more likely to respond to mastodon messages.</p>
You are free to share and adapt this file under the terms of this license:
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
For more information, see:
https://creativecommons.org/licenses/by-sa/4.0/
https://creativecommons.org/licenses/by-sa/4.0/
-->
@@ -881,7 +881,7 @@ email but I’m more likely to respond to mastodon messages.</p>
<div class="footer">
<h2>Copyright and CC BY-SA 4.0 License</h2>
<p>This file and web page is:</p>
<blockquote><p><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+28 -28
View File
@@ -145,7 +145,7 @@ ints:</p>
g = e + 1;
for (j=-3; j &lt; 0; ++j)
e&lt;:j:&gt; = j+3;</code></pre>
e&lt;:j:&gt; = j+3;</code></pre>
<p>Which I think is more confusing: when one is iterating an array you don’t
expect to start out with index &lt; 0 but to then compare that that index &lt; 0
and increment until 0 along with setting the value of the array to j + 3 is
@@ -156,21 +156,21 @@ e&lt;:i-3:&gt; = (j &lt; 1 ? 1 : (j &gt; 5 ? 5 : j))-1;</code></pre></li>
<li><p>Observe these two functions:</p>
<pre><code>void w(char *s, int k, int v)
{
for(e&lt;:2:&gt; = 0; s&lt;:*P:&gt;; ++e&lt;:2:&gt;)
{
v = s&lt;:e&lt;:2:&gt;:&gt;;
if(v &gt; 64 &amp;&amp; v &lt; 91)
s&lt;:e&lt;:2:&gt;:&gt; = (((v - 65 + k) % 26) + 65);
}
for(e&lt;:2:&gt; = 0; s&lt;:*P:&gt;; ++e&lt;:2:&gt;)
{
v = s&lt;:e&lt;:2:&gt;:&gt;;
if(v &gt; 64 &amp;&amp; v &lt; 91)
s&lt;:e&lt;:2:&gt;:&gt; = (((v - 65 + k) % 26) + 65);
}
}
void Q(void)
{
for(*g = 0; *g &lt; 3; ++*g)
{
*Y&lt;:16+e&lt;:1:&gt;:&gt;=S&lt;:e&lt;:e&lt;:1:&gt;-3:&gt;:&gt;;
R&lt;:e&lt;:1:&gt;:&gt;=Y&lt;:e&lt;:-3+e&lt;:1:&gt;:&gt;:&gt;;
w(R[*g],*(e+e&lt;:1:&gt;-6)=q(Y&lt;:8:&gt;,*Y&lt;:7:&gt;),*g);
}
for(*g = 0; *g &lt; 3; ++*g)
{
*Y&lt;:16+e&lt;:1:&gt;:&gt;=S&lt;:e&lt;:e&lt;:1:&gt;-3:&gt;:&gt;;
R&lt;:e&lt;:1:&gt;:&gt;=Y&lt;:e&lt;:-3+e&lt;:1:&gt;:&gt;:&gt;;
w(R[*g],*(e+e&lt;:1:&gt;-6)=q(Y&lt;:8:&gt;,*Y&lt;:7:&gt;),*g);
}
}</code></pre>
<p>First of all: why do I set <code>e[2]</code> to 0 and increment it for each pass in the
loop, but then the condition for the loop is <code>s[*P]</code>?</p>
@@ -197,11 +197,11 @@ and (2) I didn’t want to risk changing all the offsets: thus I just made that
address <code>e[1]</code>. Thus I also have:</p>
<pre><code>for (*g = 0 ; *g &lt; 10; ++*g)
{
r&lt;:-2:&gt; = Y&lt;:14:&gt;&lt;:*(e+1):&gt;; r&lt;:-3:&gt; = Y&lt;:15:&gt;&lt;:1&lt;:e:&gt;:&gt;;
if (r&lt;:-3:&gt; &amp;&amp; r&lt;:-2:&gt; == r&lt;:-1:&gt;)
return r&lt;:-3:&gt;;
if (r&lt;:-2:&gt; &amp;&amp; r&lt;:-3:&gt; == r&lt;:-1:&gt;)
return r&lt;:-2:&gt;;
r&lt;:-2:&gt; = Y&lt;:14:&gt;&lt;:*(e+1):&gt;; r&lt;:-3:&gt; = Y&lt;:15:&gt;&lt;:1&lt;:e:&gt;:&gt;;
if (r&lt;:-3:&gt; &amp;&amp; r&lt;:-2:&gt; == r&lt;:-1:&gt;)
return r&lt;:-3:&gt;;
if (r&lt;:-2:&gt; &amp;&amp; r&lt;:-3:&gt; == r&lt;:-1:&gt;)
return r&lt;:-2:&gt;;
}</code></pre>
<p>This <code>e[1]</code> of course is the same as <code>*g</code> as above and as you can see has
multiple dimensions (that is the reference to Y does) too (and this is also
@@ -211,7 +211,7 @@ both Y[14] and Y[15]. I also happen to use S (via r which points to S + 10)
which I use as the two chars to compare (this is the plugboard function).</p></li>
<li><p>The above function Z() takes a <code>char x</code> but you won’t notice it being used
at all. Why? In fact I call it like so:</p>
<pre><code>k = Z(r&lt;:-1:&gt;=k);</code></pre>
<pre><code> k = Z(r&lt;:-1:&gt;=k);</code></pre>
<p>The char is just used as a way to be able to call the function and assign to
the proper variable at the same time: in the function Z I don’t care about x
because it’s the same value as r[-1] (which I do care about). Why is it
@@ -221,7 +221,7 @@ again negative offsets to cause more confusion.</p></li>
<li><p>Although this is clearly already shown in the above there are other ways I
refer to the same variable in more than one way (or in some cases maybe more
correct to say ‘same location’). In the Z() function for example:</p>
<pre><code>r&lt;:-2:&gt; = Y&lt;:14:&gt;&lt;:*(e+1):&gt;; r&lt;:-3:&gt; = Y&lt;:15:&gt;&lt;:1&lt;:e:&gt;:&gt;;</code></pre>
<pre><code> r&lt;:-2:&gt; = Y&lt;:14:&gt;&lt;:*(e+1):&gt;; r&lt;:-3:&gt; = Y&lt;:15:&gt;&lt;:1&lt;:e:&gt;:&gt;;</code></pre>
<p>I refer to e[1] as both: *(e+1) and 1[e].</p></li>
<li><p>Replacing a number of <code>if ..</code>s with <code>... &amp;&amp; (...)</code>s (in one case at least
it’s nested further: <code>f &amp;&amp; (f = 0 &amp;&amp; (a = W(A,a)));</code>).</p></li>
@@ -262,14 +262,14 @@ it to 9.</p></li>
enough because as they rightly point out they can just use the C preprocessor
itself. But although I have quite a few cpp directives I am not using them for
obfuscation but rather to save bytes. For examples:</p>
<pre><code>%:define J(x) do(*x)=getchar(); while((*x)==&#39;\n&#39;)</code></pre>
<pre><code>%:define J(x) do(*x)=getchar(); while((*x)==&#39;\n&#39;)</code></pre>
<p>Is used quite a number of times and although it could be a function that
takes a pointer to an int it was more convenient this way (I believe it used
more bytes but I no longer know that). There are many others and they all
save bytes (or at least most of them do if not all). There is one in
particular I want to bring up though because I think it’s a curious one and
it ties in to another point above:</p>
<pre><code>%:define A(y) *(&amp;Y&lt;:7:&gt;&lt;:1:&gt;+(y))</code></pre>
<pre><code>%:define A(y) *(&amp;Y&lt;:7:&gt;&lt;:1:&gt;+(y))</code></pre>
<p>What is special about this one: Above I noted how I sort of refer directly
to the notch settings (I think it was the notch settings anyway). Now I
could have done say</p>
@@ -301,9 +301,9 @@ recode.c doesn’t use the Enigma algorithm and even the strings are done very
differently (and separated) so that one cannot easily replace the <code>char</code>
variables in recode.c, move them to prog.c, compile and expect it to work right.</p></li>
<li><p>Also what is this about ?</p>
<pre><code> /\
/ This is *not* what you think:
void D(char*x){ /* ... */ }</code></pre>
<pre><code> /\
/ This is *not* what you think:
void D(char*x){ /* ... */ }</code></pre>
<p>Is that valid and if so how does it function? Yes it’s valid but I’ll leave
the other part of the question up to the reader to answer. Hint: you already
know how it works (yes, really you do)! Another hint: This is and is not a
@@ -316,11 +316,11 @@ also not).</p></li>
You are free to share and adapt this file under the terms of this license:
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
For more information, see:
https://creativecommons.org/licenses/by-sa/4.0/
https://creativecommons.org/licenses/by-sa/4.0/
-->
@@ -357,7 +357,7 @@ also not).</p></li>
<div class="footer">
<h2>Copyright and CC BY-SA 4.0 License</h2>
<p>This file and web page is:</p>
<blockquote><p><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>
+5 -5
View File
@@ -172,8 +172,8 @@ wonderful ‘challenge’ for everyone.</p>
<h1 id="options"><a name="options" href="#toc">Options</a></h1>
<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="ex">./recode</span> <span class="at">-h</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="ex">usage:</span> ./recode <span class="pp">[</span><span class="ss">options</span><span class="pp">]</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="ex">-v</span> display selected settings</span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="ex">-r</span> pseudo-randomly select settings</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="ex">-v</span> display selected settings</span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="ex">-r</span> pseudo-randomly select settings</span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="ex">-f</span><span class="op">&lt;</span>input file<span class="op">&gt;</span> read file for Enigma input</span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="ex">-R</span><span class="op">&lt;</span>string<span class="kw">|</span><span class="fu">file</span><span class="op">&gt;</span> init settings from settings string or file</span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="ex">-o</span><span class="op">&lt;</span>output file<span class="op">&gt;</span> write settings to file</span></code></pre></div>
@@ -593,11 +593,11 @@ the key you wish to select is</p>
You are free to share and adapt this file under the terms of this license:
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
For more information, see:
https://creativecommons.org/licenses/by-sa/4.0/
https://creativecommons.org/licenses/by-sa/4.0/
-->
@@ -634,7 +634,7 @@ the key you wish to select is</p>
<div class="footer">
<h2>Copyright and CC BY-SA 4.0 License</h2>
<p>This file and web page is:</p>
<blockquote><p><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></p></blockquote>
<blockquote><b>Copyright &copy; 1984-2024 by Landon Curt Noll. All Rights Reserved.</b></blockquote>
<p>You are free to share and adapt this file under the terms of this license:</p>
<blockquote><b>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</b></blockquote>
<p>For more information, see:</p>