add hack-a-round for language specified markdown code blocks

When language is specified in a markdown code block such as:

````
```c
    printf("Hello, world!\n");
```
````

is used, the resulting HTML as produced by `pandoc(1)` combined
with our revised `ioccc.css` is not intent the code block well.

A temporary "_hack-a-round_" is to turn the "markdown code language
specifier" into an HTML comment.  For example:

````
```<!---c-->
    printf("Hello, world!\n");
```
````

This commits turns off existing markdown code language specifiers
for now, while preserving our ability to restore them in the future
when a better  "_hack-a-round_" to the "markdown code language
specifier" problem is found.

The HTML impact if this "_hack-a-round_" is to produce HTML that
looks like this:

```
<pre class="&lt;!---c--&gt;"><code> .. </code></pre>
```

We might be able to create a complex set of classes for each markdown
code language (there won't be very many) in `ioccc.css`, or we might
find a more general CSS (or maybe `pandoc(1)`?) solution.

For now, this hack-a-round will have to do.
This commit is contained in:
Landon Curt Noll committed 2024-04-04 14:50:38 -07:00
1 parent 3919df50fb
commit b66c79254a
700 files changed
+7052 -7056

No files matched your search

+3 -3
View File
@@ -1,20 +1,20 @@
## To build:
```sh
```<!---sh-->
make all
```
## To use:
```sh
```<!---sh-->
./applin
```
## Try:
```sh
```<!---sh-->
./applin.c
```
+3 -3
View File
@@ -141,11 +141,11 @@ 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> all</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<h2 id="to-use">To use:</h2>
<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="ex">./applin</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./applin</code></pre>
<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">./applin.c</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./applin.c</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>The judges were so amused by this little program that we created an
award just for it. This program is portable to the C and Fortran 77
+2 -2
View File
@@ -1,6 +1,6 @@
## To build:
```sh
```<!---sh-->
make all
```
@@ -18,7 +18,7 @@ For more detailed information see [1986 august bugs](../../bugs.html#1986_august
## Try:
```sh
```<!---sh-->
./august
```
+2 -2
View File
@@ -141,13 +141,13 @@ Location: <a href="../../location.html#SE">SE</a> - <em>Kingdom of Sweden</em> (
<!-- 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> all</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#1986_august">1986 august bugs</a>.</p>
<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">./august</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./august</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This program computes a specific mathematical value. Simply compile
and give it an infinite amount of stack space and CPU time. Otherwise
+3 -3
View File
@@ -1,20 +1,20 @@
## To build:
```sh
```<!---sh-->
make all
```
## To use:
```sh
```<!---sh-->
./bright some_file
```
## Try:
```sh
```<!---sh-->
./try.sh
```
+3 -3
View File
@@ -141,11 +141,11 @@ 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> all</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<h2 id="to-use">To use:</h2>
<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="ex">./bright</span> some_file</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./bright some_file</code></pre>
<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>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Compile this program and give a filename as an argument.</p>
<p>Mr. Bright exploits the C pre-processor, similar variables and
+3 -3
View File
@@ -1,13 +1,13 @@
## To build:
```sh
```<!---sh-->
make all
```
## To use:
```sh
```<!---sh-->
./hague 2>/dev/null
# enter some text
```
@@ -15,7 +15,7 @@
## Try:
```sh
```<!---sh-->
./try.sh
```
+4 -4
View File
@@ -141,12 +141,12 @@ Location: <a href="../../location.html#GB">GB</a> - <em>United Kingdom of Great
<!-- 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> all</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<h2 id="to-use">To use:</h2>
<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="ex">./hague</span> <span class="dv">2</span><span class="op">&gt;</span>/dev/null</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> <span class="co"># enter some text</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./hague 2&gt;/dev/null
# enter some text</code></pre>
<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>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<p>Note that you can run the program without feeding it anything and then type in a
message and line by line it will show the right output. Notice also how certain
characters will print a <code>?</code>.</p>
+2 -2
View File
@@ -1,13 +1,13 @@
## To build:
```sh
```<!---sh-->
make all
```
## Try:
```sh
```<!---sh-->
./holloway
```
+2 -2
View File
@@ -141,9 +141,9 @@ 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> all</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<h2 id="try">Try:</h2>
<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="ex">./holloway</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./holloway</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Believe it or not, this is the old standard “Hello, world” program
performed in a very complex way. The judges and the author defy you
+4 -4
View File
@@ -1,6 +1,6 @@
## To build:
```sh
```<!---sh-->
make all
```
@@ -18,7 +18,7 @@ if nothing else.
## To use:
```sh
```<!---sh-->
./marshall
```
@@ -36,14 +36,14 @@ instead offer the problematic code as an alternate version whereas
To see if your compiler has the problems noted:
```sh
```<!---sh-->
make alt
```
### Alternate use:
```sh
```<!---sh-->
./marshall.alt
```
+4 -4
View File
@@ -162,7 +162,7 @@ because of the call to <code>_exit()</code> (see below).</p>
enable the optimiser clang will generate code that prints the string twice and
dumps core just like before! What about the call to <code>_exit()</code>?</p>
<p>The call was:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> _exit<span class="op">(</span>argv<span class="op">[(</span><span class="dt">int</span><span class="op">)*</span>argc<span class="op">-</span><span class="dv">2</span><span class="op">/</span>cc<span class="op">[</span><span class="dv">1</span><span class="op">*(</span><span class="dt">int</span><span class="op">)*</span>argc<span class="op">]|-</span><span class="dv">1</span><span class="op">&lt;&lt;</span><span class="dv">4</span><span class="op">]);</span></span></code></pre></div>
<pre class="&lt;!---c--&gt;"><code> _exit(argv[(int)*argc-2/cc[1*(int)*argc]|-1&lt;&lt;4]);</code></pre>
<p>Changing it to not refer to these variables and just exit 1 and the problems
disappear!</p>
<h3 id="macos">macOS</h3>
@@ -172,9 +172,9 @@ it works fine but if it’s disabled it prints out the string and then enters an
infinite loop!</p>
<p>After we fix the infinite loop if we change the <code>_exit()</code> call in macOS and
disable the optimiser we might get something like:</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="ex">$</span> ./marshall</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">choo</span> choo</span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">Segmentation</span> fault: 11</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> $ ./marshall
choo choo
Segmentation fault: 11</code></pre>
<p>Observe how it doesn’t print it twice. But of course it segfaults so it’s not
right either.</p>
<p>If the optimiser is enabled, however, we will see that it works fine before the
+2 -2
View File
@@ -54,7 +54,7 @@ dumps core just like before! What about the call to `_exit()`?
The call was:
```c
```<!---c-->
_exit(argv[(int)*argc-2/cc[1*(int)*argc]|-1<<4]);
```
@@ -72,7 +72,7 @@ infinite loop!
After we fix the infinite loop if we change the `_exit()` call in macOS and
disable the optimiser we might get something like:
```sh
```<!---sh-->
$ ./marshall
choo choo
Segmentation fault: 11
+4 -4
View File
@@ -141,7 +141,7 @@ 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> all</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<p>NOTE: we FORCE disable the optimiser due to a funny problem with different
compilers and systems. See below and <a href="compilers.html">compilers.html</a> for details.</p>
<p>There is an <a href="#alternate-code">alternate version</a>. The reason is a funny problem:
@@ -152,7 +152,7 @@ might work but the other one would not. We describe this in more detail in
<a href="compilers.html">compilers.html</a> and we encourage you to read it for entertainment
if nothing else.</p>
<h2 id="to-use">To use:</h2>
<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="ex">./marshall</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./marshall</code></pre>
<h2 id="alternate-code">Alternate code:</h2>
<p>Due to the different <a href="compilers.html">conflicting problems</a> with gcc and clang, we
instead offer the problematic code as an alternate version whereas
@@ -160,9 +160,9 @@ instead offer the problematic code as an alternate version whereas
<code>_exit()</code> commented out, changing the value passed into <code>_exit()</code> to <code>1</code>.</p>
<h3 id="alternate-build">Alternate build:</h3>
<p>To see if your compiler has the problems noted:</p>
<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="fu">make</span> alt</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make alt</code></pre>
<h3 id="alternate-use">Alternate use:</h3>
<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">./marshall.alt</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./marshall.alt</code></pre>
<p>Does it work in your system? That is does it not segfault, does it print it only
once and does it not enter an infinite loop? Or more generally does it print the
text exactly once and then exit?</p>
+2 -2
View File
@@ -1,13 +1,13 @@
## To build:
```sh
```<!---sh-->
make all
```
## Try:
```sh
```<!---sh-->
./pawka
```
+2 -2
View File
@@ -141,9 +141,9 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></l
<!-- 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> all</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<h2 id="try">Try:</h2>
<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="ex">./pawka</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./pawka</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>The judges found this entry to be one of hardest to read without the
aid of <code>/lib/cpp</code> and a good editor. When run, the program asks if it
+3 -3
View File
@@ -1,13 +1,13 @@
## To build:
```sh
```<!---sh-->
make all
```
## To use:
```sh
```<!---sh-->
./stein $(printf "\015\015"); echo
```
@@ -24,7 +24,7 @@ The `\015` in the above `printf(1)` command produces a control-N.
One some machines, a control-M control-N arg is needed
to get the command to output cleanly:
```sh
```<!---sh-->
./stein $(printf "\014\015"); echo
```
+3 -3
View File
@@ -141,9 +141,9 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></l
<!-- 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> all</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<h2 id="to-use">To use:</h2>
<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="ex">./stein</span> <span class="va">$(</span><span class="bu">printf</span> <span class="st">&quot;\015\015&quot;</span><span class="va">)</span><span class="kw">;</span> <span class="bu">echo</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./stein $(printf &quot;\015\015&quot;); echo</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>NOTE: to avoid problems with news and mail, the single line was split
into 3 lines. Join all lines into a single line to recreate
@@ -151,7 +151,7 @@ the original file.</p>
<p>The <code>\015</code> in the above <code>printf(1)</code> command produces a control-N.</p>
<p>One some machines, a control-M control-N arg is needed
to get the command to output cleanly:</p>
<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">./stein</span> <span class="va">$(</span><span class="bu">printf</span> <span class="st">&quot;\014\015&quot;</span><span class="va">)</span><span class="kw">;</span> <span class="bu">echo</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./stein $(printf &quot;\014\015&quot;); echo</code></pre>
<p>Your system may require another set of characters.
In time, you will figure out what it does. :-)</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
+2 -2
View File
@@ -1,13 +1,13 @@
## To build:
```sh
```<!---sh-->
make all
```
## To use:
```sh
```<!---sh-->
./wall
```
+2 -2
View File
@@ -141,9 +141,9 @@ 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> all</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<h2 id="to-use">To use:</h2>
<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="ex">./wall</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./wall</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>The original version did not have a ‘;’ character in the first line.
This caused a number of System V C pre-preprocessors to gripe about a