build missing HTML files for entries

Setup a simple topnav for missing HTML files for entries.

Added `bin/gen-other-html.sh` to build entry HTML files from
markdown other than README.md to index.html HTML files.

Fixed duplicate link text in `2020/ferguson1/gameplay.md`.

Improved `inc/md2html.cfg` to support building the missing HTML
files for entries.

Added `make gen_other_html` to top level Makefile.
Added `make gen_other_html` to `make quick_www` and `make www`.

Fixed inventory links for year level index.html files.
Changed `bin/output-year-index.sh` VERSION from "1.0.1 2024-02-23"
to "1.1 2024-02-27".

Added missing lines in `manifest.numbers`.  Update the affected
`.entry.json` files.

The manifest (in both `manifest.numbers` and the collection of
manifests from of all entry `.entry.json` files) now match.  Errors
from `make verify_entry_files` will now abort both `make quick_www`
and `make www` rules in the top level `Makefile`.

Changed markdown files in manifest to have an _inventory_order_ of
_2000000000_ so that the `index.html` file will usually appear at
the start of the _Secondary files_ set for the "#inventory" section
of an entry's `index.html` file.

Changed compressed tar files (files that end in _.tar.bz2_) in
manifest to have an _inventory_order_ of _100000_ so that these
files will usually appear at the end of the _Primary files_ set for
the "#inventory" section of an entry's `index.html` file.

Added 'Jump to top` link above the _Primary files_ section.
Changed `bin/output-index-inventory.sh` VERSION from "1.1.1 2024-02-23"
to "1.2 2024-02-27".

Updated HTML files to perform the above via `make www`.
This commit is contained in:
Landon Curt Noll committed 2024-02-27 22:36:20 -08:00
1 parent 7babf792e4
commit 9d3438fb88
718 files changed
+17515 -4084

No files matched your search

+198
View File
@@ -0,0 +1,198 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- START: two lines up starts content from: inc/top.default.html -->
<!-- -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- END: this line ends content from: inc/top.default.html -->
<!-- -->
<!-- The original markdown content was formed by the tool: bin/gen-other-html.sh -->
<!-- The HTML was converted from markdown by the tool: bin/md2html.sh -->
<!-- -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<link rel="stylesheet" href="../../ioccc.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>The International Obfuscated C Code Contest</title>
<meta name="description" content="macos.md for 1998/schweikh1">
<meta name="keywords" content="IOCCC, 1998/schweikh1, macos.md">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<div class="header">
<img src="../../png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
<h1>The International Obfuscated C Code Contest</h1>
<h2>macos.md for 1998/schweikh1</h2>
</div>
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.up2index.html -->
<div class="topnav">
<a class="Left" href="index.html">&uarr; jump to index.html &uarr;</a>
</div>
<!-- END: this line ends content from: inc/topnav.up2index.html -->
<!-- START: this line starts content from: inc/begin-row.default.html -->
<div class="row">
<!-- END: this line ends content from: inc/begin-row.default.html -->
<!-- START: this line starts content from: inc/begin-leftcolumn.default.html -->
<div class="leftcolumn">
<!-- END: this line ends content from: inc/begin-leftcolumn.default.html -->
<!-- START: this line starts content from: inc/sidenav.default.html -->
<div class="sidenav">
<a href="#content">Jump to contents</a>
</div>
<hr>
<div class="sidenav">
<a href="../../index.html">IOCCC Home</a>
<a href="../../years.html">Winning Entries</a>
<a href="../../authors.html">People who have won</a>
</div>
<hr>
<div class="sidenav">
<a href="../../news.html">IOCCC News</a>
<a href="../../faq.html#submit">How to enter the IOCCC</a>
<a href="../../faq.html">FAQ</a>
</div>
<hr>
<div class="sidenav">
<a href="../../bugs.html">Bugs &amp; (mis)features</a>
<a href="../../faq.html#fix_an_entry">Fixing IOCCC entries</a>
<a href="../../faq.html#fix_web_site">Fixing the web site</a>
<a href="../../faq.html#fix_author">Fixing author info</a>
<a href="../../thanks-for-help.html">Thanks for the help</a>
</div>
<hr>
<div class="sidenav">
<a href="../../judges.html">The IOCCC Judges</a>
<a href="../../contact.html">Contacting the IOCCC</a>
</div>
<hr>
<div class="sidenav">
<a href="#top">Jump to top</a>
</div>
<!-- END: this line ends content from: inc/sidenav.default.html -->
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
</div>
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
<div class="rightcolumn">
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
<!-- START: this line starts content from: inc/before-content.default.html -->
<a name="content"></a>
<!-- END: this line ends content from: inc/before-content.default.html -->
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<p>This document describes how this was fixed to work with macOS as well
as some of the magic in the entry. Even if you don’t have a Mac it might
be worth your time reading especially as some of it details some
important fixes and changes in the original entry as well.</p>
<h1 id="macos-changes">macOS changes</h1>
<p>As an aside: if you have a Mac with the Apple chip, some of the
header files will report an unsupported architecture and unsupported
compiler (error, warning). This will not make the program abort,
however, but even with an Intel CPU though, the original entry will not
work in macOS as it stands because <code>/usr/include</code> is
hard-coded in the code and macOS does not have it.</p>
<p>Nevertheless, although some of it would not work in other systems
where <code>/usr/include</code> exists, the <code>#define</code>s would
still be found okay, at least until a file was not found (this
limitation was removed in both versions in 2023). see</p>
<p>However, as noted, macOS does <strong>not</strong> have
<code>/usr/include</code> so this would never work for macOS without
some changes, described next. For macOS you will need the command line
tools installed which can be done like:</p>
<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">sudo</span> xcode-select <span class="at">--install</span></span></code></pre></div>
<p>An important point is that the original version hard-coded
<code>gcc</code> but just like the entry, the alternate version has also
removed this limitation despite <code>gcc</code> existing (though it’s
<code>clang</code>) in macOS.</p>
<p>Now as far as how this works if you look at the code of <a
href="schweikh1.c">schweikh1.c</a>, on line 55 you’ll see a funny
command (this goes for the alternate version as well but a bit
different).</p>
<p>Now the key is two magic numbers, one (two times) on a different line
shortly below the string and the other a couple lines further below.</p>
<p>In the original the numbers are, respectively, <code>44</code> and
<code>46</code>, but with the gcc limitation removed the numbers now are
<code>43</code> and <code>45</code>. But how does this work? Well the
command is:</p>
<pre><code>&quot;0gcc -ansi -E -dM -undef %s /usr/include/%s&gt;r\0 (&quot;</code></pre>
<p>which has been changed to be:</p>
<pre><code>&quot;0cc -ansi -E -dM -undef %s /usr/include/%s&gt;r\0 (&quot;</code></pre>
<p>Shortly below that you will see, as noted above, the numbers:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> <span class="op">((</span>H <span class="op">=</span> fopen <span class="op">(</span>__FILE__<span class="op">+</span><span class="dv">43</span><span class="op">,</span> <span class="dv">43</span><span class="op">+</span>__FILE__<span class="op">)))</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="cf">while</span> <span class="op">((</span>fgets <span class="op">(</span>L<span class="op">,</span> <span class="op">(</span><span class="dt">int</span><span class="op">)</span><span class="kw">sizeof</span> L<span class="op">,</span> H<span class="op">))</span> <span class="op">!=</span> <span class="dv">0</span><span class="op">)</span> <span class="op">{</span></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> I<span class="op">[</span>strcspn <span class="op">(</span>I<span class="op">,</span> <span class="dv">45</span><span class="op">+</span>__FILE__<span class="op">)]</span> <span class="op">=</span> O <span class="op">=</span> <span class="dv">0</span><span class="op">;</span></span></code></pre></div>
<p>The first number in the above C means the length starting from 0 up
through the <code>&gt;</code>. The second number is the same starting
point but up through the <code>\0</code> which is why it’s
<code>+2</code>. But what happens if only the first number is updated
(from the original)? Most of the output will be just
<code>#define</code> by itself; in the cases where there was text after
that it was macros that certainly were not defined. There might have
been other errors as well.</p>
<p>Changing this for macOS allows for opening the right files; the
problem with macOS is <code>/usr/include</code> does not exist: instead
it’s
<code>/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include</code>
which is why the different command line and the different numbers. The
change of the numbers can be found in the alternate code and the
explanation is the same.</p>
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- START: this line starts content from: inc/after-content.default.html -->
<!-- END: this line ends content from: inc/after-content.default.html -->
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
</div>
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
<!-- START: this line starts content from: inc/end-row.default.html -->
</div>
<!-- END: this line ends content from: inc/end-row.default.html -->
<!-- START: this line starts content from: inc/footer.default.html -->
<div class="footer">
<hr>
<h2>Coda</h2>
<p><a href="https://validator.w3.org/nu/?doc=#">Nu HTML check this web page</a></p>
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
</div>
<!-- END: this line ends content from: inc/footer.default.html -->
<!-- START: this line starts content from: inc/bottom.default.html -->
</body>
</html>
<!-- END: this line ends content from: inc/bottom.default.html -->