force use of pandoc version >= 3.1.12.2

The `bin/pandoc-wrapper.sh` tool will verify that the ssytem
has a recent enough version of `pandoc(1)`.

We explain why we insist on `pandoc(1)`. version >= 3.1.12.2
in comments where the $PANDOC_MIN_VERSION is set.

Added `--wrap=preserve` as a default argument to `pandoc(1)`.
While this change will impact every HTML file generated,
we believe this will improve the ability of someone to look
at the generated HTML and correlate with the original markdown.

Changed `bin/pandoc-wrapper.sh` VERSION from "1.4.2 2024-03-17"
to "1.4.3 2024-03-18".

Performed `make www` to achieve all of the above and to generate
HTML using the new  `--wrap=preserve` `pandoc(1)` mode.
This commit is contained in:
Landon Curt Noll committed 2024-03-18 01:26:39 -07:00
1 parent 9eb7a54e9f
commit b0b212acb1
402 files changed
+37061 -55132

No files matched your search

+48 -76
View File
@@ -129,9 +129,9 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Andrew_Shapiro">Andrew T.
Shapiro</a><br> Location: <a href="../../location.html#ZZ">ZZ</a> -
<em>Unknown location</em> <br><br></li>
<li>Name: <a href="../../authors.html#Andrew_Shapiro">Andrew T. Shapiro</a><br>
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
<br><br></li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -145,12 +145,10 @@ Shapiro</a><br> Location: <a href="../../location.html#ZZ">ZZ</a> -
<p>The current status of this entry is:</p>
<pre><code>STATUS: missing file - please provide it
STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a
href="../../bugs.html#1994_shapiro">1994 shapiro bugs</a>.</p>
<p>For more detailed information see <a href="../../bugs.html#1994_shapiro">1994 shapiro bugs</a>.</p>
<h2 id="to-use">To use:</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">./shapiro</span> <span class="kw">&amp;</span></span></code></pre></div>
<p>Now find the clock in the same terminal window (or console if at the
console).</p>
<p>Now find the clock in the same terminal window (or console if at the console).</p>
<h2 id="try">Try:</h2>
<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">./shapiro</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">^Z</span></span>
@@ -160,99 +158,73 @@ console).</p>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a><span class="ex">^C</span></span>
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a><span class="ex">./shapiro_t1</span></span></code></pre></div>
<p>Notice what you see in the output of <code>ps</code>! Observe too
what happens after you bring it back to the foreground.</p>
<p>Notice what you see in the output of <code>ps</code>! Observe too what happens after you
bring it back to the foreground.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This entry has many different levels of obfuscation, and yet the
source file is self documenting. :-)</p>
<p>From time to time, run <code>ps(1)</code> and look at the new
processes.</p>
<p>See <a href="shapiro.html">shapiro.html</a> for more information in
the internals of this program. The file <a
href="shapiro.alt.c">shapiro.alt.c</a> contains a non-obfuscated version
of this program. Note that this alt file is currently missing. See <a
href="../../bugs.html#1994_shapiro">1994 shapiro bugs</a> for
details.</p>
<p>From time to time, run <code>ps(1)</code> and look at the new processes.</p>
<p>See <a href="shapiro.html">shapiro.html</a> for more information in the internals of this program.
The file <a href="shapiro.alt.c">shapiro.alt.c</a> contains a non-obfuscated version of
this program. Note that this alt file is currently missing. See
<a href="../../bugs.html#1994_shapiro">1994 shapiro bugs</a> for details.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>The basic theme (pun) of this program is:</p>
<blockquote>
<p>“This time (everything) is not where it should be.” ~~~~</p>
<p>“This time (everything) is not where it should be.”
~~~~</p>
</blockquote>
<p>My entry (<a href="shapiro.c">shapiro.c</a>) is mostly comments,
formatted in the shape of a clock. If you strip out the comments and
look at the code you will quickly realize that the comments were the
important part and that the code does very little (see pun above). It
writes (to <code>stdout</code>) another C program (<a
href="shapiro_t2.c">shapiro_t2.c</a>). This is the first level of
<p>My entry (<a href="shapiro.c">shapiro.c</a>) is mostly comments, formatted in the shape of a
clock. If you strip out the comments and look at the code you will
quickly realize that the comments were the important part and that
the code does very little (see pun above). It writes (to <code>stdout</code>)
another C program (<a href="shapiro_t2.c">shapiro_t2.c</a>). This is the first level of
obfuscation.</p>
<p>The second program (<a href="shapiro_t2.c">shapiro_t2.c</a> (use
<code>make everything</code> first) prints a clock in the upper right
hand corner of your VTxxx/ANSI display.</p>
<p>Most of the surface obfuscation in the second program (<a
href="shapiro_t2.c">shapiro_t2.c</a>) was an attempt to make it as small
as possible. You should be able to see around this with
<code>cb(1)</code> and some more intelligent variable names. Once you
get past this you will realize that the third level of obfuscation is a
six member client/server hierarchy. (See the <a
href="shapiro.html">shapiro.html</a> web page for a detailed description
of the algorithm.)</p>
<p><code>lint</code> complains about: precedence confusion,
<code>K</code> may be used before set, <code>main()</code> returns
random value to invocation environment, value type used inconsistently,
value type declared inconsistently, function argument (number) used
inconsistently, function returns value which is always ignored, function
returns value which is sometimes ignored. All of which are harmless
(famous last words).</p>
<p>This may or may not work on non ASCII systems (I could not find one
to test it on.)</p>
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
License:</h2>
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
Reserved. You are free to share and adapt this file under the terms of
this license:</p>
<p>The second program (<a href="shapiro_t2.c">shapiro_t2.c</a> (use <code>make everything</code> first)
prints a clock in the upper right hand corner of your VTxxx/ANSI display.</p>
<p>Most of the surface obfuscation in the second program
(<a href="shapiro_t2.c">shapiro_t2.c</a>) was an attempt to make it as small as possible.
You should be able to see around this with <code>cb(1)</code> and some more intelligent
variable names. Once you get past this you will realize that the third level of
obfuscation is a six member client/server hierarchy. (See the
<a href="shapiro.html">shapiro.html</a> web page for a detailed description of the algorithm.)</p>
<p><code>lint</code> complains about: precedence confusion, <code>K</code> may be used before set,
<code>main()</code> returns random value to invocation environment, value type used
inconsistently, value type declared inconsistently, function argument
(number) used inconsistently, function returns value which is always
ignored, function returns value which is sometimes ignored.
All of which are harmless (famous last words).</p>
<p>This may or may not work on non ASCII systems (I could not find one to
test it on.)</p>
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0 License:</h2>
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved.
You are free to share and adapt this file under the terms of this license:</p>
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
<p>For more information, see:
https://creativecommons.org/licenses/by-sa/4.0/</p>
<p>For more information, see: https://creativecommons.org/licenses/by-sa/4.0/</p>
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- START: this line starts content for HTML phase 22 by: bin/output-index-inventory.sh via bin/md2html.sh -->
<!-- START: this line starts content generated by: bin/output-index-inventory.sh -->
<h1 id="inventory-for-1994shapiro"><a name="inventory"></a>Inventory for
1994/shapiro</h1>
<h1 id="inventory-for-1994shapiro"><a name="inventory"></a>Inventory for 1994/shapiro</h1>
<p><a href="#top">Jump to top</a></p>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/shapiro/shapiro.c">shapiro.c</a>
- entry source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/shapiro/Makefile">Makefile</a>
- entry Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/shapiro/shapiro.orig.c">shapiro.orig.c</a>
- original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/shapiro/shapiro.c">shapiro.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/shapiro/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/shapiro/shapiro.orig.c">shapiro.orig.c</a> - original source</li>
<li><a href="shapiro.html">shapiro.html</a> - author hints</li>
<li><a href="1994_shapiro.tar.bz2">1994_shapiro.tar.bz2</a> - download
entry source</li>
<li><a href="1994_shapiro.tar.bz2">1994_shapiro.tar.bz2</a> - download entry source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="index.html">index.html</a> - entry home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/shapiro/.entry.json">.entry.json</a>
- description of entry in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/shapiro/.gitignore">.gitignore</a>
- list of files that should not be committed under git</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/shapiro/.entry.json">.entry.json</a> - description of entry in JSON</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/shapiro/.gitignore">.gitignore</a> - list of files that should not be committed under git</li>
<li><a href=".path">.path</a> - directory path from top directory</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/shapiro/README.md">README.md</a>
- markdown source for index.html</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/shapiro/shapiro.md">shapiro.md</a>
- markdown source for shapiro.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/shapiro/README.md">README.md</a> - markdown source for index.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1994/shapiro/shapiro.md">shapiro.md</a> - markdown source for shapiro.html</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
+44 -57
View File
@@ -135,25 +135,21 @@
10. ((M=!M)?K=L:putchar(K-&#39;J&#39;|(L-&#39;J&#39;&lt;&lt;4)))
11. );
12. exit(0);}</code></pre>
<p>Lines 1-5 are basic stuff. Line 6 opens the source code for input.
Line 7 is the loop. Line 8 reads in each character in the file (placed
in <code>L</code>) while not &gt;= 0. Line 9 is an <code>if</code>
expression which filters out all characters not between <code>J</code>
and <code>J + 15</code>. Line 10 uses <code>M</code> to execute two
different paths; the first just stores the character in <code>K</code>
and the second path combines the last two characters read in as high and
low nibbles of a byte and outputs them. In effect this is a very poor
ASCII to binary decoder. The last line is necessary so that make will
<p>Lines 1-5 are basic stuff. Line 6 opens the source code for input. Line 7 is the
loop. Line 8 reads in each character in the file (placed in <code>L</code>) while not &gt;= 0.
Line 9 is an <code>if</code> expression which filters out all characters not between <code>J</code>
and <code>J + 15</code>. Line 10 uses <code>M</code> to execute two different paths; the first just
stores the character in <code>K</code> and the second path combines the last two characters
read in as high and low nibbles of a byte and outputs them. In effect this is a
very poor ASCII to binary decoder. The last line is necessary so that make will
not stop when it executes this program.</p>
<p>The second program is encoded into this format and then included
(mostly) as a comment.</p>
<p>The second program is encoded into this format and then included (mostly)
as a comment.</p>
<p>Notice that it is impossible to write this program while leaving 16
contiguous ASCII characters free for the encoding. Because of this the
second program is mostly included as a comment. However, some of the
characters of the encoded program are also source code for the
decoder.</p>
<h3 id="for-the-second-program-with-time.h">For the second program (with
time.h):</h3>
characters of the encoded program are also source code for the decoder.</p>
<h3 id="for-the-second-program-with-time.h">For the second program (with time.h):</h3>
<pre><code> 1 #include &lt;stdio.h&gt;
2 #include &lt;time.h&gt;
3 #define o(j,k,m,n,l) {fprintf(j,a[k],m,n,a[l]);fflush(j);}
@@ -183,54 +179,45 @@ time.h):</h3>
27 sleep(1);
28 }}}
</code></pre>
<p>Lines 1 and 2 have to be there. Think of <code>o</code> in line 3 as
send message with <code>j</code>,<code>k</code> and <code>m</code> as
where, format and what. Lines 4 and 5 are all the text strings. Line 6
is the offsets into the time string for the hours, minutes and seconds.
Lines 7-13 are basic stuff. Line 14 is the crux of the biscuit. 14 forks
off <code>f</code> (6) processes each of which is connected to the ones
above and below it with a Unix pipe. It was too difficult to recover the
actual FD numbers for the pipe ends in line 14 so I regenerate them and
<code>fdopen()</code> them (for use with the standard C library
functions) on lines 15 and 16. Now we have six almost identical
processes each of which has two files open, <code>h</code> and
<code>i</code> (up and down). The only difference in each process is the
value of <code>f</code> (<code>0 &lt;= f &lt; 6</code>). The five
processes where <code>f !=0</code> are the slave processes and
<code>f == 0</code> is the master. Line 17 says we are going to do this
forever. Lines 18 and 23 differentiate between the master and the
slaves.</p>
<p>Lines 19 to 22 are the slave code. Here we read in a line of text
from <code>i</code> (down, line 19) and remove the newline char (line
20). On line 21 if this message is for us (if the first character is our
number, <code>f</code>, in ASCII) we do two things:</p>
<p>Lines 1 and 2 have to be there. Think of <code>o</code> in line 3 as send message with
<code>j</code>,<code>k</code> and <code>m</code> as where, format and what. Lines 4 and 5 are all the text
strings. Line 6 is the offsets into the time string for the hours, minutes and
seconds. Lines 7-13 are basic stuff. Line 14 is the crux of the biscuit. 14
forks off <code>f</code> (6) processes each of which is connected to the ones above and
below it with a Unix pipe. It was too difficult to recover the actual FD numbers
for the pipe ends in line 14 so I regenerate them and <code>fdopen()</code> them (for use
with the standard C library functions) on lines 15 and 16. Now we have six
almost identical processes each of which has two files open, <code>h</code> and <code>i</code> (up and
down). The only difference in each process is the value of <code>f</code> (<code>0 &lt;= f &lt; 6</code>).
The five processes where <code>f !=0</code> are the slave processes and <code>f == 0</code> is the
master. Line 17 says we are going to do this forever. Lines 18 and 23
differentiate between the master and the slaves.</p>
<p>Lines 19 to 22 are the slave code. Here we read in a line of text from
<code>i</code> (down, line 19) and remove the newline char (line 20). On line
21 if this message is for us (if the first character is our number, <code>f</code>,
in ASCII) we do two things:</p>
<ol type="1">
<li>We copy the text of the message to <code>*c</code> which is really
<code>argv[0]</code>. If you are on the correct flavor of Unix this will
change the output of the <code>ps(1)</code> command to the string we
just put there.</li>
<li>We send the message (not including the number) to
<code>stdout</code> with format number 6
(<code>"\0337\033[%d;65;H%s\0338"</code>) If you can read VTxxx (and I
read books printed as ANSI/VTxxx codes for fun :-) ) you know this is
the sequence for:</li>
<li>We copy the text of the message to <code>*c</code> which is really <code>argv[0]</code>. If you are
on the correct flavor of Unix this will change the output of the <code>ps(1)</code> command
to the string we just put there.</li>
<li>We send the message (not including the number) to <code>stdout</code> with format number 6
(<code>"\0337\033[%d;65;H%s\0338"</code>) If you can read VTxxx (and I read books printed
as ANSI/VTxxx codes for fun :-) ) you know this is the sequence for:</li>
</ol>
<pre><code>remember where we are,
go somewhere else,
print the message,
and return to where we started.</code></pre>
<p>Line 22 says if this message is not for us (the number is bigger than
ours) send it to <code>h</code> (up).</p>
<p>Lines 24 to 27 are the master code. Here we get the time and convert
it to an ASCII format (lines 24 and 25). Then on line 26 we build and
send each of the messages for the slaves. The message uses a different
control string for the different slaves. For the first and last slave
the message text is just <code>"%c+------------+\n"</code> (slave
number, text, newline.) For the other slaves it is
<code>"%c+%3d %-8s+\n"</code> (slave number, number, units, newline).
The slave number is <code>v+'0'</code>. The number (if used) is
<code>atoi(e+b[v])</code> and the units are just the string in the slave
number position.</p>
<p>Line 22 says if this message is not for us (the number is bigger than ours)
send it to <code>h</code> (up).</p>
<p>Lines 24 to 27 are the master code. Here we get the time and convert it
to an ASCII format (lines 24 and 25). Then on line 26 we build and send
each of the messages for the slaves. The message uses a different control
string for the different slaves. For the first and last slave the message
text is just <code>"%c+------------+\n"</code> (slave number, text, newline.) For the
other slaves it is <code>"%c+%3d %-8s+\n"</code> (slave number, number, units, newline).
The slave number is <code>v+'0'</code>. The number (if used) is <code>atoi(e+b[v])</code> and the
units are just the string in the slave number position.</p>
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- START: this line starts content from: inc/after-content.default.html -->