build index.html for all winners

Updated manifest as per recent file changes.

Updated winner `.winner.json` to reflect the manifest changes.

Added [bin/all_run.sh](bin/all_run.sh) tool to run a command over
all winning entries.

These tools had slight improvements in the help usage message:

* bin/gen-author.sh VERSION="1.3.1 2024-01-16"
* bin/gen-inventory.sh VERSION="1.0.1 2024-01-16"
* bin/pandoc_wrapper.sh VERSION="1.3.1 2024-01-16"
* bin/subst.default.sh VERSION="1.1.1 2024-01-16"
* bin/subst.winner-index.sh VERSION="1.1.1 2024-01-16"

The `bin/readme2index.sh` tool was improved so that
if the `index.html` file exists and the tool forms
the exact same content, then the file `index.html`
file is NOT touched.

* bin/readme2index.sh VERSION="1.1 2024-01-16"

We used the following command to generate `index.html` files
for all winning entries:

```sh
bin/all_run.sh -v 3 bin/readme2index.sh
```

NOTE: We have not (yet) built HTML files above the winner directory
level (e.g., no year level nor top level HTML), nor have be built
non-index HTML files for winners.

NOTE: By default we are running `pandoc(1)` with:

```
--fail-if-warnings=true
```

This means that any problems with markdown to HTML
generates an error.  This is done to be sure that
the HTML conversion is clean.

We had to fix the following `README.md` files:

* `2000/rince/README.md`

The reference [^2] was never used.  We made a guess that [^2] applies
to the same spot as [^1].  Perhaps there is a better spot where
[^2] applies?

NOTE: For every reference, there MUST be some place where that
reference is used.

* 2012/vik/README.md

The string "$...$" is assumed to be a TeX encoded string.

NOTE: Every "$..$" needs to be backslashed as in "\$..\$".

* 2018/burton1/README.md

The reference [2] was duplicated.  We changed the
second [2] to [3].

NOTE: Every reference needs to have a unique number.

* 2020/carlini/README.md

The string "$...$" is assumed to be a TeX encoded string.

NOTE: Every "$..$" needs to be backslashed as in "\$..\$".

We also found 2 errors in the `author/author_handle.json` file set:

* author/Anonymous_2001.json

The `author/Anonymous_2001.json` file was missing.

* author/Jari_Arkko.json

The winner ID for `1989_jar.1` had a typo.
This commit is contained in:
Landon Curt Noll committed 2024-01-17 00:32:39 -08:00
1 parent 893cd915b6
commit c1466f5165
350 files changed
+95242 -4217

No files matched your search

+247 -13
View File
@@ -1,4 +1,6 @@
<!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 !!! -->
@@ -6,27 +8,259 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 1990/baruch/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
<html lang="en">
<!-- END: this line ends content from: inc/top.default.html -->
<!-- -->
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
<!-- -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>1990 baruch</title>
<meta name="description" content="IOCCC year: 1990 IOCCC winner: baruch winner index page">
<meta name="keywords" content="IOCCC,1990,baruch,winner index page">
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>1990/baruch</title>
<meta name="description" content="1990 IOCCC winner baruch">
<meta name="keywords" content="IOCCC, 1990, IOCCC 1990, IOCCC winner, baruch">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>1990 baruch</h1>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<p>XXX - fake content until readme2index is working - XXX</p>
<div class="header">
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
<h1>The International Obfuscated C Code Contest</h1>
<h2>1990/baruch</h2>
</div>
<hr style="width:50%;text-align:left;margin-left:0">
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.first.html -->
<!-- Start Nu Html Checker -->
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fbaruch%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1990/baruch/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left Disabled" href="#">first entry</a>
<a class="Left" href="../index.html">&uarr; 1990 &uarr;</a>
<a class="Left" href="../cmills/index.html">cmills &rarr;</a>
<a class="Right" href="#inventory">Inventory</a>
</div>
<!-- END: this line ends content from: inc/topnav.first.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="/temp-test-ioccc/index.html">IOCCC Home</a>
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
<a href="/temp-test-ioccc/winners.html">People who have won</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
<a href="/temp-test-ioccc/faq.html">FAQ</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/bugs.html">Bugs &amp; (mis)features</a>
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
<p><a name="author"><strong>Authors:</strong></a> <br><br>Name: <a
href="/temp-test-ioccc/winners.html#Baruch_Nissenbaum">Baruch
Nissenbaum</a><br> Location: <a
href="/temp-test-ioccc/location.html#IL">IL</a> <br><br>Name: <a
href="/temp-test-ioccc/winners.html#Doron_Osovlanski">Doron
Osovlanski</a><br> Location: <a
href="/temp-test-ioccc/location.html#IL">IL</a></p>
<!-- END: next line ends content generated by: bin/gen-author.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>
<p>There is an alternate version for those using Turbo-C or MSC. See <a
href="#alternate-code">alternate code</a> below for details.</p>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code>STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="/bugs.md#1990-baruch">1990
baruch in bugs.md</a>.</p>
<h2 id="to-use">To use:</h2>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> 4 <span class="kw">|</span> <span class="ex">./baruch</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> 7 <span class="kw">|</span> <span class="ex">./baruch</span></span></code></pre></div>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> 2 <span class="kw">|</span> <span class="ex">./baruch</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> 3 <span class="kw">|</span> <span class="ex">./baruch</span></span></code></pre></div>
<p>Why is there no output?</p>
<h2 id="alternate-code">Alternate code:</h2>
<p>This alternate code is for the <a
href="https://en.wikipedia.org/wiki/0">very few</a> <a
href="https://en.wikipedia.org/wiki/Microsoft_Windows">users</a> <a
href="https://www.ioccc.org">here</a> who will need it. Nonetheless if
you’re using Turbo-C or MSC, the code is available, based on the
authors’ remarks except that the <code>" #Q"</code> string was not
changed as that showed worse looking output instead of improved output
though admittedly we have no way to test the compilers in question.
YMMV.</p>
<h3 id="alternate-build">Alternate build:</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="fu">make</span> alt</span></code></pre></div>
<h3 id="alternate-use">Alternate use:</h3>
<p>Use <code>baruch.alt</code> as you would <code>baruch</code>.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This program reads an integer between 4 and 99 from the
<code>stdin</code>.</p>
<p>NOTE: The original program did not have a newline at the end of the
file. We added a final newline to the file to make unpacking easy.</p>
<h2 id="authors-remarks">Authors’ remarks:</h2>
<p>The goal of this work was to write a program that solves the classic
<a href="https://en.wikipedia.org/wiki/Eight_queens_puzzle">n-queens
problem</a>, with a board size of up to 99x99, while keeping the program
as short as possible.</p>
<p>The program finds all possibilities to place N chess queens on an NxN
<a href="https://en.wikipedia.org/wiki/Chessboard">chessboard</a> so
that no queen is in range of any other queen (not in the same column row
or diagonal). For each solution the chess board and the place of the
queens is printed to stdout.</p>
<p>This program is about as simple and as readable as possible. To make
things even more simple we used a very limited subset of C:</p>
<ul>
<li>No pre-processor statements</li>
<li>Only one, harmless, <code>for</code> statement</li>
<li>No <code>if</code>s</li>
<li>No <code>break</code>s</li>
<li>No <code>case</code>s</li>
<li>No functions outside the standard C library</li>
<li>No <code>goto</code>s</li>
<li>No structures</li>
</ul>
<p>In short, it contains no C language that might confuse the innocent
reader. :-)</p>
<p>This program demonstrates the claim that in C, any program can be
written using a single ‘for’ statement, as long as it is long
enough.</p>
<h3 id="for-pc-users">For PC users:</h3>
<p>In order to compile the program under Turbo-C or MSC,
<code>int</code> should be inserted at the beginning of the program. For
better looking results it is recommended to replace the
<code>" #Q"</code> string with <code>" \261\2"</code>.</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>
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
<h1 id="inventory-for-1990baruch"><a name="inventory"></a>Inventory for
1990/baruch</h1>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - winner home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/baruch/baruch.c">baruch.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/baruch/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/baruch/baruch.alt.c">baruch.alt.c</a>
- alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/baruch/baruch.orig.c">baruch.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/baruch/try.sh">try.sh</a>
- how to run</li>
<li><a href="1990_baruch.tar.bz2">1990_baruch.tar.bz2</a> - download
winning source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/baruch/.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/1990/baruch/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/baruch/README.md">README.md</a>
- markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/gen-inventory.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=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fbaruch%2Findex.html">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 -->
+204 -13
View File
@@ -1,4 +1,6 @@
<!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 !!! -->
@@ -6,27 +8,216 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 1990/cmills/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
<html lang="en">
<!-- END: this line ends content from: inc/top.default.html -->
<!-- -->
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
<!-- -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>1990 cmills</title>
<meta name="description" content="IOCCC year: 1990 IOCCC winner: cmills winner index page">
<meta name="keywords" content="IOCCC,1990,cmills,winner index page">
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>1990/cmills</title>
<meta name="description" content="1990 IOCCC winner cmills">
<meta name="keywords" content="IOCCC, 1990, IOCCC 1990, IOCCC winner, cmills">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>1990 cmills</h1>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<p>XXX - fake content until readme2index is working - XXX</p>
<div class="header">
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
<h1>The International Obfuscated C Code Contest</h1>
<h2>1990/cmills</h2>
</div>
<hr style="width:50%;text-align:left;margin-left:0">
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.mid.html -->
<!-- Start Nu Html Checker -->
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fcmills%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1990/cmills/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../baruch/index.html">&larr; baruch</a>
<a class="Left" href="../index.html">&uarr; 1990 &uarr;</a>
<a class="Left" href="../dds/index.html">dds &rarr;</a>
<a class="Right" href="#inventory">Inventory</a>
</div>
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
<a href="/temp-test-ioccc/winners.html">People who have won</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
<a href="/temp-test-ioccc/faq.html">FAQ</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/bugs.html">Bugs &amp; (mis)features</a>
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
href="/temp-test-ioccc/winners.html#Christopher_Mills">Christopher
Mills</a><br> Location: <a
href="/temp-test-ioccc/location.html#US">US</a></p>
<!-- END: next line ends content generated by: bin/gen-author.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>
<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">./cmills</span> <span class="pp">[</span><span class="ss">starting_cash</span><span class="pp">]</span></span></code></pre></div>
<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">./cmills</span> 5000</span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>The Makefile uses several <code>-D</code> defines. The following is
is a list of the macros that may be changed:</p>
<ul>
<li><code>-DM=&lt;max bet allowed&gt;</code></li>
<li><code>-DN=&lt;52 * number of decks used&gt;</code></li>
<li><code>-DX=&lt;how to seed the rand() generator&gt;</code></li>
</ul>
<p>The macro <code>V</code> should remain <code>void</code>.</p>
<p>The author noted that a compiler being used assumed that
<code>x=*p++</code> means <code>x*=p++</code> but do you know why? This
is not so strange as it might seem if you look at <a
href="https://www.bell-labs.com/usr/dmr/www/chist.html">C’s history</a>.
Example code where this occurs is in John Lions’ Commentary on the Sixth
Edition UNIX Operating System.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>This is a blackjack program. It does splits, doubling down,
insurance, etc.</p>
<p>As best I can figure, it should be ANSI-compliant, as well as
portable to BSD &amp; SysV (as well as the irritating compiler I was
using which assumes <code>x=*p++</code> means <code>x*=p++</code>!). It
is reasonably robust in its error handling—it won’t let you split,
double, etc. unless you actually have the cash, etc. To terminate the
program, hit <code>EOF</code> or type <code>0</code> or a negative
number for you wager.</p>
<p>The way it deals with splits is particularly cool (IMHO). You can
split many times, and it will show all hands as they are played.</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>
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
<h1 id="inventory-for-1990cmills"><a name="inventory"></a>Inventory for
1990/cmills</h1>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - winner home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/cmills/cmills.c">cmills.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/cmills/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/cmills/cmills.orig.c">cmills.orig.c</a>
- original source</li>
<li><a href="1990_cmills.tar.bz2">1990_cmills.tar.bz2</a> - download
winning source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/cmills/.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/1990/cmills/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/cmills/README.md">README.md</a>
- markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/gen-inventory.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=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fcmills%2Findex.html">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 -->
+270 -13
View File
@@ -1,4 +1,6 @@
<!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 !!! -->
@@ -6,27 +8,282 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 1990/dds/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
<html lang="en">
<!-- END: this line ends content from: inc/top.default.html -->
<!-- -->
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
<!-- -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>1990 dds</title>
<meta name="description" content="IOCCC year: 1990 IOCCC winner: dds winner index page">
<meta name="keywords" content="IOCCC,1990,dds,winner index page">
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>1990/dds</title>
<meta name="description" content="1990 IOCCC winner dds">
<meta name="keywords" content="IOCCC, 1990, IOCCC 1990, IOCCC winner, dds">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>1990 dds</h1>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<p>XXX - fake content until readme2index is working - XXX</p>
<div class="header">
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
<h1>The International Obfuscated C Code Contest</h1>
<h2>1990/dds</h2>
</div>
<hr style="width:50%;text-align:left;margin-left:0">
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.mid.html -->
<!-- Start Nu Html Checker -->
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fdds%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1990/dds/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../cmills/index.html">&larr; cmills</a>
<a class="Left" href="../index.html">&uarr; 1990 &uarr;</a>
<a class="Left" href="../dg/index.html">dg &rarr;</a>
<a class="Right" href="#inventory">Inventory</a>
</div>
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
<a href="/temp-test-ioccc/winners.html">People who have won</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
<a href="/temp-test-ioccc/faq.html">FAQ</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/bugs.html">Bugs &amp; (mis)features</a>
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
href="/temp-test-ioccc/winners.html#Diomidis_Spinellis">Diomidis
Spinellis</a><br> Location: <a
href="/temp-test-ioccc/location.html#GR">GR</a></p>
<!-- END: next line ends content generated by: bin/gen-author.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>
<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">./dds</span></span></code></pre></div>
<h2 id="try">Try:</h2>
<p>Give the following lines as input:</p>
<pre class="basic"><code>OLD LANDER.BAS
RUN</code></pre>
<p>NOTE: this entry is probably one of the only times CAPS LOCK might be
worth having (though still not useful enough to enable :-) ) as all
input has to be UPPER CASE.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Be sure not to run out of fuel!</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>This is the DDS-BASIC Interpreter (Version 1.00).</p>
<h3 id="immediate-commands">Immediate commands:</h3>
<ul>
<li>RUN</li>
<li>LIST</li>
<li>NEW</li>
<li>OLD filename</li>
<li>BYE</li>
<li>SAVE filename</li>
</ul>
<h3 id="program-commands">Program commands:</h3>
<ul>
<li>variable names a to z</li>
<li>variables initialized to 0 on RUN</li>
<li>FOR var = exp TO exp</li>
<li>NEXT variable</li>
<li>GOSUB exp</li>
<li>RETURN</li>
<li>GOTO exp</li>
<li>IF exp THEN exp</li>
<li>INPUT variable</li>
<li>PRINT string</li>
<li>PRINT exp</li>
<li>var = exp</li>
<li>REM any text</li>
<li>END</li>
</ul>
<h3 id="expressions-ranked-by-precedence">Expressions (ranked by
precedence):</h3>
<ul>
<li>Bracketed expressions</li>
<li>number (leading 0 for octal, 0x for hex, else decimal),
variable</li>
<li>Unary -</li>
<li><code>*</code> <code>/</code></li>
<li><code>+</code> <code>-</code></li>
<li><code>=</code> <code>&lt;&gt;</code></li>
<li><code>&gt;</code> <code>&lt;</code></li>
<li><code>&lt;=</code> <code>&gt;=</code></li>
</ul>
<p>(<code>*</code> and <code>+</code> are also used for boolean AND and
boolean OR)</p>
<p>Boolean expressions evaluate to 0 for false and 1 for true.</p>
<h3 id="editing">Editing:</h3>
<ul>
<li>Line editor using line re-entry.</li>
<li>A line number with nothing following it, deletes the line.</li>
</ul>
<h3 id="input-format">Input format:</h3>
<ul>
<li>Free format positioning of tokens on the line.</li>
<li>No space is allowed before the line number.</li>
<li>Exactly one space is needed between the OLD or SAVE command
and<br />
the filename.</li>
<li>ALL INPUT MUST BE UPPERCASE.</li>
</ul>
<h3 id="limits">Limits:</h3>
<ul>
<li>Line numbers 1-10000</li>
<li>Line length 999 characters</li>
<li>FOR nesting 26</li>
<li>GOSUB 999 levels</li>
<li>Program Dynamically allocated</li>
<li>Expressions -32768 - 32767 for 16 bit machines, -2147483648 -
2147483647 for 32 bit machines</li>
</ul>
<h3 id="error-checking-error-reports">Error checking / error
reports:</h3>
<p>No error checking is performed. It might dump core if a syntax or
semantic error is encountered.</p>
<h3 id="hosting-environment">Hosting Environment:</h3>
<p>ANSI C, traditional K&amp;R C or OSF ANDF ASCII or EBCIDIC character
set 48K bytes memory.</p>
<p>The Speed of DDS-BASIC Interpreter (Version 1.00) relative to
Microsoft Advanced BASIC 3.31 is approximately 60%.</p>
<p>The code size could be further reduced by doing ugly things like not
declaring the return type of functions, not freeing memory, defining
define, and joining lines. In its present 1536 character form the
program is reasonably portable (it may fail to run in a tagged object
architecture) and nicely formatted (it fits in an <code>80*25</code>
screen).</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>
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
<h1 id="inventory-for-1990dds"><a name="inventory"></a>Inventory for
1990/dds</h1>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - winner home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/dds/dds.c">dds.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/dds/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/dds/dds.orig.c">dds.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/dds/LANDER.BAS">LANDER.BAS</a>
- BASIC source code</li>
<li><a href="1990_dds.tar.bz2">1990_dds.tar.bz2</a> - download winning
source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/dds/.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/1990/dds/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/dds/README.md">README.md</a>
- markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/gen-inventory.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=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fdds%2Findex.html">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 -->
+209 -13
View File
@@ -1,4 +1,6 @@
<!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 !!! -->
@@ -6,27 +8,221 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 1990/dg/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
<html lang="en">
<!-- END: this line ends content from: inc/top.default.html -->
<!-- -->
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
<!-- -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>1990 dg</title>
<meta name="description" content="IOCCC year: 1990 IOCCC winner: dg winner index page">
<meta name="keywords" content="IOCCC,1990,dg,winner index page">
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>1990/dg</title>
<meta name="description" content="1990 IOCCC winner dg">
<meta name="keywords" content="IOCCC, 1990, IOCCC 1990, IOCCC winner, dg">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>1990 dg</h1>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<p>XXX - fake content until readme2index is working - XXX</p>
<div class="header">
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
<h1>The International Obfuscated C Code Contest</h1>
<h2>1990/dg</h2>
</div>
<hr style="width:50%;text-align:left;margin-left:0">
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.mid.html -->
<!-- Start Nu Html Checker -->
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fdg%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1990/dg/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../dds/index.html">&larr; dds</a>
<a class="Left" href="../index.html">&uarr; 1990 &uarr;</a>
<a class="Left" href="../jaw/index.html">jaw &rarr;</a>
<a class="Right" href="#inventory">Inventory</a>
</div>
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
<a href="/temp-test-ioccc/winners.html">People who have won</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
<a href="/temp-test-ioccc/faq.html">FAQ</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/bugs.html">Bugs &amp; (mis)features</a>
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
href="/temp-test-ioccc/winners.html#David_Goodenough">David
Goodenough</a><br> Location: <a
href="/temp-test-ioccc/location.html#null">unknown</a></p>
<!-- END: next line ends content generated by: bin/gen-author.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>
<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="bu">echo</span> foo bar <span class="kw">|</span> <span class="ex">./dg</span></span></code></pre></div>
<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="judges-remarks">Judges’ remarks:</h2>
<p>Some C preprocessors got confused about single quotes in certain
cases. In particular, the following source line:</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>b12<span class="op">(</span>ase<span class="op">(</span>bco<span class="op">(</span>acp<span class="op">(</span>bi<span class="op">(</span>acp<span class="op">(</span>bcp<span class="op">(</span>acp<span class="op">(</span>bpl<span class="op">(</span>aqu<span class="op">(</span>bqu<span class="op">(</span>A<span class="op">))))))))))))))))))))))))))))))</span></span></code></pre></div>
<p>sometimes has to be changed to:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>b12<span class="op">(</span>ase<span class="op">(</span>bco<span class="op">(</span>acp<span class="op">(</span>bi<span class="op">(</span>acp<span class="op">(</span>bcp<span class="op">(</span>acp<span class="op">(</span>bpl<span class="op">(</span><span class="ch">&#39;A&#39;</span><span class="op">))))))))))))))))))))))))))))</span></span></code></pre></div>
<p>particularly if the C preprocessor botches single quotes in cpp
expansions, which we have done for the wider audience.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>If my preprocessor could hack it, I could write this as one single
line rather than 4, but when I do that I get a complaint “defines nested
too deeply”.</p>
<h3 id="obfuscation-spoiler">Obfuscation spoiler:</h3>
<p>This is another rot13 job (believe it or not) - the
<code>#defines</code> are a novel way of adding tokens:
<code>#define b12(x) 12 x</code> means that at some point in the source
a <code>12</code> is followed by the compressed nested
<code>#define</code>s. The <code>b12</code> gets the previous
compression as an argument, and prepends the <code>12</code>, thus
making another step in the recreation of the source. The
<code>axx()</code> <code>#define</code>s do the same, but add tokens
after.</p>
<p>As for the rot13 algorithm, it relies on <code>index(3)</code> to
find if the character is in the set <code>A-Za-z</code>.
<code>l[]</code> is an array that gets filled with:</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="st">&quot;nopqrstuvwxyzzzzabcdefghijklmmmmNOPQRSTUVWXYZZZZABCDEFGHIJKLMMMM&quot;</span></span></code></pre></div>
<p>If <code>index(3)</code> says the char is in the alphabet, then XOR
the offset with <code>16</code> to translate, and output, otherwise pass
it unchanged.</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>
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
<h1 id="inventory-for-1990dg"><a name="inventory"></a>Inventory for
1990/dg</h1>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - winner home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/dg/dg.c">dg.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/dg/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/dg/dg.orig.c">dg.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/dg/try.sh">try.sh</a>
- how to run</li>
<li><a href="1990_dg.tar.bz2">1990_dg.tar.bz2</a> - download winning
source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/dg/.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/1990/dg/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/dg/README.md">README.md</a>
- markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/gen-inventory.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=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fdg%2Findex.html">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 -->
+361 -13
View File
@@ -1,4 +1,6 @@
<!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 !!! -->
@@ -6,27 +8,373 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 1990/jaw/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
<html lang="en">
<!-- END: this line ends content from: inc/top.default.html -->
<!-- -->
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
<!-- -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>1990 jaw</title>
<meta name="description" content="IOCCC year: 1990 IOCCC winner: jaw winner index page">
<meta name="keywords" content="IOCCC,1990,jaw,winner index page">
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>1990/jaw</title>
<meta name="description" content="1990 IOCCC winner jaw">
<meta name="keywords" content="IOCCC, 1990, IOCCC 1990, IOCCC winner, jaw">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>1990 jaw</h1>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<p>XXX - fake content until readme2index is working - XXX</p>
<div class="header">
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
<h1>The International Obfuscated C Code Contest</h1>
<h2>1990/jaw</h2>
</div>
<hr style="width:50%;text-align:left;margin-left:0">
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.mid.html -->
<!-- Start Nu Html Checker -->
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fjaw%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1990/jaw/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../dg/index.html">&larr; dg</a>
<a class="Left" href="../index.html">&uarr; 1990 &uarr;</a>
<a class="Left" href="../pjr/index.html">pjr &rarr;</a>
<a class="Right" href="#inventory">Inventory</a>
</div>
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
<a href="/temp-test-ioccc/winners.html">People who have won</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
<a href="/temp-test-ioccc/faq.html">FAQ</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/bugs.html">Bugs &amp; (mis)features</a>
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
<p><a name="author"><strong>Authors:</strong></a> <br><br>Name: <a
href="/temp-test-ioccc/winners.html#James_A_Woods">James A.
Woods</a><br> Location: <a
href="/temp-test-ioccc/location.html#null">unknown</a> <br><br>Name: <a
href="/temp-test-ioccc/winners.html#Karl_F_Fox">Karl F. Fox</a><br>
Location: <a href="/temp-test-ioccc/location.html#null">unknown</a>
<br><br>Name: <a href="/temp-test-ioccc/winners.html#Paul_Eggert">Paul
Eggert</a><br> Location: <a
href="/temp-test-ioccc/location.html#null">unknown</a></p>
<!-- END: next line ends content generated by: bin/gen-author.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>
<h2 id="try">Try:</h2>
<p>To test the official C entry, one might try:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="st">&quot;Quartz glyph jocks vend, fix, BMW.&quot;</span> <span class="kw">|</span> <span class="ex">compress</span> <span class="kw">|</span> <span class="ex">./btoa</span> <span class="kw">|</span> <span class="ex">./jaw</span></span></code></pre></div>
<p>which should apply the identity transformation to a minimal
holoalphabetic sentence.</p>
<h4 id="also-try">Also try:</h4>
<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="judges-remarks">Judges’ remarks:</h2>
<p>The program, in its base form, implements two useful utilities:</p>
<ul>
<li><code>atob</code> - ASCII to binary conversion</li>
<li><code>zcat</code> - decompression filter</li>
</ul>
<p>Included with this entry is a shell script (with comments edited down
to reduce it to 1530 bytes) which implements the complete shark utility.
The script, <a href="shark.sh">shark.sh</a>, contains a
<code>jaw.c</code> embedded within it!</p>
<p>The sender must have <code>compress</code> and <code>btoa</code>. To
send, try:</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">./shark.sh</span> jaw.<span class="pp">*</span> README.md <span class="op">&gt;</span> receive</span></code></pre></div>
<p>The resulting file, <code>receive</code>, unpacks the input files
even if the receiver lacks <code>uncompress</code> and
<code>btoa</code>:</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="fu">mkdir</span> <span class="at">-p</span> test</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="bu">cd</span> test</span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="fu">sh</span> ../receive</span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="fu">cmp</span> ../jaw.c jaw.c</span>
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a><span class="fu">cmp</span> ../README.md README.md</span></code></pre></div>
<p>NOTE: a limitation is that the script should be in the parent
directory of the directory it is run from.</p>
<h2 id="authors-remarks">Authors’ remarks:</h2>
<h3 id="abstract">ABSTRACT</h3>
<h4
id="minimal-universal-file-bundling-or-functional-obfuscation-in-a-self-decoding-unix-shell-archive">Minimal,
Universal File Bundling (or, Functional Obfuscation in a Self-Decoding
Unix Shell Archive)</h4>
<p>James A. Woods<br />
Universities Space Research Association<br />
NASA Ames Research Center</p>
<hr />
<blockquote>
<p>“Use an algorithm, go to jail.”</p>
<p>– anon., circa 1988, pre-<a
href="https://en.wikipedia.org/wiki/Morris_worm">Morris worm</a> era</p>
</blockquote>
<hr />
<p>Myriad formats have been proposed for network-mailable data. A major
difficulty undermining the popularity of most file/message bundlers is
that the sender assumes prior installation of the computational dual of
such bundling software by the receiver. Command shell archives alleviate
this problem somewhat, but still require standardization for the
function of data compression and mail-transparency encoding. On Unix,
these coding format quandaries are overcome by planting a novel <a
href="https://en.wikipedia.org/wiki/Trojan_horse_(computing)">Trojan
Horse</a> in the archive header to perform negotiation-less
decoding.</p>
<p>Specifically, we outline the development of an extraordinarily
compact portable bundler/extractor to (dis)assemble data-compressed,
binary-to-ASCII-converted, length-split, and checksummed directory
structures using standard Unix tools. Miniature versions of counterparts
to a Lempel-Ziv coder (<code>compress</code> or <code>squeeze</code>)
and an efficient bit packetizer (<code>btoa</code>) are compiled
on-the-fly at mail destination sites where they may not already exist.
These are written in purposefully obfuscated-C to accompany
similarly-shrunk shell command glue. This resulting shell archiver is
dubbed <code>shark</code>.</p>
<p><code>shark</code> procedure overhead consumes as few as three dozen
shell commands (or <code>~1100</code> bytes), commensurate with the size
of many Internet mail headers; it amortizes favorably with message size.
<code>shark</code> is portable across Unix variants, while the
underlying technique is inherently generalizable to other encoding
schemes.</p>
<p>In the function-theoretic sense of minimal Chaitin/Kolmogorov
complexity, and within a modified Shannon model of communication, the
‘shark’ effort aims to construct a “shortest program” for source
decoding in the Turing-universal Unix environment.</p>
<hr />
<blockquote>
<p>Oh, the shark has pretty teeth, dear–<br />
And he shows them pearly white<br />
Just a jackknife has Macheath, dear–<br />
And he keeps it out of sight.<br />
<br />
– Bertolt Brecht, Threepenny Opera</p>
</blockquote>
<hr />
<h3 id="portability">Portability</h3>
<p>We have ported this program to a wide variety of systems. Among these
are:</p>
<ul>
<li>SunOS 4.1 / Sun SPARCstation 1 (using both ‘cc’ and ‘gcc
1.37.1’)</li>
<li>SunOS 4.0.3 / Sun 3</li>
<li>BSD 4.3 / VAX 8650</li>
<li>SEIUX / Sumitomo Electric Ustation/S</li>
<li>Sony NEWS-OS 3.3 / Sony NEWS (fairly vanilla 4.3BSD)</li>
<li>System V.? / Hitachi 2050</li>
<li>System V.? / NEC EWS 4800</li>
<li>UNIOS-B / Omron Luna</li>
<li>Dynix / Sequent Balance (‘cc’ for Natl. Semi. base + ‘gcc
1.36’)</li>
<li>Unicos / Cray 2</li>
</ul>
<h3 id="obfuscation">Obfuscation</h3>
<p>We (the authors) feel this program is obfuscated for the following
reasons:</p>
<ol start="0" type="1">
<li><p>This is one of the few programs you’ll see <em>WHOSE VERY UTILITY
DEPENDS ON ITS OBFUSCATION</em>!</p></li>
<li><p>The contest entry may be used to send its wonderful self to
anyone in the Unix world! Virus writers need not apply…</p></li>
<li><p>The basic idea is twisted enough to be patentable, but is, out of
the kindness of our hearts (as well as to maintain eligibility for the
large IOCCC prize fund), dedicated to the public domain. Claude Shannon,
meet Alan Turing.</p></li>
<li><p>Meta-obfuscation is via obfuscated description (see
<em>ABSTRACT</em>).</p></li>
<li><p>“Literary” allusion. Production code contains a reference to
self-reference, preserved at amazing cost for sheer perversity.</p></li>
<li><p>Many, many micro obfuscations below, honed over three years time,
in shell as well as C. Ask about the ‘tar’ pit escape, the
<code>argv[0]</code> flip, Paul’s <code>&amp;4294967295</code>
portability hack, the “void where prohibited by flaw” fix, the
<code>scanf()</code> space-saver, shift shenanigans, signal madness,
<code>exit()</code>ing stage left, and source-to-source transformations
galore.</p></li>
</ol>
<h3 id="for-extra-credit">For extra credit:</h3>
<p>Construct <code>sharkmail</code>, to auto-split
<code>sharkives</code> into mailable segments and mail them. Here’s a
simple one, which could be extended to enable auto-reassembly with one
shell cmd at the far end.</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="co">#!/bin/sh</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="va">m</span><span class="op">=</span><span class="va">$1</span><span class="kw">;</span> <span class="bu">shift</span></span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="ex">shark</span> <span class="va">$*</span> <span class="kw">|</span> <span class="fu">split</span> <span class="at">-800</span> <span class="at">-</span> /tmp/shark<span class="va">$$</span></span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="va">n</span><span class="op">=</span><span class="kw">`</span><span class="fu">ls</span> /tmp/shark<span class="va">$$</span><span class="pp">*</span> <span class="kw">|</span> <span class="fu">wc</span> <span class="at">-l</span> <span class="kw">|</span> <span class="fu">sed</span> <span class="st">&#39;s/ *//&#39;</span><span class="kw">`</span></span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a><span class="va">p</span><span class="op">=</span>0</span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span> f <span class="kw">in</span> <span class="kw">`</span><span class="fu">ls</span> /tmp/shark<span class="va">$$</span><span class="pp">*</span><span class="kw">`</span></span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a><span class="cf">do</span></span>
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true" tabindex="-1"></a> <span class="va">p</span><span class="op">=</span><span class="kw">`</span><span class="fu">expr</span> <span class="va">$p</span> + 1<span class="kw">`</span></span>
<span id="cb6-9"><a href="#cb6-9" aria-hidden="true" tabindex="-1"></a> <span class="ex">mail</span> <span class="at">-s</span> <span class="st">&quot;bundle (</span><span class="va">$p</span><span class="st"> of </span><span class="va">$n</span><span class="st">) from &#39;</span><span class="kw">`</span><span class="fu">whoami</span><span class="kw">`</span><span class="st">&#39;&quot;</span> <span class="va">$m</span> <span class="op">&lt;</span> <span class="va">$f</span></span>
<span id="cb6-10"><a href="#cb6-10" aria-hidden="true" tabindex="-1"></a><span class="cf">done</span></span>
<span id="cb6-11"><a href="#cb6-11" aria-hidden="true" tabindex="-1"></a><span class="fu">rm</span> /tmp/shark<span class="va">$$</span><span class="pp">*</span></span></code></pre></div>
<h3 id="shark-history">Shark history:</h3>
<ul>
<li><p>May 1987: Karl Fox introduces 1023-byte <code>zcat.c</code> to
USENET. It’s too late for the 4th IOCCC.</p></li>
<li><p>May 21, 1987: James A. Woods extends idea to construct self
decompressing <code>shar</code> Trojan horse, utilizing <code>cc</code>,
<code>shar</code>, <code>zcat</code>, &amp; <code>btoa</code>; size:
2303 bytes.</p></li>
<li><p>May 23, 1987: <code>jaw</code> trims 250 bytes without much
thought.</p></li>
<li><p>June 2, 1987: 52 lines of shell, 1991 bytes, now made with
<code>tar</code>, short-circuit C-compile at far end, dual-use main.c,
portability mods. (jaw)</p></li>
<li><p>Mar-May 1988: abortive run at 5th IOCCC. <code>jaw.c</code> -
1529 bytes. compile line: 152 bytes. generated funny code with
<code>execvp()</code> to invoke shell.</p></li>
<li><p>Aug 29, 1988: production version, now at 1830 bytes.</p></li>
<li><p>Jan 1990: Paul Eggert does tour-de-force shark
re-engineering.</p></li>
<li><p>May 24, 1990: collaboration yields 999-byte <code>jaw.c</code>
core (see above) and 1530-byte production shell code (w/comments).
Eggert comes through with lion’s share of improvements. 7th IOCCC code
now faster than the <code>btoa</code>/<code>zcat</code> it
replaces.</p></li>
<li><p>May 1990: <code>jaw</code> develops experimental replacement
using Dan Bernstein’s high-compression ‘squeeze’.</p></li>
</ul>
<p>To which we add:</p>
<ul>
<li>June 1990: <code>shark</code> wins the IOCCC, finally! :-)</li>
</ul>
<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>
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
<h1 id="inventory-for-1990jaw"><a name="inventory"></a>Inventory for
1990/jaw</h1>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - winner home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/jaw/jaw.c">jaw.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/jaw/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/jaw/jaw.orig.c">jaw.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/jaw/try.sh">try.sh</a>
- how to run</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/jaw/btoa">btoa</a>
- bota utility</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/jaw/shark.sh">shark.sh</a>
- shark utility with embedded source</li>
<li><a href="1990_jaw.tar.bz2">1990_jaw.tar.bz2</a> - download winning
source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/jaw/.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/1990/jaw/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/jaw/README.md">README.md</a>
- markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/gen-inventory.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=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fjaw%2Findex.html">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 -->
+218 -13
View File
@@ -1,4 +1,6 @@
<!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 !!! -->
@@ -6,27 +8,230 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 1990/pjr/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
<html lang="en">
<!-- END: this line ends content from: inc/top.default.html -->
<!-- -->
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
<!-- -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>1990 pjr</title>
<meta name="description" content="IOCCC year: 1990 IOCCC winner: pjr winner index page">
<meta name="keywords" content="IOCCC,1990,pjr,winner index page">
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>1990/pjr</title>
<meta name="description" content="1990 IOCCC winner pjr">
<meta name="keywords" content="IOCCC, 1990, IOCCC 1990, IOCCC winner, pjr">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>1990 pjr</h1>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<p>XXX - fake content until readme2index is working - XXX</p>
<div class="header">
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
<h1>The International Obfuscated C Code Contest</h1>
<h2>1990/pjr</h2>
</div>
<hr style="width:50%;text-align:left;margin-left:0">
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.mid.html -->
<!-- Start Nu Html Checker -->
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fpjr%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1990/pjr/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../jaw/index.html">&larr; jaw</a>
<a class="Left" href="../index.html">&uarr; 1990 &uarr;</a>
<a class="Left" href="../scjones/index.html">scjones &rarr;</a>
<a class="Right" href="#inventory">Inventory</a>
</div>
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
<a href="/temp-test-ioccc/winners.html">People who have won</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
<a href="/temp-test-ioccc/faq.html">FAQ</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/bugs.html">Bugs &amp; (mis)features</a>
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
href="/temp-test-ioccc/winners.html#Peter_J_Ruczynski">Peter J
Ruczynski</a><br> Location: <a
href="/temp-test-ioccc/location.html#GB">GB</a></p>
<!-- END: next line ends content generated by: bin/gen-author.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>
<p>There is an <a href="#alternate-code">alternate version</a> that does
something different that can be used if your compiler is incapable of
compiling <code>X=g()...</code> in <code>main()</code>. It can be used
for another purpose too.</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">./pjr</span></span></code></pre></div>
<h2 id="alternate-code">Alternate code:</h2>
<p>Note that some compilers will be unable to compile the expression
<code>X=g()...</code> in <code>main()</code> due to lack of temporary
stack space. One might want to try replacing <code>main()</code>
with:</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>X<span class="op">=</span>s<span class="op">().</span>v<span class="op">().</span>o<span class="op">().</span>o<span class="op">().</span>l<span class="op">().</span>S<span class="op">().</span>d<span class="op">().</span>l<span class="op">().</span>i<span class="op">().</span>o<span class="op">().</span>w<span class="op">().</span>N<span class="op">();}</span></span></code></pre></div>
<p>if this is a problem, which is what this alternate code is.</p>
<p>NOTE: it prints something else and it is what the author suggested
one try as well.</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>
<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">./pjr.alt</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This program prints out a string. Can you figure out how it is
done?</p>
<p>By use of pointers to functions returning a struct of pointers to
functions!</p>
<h3 id="spoiler">Spoiler:</h3>
<p>This program prints out the string:</p>
<blockquote>
<p>the quick brown fox jumped over the lazy dog</p>
</blockquote>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>It is simple to make the program print other strings. Each
alphabetical character from a to z is printed out as its opposite:</p>
<pre><code>a-&gt;z b-&gt;y c-&gt;x etc</code></pre>
<p>To encode a new string input the string as it is meant to come
out:</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>X<span class="op">=</span>s<span class="op">().</span>v<span class="op">().</span>o<span class="op">().</span>o<span class="op">().</span>l<span class="op">().</span>S<span class="op">().</span>d<span class="op">().</span>l<span class="op">().</span>i<span class="op">().</span>o<span class="op">().</span>w<span class="op">().</span>N<span class="op">();</span></span></code></pre></div>
<p>Note: <code>S()</code> represents a space and <code>N()</code> a
newline. This will now produce…</p>
<pre><code>hello world</code></pre>
<p>By the way, there is actually a piece of code which is not used in
the original program! I leave it as an intellectual exercise to the
reader to find out what it is.</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>
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
<h1 id="inventory-for-1990pjr"><a name="inventory"></a>Inventory for
1990/pjr</h1>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - winner home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/pjr/pjr.c">pjr.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/pjr/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/pjr/pjr.alt.c">pjr.alt.c</a>
- alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/pjr/pjr.orig.c">pjr.orig.c</a>
- original source</li>
<li><a href="1990_pjr.tar.bz2">1990_pjr.tar.bz2</a> - download winning
source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/pjr/.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/1990/pjr/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/pjr/README.md">README.md</a>
- markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/gen-inventory.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=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fpjr%2Findex.html">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 -->
+208 -13
View File
@@ -1,4 +1,6 @@
<!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 !!! -->
@@ -6,27 +8,220 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 1990/scjones/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
<html lang="en">
<!-- END: this line ends content from: inc/top.default.html -->
<!-- -->
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
<!-- -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>1990 scjones</title>
<meta name="description" content="IOCCC year: 1990 IOCCC winner: scjones winner index page">
<meta name="keywords" content="IOCCC,1990,scjones,winner index page">
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>1990/scjones</title>
<meta name="description" content="1990 IOCCC winner scjones">
<meta name="keywords" content="IOCCC, 1990, IOCCC 1990, IOCCC winner, scjones">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>1990 scjones</h1>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<p>XXX - fake content until readme2index is working - XXX</p>
<div class="header">
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
<h1>The International Obfuscated C Code Contest</h1>
<h2>1990/scjones</h2>
</div>
<hr style="width:50%;text-align:left;margin-left:0">
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.mid.html -->
<!-- Start Nu Html Checker -->
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fscjones%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1990/scjones/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../pjr/index.html">&larr; pjr</a>
<a class="Left" href="../index.html">&uarr; 1990 &uarr;</a>
<a class="Left" href="../stig/index.html">stig &rarr;</a>
<a class="Right" href="#inventory">Inventory</a>
</div>
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
<a href="/temp-test-ioccc/winners.html">People who have won</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
<a href="/temp-test-ioccc/faq.html">FAQ</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/bugs.html">Bugs &amp; (mis)features</a>
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
href="/temp-test-ioccc/winners.html#Larry_Jones">Larry Jones</a><br>
Location: <a href="/temp-test-ioccc/location.html#null">unknown</a></p>
<!-- END: next line ends content generated by: bin/gen-author.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>
<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">./scjones</span></span></code></pre></div>
<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="judges-remarks">Judges’ remarks:</h2>
<p>The addition of trigraphs has made it easier to make programs hard to
read. It was a dark and stormy night for C when the ANSI C committee
added trigraphs to the standard. Too bad that they didn’t just simply
require a more reasonable ISO character set.</p>
<p>The Author sent us this note after he was informed that he won:</p>
<blockquote>
<p>Although I am quite grateful for the “ANSI Committee’s Worst Abuse of
C” title (were you aware that I am a member of the committee or is the
double meaning unintentional?), I was really hoping for something more
along the lines of “Closest Resemblance to Line Noise.” :-)</p>
</blockquote>
<p>… it was unintentional.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>Since this year’s contest is dedicated to ANSI C, here is a strictly
conforming entry. In accordance with the ANSI definition of a strictly
conforming program it does not produce output dependent on any
unspecified, undefined, or implementation defined behavior, and it does
not exceed any of the minimum implementation limits. It adheres to all
of the syntactic and semantic constraints of the standard: it
<code>#include</code>s the relevant headers for the functions it uses,
and it uses the <code>EXIT_SUCCESS</code> and <code>EXIT_FAILURE</code>
macros to return a correct success/fail status to the invoking program.
It also uses trigraphs for characters which are not in the
<code>Invariant Code Set</code> of <code>ISO 646:1983</code>, so it will
be portable to machines with deficient (from C’s standpoint) character
sets. In short, it should be very widely portable. As an extra added
attraction, all of the lines are under 72 characters long, which would
allow for sequence numbers to be punched in columns 73-80 :-).</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>
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
<h1 id="inventory-for-1990scjones"><a name="inventory"></a>Inventory for
1990/scjones</h1>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - winner home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/scjones/scjones.c">scjones.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/scjones/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/scjones/scjones.orig.c">scjones.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/scjones/try.sh">try.sh</a>
- how to run</li>
<li><a href="1990_scjones.tar.bz2">1990_scjones.tar.bz2</a> - download
winning source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/scjones/.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/1990/scjones/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/scjones/README.md">README.md</a>
- markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/gen-inventory.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=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fscjones%2Findex.html">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 -->
+204 -13
View File
@@ -1,4 +1,6 @@
<!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 !!! -->
@@ -6,27 +8,216 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 1990/stig/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
<html lang="en">
<!-- END: this line ends content from: inc/top.default.html -->
<!-- -->
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
<!-- -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>1990 stig</title>
<meta name="description" content="IOCCC year: 1990 IOCCC winner: stig winner index page">
<meta name="keywords" content="IOCCC,1990,stig,winner index page">
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>1990/stig</title>
<meta name="description" content="1990 IOCCC winner stig">
<meta name="keywords" content="IOCCC, 1990, IOCCC 1990, IOCCC winner, stig">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>1990 stig</h1>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<p>XXX - fake content until readme2index is working - XXX</p>
<div class="header">
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
<h1>The International Obfuscated C Code Contest</h1>
<h2>1990/stig</h2>
</div>
<hr style="width:50%;text-align:left;margin-left:0">
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.mid.html -->
<!-- Start Nu Html Checker -->
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fstig%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1990/stig/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../scjones/index.html">&larr; scjones</a>
<a class="Left" href="../index.html">&uarr; 1990 &uarr;</a>
<a class="Left" href="../tbr/index.html">tbr &rarr;</a>
<a class="Right" href="#inventory">Inventory</a>
</div>
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
<a href="/temp-test-ioccc/winners.html">People who have won</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
<a href="/temp-test-ioccc/faq.html">FAQ</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/bugs.html">Bugs &amp; (mis)features</a>
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
href="/temp-test-ioccc/winners.html#Stig_Hemmer">Stig Hemmer</a><br>
Location: <a href="/temp-test-ioccc/location.html#NO">NO</a></p>
<!-- END: next line ends content generated by: bin/gen-author.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>
<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="fu">make</span> all</span></code></pre></div>
<p>NOTE: that’s not a typo or mistake but one can also do:</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">./o</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>We changed the alias that the author’s suggested alias from a C-shell
alias to a Bourne-like shell alias.</p>
<p>Note that <code>shst.c</code> is renamed to <a
href="stig.c">stig.c</a> in the distribution.</p>
<p>WARNING: This program’s <code>how to compile</code> is too specific
to a particular shell. The obfuscation of this program is more related
to shell obfuscation than C obfuscation. This type of entry will not be
permitted in future contests.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>If you like shell programming you may also admire my creative
quoting. (I use <code>echo</code> to create an alias which when run
calls cc with the <code>-D</code> option to create a C macro with double
quotes in it. ARRRRRGGGHHH!)</p>
<p>The program is totally portable, but the compile commands are very
shell specific so don’t be TOO mad at me if they don’t work for you.</p>
<p>If you want to put these commands in a Makefile you must add 4 - four
- backslashes at the end on first line. (At least that’s what works
here.)</p>
<p>If everything works correctly it create an executable named
<code>o</code> which checks whether your compiler supports nested
comments. I’ve stolen the <code>"/*/*/0*/**/1"</code> from somewhere so
don’t give me any points for it. Of course neither ANSI nor K&amp;R
support nested comments when properly implemented, but what the
heck.</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>
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
<h1 id="inventory-for-1990stig"><a name="inventory"></a>Inventory for
1990/stig</h1>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - winner home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/stig/stig.c">stig.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/stig/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/stig/stig.orig.c">stig.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/stig/stig.sh">stig.sh</a>
- how to compile</li>
<li><a href="1990_stig.tar.bz2">1990_stig.tar.bz2</a> - download winning
source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/stig/.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/1990/stig/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/stig/README.md">README.md</a>
- markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/gen-inventory.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=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fstig%2Findex.html">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 -->
+301 -13
View File
@@ -1,4 +1,6 @@
<!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 !!! -->
@@ -6,27 +8,313 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 1990/tbr/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
<html lang="en">
<!-- END: this line ends content from: inc/top.default.html -->
<!-- -->
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
<!-- -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>1990 tbr</title>
<meta name="description" content="IOCCC year: 1990 IOCCC winner: tbr winner index page">
<meta name="keywords" content="IOCCC,1990,tbr,winner index page">
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>1990/tbr</title>
<meta name="description" content="1990 IOCCC winner tbr">
<meta name="keywords" content="IOCCC, 1990, IOCCC 1990, IOCCC winner, tbr">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>1990 tbr</h1>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<p>XXX - fake content until readme2index is working - XXX</p>
<div class="header">
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
<h1>The International Obfuscated C Code Contest</h1>
<h2>1990/tbr</h2>
</div>
<hr style="width:50%;text-align:left;margin-left:0">
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.mid.html -->
<!-- Start Nu Html Checker -->
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Ftbr%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1990/tbr/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../stig/index.html">&larr; stig</a>
<a class="Left" href="../index.html">&uarr; 1990 &uarr;</a>
<a class="Left" href="../theorem/index.html">theorem &rarr;</a>
<a class="Right" href="#inventory">Inventory</a>
</div>
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
<a href="/temp-test-ioccc/winners.html">People who have won</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
<a href="/temp-test-ioccc/faq.html">FAQ</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/bugs.html">Bugs &amp; (mis)features</a>
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
<p><a name="author"><strong>Authors:</strong></a> <br><br>Name: <a
href="/temp-test-ioccc/winners.html#Byron_Rakitzis">Byron
Rakitzis</a><br> Location: <a
href="/temp-test-ioccc/location.html#US">US</a> <br><br>Name: <a
href="/temp-test-ioccc/winners.html#Sean_Dorward">Sean Dorward</a><br>
Location: <a href="/temp-test-ioccc/location.html#null">unknown</a></p>
<!-- END: next line ends content generated by: bin/gen-author.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>
<p>The authors provided another version of this program. See the <a
href="#alternate-code">alternate version</a> section below.</p>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code>STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="/bugs.md#1990-tbr">1990
tbr in bugs.md</a>.</p>
<h3 id="a-note-about-the-fixes-of-this-entry-in-2023">A note about the
fixes of this entry in 2023:</h3>
<p>In 2023 it was noticed that in some systems like macOS there was
confusing output due to a warning at runtime that was interspersed with
the output of the program. For instance it would show:</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">./tbr</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> warning: this program uses gets<span class="er">(</span><span class="kw">)</span><span class="ex">,</span> which is unsafe.</span></code></pre></div>
<p>which kind of hid the prompt. Thus the entry was changed to use
<code>fgets(3)</code> which is referred to later in this file.</p>
<p>Also <code>exit(3)</code> returns <code>void</code> but the entry was
using it in a binary expression so this entry would not compile in
modern systems. This fix is also referred to below, in the <a
href="#alternate-code">alternate version</a> section.</p>
<h2 id="to-use">To use:</h2>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./tbr</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> enter some shell commands</span></code></pre></div>
<p>NOTE: globs do not work with this entry. Why?</p>
<p>NOTE: <code>exit</code> does not work and neither does
<code>logout</code>. To exit try sending ctrl-d or ctrl-c (or kill it
from another terminal :-) ). But why does it not work with just
<code>exit</code> or <code>logout</code>? Hint: see the authors’
remarks.</p>
<h2 id="try">Try:</h2>
<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">./tbr</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> ls <span class="at">-l</span> tbr tbr.c</span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="co"># notice how the following does not work:</span></span>
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a><span class="fu">ls</span> tbr<span class="pp">*</span></span>
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a><span class="co"># try figuring out how this entry works in an editor:</span></span>
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true" tabindex="-1"></a><span class="fu">vi</span> tbr.c</span>
<span id="cb5-9"><a href="#cb5-9" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-10"><a href="#cb5-10" aria-hidden="true" tabindex="-1"></a><span class="co"># then figure out how to exit vi :-)</span></span></code></pre></div>
<p>What happens if you try using <code>cd -</code> to return to previous
directory? What about <code>cd</code> with no args?</p>
<p>The authors include a section called <a href="#bugs">BUGS</a> that,
because they were documented, are not considered bugs as such in the
context of the contest.</p>
<h2 id="alternate-code">Alternate code:</h2>
<p>The authors supplied us with a slightly smaller unformatted version
of the program which we include below:</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 D </span><span class="op">,</span><span class="pp">close</span><span class="op">(</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="dt">char</span><span class="op">*</span>c<span class="op">,</span>q<span class="op">[</span><span class="dv">512</span><span class="op">],</span>m<span class="op">[</span><span class="dv">256</span><span class="op">],*</span>v<span class="op">[</span><span class="dv">99</span><span class="op">],**</span>u<span class="op">,*</span>i<span class="op">[</span><span class="dv">3</span><span class="op">];</span><span class="dt">int</span> f<span class="op">[</span><span class="dv">2</span><span class="op">],</span>p<span class="op">;</span>main<span class="op">(){</span><span class="cf">for</span><span class="op">(</span>m<span class="op">[</span>m<span class="op">[</span><span class="dv">60</span><span class="op">]=</span>m<span class="op">[</span><span class="dv">62</span><span class="op">]=</span></span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="dv">32</span><span class="op">]=</span>m<span class="op">[*</span>m<span class="op">=</span><span class="dv">124</span><span class="op">[</span>m<span class="op">]=</span><span class="dv">9</span><span class="op">]=</span><span class="dv">6</span><span class="op">;</span>e<span class="op">(-</span><span class="dv">8</span><span class="op">),</span>gets<span class="op">(</span><span class="dv">1</span><span class="op">+(</span>c<span class="op">=</span>q<span class="op">))||(</span>exit<span class="op">(</span><span class="dv">0</span><span class="op">),</span><span class="dv">0</span><span class="op">);</span>r<span class="op">(</span><span class="dv">0</span><span class="op">,</span><span class="dv">0</span><span class="op">))</span><span class="cf">for</span><span class="op">(;*++</span>c<span class="op">;);}</span></span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a>r<span class="op">(</span>t<span class="op">,</span>o<span class="op">){*</span>i<span class="op">=</span>i<span class="op">[</span><span class="dv">2</span><span class="op">]=</span><span class="dv">0</span><span class="op">;</span><span class="cf">for</span><span class="op">(</span>u<span class="op">=</span>v<span class="op">+</span><span class="dv">98</span><span class="op">;</span>m<span class="op">[*--</span>c<span class="op">]^</span><span class="dv">9</span><span class="op">;</span>m<span class="op">[*</span>c<span class="op">]&amp;</span><span class="dv">32</span><span class="op">?</span>i<span class="op">[*</span>c<span class="op">&amp;</span><span class="dv">2</span><span class="op">]=</span></span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a><span class="op">*</span>u<span class="op">,</span>u<span class="op">-</span>v<span class="op">^</span><span class="dv">98</span><span class="op">&amp;&amp;++</span>u<span class="op">:</span><span class="dv">3</span><span class="op">)</span><span class="cf">if</span><span class="op">(!</span>m<span class="op">[*</span>c<span class="op">]){</span><span class="cf">for</span><span class="op">(*++</span>c<span class="op">=</span><span class="dv">0</span><span class="op">;!</span>m<span class="op">[*--</span>c<span class="op">];);*--</span>u<span class="op">=</span></span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a><span class="op">++</span>c<span class="op">;}</span>u<span class="op">-</span>v<span class="op">^</span><span class="dv">98</span><span class="op">?</span>strcmp<span class="op">(*</span>u<span class="op">,</span><span class="st">&quot;cd&quot;</span><span class="op">)?*</span>c<span class="op">?</span>pipe<span class="op">(</span>f<span class="op">),</span>o<span class="op">=</span>f<span class="op">[</span><span class="dv">1</span><span class="op">]:</span><span class="dv">1</span><span class="op">,(</span>p<span class="op">=</span>fork<span class="op">())?</span>e<span class="op">(</span>p<span class="op">),</span>o<span class="op">?</span></span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a>r<span class="op">(</span>o<span class="op">,</span><span class="dv">0</span><span class="op">)</span>D o<span class="op">)</span>D<span class="op">*</span>f<span class="op">):</span><span class="dv">4</span><span class="op">,</span>wait<span class="op">(</span><span class="dv">0</span><span class="op">):(</span>o<span class="op">?</span>dup2<span class="op">(*</span>f<span class="op">,</span><span class="dv">0</span><span class="op">)</span>D<span class="op">*</span>f<span class="op">)</span>D o<span class="op">):*</span>i<span class="op">?</span><span class="dv">1</span> D</span>
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true" tabindex="-1"></a><span class="dv">0</span><span class="op">),</span>e<span class="op">(</span>open<span class="op">(*</span>i<span class="op">,</span><span class="dv">0</span><span class="op">)):</span><span class="dv">5</span><span class="op">,</span>t<span class="op">?</span>dup2<span class="op">(</span>t<span class="op">,</span><span class="dv">1</span><span class="op">)</span>D t<span class="op">):</span>i<span class="op">[</span><span class="dv">2</span><span class="op">]?</span><span class="dv">9</span> D</span>
<span id="cb6-9"><a href="#cb6-9" aria-hidden="true" tabindex="-1"></a><span class="dv">1</span><span class="op">),</span>e<span class="op">(</span>creat<span class="op">(</span>i<span class="op">[</span><span class="dv">2</span><span class="op">],</span><span class="dv">438</span><span class="op">)):</span><span class="dv">2</span><span class="op">,</span>e<span class="op">(</span>execvp<span class="op">(*</span>u<span class="op">,</span>u<span class="op">))):</span>e<span class="op">(</span>chdir<span class="op">(</span>u<span class="op">[</span><span class="dv">1</span><span class="op">])*</span><span class="dv">2</span><span class="op">):</span><span class="dv">6</span><span class="op">;}</span></span>
<span id="cb6-10"><a href="#cb6-10" aria-hidden="true" tabindex="-1"></a>e<span class="op">(</span>x<span class="op">){</span>x<span class="op">&lt;</span><span class="dv">0</span><span class="op">?</span>write<span class="op">(</span><span class="dv">2</span><span class="op">,</span><span class="st">&quot;?</span><span class="sc">\n</span><span class="st">$ &quot;</span><span class="op">-</span>x<span class="op">/</span><span class="dv">4</span><span class="op">,</span><span class="dv">2</span><span class="op">),</span>x<span class="op">+</span><span class="dv">1</span><span class="op">||(</span>exit<span class="op">(</span><span class="dv">1</span><span class="op">),</span><span class="dv">0</span><span class="op">):</span><span class="dv">5</span><span class="op">;}</span></span></code></pre></div>
<p>and in the <a href="tbr.alt.c">alternate source</a>. It has the
<code>exit()</code> returns <code>void</code> fix as well as the
<code>gets()</code> to <code>fgets()</code> fix applied to it to make it
functionally equivalent like the authors intended.</p>
<h3 id="alternate-build">Alternate build:</h3>
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
<h3 id="alternate-use">Alternate use:</h3>
<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="ex">./tbr.alt</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This program touches on a well known Unix utility, the 6th edition
Bourne Shell (<code>/bin/sh</code>), whose original source was
considered to be extremely obfuscated by many people (although Steve
Bourne might disagree). Did you know that the Bourne Shell source was a
major inspiration for the formation of the IOCCC back in 1984?</p>
<h2 id="authors-remarks">Authors’ remarks:</h2>
<p>This program is a rudimentary shell. It does I/O redirection, pipes
and cd. It flags errors on failed <code>chdir()</code>,
<code>open()</code>, <code>creat()</code>, <code>execvp()</code>,
<code>fork()</code> and a few syntax errors.</p>
<p>This program is obfuscated in a few notable ways: apart from the
layout (an unformatted (but crunched) version is included for people who
want to put this through <code>cb</code>) it makes clever use of a
<code>write()</code> statement, so that the same statement can be used
to print errors and the prompt. By calling the error function with the
value <code>-8</code>, the pointer offset in the expression
<code>"?\n$ "-x/4</code> goes from 0 to 2. Presto! A prompt. For errors
with numbers smaller than <code>-4</code> (i.e., UNIX system calls) a
question mark is printed.</p>
<p>The error value of <code>chdir()</code> is doubled so that we don’t
exit from the parent shell on a <code>chdir()</code> error (since
<code>e()</code> exits on <code>-1</code> errors only). All other system
call failures exit since they are from sub-shells.</p>
<p>Recursion is sneakily employed to avoid a second call to
<code>fork()</code>, and the line is parsed in a fairly bizarre fashion:
backwards. The heart of the program, that is, the part which performs
all <code>fork()</code>s, <code>exec()</code>s, <code>open()</code>s,
etc. is ONE C STATEMENT.</p>
<p>The meta-values array is initialized in a bizarre fashion, and the
subsequent checks for the <code>'&lt;'</code> and <code>'&gt;'</code>
are performed in a single statement using a mask, since you know that
<code>'&gt;'&amp;2</code> is 0, whereas <code>'&lt;'&amp;2</code> is 2.
Other such micro-obfuscations abound.</p>
<p>Finally, it is notable that the code was hacked for minimality. If
you look at the compressed version, you will be hard-pressed to
eliminate more than a few characters (we can’t see how to make it any
smaller!). 550 characters is pretty lean for a shell that does this
much.</p>
<h3 id="bugs">BUGS</h3>
<p>The syntax of the shell has not been fully explored, but if you try
to redirect in the same direction more than once, only one redirection
is performed. This is a “feature” of the way the line is parsed; a
pointer to the stack of arguments is assigned and an argument is stolen
every time a <code>&gt;</code> or <code>&lt;</code> is encountered. The
shell flags an error if no arguments are on the stack. Thus, for
example:</p>
<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">cat</span> <span class="op">&gt;</span> foo <span class="op">&gt;</span> bar</span></code></pre></div>
<p>cats to <code>foo</code>, since it was pushed last, but</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">cat</span> <span class="op">&gt;</span> <span class="op">&gt;</span> foo bar</span></code></pre></div>
<p>cats to <code>bar</code>, since <code>bar</code> was pushed under
<code>foo</code> (remember we’re parsing right-left).</p>
<p>Depending on your flavor of Unix, <code>cd</code> without an argument
will either produce an error or just do nothing.</p>
<p>There is just one error message, the question mark, but hey, that’s
all <code>ed(1)</code> does too.</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>
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
<h1 id="inventory-for-1990tbr"><a name="inventory"></a>Inventory for
1990/tbr</h1>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - winner home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/tbr/tbr.c">tbr.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/tbr/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/tbr/tbr.alt.c">tbr.alt.c</a>
- alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/tbr/tbr.orig.c">tbr.orig.c</a>
- original source</li>
<li><a href="1990_tbr.tar.bz2">1990_tbr.tar.bz2</a> - download winning
source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/tbr/.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/1990/tbr/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/tbr/README.md">README.md</a>
- markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/gen-inventory.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=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Ftbr%2Findex.html">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 -->
+248 -13
View File
@@ -1,4 +1,6 @@
<!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 !!! -->
@@ -6,27 +8,260 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 1990/theorem/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
<html lang="en">
<!-- END: this line ends content from: inc/top.default.html -->
<!-- -->
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
<!-- -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>1990 theorem</title>
<meta name="description" content="IOCCC year: 1990 IOCCC winner: theorem winner index page">
<meta name="keywords" content="IOCCC,1990,theorem,winner index page">
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>1990/theorem</title>
<meta name="description" content="1990 IOCCC winner theorem">
<meta name="keywords" content="IOCCC, 1990, IOCCC 1990, IOCCC winner, theorem">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>1990 theorem</h1>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<p>XXX - fake content until readme2index is working - XXX</p>
<div class="header">
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
<h1>The International Obfuscated C Code Contest</h1>
<h2>1990/theorem</h2>
</div>
<hr style="width:50%;text-align:left;margin-left:0">
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.mid.html -->
<!-- Start Nu Html Checker -->
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Ftheorem%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1990/theorem/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../tbr/index.html">&larr; tbr</a>
<a class="Left" href="../index.html">&uarr; 1990 &uarr;</a>
<a class="Left" href="../westley/index.html">westley &rarr;</a>
<a class="Right" href="#inventory">Inventory</a>
</div>
<!-- END: this line ends content from: inc/topnav.mid.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="/temp-test-ioccc/index.html">IOCCC Home</a>
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
<a href="/temp-test-ioccc/winners.html">People who have won</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
<a href="/temp-test-ioccc/faq.html">FAQ</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/bugs.html">Bugs &amp; (mis)features</a>
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
href="/temp-test-ioccc/winners.html#Adrian_Mariano">Adrian
Mariano</a><br> Location: <a
href="/temp-test-ioccc/location.html#US">US</a></p>
<!-- END: next line ends content generated by: bin/gen-author.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>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code>STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a
href="/bugs.md#1990-theorem">1990 theorem in bugs.md</a>.</p>
<h2 id="to-use">To use:</h2>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./theorem</span> expression x1 x2 h y1</span></code></pre></div>
<p>where:</p>
<pre><code>expression - function f(x,y) (see below)
x1 - start of interval
x2 - end of interval
h - step size
y1 - initial value (y(x1) == y1)</code></pre>
<h2 id="try">Try:</h2>
<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.sh</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>The program’s source implements four functions, all from the same
source file!</p>
<p>When you compile <a href="theorem.c">theorem.c</a> as is and run with
5 args, it numerically solves the equation <code>y'=f(x,y)</code>, with
a step size of <code>h</code> (see above usage), over the interval
<code>x=[x1,x2]</code>, with the initial condition of
<code>y(x1)=y1</code>.</p>
<p>The ‘expression’ <code>f(x,y)</code> is any function of
<code>x</code> and <code>y</code> with the operators:</p>
<pre><code>+ - * / ^</code></pre>
<p>The symbol <code>^</code> is the power operator. Note that it only
supports integer powers. Also note that all expressions are evaluated
strictly left to right. (i.e., parenthesis aren’t supported).</p>
<p>Try running the program with the following args:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./theorem</span> y 0 1 0.1 1</span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./theorem</span> 1/x 1 2 0.1 0</span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./theorem</span> <span class="st">&#39;x^2/y+x&#39;</span> 0 1 0.1 6</span></code></pre></div>
<p>But wait, there is more! You also get, free of charge, a reversing
filter! Try:</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="ex">./theorem</span> <span class="at">-r</span> 0 0 0 0 <span class="op">&lt;</span> theorem.c <span class="op">&gt;</span> sorter.c</span></code></pre></div>
<p>Still not impressed? The author throws in for free, a sort program!
Try:</p>
<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">make</span> sorter</span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="fu">ls</span> <span class="kw">|</span> <span class="ex">./sorter</span></span></code></pre></div>
<p>This program is safe for home use as well. The author has included a
safety feature in case you misplace the original program source:</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="ex">./sorter</span> <span class="at">-r</span> 0 0 0 0 <span class="op">&lt;</span> sorter.c <span class="op">&gt;</span> theorem_bkp.c</span></code></pre></div>
<p>And finally, as a special offer to users of this entry, the author
provides a Fibonacci sequence generator! Try:</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="ex">./sorter</span> 0 0 0 0 <span class="op">&lt;</span> theorem.c <span class="op">&gt;</span> fibonacci.c</span>
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> fibonacci</span>
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./fibonacci</span> 1 1</span>
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./fibonacci</span> 2 1</span></code></pre></div>
<p>NOTE: if the two args passed to <code>fibonacci</code> and
<code>theorem_bkp</code> add to 0 it will print 0 over and over again in
an infinite loop. In this case it should not be fixed (another condition
where this occurred was fixed in 2023 as it affected usability of the
program).</p>
<p>Program available on 9 track and cartridge cassette. Neither <a
href="https://ginsu.com">Ginsu knife</a> nor <a
href="https://en.wikipedia.org/wiki/Swiss_Army_knife">Swiss army
knife</a> included! :-)</p>
<p>When this program was first shown at the 1990 Summer USENIX
conference, it received a standing ovation; a first for a contest
entry.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>Differential equations are solved via the Runge-Kutta method, which
guarantees local error proportional to <code>h^5</code>, and total error
across a finite interval is at most a constant times
<code>h^4</code>.</p>
<p>Sorting is accomplished with a standard <a
href="https://en.wikipedia.org/wiki/Shellsort">shell sort</a>.</p>
<p>Note that the sorting and reversing is limited to files with fewer
than 500 lines, each less than 99 characters long.</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>
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
<h1 id="inventory-for-1990theorem"><a name="inventory"></a>Inventory for
1990/theorem</h1>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - winner home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/theorem/theorem.c">theorem.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/theorem/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/theorem/theorem.orig.c">theorem.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/theorem/try.sh">try.sh</a>
- how to run</li>
<li><a href="1990_theorem.tar.bz2">1990_theorem.tar.bz2</a> - download
winning source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/theorem/.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/1990/theorem/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/theorem/README.md">README.md</a>
- markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/gen-inventory.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=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Ftheorem%2Findex.html">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 -->
+216 -13
View File
@@ -1,4 +1,6 @@
<!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 !!! -->
@@ -6,27 +8,228 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 1990/westley/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
<html lang="en">
<!-- END: this line ends content from: inc/top.default.html -->
<!-- -->
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
<!-- -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>1990 westley</title>
<meta name="description" content="IOCCC year: 1990 IOCCC winner: westley winner index page">
<meta name="keywords" content="IOCCC,1990,westley,winner index page">
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>1990/westley</title>
<meta name="description" content="1990 IOCCC winner westley">
<meta name="keywords" content="IOCCC, 1990, IOCCC 1990, IOCCC winner, westley">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>1990 westley</h1>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<p>XXX - fake content until readme2index is working - XXX</p>
<div class="header">
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
<h1>The International Obfuscated C Code Contest</h1>
<h2>1990/westley</h2>
</div>
<hr style="width:50%;text-align:left;margin-left:0">
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.last.html -->
<!-- Start Nu Html Checker -->
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fwestley%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1990/westley/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../theorem/index.html">&larr; theorem</a>
<a class="Left" href="../index.html">&uarr; 1990 &uarr;</a>
<a class="Left Disabled" href="#">last entry</a>
<a class="Right" href="#inventory">Inventory</a>
</div>
<!-- END: this line ends content from: inc/topnav.last.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="/temp-test-ioccc/index.html">IOCCC Home</a>
<a href="/temp-test-ioccc/years.html">Winning Entries</a>
<a href="/temp-test-ioccc/winners.html">People who have won</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/news.html">IOCCC News</a>
<a href="/temp-test-ioccc/faq.html#submit">How to enter the IOCCC</a>
<a href="/temp-test-ioccc/faq.html">FAQ</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/bugs.html">Bugs &amp; (mis)features</a>
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
</div>
<hr>
<div class="sidenav">
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
<a href="/temp-test-ioccc/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 generated by: bin/gen-author.sh -->
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
href="/temp-test-ioccc/winners.html#Brian_Westley">Brian Westley</a><br>
Location: <a href="/temp-test-ioccc/location.html#US">US</a></p>
<!-- END: next line ends content generated by: bin/gen-author.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>
<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">./westley</span> <span class="op">&lt;</span>number<span class="op">&gt;</span></span></code></pre></div>
<p>The number should be greater than 0.</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>The alternate code is provided to show how C changed.</p>
<h3 id="alternate-build">Alternate build:</h3>
<p>If you have an old enough compiler try and to see how C has changed
over the years:</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="fu">make</span> alt</span></code></pre></div>
<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">./westley.alt</span> <span class="op">&lt;</span>number<span class="op">&gt;</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>If you would rather “Daisy” someone other than Westley, rename the
program as needed. :-)</p>
<p>Read each block of code as if it were a piece of correspondence. For
example, the first block of code would read:</p>
<pre><code>charlie,
doubletime me, OXFACE!
not interested, get out
mainly die, charly, *die*
signed charlotte</code></pre>
<p>The original source had control-L’s after each code block. To make it
easier on news readers, we converted each control-L to a blank line.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>This is a “Picking the Daisy” simulation. Now, instead of mangling a
daisy, simply run this program with the number of petals desired as the
argument.</p>
<p>This is a good counter-example to peoples’ complaints that C doesn’t
have an “English-like” syntax.</p>
<p>Lint complains about everything - null effect, xxx may be used before
set, statement not reached, return(e) and return. Lint dumps core on
some systems. My personal favorite lint complaint is</p>
<p><strong><em>“warning: eroticism unused in function
main”.</em></strong></p>
<p>Also obviously, <code>(char)lotte</code> and <code>(char*)lie</code>
are incompatible types…</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>
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
<h1 id="inventory-for-1990westley"><a name="inventory"></a>Inventory for
1990/westley</h1>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="index.html">index.html</a> - winner home page</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/westley/westley.c">westley.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/westley/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/westley/westley.alt.c">westley.alt.c</a>
- alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/westley/westley.orig.c">westley.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/westley/try.sh">try.sh</a>
- how to run</li>
<li><a href="1990_westley.tar.bz2">1990_westley.tar.bz2</a> - download
winning source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/westley/.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/1990/westley/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1990/westley/README.md">README.md</a>
- markdown source for index.html</li>
</ul>
<!-- END: next line ends content generated by: bin/gen-inventory.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=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1990%2Fwestley%2Findex.html">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 -->