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

+3 -3
View File
@@ -1,7 +1,7 @@
## To build:
```sh
make all
make all
```
A smaller version, originally called `zsmall.c` (and still exists as such, as
@@ -13,7 +13,7 @@ program. See the [Alternate code](#alternate-code) section below for details.
## Try:
```sh
./applin
./applin
```
@@ -26,7 +26,7 @@ with this entry.
### Alternate build:
```sh
make alt
make alt
```
Use `applin.alt` as you would `applin` above.
+4 -5
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Jack_Applin">Jack Applin</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,18 +141,18 @@ 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>
<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>
<p>A smaller version, originally called <code>zsmall.c</code> (and still exists as such, as
the source of the alt code), of <a href="applin.c">applin.c</a>, can be found in
<a href="applin.alt.c">applin.alt.c</a>. Your machine may have an easier time with this
program. See the <a href="#alternate-code">Alternate code</a> section below for details.</p>
<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">./applin</span></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="ex">./applin</span></span></code></pre></div>
<h2 id="alternate-code">Alternate code:</h2>
<p>As noted above a smaller version can be used in case your <code>cpp</code> has a hard time
with this entry.</p>
<h3 id="alternate-build">Alternate build:</h3>
<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>
<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>
<p>Use <code>applin.alt</code> as you would <code>applin</code> above.</p>
<h4 id="history-about-the-smaller-version">History about the smaller version:</h4>
<p>Way back in 1988 ..</p>
+6 -6
View File
@@ -1,7 +1,7 @@
## To build:
```sh
make all
make all
```
@@ -10,7 +10,7 @@ make all
The current status of this entry is:
```
STATUS: INABIAF - please **DO NOT** fix
STATUS: INABIAF - please **DO NOT** fix
```
For more detailed information see [1988 dale bugs](../../bugs.html#1988_dale).
@@ -19,15 +19,15 @@ For more detailed information see [1988 dale bugs](../../bugs.html#1988_dale).
## Try:
```sh
./try.sh
./try.sh
```
Observe that three of the commands in the script are:
```sh
./dale these files are in this directory: *
./dale $(printf "the following files exist in this directory:\n%s\n" *)
./dale "$(printf "the following files exist in this directory:\n%s\n" *)"
./dale these files are in this directory: *
./dale $(printf "the following files exist in this directory:\n%s\n" *)
./dale "$(printf "the following files exist in this directory:\n%s\n" *)"
```
As the script asks what do the last two do and why do they do it? Why do they
+7 -8
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Paul_Dale">Paul Dale</a><br>
Location: <a href="../../location.html#AU">AU</a> - <em>Commonwealth of Australia</em> (<em>Australia</em>)
<br><br></li>
Location: <a href="../../location.html#AU">AU</a> - <em>Commonwealth of Australia</em> (<em>Australia</em>)</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -142,17 +141,17 @@ Location: <a href="../../location.html#AU">AU</a> - <em>Commonwealth of Australi
<!-- 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>
<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>
<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>
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#1988_dale">1988 dale 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">./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>
<p>Observe that three of the commands in the script are:</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">./dale</span> these files are in this directory: <span class="pp">*</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./dale</span> <span class="va">$(</span><span class="bu">printf</span> <span class="st">&quot;the following files exist in this directory:\n%s\n&quot;</span> <span class="pp">*</span><span class="va">)</span></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./dale</span> <span class="st">&quot;</span><span class="va">$(</span><span class="bu">printf</span> <span class="st">&quot;the following files exist in this directory:\n%s\n&quot;</span> <span class="pp">*</span><span class="va">)</span><span class="st">&quot;</span></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">./dale</span> these files are in this directory: <span class="pp">*</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./dale</span> <span class="va">$(</span><span class="bu">printf</span> <span class="st">&quot;the following files exist in this directory:\n%s\n&quot;</span> <span class="pp">*</span><span class="va">)</span></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./dale</span> <span class="st">&quot;</span><span class="va">$(</span><span class="bu">printf</span> <span class="st">&quot;the following files exist in this directory:\n%s\n&quot;</span> <span class="pp">*</span><span class="va">)</span><span class="st">&quot;</span></span></code></pre></div>
<p>As the script asks what do the last two do and why do they do it? Why do they
differ in format from the first command? Finally how can you get the more likely
desired behaviour?</p>
+6 -6
View File
@@ -1,7 +1,7 @@
## To build:
```sh
make all
make all
```
There is an alternate version, the original, that can't be compiled in modern
@@ -12,7 +12,7 @@ code](#alternate-code) below.
## To use:
```sh
./isaak
./isaak
```
@@ -22,7 +22,7 @@ The original version of this code is in [isaak.alt.c](isaak.alt.c).
The original entry starts with the line:
```c
main(){};
main(){};
```
This works on some systems. Why? Note that `#include <stdio.h>` is given on
@@ -38,7 +38,7 @@ compile.
### Alternate build:
```sh
make alt
make alt
```
Use `isaak.alt` as you would `isaak` above.
@@ -65,8 +65,8 @@ due to the fact that BSD style systems have an `sprintf(3)` that returns a `char
file: isaak.encode. To read this file do.
```sh
uudecode < isaak.encode
cat isaak.output
uudecode < isaak.encode
cat isaak.output
```
Since this was fixed, this file is not strictly necessary. See the
+7 -8
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Mark_Isaak">Mark Isaak</a><br>
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
<br><br></li>
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -142,16 +141,16 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</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>
<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>
<p>There is an alternate version, the original, that can’t be compiled in modern
systems but can be if you have an old enough compiler. See <a href="#alternate-code">Alternate
code</a> below.</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">./isaak</span></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="ex">./isaak</span></span></code></pre></div>
<h2 id="alternate-code">Alternate code:</h2>
<p>The original version of this code is in <a href="isaak.alt.c">isaak.alt.c</a>.
The original entry starts with the line:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>main<span class="op">(){};</span></span></code></pre></div>
<div class="sourceCode" id="cb3"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a> main<span class="op">(){};</span></span></code></pre></div>
<p>This works on some systems. Why? Note that <code>#include &lt;stdio.h&gt;</code> is given on
the last line. Why is this needed? Note the unusual calls to <code>sprintf(3)</code>.</p>
<p>This version also relied on being able to define <code>#define</code> to something else and
@@ -159,7 +158,7 @@ using that macro for <code>#define</code>.</p>
<p>This version will not likely work on modern systems if you can even get it to
compile.</p>
<h3 id="alternate-build">Alternate build:</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="fu">make</span> alt</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="fu">make</span> alt</span></code></pre></div>
<p>Use <code>isaak.alt</code> as you would <code>isaak</code> above.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>The program relies heavily on ASCII. Don’t even think of running it on
@@ -174,8 +173,8 @@ from a single macro (e.g., <code>"O/**/O"</code> creates either <code>++</code>
<p>NOTE: Most System V machines were not be able to execute this program correctly
due to the fact that BSD style systems have an <code>sprintf(3)</code> that returns a <code>char *</code>. Due to the above problems, we placed the output of this program in the
file: isaak.encode. To read this file do.</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="ex">uudecode</span> <span class="op">&lt;</span> isaak.encode</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="fu">cat</span> isaak.output</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="ex">uudecode</span> <span class="op">&lt;</span> isaak.encode</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">cat</span> isaak.output</span></code></pre></div>
<p>Since this was fixed, this file is not strictly necessary. See the
<a href="isaak.alt.c">isaak.alt.c</a> for the original source.</p>
<p>FYI: We are likely to be more strict about portability in the future.</p>
+11 -11
View File
@@ -1,14 +1,14 @@
## To build:
```sh
make
make
```
## To use:
```sh
./litmaath some text
./litmaath some text
```
There is an alternate version provided. See the [Alternate
@@ -18,7 +18,7 @@ code](#alternate-code) section below.
## Try:
```sh
./litmaath eschew obfuscation
./litmaath eschew obfuscation
```
@@ -32,7 +32,7 @@ a file.
### Alternate build:
```sh
make alt
make alt
```
Use `litmaath.alt` as you would `litmaath` above.
@@ -41,7 +41,7 @@ Use `litmaath.alt` as you would `litmaath` above.
### Alternate try:
```sh
./litmaath.alt six was afraid of seven because seven eight nine
./litmaath.alt six was afraid of seven because seven eight nine
```
@@ -51,8 +51,8 @@ Note the unusual structure:
```c
while (<condition>)
;
while (<condition>)
;
```
Did you notice that the body is empty?
@@ -67,10 +67,10 @@ variables like:
```c
fprintf(stderr,
"argv=%lo *argv=%lo **argv=%c argv[1]=%lo *argv[1]=%c argc=%d\n",
(long) argv, (long) *argv, *argv && **argv ? **argv : '@',
(long) argv[1], argv[1] && *argv[1] ? *argv[1] : '@', argc);
fprintf(stderr,
"argv=%lo *argv=%lo **argv=%c argv[1]=%lo *argv[1]=%c argc=%d\n",
(long) argv, (long) *argv, *argv && **argv ? **argv : '@',
(long) argv[1], argv[1] && *argv[1] ? *argv[1] : '@', argc);
```
... which is what the [alternate code](#alternate-code) is.
+12 -13
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Maarten_Litmaath">Maarten Litmaath</a><br>
Location: <a href="../../location.html#CH">CH</a> - <em>Swiss Confederation</em> (<em>Switzerland</em>)
<br><br></li>
Location: <a href="../../location.html#CH">CH</a> - <em>Swiss Confederation</em> (<em>Switzerland</em>)</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -142,26 +141,26 @@ Location: <a href="../../location.html#CH">CH</a> - <em>Swiss Confederation</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></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>
<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">./litmaath</span> some text</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="ex">./litmaath</span> some text</span></code></pre></div>
<p>There is an alternate version provided. See the <a href="#alternate-code">Alternate
code</a> section below.</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">./litmaath</span> eschew obfuscation</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">./litmaath</span> eschew obfuscation</span></code></pre></div>
<h2 id="alternate-code">Alternate code:</h2>
<p>This alternate code, added to help understand the entry and for fun, is code
that we suggested at the time of the entry publication but which we never put in
a file.</p>
<h3 id="alternate-build">Alternate build:</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="fu">make</span> alt</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="fu">make</span> alt</span></code></pre></div>
<p>Use <code>litmaath.alt</code> as you would <code>litmaath</code> above.</p>
<h3 id="alternate-try">Alternate try:</h3>
<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="ex">./litmaath.alt</span> six was afraid of seven because seven eight nine</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="ex">./litmaath.alt</span> six was afraid of seven because seven eight nine</span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Note the unusual structure:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="cf">while</span> <span class="op">(&lt;</span>condition<span class="op">&gt;)</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="op">;</span></span></code></pre></div>
<div class="sourceCode" id="cb6"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a> <span class="cf">while</span> <span class="op">(&lt;</span>condition<span class="op">&gt;)</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="op">;</span></span></code></pre></div>
<p>Did you notice that the body is empty?</p>
<p>Furthermore, it’s interesting to note that only two variables are
used to achieve everything.</p>
@@ -169,10 +168,10 @@ used to achieve everything.</p>
two small strings as arguments, and follow the program closely. One
could make the body of the <code>while</code> loop an <code>fprintf</code> with interesting
variables like:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>fprintf<span class="op">(</span>stderr<span class="op">,</span></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;argv=</span><span class="sc">%lo</span><span class="st"> *argv=</span><span class="sc">%lo</span><span class="st"> **argv=</span><span class="sc">%c</span><span class="st"> argv[1]=</span><span class="sc">%lo</span><span class="st"> *argv[1]=</span><span class="sc">%c</span><span class="st"> argc=</span><span class="sc">%d\n</span><span class="st">&quot;</span><span class="op">,</span></span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a> <span class="op">(</span><span class="dt">long</span><span class="op">)</span> argv<span class="op">,</span> <span class="op">(</span><span class="dt">long</span><span class="op">)</span> <span class="op">*</span>argv<span class="op">,</span> <span class="op">*</span>argv <span class="op">&amp;&amp;</span> <span class="op">**</span>argv <span class="op">?</span> <span class="op">**</span>argv <span class="op">:</span> <span class="ch">&#39;@&#39;</span><span class="op">,</span></span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a> <span class="op">(</span><span class="dt">long</span><span class="op">)</span> argv<span class="op">[</span><span class="dv">1</span><span class="op">],</span> argv<span class="op">[</span><span class="dv">1</span><span class="op">]</span> <span class="op">&amp;&amp;</span> <span class="op">*</span>argv<span class="op">[</span><span class="dv">1</span><span class="op">]</span> <span class="op">?</span> <span class="op">*</span>argv<span class="op">[</span><span class="dv">1</span><span class="op">]</span> <span class="op">:</span> <span class="ch">&#39;@&#39;</span><span class="op">,</span> argc<span class="op">);</span></span></code></pre></div>
<div class="sourceCode" id="cb7"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a> fprintf<span class="op">(</span>stderr<span class="op">,</span></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;argv=</span><span class="sc">%lo</span><span class="st"> *argv=</span><span class="sc">%lo</span><span class="st"> **argv=</span><span class="sc">%c</span><span class="st"> argv[1]=</span><span class="sc">%lo</span><span class="st"> *argv[1]=</span><span class="sc">%c</span><span class="st"> argc=</span><span class="sc">%d\n</span><span class="st">&quot;</span><span class="op">,</span></span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a> <span class="op">(</span><span class="dt">long</span><span class="op">)</span> argv<span class="op">,</span> <span class="op">(</span><span class="dt">long</span><span class="op">)</span> <span class="op">*</span>argv<span class="op">,</span> <span class="op">*</span>argv <span class="op">&amp;&amp;</span> <span class="op">**</span>argv <span class="op">?</span> <span class="op">**</span>argv <span class="op">:</span> <span class="ch">&#39;@&#39;</span><span class="op">,</span></span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a> <span class="op">(</span><span class="dt">long</span><span class="op">)</span> argv<span class="op">[</span><span class="dv">1</span><span class="op">],</span> argv<span class="op">[</span><span class="dv">1</span><span class="op">]</span> <span class="op">&amp;&amp;</span> <span class="op">*</span>argv<span class="op">[</span><span class="dv">1</span><span class="op">]</span> <span class="op">?</span> <span class="op">*</span>argv<span class="op">[</span><span class="dv">1</span><span class="op">]</span> <span class="op">:</span> <span class="ch">&#39;@&#39;</span><span class="op">,</span> argc<span class="op">);</span></span></code></pre></div>
<p>… which is what the <a href="#alternate-code">alternate code</a> is.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>No remarks were provided by the author.</p>
+1 -1
View File
@@ -1,7 +1,7 @@
## To build:
```sh
make all
make all
```
+2 -3
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Ian_Phillipps">Ian Phillipps</a><br>
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
<br><br></li>
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -142,7 +141,7 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</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>
<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>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Compile and run without parameters.</p>
<p>The program is smaller than even the ‘compressed’ form of its output,
+5 -5
View File
@@ -1,22 +1,22 @@
## To build:
```sh
make all
make all
```
## Try:
```sh
./reddy
char *(*(fun[16])();
char *(*(*(*(*(*fun[32])))))();
./reddy
char *(*(fun[16])();
char *(*(*(*(*(*fun[32])))))();
```
What happens if you input, and what you do about it?
```c
char *(*(*(*(*(*fun[32])))))());
char *(*(*(*(*(*fun[32])))))());
```
+6 -7
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Gopi_Reddy">Gopi Reddy</a><br>
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
<br><br></li>
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -142,13 +141,13 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</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>
<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>
<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">./reddy</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="ex">char</span> <span class="pp">*(*(</span>fun<span class="pp">[</span><span class="ss">16</span><span class="pp">])</span>(<span class="pp">)</span><span class="kw">;</span></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="ex">char</span> <span class="pp">*(*(*(*(*(*</span>fun<span class="pp">[</span><span class="ss">32</span><span class="pp">])))))</span><span class="er">(</span><span class="kw">);</span></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="ex">./reddy</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">char</span> <span class="pp">*(*(</span>fun<span class="pp">[</span><span class="ss">16</span><span class="pp">])</span>(<span class="pp">)</span><span class="kw">;</span></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">char</span> <span class="pp">*(*(*(*(*(*</span>fun<span class="pp">[</span><span class="ss">32</span><span class="pp">])))))</span><span class="er">(</span><span class="kw">);</span></span></code></pre></div>
<p>What happens if you input, and what you do about it?</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="dt">char</span> <span class="op">*(*(*(*(*(*</span>fun<span class="op">[</span><span class="dv">32</span><span class="op">])))))());</span></span></code></pre></div>
<div class="sourceCode" id="cb3"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a> <span class="dt">char</span> <span class="op">*(*(*(*(*(*</span>fun<span class="op">[</span><span class="dv">32</span><span class="op">])))))());</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This is a somewhat restricted version of a useful program that has been
posted to Usenet. What is unusual is what it is able to do so much
+6 -7
View File
@@ -1,22 +1,22 @@
## To build:
```sh
make all
make all
```
## Try:
```sh
./robison 80 10
./robison 40 16
./robison 80 10
./robison 40 16
```
The first and second parameters are optional. You might also try:
```sh
./robison 80 2 # <--- can you find the bug?
./robison 80 -246
./robison 80 2 # <--- can you find the bug?
./robison 80 -246
```
@@ -25,8 +25,7 @@ The first and second parameters are optional. You might also try:
The following might make an interesting benchmark:
```sh
./robison 100
./robison 100
```
[Amdahl 5890-300E with System V cc: 8.40 seconds]
+7 -8
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Arch_D_Robison">Arch D. Robison</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,16 +141,16 @@ 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>
<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>
<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">./robison</span> 80 10</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./robison</span> 40 16</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="ex">./robison</span> 80 10</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./robison</span> 40 16</span></code></pre></div>
<p>The first and second parameters are optional. You might also try:</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">./robison</span> 80 2 <span class="co"># &lt;--- can you find the bug?</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./robison</span> 80 <span class="at">-246</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">./robison</span> 80 2 <span class="co"># &lt;--- can you find the bug?</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./robison</span> 80 <span class="at">-246</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>The following might make an interesting benchmark:</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">./robison</span> 100</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">./robison</span> 100</span></code></pre></div>
<p>[Amdahl 5890-300E with System V cc: 8.40 seconds]</p>
<p>We suggest that you C pre-process and perhaps C-beautify this program.
All is not what it may appear to be in this program. Why does a <code>whi1e</code>
+6 -6
View File
@@ -1,7 +1,7 @@
## To build:
```sh
make clobber all
make clobber all
```
and follow the instructions this will give you.
@@ -13,7 +13,7 @@ code](#alternate-code) section below.
## To use:
```sh
./spinellis
./spinellis
```
Type in or copy paste some C code, perhaps from [input.txt](input.txt), and send
@@ -22,7 +22,7 @@ EOF (typically ctrl-d).
Now run again:
```sh
./spinellis
./spinellis
```
@@ -34,7 +34,7 @@ For clang or compilers that won't read from `/dev/tty`, we provide this version.
### Alternate build:
```sh
make clobber alt
make clobber alt
```
and follow the instructions.
@@ -43,7 +43,7 @@ and follow the instructions.
### Alternate use:
```sh
./spinellis.alt
./spinellis.alt
```
Type in or copy paste some C code, perhaps from [input.txt](input.txt), and send
@@ -52,7 +52,7 @@ EOF (typically ctrl-d).
Now run again:
```sh
./spinellis.alt
./spinellis.alt
```
+7 -8
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Diomidis_Spinellis">Diomidis Spinellis</a><br>
Location: <a href="../../location.html#GR">GR</a> - <em>Hellenic Republic</em> (<em>Greece</em>)
<br><br></li>
Location: <a href="../../location.html#GR">GR</a> - <em>Hellenic Republic</em> (<em>Greece</em>)</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -142,27 +141,27 @@ Location: <a href="../../location.html#GR">GR</a> - <em>Hellenic Republic</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> clobber all</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> clobber all</span></code></pre></div>
<p>and follow the instructions this will give you.</p>
<p>If your compiler will not read from <code>/dev/tty</code> see the <a href="#alternate-code">Alternate
code</a> section below.</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">./spinellis</span></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="ex">./spinellis</span></span></code></pre></div>
<p>Type in or copy paste some C code, perhaps from <a href="input.txt">input.txt</a>, and send
EOF (typically ctrl-d).</p>
<p>Now run again:</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">./spinellis</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">./spinellis</span></span></code></pre></div>
<h2 id="alternate-code">Alternate code:</h2>
<p>For clang or compilers that won’t read from <code>/dev/tty</code>, we provide this version.</p>
<h3 id="alternate-build">Alternate build:</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="fu">make</span> clobber alt</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="fu">make</span> clobber alt</span></code></pre></div>
<p>and follow the instructions.</p>
<h3 id="alternate-use">Alternate use:</h3>
<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="ex">./spinellis.alt</span></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="ex">./spinellis.alt</span></span></code></pre></div>
<p>Type in or copy paste some C code, perhaps from <a href="input.txt">input.txt</a>, and send
EOF (typically ctrl-d).</p>
<p>Now run again:</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">./spinellis.alt</span></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">./spinellis.alt</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>We enjoyed this entry this year; however in the future programs must be able to
be compiled from within a Makefile without the need of human intervention.</p>
+9 -9
View File
@@ -1,7 +1,7 @@
## To build:
```sh
make all
make all
```
NOTE: this version is a fixed version for modern C compilers. See the [Alternate
@@ -12,13 +12,13 @@ might wish to do so.
## Try:
```sh
./westley
./westley
```
Also try:
```sh
./try.sh
./try.sh
```
to show the code with followed by the result so you can truly see the magic.
@@ -32,7 +32,7 @@ This version is the original which might not work as you expect nowadays.
### Alternate build:
```sh
make alt
make alt
```
@@ -42,7 +42,7 @@ To see if your compiler has the problem described in the Judges' remarks below,
try:
```sh
./westley.alt
./westley.alt
```
Does it show the same output as `westley`?
@@ -53,8 +53,8 @@ Does it show the same output as `westley`?
Your compiler must parse
```c
#define _ -a
-_
#define _ -a
-_
```
as `--a` and not `-(-a)` or some other tokenized form. Some strictly
@@ -63,7 +63,7 @@ compilers, you can elide the non-standard token-pasting requirement
by changing the #define line to:
```c
#define _ F-->00||F-OO--;
#define _ F-->00||F-OO--;
```
This is what the modified code in [westley.c](westley.c) does whereas the alt
@@ -72,7 +72,7 @@ code is the original.
You might enjoy looking at the output of:
```sh
cc -E westley.alt.c
cc -E westley.alt.c
```
+10 -11
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Brian_Westley">Brian Westley</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,37 +141,37 @@ 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>
<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>
<p>NOTE: this version is a fixed version for modern C compilers. See the <a href="#alternate-code">Alternate
code</a> section below for how to use the original and why one
might wish to do so.</p>
<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">./westley</span></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="ex">./westley</span></span></code></pre></div>
<p>Also try:</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">./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>
<p>to show the code with followed by the result so you can truly see the magic.</p>
<h2 id="alternate-code">Alternate code:</h2>
<p>This version is the original which might not work as you expect nowadays.</p>
<h3 id="alternate-build">Alternate build:</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="fu">make</span> alt</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="fu">make</span> alt</span></code></pre></div>
<h3 id="alternate-use">Alternate use:</h3>
<p>To see if your compiler has the problem described in the Judges’ remarks below,
try:</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="ex">./westley.alt</span></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="ex">./westley.alt</span></span></code></pre></div>
<p>Does it show the same output as <code>westley</code>?</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Your compiler must parse</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#define _ </span><span class="op">-</span><span class="pp">a</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="op">-</span>_</span></code></pre></div>
<div class="sourceCode" id="cb6"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a> <span class="pp">#define _ </span><span class="op">-</span><span class="pp">a</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="op">-</span>_</span></code></pre></div>
<p>as <code>--a</code> and not <code>-(-a)</code> or some other tokenized form. Some strictly
conforming ANSI C Preprocessors may object to this: for such
compilers, you can elide the non-standard token-pasting requirement
by changing the #define line to:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#define _ F</span><span class="op">--&gt;</span><span class="bn">00</span><span class="op">||</span><span class="pp">F</span><span class="op">-</span><span class="pp">OO</span><span class="op">--;</span></span></code></pre></div>
<div class="sourceCode" id="cb7"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a> <span class="pp">#define _ F</span><span class="op">--&gt;</span><span class="bn">00</span><span class="op">||</span><span class="pp">F</span><span class="op">-</span><span class="pp">OO</span><span class="op">--;</span></span></code></pre></div>
<p>This is what the modified code in <a href="westley.c">westley.c</a> does whereas the alt
code is the original.</p>
<p>You might enjoy looking at the output of:</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="fu">cc</span> <span class="at">-E</span> westley.alt.c</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="fu">cc</span> <span class="at">-E</span> westley.alt.c</span></code></pre></div>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>No remarks were provided by the author.</p>
<!--