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

+134 -207
View File
@@ -129,10 +129,9 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Aidan_Thornton">Aidan
Thornton</a><br> Location: <a href="../../location.html#GB">GB</a> -
<em>United Kingdom of Great Britain and Northern Ireland</em>
(<em>United Kingdom</em>) <br><br></li>
<li>Name: <a href="../../authors.html#Aidan_Thornton">Aidan Thornton</a><br>
Location: <a href="../../location.html#GB">GB</a> - <em>United Kingdom of Great Britain and Northern Ireland</em> (<em>United Kingdom</em>)
<br><br></li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -142,8 +141,8 @@ Thornton</a><br> Location: <a href="../../location.html#GB">GB</a> -
<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>
<p>There is an alternate version based on the author’s remarks. See <a
href="#alternate-code">alternate code</a>.</p>
<p>There is an alternate version based on the author’s remarks. See <a href="#alternate-code">alternate
code</a>.</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">./aidan</span> <span class="op">&lt;</span> puzzle</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a></span>
@@ -152,9 +151,8 @@ href="#alternate-code">alternate code</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>
<h2 id="alternate-code">Alternate code:</h2>
<p>This code is formatted differently and is not the approach used by
the author which is slower, inelegant and not as obscure, as the author
put it.</p>
<p>This code is formatted differently and is not the approach used by the author
which is slower, inelegant and not as obscure, as the author put it.</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>
<h3 id="alternate-use">Alternate use:</h3>
@@ -162,25 +160,21 @@ put it.</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">./try.alt.sh</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Are you puzzled about puzzles? This entry might puzzle you more while
it puzzles out some puzzles: all in a puzzling way!</p>
<p>Are you puzzled about puzzles? This entry might puzzle you
more while it puzzles out some puzzles: all in a puzzling way!</p>
<p><code>goto</code> the source and notice the lack of functions. Jump
to the <code>switch</code> statement. And if you think you can puzzle it
out better, try solving <a href="insane1.sudoku">insane1.sudoku</a> all
by yourself!</p>
<p>NOTE: the tarball named by the author was removed after the files
were extracted into the directory instead. These files were added to the
list.</p>
to the <code>switch</code> statement. And if you think you can puzzle
it out better, try solving <a href="insane1.sudoku">insane1.sudoku</a> all by yourself!</p>
<p>NOTE: the tarball named by the author was removed after the files were extracted
into the directory instead. These files were added to the list.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>This program can solve a type of logic puzzle known as a <a
href="https://en.wikipedia.org/wiki/Sudoku">Sudoku</a>, and also
<p>This program can solve a type of logic puzzle known as a
<a href="https://en.wikipedia.org/wiki/Sudoku">Sudoku</a>, and also
generate new ones.</p>
<h3 id="contents">Contents</h3>
<ul>
<li>program file: <a href="aidan.c">aidan.c</a> - sudoku solver and
generator</li>
<li>test suite: <a href="test-su.perl">test-su.perl</a> - optional test
script (written for Perl5)</li>
<li>program file: <a href="aidan.c">aidan.c</a> - sudoku solver and generator</li>
<li>test suite: <a href="test-su.perl">test-su.perl</a> - optional test script (written for Perl5)</li>
<li>sudoku file: <a href="blank.sudoku">blank.sudoku</a></li>
<li>sudoku file: <a href="insane1.sudoku">insane1.sudoku</a></li>
<li>sudoku file: <a href="insane2.sudoku">insane2.sudoku</a></li>
@@ -190,30 +184,27 @@ script (written for Perl5)</li>
<li>sudoku file: <a href="tough1.sudoku">tough1.sudoku</a></li>
<li>sudoku file: <a href="wp.sudoku">wp.sudoku</a></li>
</ul>
<p>Yes, the test suite really is 5 times larger than the actual program.
You <strong>did</strong> say this was a parody of the software
development process…</p>
<p>Yes, the test suite really is 5 times larger than the actual program. You
<strong>did</strong> say this was a parody of the software development process…</p>
<h3 id="important">IMPORTANT</h3>
<p><a href="test-su.perl">test.perl</a> expects the
<code>sudoku-sf</code> executable to be <code>./sudoku-sf</code>. If you
rename it, please change the definition of <code>$sf_exe</code> to the
<p><a href="test-su.perl">test.perl</a> expects the <code>sudoku-sf</code> executable to be
<code>./sudoku-sf</code>. If you rename it, please change the definition of <code>$sf_exe</code> to the
new name.</p>
<blockquote>
<p>Judges’ note: this was done.</p>
</blockquote>
<h3 id="legal-blurb">Legal blurb</h3>
<p>This program comes with NO WARRANTY, not even that it’ll do what I
say it should. Any misfortunes that occur as a result of using this are
not my fault. Go find some unpopular multinational to sue instead.</p>
<p>This program is not copyrighted and is entirely my work. Distribute
or modify it as you wish, though please give me credit.</p>
<p>This program comes with NO WARRANTY, not even that it’ll do what I say it
should. Any misfortunes that occur as a result of using this are not my fault.
Go find some unpopular multinational to sue instead.</p>
<p>This program is not copyrighted and is entirely my work. Distribute or modify
it as you wish, though please give me credit.</p>
<h3 id="what-is-a-sudoku">What is a sudoku?</h3>
<p>(If you know, feel free to skip this section. Get more details from
<a href="http://en.wikipedia.org/wiki/Sudoku">the wikipedia
entry</a>)</p>
<p>A sudoku is a type of logic puzzle. You are given a grid of 9x9
boxes, some of which contain digits. This is divided into a 3x3 set up,
e.g. (from the Wikipedia article - fairly easy):</p>
<p>(If you know, feel free to skip this section. Get more details from <a href="http://en.wikipedia.org/wiki/Sudoku">the
wikipedia entry</a>)</p>
<p>A sudoku is a type of logic puzzle. You are given a grid of 9x9 boxes, some
of which contain digits. This is divided into a 3x3 set up, e.g. (from the
Wikipedia article - fairly easy):</p>
<pre><code> . . . | 1 . . | 7 4 .
. 5 . | . 9 . | . 3 2
. . 6 | 7 . . | 9 . .
@@ -225,15 +216,12 @@ e.g. (from the Wikipedia article - fairly easy):</p>
. . 4 | . . 7 | 3 . .
7 3 . | . 2 . | . 6 .
. 6 5 | . . 4 | . . .</code></pre>
<p>You have to fill in the remaining boxes so that each row, column, and
smaller box contains all of the digits 1-9. That’s all the information I
needed to figure out how to solve them, but there’s a useful tutorial on
<a href="http://www.sudoku.org.uk/"
class="uri">http://www.sudoku.org.uk/</a>, which is roughly affiliated
with the <a href="https://www.telegraph.co.uk/">Daily Telegraph</a>, a
UK newspaper.</p>
<p>Now, with modern computers this <strong>can</strong> be solved using
brute force, e.g.:</p>
<p>You have to fill in the remaining boxes so that each row, column, and smaller
box contains all of the digits 1-9. That’s all the information I needed to
figure out how to solve them, but there’s a useful tutorial on
<a href="http://www.sudoku.org.uk/" class="uri">http://www.sudoku.org.uk/</a>, which is roughly affiliated with the <a href="https://www.telegraph.co.uk/">Daily
Telegraph</a>, a UK newspaper.</p>
<p>Now, with modern computers this <strong>can</strong> be solved using brute force, e.g.:</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">#include </span><span class="im">&lt;stdio.h&gt;</span><span class="pp"> </span><span class="co">/* sudoku-bfi.c */</span></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#define S</span><span class="op">(</span><span class="pp">t</span><span class="op">)</span><span class="pp"> </span><span class="cf">for</span><span class="op">(</span><span class="pp">n</span><span class="op">=</span><span class="dv">0</span><span class="op">;</span><span class="pp">n</span><span class="op">&lt;</span><span class="dv">9</span><span class="op">;</span><span class="pp">v</span><span class="op">[</span><span class="pp">n</span><span class="op">++]=</span><span class="dv">0</span><span class="op">);</span><span class="cf">for</span><span class="op">(</span><span class="pp">n</span><span class="op">=</span><span class="dv">0</span><span class="op">;</span><span class="pp">n</span><span class="op">&lt;</span><span class="dv">81</span><span class="op">;</span><span class="pp">n</span><span class="op">++)</span><span class="cf">if</span><span class="op">(</span><span class="pp">i</span><span class="op">[</span><span class="pp">n</span><span class="op">]){</span><span class="pp">z</span><span class="op">=</span><span class="dv">1</span><span class="op">&lt;&lt;</span><span class="pp">i</span><span class="op">[</span><span class="pp">n</span><span class="op">];</span><span class="cf">if</span><span class="op">(</span><span class="pp">v</span><span class="op">[</span><span class="pp">t</span><span class="op">]</span><span class="pp">\</span><span class="op">\</span></span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="op">&amp;</span><span class="pp">z</span><span class="op">)</span><span class="cf">for</span><span class="op">(;;){</span><span class="cf">if</span><span class="op">(</span><span class="pp">p</span><span class="op">&lt;</span><span class="dv">0</span><span class="op">)</span><span class="cf">goto</span><span class="pp"> d</span><span class="op">;</span><span class="cf">if</span><span class="op">(</span><span class="pp">i</span><span class="op">[</span><span class="pp">p</span><span class="op">]++&lt;</span><span class="dv">9</span><span class="op">)</span><span class="cf">goto</span><span class="pp"> f</span><span class="op">;</span><span class="pp">i</span><span class="op">[</span><span class="pp">p</span><span class="op">]=</span><span class="dv">0</span><span class="op">;</span><span class="pp">p</span><span class="op">=</span><span class="pp">s</span><span class="op">[</span><span class="pp">p</span><span class="op">];}</span><span class="pp">v</span><span class="op">[</span><span class="pp">t</span><span class="op">]|=</span><span class="pp">z</span><span class="op">;}</span></span>
@@ -243,16 +231,15 @@ brute force, e.g.:</p>
<span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a><span class="st">&quot;Success&quot;</span><span class="op">);</span><span class="cf">for</span><span class="op">(</span>n<span class="op">=</span><span class="dv">0</span><span class="op">;</span>n<span class="op">&lt;</span><span class="dv">81</span><span class="op">;){</span>p<span class="op">=</span>i<span class="op">[</span>n<span class="op">];</span>printf<span class="op">(</span><span class="st">&quot;</span><span class="sc">%c</span><span class="st"> </span><span class="sc">%s</span><span class="st">&quot;</span><span class="op">,(</span>p<span class="op">?</span>p<span class="op">|</span><span class="dv">48</span><span class="op">:</span><span class="ch">&#39;.&#39;</span><span class="op">),(++</span>n<span class="op">%</span><span class="dv">3</span><span class="op">?</span><span class="st">&quot;&quot;</span><span class="op">:</span>n<span class="op">%</span><span class="dv">9</span><span class="op">?</span><span class="st">&quot;| &quot;</span></span>
<span id="cb7-8"><a href="#cb7-8" aria-hidden="true" tabindex="-1"></a><span class="op">:</span>n<span class="op">%</span><span class="dv">27</span><span class="op">?</span><span class="st">&quot;</span><span class="sc">\n</span><span class="st">&quot;</span><span class="op">:</span>n<span class="op">%</span><span class="dv">81</span><span class="op">?</span><span class="st">&quot;</span><span class="sc">\n</span><span class="st">------+-------+------</span><span class="sc">\n</span><span class="st">&quot;</span><span class="op">:</span><span class="st">&quot;</span><span class="sc">\n\n</span><span class="st">&quot;</span><span class="op">));}</span><span class="cf">return</span> z<span class="op">;}</span></span></code></pre></div>
<blockquote>
<p>Judges’ note: this was added as <a
href="aidan.alt.c">aidan.alt.c</a>.</p>
<p>Judges’ note: this was added as <a href="aidan.alt.c">aidan.alt.c</a>.</p>
</blockquote>
<p>That isn’t the approach I’ve used; it’s slow (particularly in
worst-case or nearly so scenarios), inelegant, and not a good starting
point for sudoku generation. It’s also much too easy to understand ;-)
Instead, I’ve written a program which solves them in much the same way
as I do, only a lot faster (and hopefully more reliably).</p>
<p>Oh, and if you think that example sudoku is too easy, try this one
(which my program generated):</p>
<p>That isn’t the approach I’ve used; it’s slow (particularly in worst-case or
nearly so scenarios), inelegant, and not a good starting point for sudoku
generation. It’s also much too easy to understand ;-) Instead, I’ve written a
program which solves them in much the same way as I do, only a lot faster (and
hopefully more reliably).</p>
<p>Oh, and if you think that example sudoku is too easy, try this one (which my
program generated):</p>
<pre><code>--- insane1.sudoku --
. . 4 | . . . | . 5 6
5 . . | . 7 2 | . . .
@@ -265,211 +252,151 @@ as I do, only a lot faster (and hopefully more reliably).</p>
. 5 . | 2 . 1 | 4 . 8
3 . . | . . . | . . .
. . . | . . . | . 6 1</code></pre>
<p>Be warned - it’s evil! (I certainly haven’t been able to solve it by
hand. The brute-force program given above, <code>sudoku-bfi.c</code> (<a
href="aidan.alt.c">aidan.alt.c</a>), also has trouble - it took 66
seconds to solve it - but probably for different reasons. That’s the
worst performance I’ve had from brute-force so far!)</p>
<p>Be warned - it’s evil! (I certainly haven’t been able to solve it by hand. The
brute-force program given above, <code>sudoku-bfi.c</code> (<a href="aidan.alt.c">aidan.alt.c</a>),
also has trouble - it took 66 seconds to solve it - but probably for different
reasons. That’s the worst performance I’ve had from brute-force so far!)</p>
<h3 id="usage">Usage</h3>
<h4 id="building">Building</h4>
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-o</span> sudoku-sf sudoku-sf.c</span></code></pre></div>
<p>or, if using gcc, try:</p>
<div class="sourceCode" id="cb10"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="at">-O2</span> <span class="at">-Wall</span> <span class="at">-Wextra</span> <span class="at">-ansi</span> <span class="at">-pedantic-errors</span> <span class="at">-o</span> sudoku-sf sudoku-sf.c</span></code></pre></div>
<div class="sourceCode" id="cb10"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="at">-O2</span> <span class="at">-Wall</span> <span class="at">-Wextra</span> <span class="at">-ansi</span> <span class="at">-pedantic-errors</span> <span class="at">-o</span> sudoku-sf sudoku-sf.c</span></code></pre></div>
<h4 id="testing-optional">Testing (optional)</h4>
<div class="sourceCode" id="cb11"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">perl</span> ./test-su.perl</span></code></pre></div>
<p>Note that this requires Perl 5 (I use 5.8.5, earlier versions
untested) and is somewhat slow (should take under a minute on a fairly
modern PC - try appending <code>-n 0</code> if you’re in a hurry). I
wrote it mostly for my own benefit, really.</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">perl</span> ./test-su.perl</span></code></pre></div>
<p>Note that this requires Perl 5 (I use 5.8.5, earlier versions untested) and is
somewhat slow (should take under a minute on a fairly modern PC - try
appending <code>-n 0</code> if you’re in a hurry). I wrote it mostly for my own benefit,
really.</p>
<h4 id="solving">Solving</h4>
<div class="sourceCode" id="cb12"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./aidan</span> <span class="op">&lt;</span> somefile.txt</span></code></pre></div>
<div class="sourceCode" id="cb12"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./aidan</span> <span class="op">&lt;</span> somefile.txt</span></code></pre></div>
<p>Input should be the numbers of each row in turn. Empty spaces can be
represented as a full stop (<code>.</code>) or zero (<code>0</code>).
Other characters are ignored, so you can cut-and-paste either example
sudoku puzzle from above into a file and feed that in. The program has
coped with every input I’ve thrown at it so far, including an <a
href="blank.sudoku">empty grid</a>.</p>
represented as a full stop (<code>.</code>) or zero (<code>0</code>). Other characters are ignored, so you
can cut-and-paste either example sudoku puzzle from above into a file and feed that
in. The program has coped with every input I’ve thrown at it so far, including
an <a href="blank.sudoku">empty grid</a>.</p>
<p>Output consists of the problem, then the solution, then a message of
success/failure.</p>
<p><code>./aidan U</code> may also be useful, or perhaps not. It only
took an extra 15 bytes of (very simple) code to add, so it doesn’t
really matter to me. (It’s the same as the normal mode for most input
you’re likely to feed it, though slightly slower. See if you can figure
out what it does.)</p>
<p><code>./aidan U</code> may also be useful, or perhaps not. It only took
an extra 15 bytes of (very simple) code to add, so it doesn’t really matter to
me. (It’s the same as the normal mode for most input you’re likely to feed it,
though slightly slower. See if you can figure out what it does.)</p>
<h4 id="generating">Generating</h4>
<div class="sourceCode" id="cb13"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./sudoku</span> <span class="op">&lt;</span>seed<span class="op">&gt;</span></span></code></pre></div>
<p>Output is a blank grid, then the solution, then the problem. There’s
no control over the difficulty. Sorry. However, all generated sudokus
should have exactly one solution - if one doesn’t, that’s a bug.</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./sudoku</span> <span class="op">&lt;</span>seed<span class="op">&gt;</span></span></code></pre></div>
<p>Output is a blank grid, then the solution, then the problem. There’s no
control over the difficulty. Sorry. However, all generated sudokus should have
exactly one solution - if one doesn’t, that’s a bug.</p>
<h3 id="speed">Speed</h3>
<p>Fast enough. Solving and generating are practically instant on my
1Ghz Duron. Of course, there could be some cases which take longer…</p>
<p>More precisely - 400 random sudokus are generated and solved in about
45 seconds in tests on my PC (1Ghz Duron, gcc 3.4.1, <code>-O2</code>
optimisation - takes about 60 seconds with no optimisation). If that
isn’t fast enough, what on Earth are you doing with it?</p>
<p>Fast enough. Solving and generating are practically instant on my 1Ghz Duron.
Of course, there could be some cases which take longer…</p>
<p>More precisely - 400 random sudokus are generated and solved in about 45 seconds
in tests on my PC (1Ghz Duron, gcc 3.4.1, <code>-O2</code> optimisation - takes about 60
seconds with no optimisation). If that isn’t fast enough, what on Earth are you
doing with it?</p>
<h3 id="bugs">Bugs</h3>
<p>None known - hopefully I’ve worked out all the major ones. Nothing
has come up in testing since the last bug fix, but what does that
mean?</p>
<p>None known - hopefully I’ve worked out all the major ones. Nothing has come up
in testing since the last bug fix, but what does that mean?</p>
<p>Tested on:</p>
<ul>
<li><code>gcc 3.4.1-3mdk</code>, Linux/x86</li>
</ul>
<p><em>RETEST</em> Borland C 4.5, 16-bit DOS .exe (small memory
model)</p>
<p>I don’t count the fact that it first prints a blank grid whenever
asked to generate a sudoku as a bug - just a minor quirk. The fix is
slightly awkward and would make the program slightly longer, so I
haven’t bothered - it’s not important.</p>
<p><em>RETEST</em> Borland C 4.5, 16-bit DOS .exe (small memory model)</p>
<p>I don’t count the fact that it first prints a blank grid whenever asked to
generate a sudoku as a bug - just a minor quirk. The fix is slightly awkward
and would make the program slightly longer, so I haven’t bothered - it’s not
important.</p>
<h3 id="missing-features">Missing Features</h3>
<ul>
<li><p>No control over the difficulty of generated sudokus - they vary
from easy to hair-tugging near-impossibility. Solver beware. Seeing as
apparently one program <a
href="http://news.bbc.co.uk/1/hi/magazine/4469719.stm">took six
years</a>, I’m in no hurry.</p></li>
<li><p>Some sort of curses-based UI to let you solve interactively might
be cool, but I don’t feel like learning curses just for this. Besides, I
spent enough of the time swearing as it is.</p></li>
<li><p>If you mistype a sudoku (e.g. from a paper/magazine) - and you
will - it can’t help you figure out where the mistake is,
sadly.</p></li>
<li><p>No control over the difficulty of generated sudokus - they vary from easy to
hair-tugging near-impossibility. Solver beware. Seeing as apparently one program
<a href="http://news.bbc.co.uk/1/hi/magazine/4469719.stm">took six years</a>, I’m in no
hurry.</p></li>
<li><p>Some sort of curses-based UI to let you solve interactively might be cool,
but I don’t feel like learning curses just for this. Besides, I spent enough
of the time swearing as it is.</p></li>
<li><p>If you mistype a sudoku (e.g. from a paper/magazine) - and you will - it
can’t help you figure out where the mistake is, sadly.</p></li>
</ul>
<h3 id="portability">Portability</h3>
<p>Dependant on ASCII, requires that an <code>int</code> is at least 15
bits and a <code>long</code> at least 32. (No, that isn’t a typo - I did
say 15, not 16).</p>
<p>Also requires that <code>cpp</code> can properly handle something
like:</p>
<p>Dependant on ASCII, requires that an <code>int</code> is at least 15 bits and a <code>long</code> at
least 32. (No, that isn’t a typo - I did say 15, not 16).</p>
<p>Also requires that <code>cpp</code> can properly handle something like:</p>
<div class="sourceCode" id="cb14"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#define foo</span><span class="op">(</span><span class="pp">x</span><span class="op">,</span><span class="pp">y</span><span class="op">)</span><span class="pp"> x y</span></span>
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a>foo<span class="op">(</span>bar<span class="op">,)</span></span></code></pre></div>
<p>Apparently, a few can’t (ANSI C specifically doesn’t require that
this works, though it usually does). Unfortunately, I didn’t discover
this issue until too late. (It was mentioned in the notes for people
modifying GCC in the “beware of obscure compiler limitations” section,
so I’m figuring it’s quite unusual.)</p>
<p>Apparently, a few can’t (ANSI C specifically doesn’t require that this works,
though it usually does). Unfortunately, I didn’t discover this issue until too
late. (It was mentioned in the notes for people modifying GCC in the “beware
of obscure compiler limitations” section, so I’m figuring it’s quite unusual.)</p>
<h3 id="compiler-warnings">Compiler warnings</h3>
<p>Some when compiled with
<code>gcc -Wall -Wextra -ansi -pedantic</code>:</p>
<p>Some when compiled with <code>gcc -Wall -Wextra -ansi -pedantic</code>:</p>
<ul>
<li>The left-hand operand of a comma has no effect in two places.</li>
<li>Parentheses are suggested around a <code>+</code> in an operand of
<code>&amp;</code> in the <code>i</code> macro definition.</li>
<li>Parentheses are suggested around a <code>+</code> in an operand of <code>&amp;</code> in the <code>i</code> macro
definition.</li>
</ul>
<p>Borland C also spots some code in expressions which has no effect,
and some uses of <code>=</code> where you’d expect a comparison
operator.</p>
<p>Borland C also spots some code in expressions which has no effect, and some
uses of <code>=</code> where you’d expect a comparison operator.</p>
<h3 id="obfuscation">Obfuscation</h3>
<p>Let’s see now:</p>
<ul>
<li>Squint-inducing variable naming.</li>
<li>Slightly odd <code>#defines</code> (which will be cleaned up by
<code>cpp</code> + a code beautifier, but see the next item).</li>
<li>No functions but <code>main()</code> - all code reuse via
<code>#define</code>s, or by various other methods (usually somewhat
icky ones). This wasn’t deliberate - it just ended up that way
somehow…</li>
<li>Slightly odd <code>#defines</code> (which will be cleaned up by <code>cpp</code> + a code
beautifier, but see the next item).</li>
<li>No functions but <code>main()</code> - all code reuse via <code>#define</code>s, or by various other
methods (usually somewhat icky ones). This wasn’t deliberate - it just ended up
that way somehow…</li>
<li><code>goto</code>s from everywhere to everywhere else.</li>
<li>A slightly… interesting <code>switch</code> statement.</li>
<li>Generally odd flow of control (see above items).</li>
<li>Plenty of bit-twiddling.</li>
<li>To save space, no <code>'A'</code>-style char constants - hard-coded
numbers are used. (There’s one, but it isn’t used to make things
<strong>clearer</strong>).</li>
<li>To save space, no <code>'A'</code>-style char constants - hard-coded numbers are used.
(There’s one, but it isn’t used to make things <strong>clearer</strong>).</li>
<li><code>array[index]</code> notation, because:
<ul>
<li>it’s traditional</li>
<li>take a look at how the <code>s</code> and <code>N(I,l)</code> macros
are used</li>
<li>take a look at how the <code>s</code> and <code>N(I,l)</code> macros are used</li>
</ul></li>
<li>various other little things not worth mentioning.</li>
</ul>
<p>So basically, just what you’d normally expect in an IOCCC entry.</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>
<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-2005aidan"><a name="inventory"></a>Inventory for
2005/aidan</h1>
<h1 id="inventory-for-2005aidan"><a name="inventory"></a>Inventory for 2005/aidan</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/2005/aidan/aidan.c">aidan.c</a>
- entry source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/Makefile">Makefile</a>
- entry Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/aidan.alt.c">aidan.alt.c</a>
- alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/aidan.orig.c">aidan.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/blank.sudoku">blank.sudoku</a>
- blank sudoku puzzle</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/insane1.sudoku">insane1.sudoku</a>
- insane sudoku puzzle</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/insane2.sudoku">insane2.sudoku</a>
- insane sudoku puzzle</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/insane3.sudoku">insane3.sudoku</a>
- insane sudoku puzzle</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/insane4.sudoku">insane4.sudoku</a>
- insane sudoku puzzle</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/insane5.sudoku">insane5.sudoku</a>
- insane sudoku puzzle</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/tough1.sudoku">tough1.sudoku</a>
- tough sudoku puzzle</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/try.alt.sh">try.alt.sh</a>
- how to run alternative code</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/try.sh">try.sh</a>
- how to run</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/wp.sudoku">wp.sudoku</a>
- Wikipedia sudoku puzzle</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/test-su.perl">test-su.perl</a>
- test suite</li>
<li><a href="2005_aidan.tar.bz2">2005_aidan.tar.bz2</a> - download entry
source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/aidan.c">aidan.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/aidan.alt.c">aidan.alt.c</a> - alternative source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/aidan.orig.c">aidan.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/blank.sudoku">blank.sudoku</a> - blank sudoku puzzle</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/insane1.sudoku">insane1.sudoku</a> - insane sudoku puzzle</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/insane2.sudoku">insane2.sudoku</a> - insane sudoku puzzle</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/insane3.sudoku">insane3.sudoku</a> - insane sudoku puzzle</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/insane4.sudoku">insane4.sudoku</a> - insane sudoku puzzle</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/insane5.sudoku">insane5.sudoku</a> - insane sudoku puzzle</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/tough1.sudoku">tough1.sudoku</a> - tough sudoku puzzle</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/try.alt.sh">try.alt.sh</a> - how to run alternative code</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/try.sh">try.sh</a> - how to run</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/wp.sudoku">wp.sudoku</a> - Wikipedia sudoku puzzle</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/test-su.perl">test-su.perl</a> - test suite</li>
<li><a href="2005_aidan.tar.bz2">2005_aidan.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/2005/aidan/.entry.json">.entry.json</a>
- description of entry in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/.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/2005/aidan/.entry.json">.entry.json</a> - description of entry in JSON</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/.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/2005/aidan/README.md">README.md</a>
- markdown source for index.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2005/aidan/README.md">README.md</a> - markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->