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

+364 -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,376 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 2014/birken/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>2014 birken</title>
<meta name="description" content="IOCCC year: 2014 IOCCC winner: birken winner index page">
<meta name="keywords" content="IOCCC,2014,birken,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>2014/birken</title>
<meta name="description" content="2014 IOCCC winner birken">
<meta name="keywords" content="IOCCC, 2014, IOCCC 2014, IOCCC winner, birken">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>2014 birken</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>2014/birken</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%2F2014%2Fbirken%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2014/birken/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; 2014 &uarr;</a>
<a class="Left" href="../deak/index.html">deak &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#Alexander_Prishchepov">Alexander
Prishchepov</a><br> Location: <a
href="/temp-test-ioccc/location.html#US">US</a> <br><br>Name: <a
href="/temp-test-ioccc/winners.html#Michael_Birken">Michael
Birken</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></span></code></pre></div>
<p>There is alternate code that lets you redefine the port to bind to,
in case there is a firewall issue, and also lets you redefine the timing
constant, <code>STARDATE</code>. See <a
href="#alternate%20code">Alternate code</a> below.</p>
<h2 id="to-use">To use:</h2>
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> <span class="op">&lt;</span> some_secret_or_something</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> http://host<span class="pp">[</span><span class="ss">:port</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">./prog</span> <span class="op">&lt;</span> README.md</span></code></pre></div>
<p>or maybe:</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="bu">echo</span> <span class="st">&quot;IOCCC 2014!&quot;</span> <span class="kw">|</span> <span class="ex">./prog</span></span></code></pre></div>
<p>Next, try in another terminal, as the above one is running:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> http://127.0.0.1:1701</span></code></pre></div>
<p>What happens if you specify instead of a regular file something like
<code>/dev/null</code> ?</p>
<p>But there’s more! Try opening in a browser the same address and then
see what happens. This is explained by the authors when explaining their
inspiration.</p>
<h2 id="alternate-code">Alternate code:</h2>
<p>This version allows you to redefine the port to bind to, should 1701
be a problem for some reason, and it also allows you to change the
timing as described by the author. See <a
href="#configuration">configuration</a> below.</p>
<h3 id="alternate-build">Alternate build:</h3>
<p>To specify the port to say, 31337, try:</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="fu">make</span> clobber PORT=31337 alt</span></code></pre></div>
<p>To change the timing constant, <code>STARDATE</code>, try:</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="fu">make</span> clobber TIME=5000000 alt</span></code></pre></div>
<p>You can combine them both of course.</p>
<h3 id="alternate-use">Alternate use:</h3>
<p>Use <code>prog.alt</code> as you would <code>prog</code> above.
Remember that ports &lt; 1024 are privileged ports that unprivileged
users cannot use.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Port 1701? Well this is not the l2f registered TCP/1701 protocol.
Sniff the traffic to/from that port. You will see HTTP client and server
traffic. The HTML content you may see is static and immutable. Nothing
funny with the HTTP status codes. Even the timestamp cookie, once set,
remains static throughout the session. The data appears to not be
transmitted within the binary content communicated between client and
server.</p>
<p>So how does this program do it? A trek though the cloak of
obfuscation awaits the reader of the source!</p>
<h2 id="authors-remarks">Authors’ remarks:</h2>
<h3 id="abstract">Abstract</h3>
<p>When launched in web server mode, this application appears to deliver
nothing more than a static HTML page. But, in actuality, it allows
covert file transfer over the Internet. This is demonstrated by starting
the application as a client-side downloader. The hidden transmitted data
cannot be reconstructed or even detected from the binary content of the
traffic between the client and the server.</p>
<h2 id="to-use-web-server">To use web server</h2>
<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">./prog</span> <span class="op">&lt;</span> secret_file_to_be_downloaded</span></code></pre></div>
<p>Try using the program’s source code as the secret file:</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="ex">./prog</span> <span class="op">&lt;</span> prog.c</span></code></pre></div>
<h2 id="to-use-client-side-downloader">To use client-side
downloader</h2>
<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">./prog</span> http://host<span class="pp">[</span><span class="ss">:port</span><span class="pp">]</span></span></code></pre></div>
<p>The optional port defaults to 1701. If the web server instance is
started on the same box, 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">./prog</span> http://127.0.0.1:1701</span></code></pre></div>
<p>It will incrementally display the contents of the hidden file at a
rate of approximately 1 baud.</p>
<p>The client-side downloader will automatically terminate if the web
server is bounced.</p>
<h3 id="html-content">HTML content</h3>
<p>Plug the URL into a browser to view a static HTML page containing
ASCII artwork.</p>
<h3 id="exploration">Exploration</h3>
<p>Studying the network traffic will reveal that the HTML content is
static and immutable, the HTTP request and response fields do not
contain anything remarkable, HTTP status and error codes are not
exploited, no unusual or deprecated features of HTTP are used, and while
the cookie is based on a timestamp, its value also remains unchanged
throughout the session. As mentioned in the abstract, the data is not
transmitted within the binary content communicated between the client
and the server. A full explanation of the protocol appears below, but
feel free to explore before reading further.</p>
<h3 id="inspiration">Inspiration</h3>
<p>The inspiration for this program comes from <a
href="https://memory-alpha.fandom.com/wiki/Star_Trek_VI:_The_Undiscovered_Country">Star
Trek VI: The Undiscovered Country</a>, specifically the final
confrontation between the <a
href="https://memory-alpha.fandom.com/wiki/USS_Enterprise_(NCC-1701)">Enterprise</a>
and the enhanced prototype <a
href="https://memory-alpha.fandom.com/wiki/Klingon_Bird-of-Prey">Klingon
Bird of Prey</a>. The definitive feature of the prototype was its
ability to fire while cloaked. But, perhaps even more impressive was its
ability to keep an open communication channel with the Enterprise
throughout the battle, enabling the antagonist <a
href="https://memory-alpha.fandom.com/wiki/Chang_(General)">Chang</a> to
taunt <a
href="https://memory-alpha.fandom.com/wiki/James_T._Kirk">Captain
Kirk</a> with <a
href="https://en.wikipedia.org/wiki/William_Shakespeare">Shakespearian</a>
quotes while he slowly pelted his ship with torpedoes. Normally, cloaked
vessels must maintain silent running to avoid detection.</p>
<p>The battle is commemorated in the form of ASCII artwork depicting the
ships faced head-to-head in the page delivered by the web server. Plus,
the program source code is formatted in the shape of a Klingon Bird of
Prey. The code itself includes a number of Star Trek references: the
registry number of the Enterprise (NCC-1701) is defined as a constant;
variable names spell out Cpt. James T. Kirk and <a
href="https://memory-alpha.fandom.com/wiki/Odo">Odo</a> (the <a
href="https://memory-alpha.fandom.com/wiki/Star_Trek:_Deep_Space_Nine">Deep
Space 9</a> character was played by René Auberjonois who also appeared
as <a href="https://memory-alpha.fandom.com/wiki/West">Colonel West</a>
in <a
href="https://memory-alpha.fandom.com/wiki/Star_Trek_VI:_The_Undiscovered_Country">Star
Trek VI</a>); the <code>STARDATE</code> constant makes timing
configurable; and, the constant <code>k</code> stands for <a
href="https://memory-alpha.fandom.com/wiki/Khan_Noonien_Singh">Khan</a>
(in the final engagement in <a
href="https://memory-alpha.fandom.com/wiki/Star_Trek_II:_The_Wrath_of_Khan">Star
Trek II: The Wrath of Khan</a>, the damaged Enterprise managed to
disable the USS <a
href="https://memory-alpha.fandom.com/wiki/USS_Reliant_(NCC-1864)">Reliant</a>’s
shield generator by accessing its prefix code: 16309).</p>
<h3 id="secondary-size-limit">Secondary size limit</h3>
<p>As obligated by a program that employs 23rd century cloaking
technology, when the source is fed as input to <a
href="../iocccsize.c">IOCCC size tool version 2014-09-23-v19</a>, and
the <code>-i</code> command line option is used, the value printed is
0.</p>
<h3 id="transmission-protocol-revealed">Transmission protocol
revealed</h3>
<p>The client-side downloader relies on the response time of the web
server rather than the binary content of the response. The server
transmits 1 nibble at a time by counting to the nibble value via a
sequence of rapid responses terminated by a long response. For instance,
the value 5 would be transmitted by making a series of requests that
result in 5 near instantaneous responses followed by a half-second
delayed response. The long delay is skipped in the case of 15, the
maximal nibble value. With the aid of an ASCII table, it is actually
possible to read the nibbles by repeatedly pressing the refresh button
within a browser and observing the page refresh delay.</p>
<p>Nibble Count Coding (file transfer protocol NCC-1701) is faster than
transmitting each individual bit as a short or long delay because it
sends each byte with 2 long delays whereas communicating individual bits
requires 8 long delays in the worst case scenario. In fact, Nibble Count
Coding is faster than applying Huffman Coding since that is designed to
produce compact codes under the assumption that the bit value does not
affect transmission time.</p>
<p>The server relies on the cookie to identify each client uniquely,
enabling it to transfer the sequence independently to each client.</p>
<h3 id="configuration">Configuration</h3>
<p>As with all network communication, accurate transmission of data
relies on the nature of hardware revealed through statistics and
timeouts set accordingly. The long delay is arbitrarily set to
<code>0.5</code> seconds. This is microsecond tunable via the
<code>STARDATE</code> constant defined at the top of the source code.
Increase the value in the event of transmission errors. Decrease the
value to download faster and less reliably.</p>
<p>The NCC constant is the web server port number.</p>
<h3 id="obfuscations">Obfuscations</h3>
<ul>
<li>The ASCII artwork is compressed using run-length encoding.</li>
<li>One long string stores a series of strings concatenated together and
referenced via pointers.</li>
<li>The long string is shift encrypted.</li>
<li>Short and meaningless identifiers are used throughout.</li>
<li>Reversed array indexing was applied immoderately.</li>
<li>Minus is used in place of not-equals.</li>
<li><code>O</code> and <code>l</code> were selected for their
resemblance to <code>0</code> and <code>1</code> respectively.</li>
<li>Standard constants and ASCII characters were replaced with their
respective numerical values.</li>
</ul>
<h3 id="compiler-warnings">Compiler warnings</h3>
<p>For space considerations, the following include statements were
dropped resulting in compiler warnings:</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im">&lt;asm/byteorder.h&gt;</span></span>
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im">&lt;ctype.h&gt;</span></span>
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im">&lt;netinet/in.h&gt;</span></span>
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im">&lt;stdlib.h&gt;</span></span>
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im">&lt;string.h&gt;</span></span>
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im">&lt;sys/select.h&gt;</span></span>
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im">&lt;sys/socket.h&gt;</span></span>
<span id="cb12-8"><a href="#cb12-8" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im">&lt;sys/types.h&gt;</span></span>
<span id="cb12-9"><a href="#cb12-9" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im">&lt;sys/unistd.h&gt;</span></span></code></pre></div>
<p>It may be necessary to restore some of these under certain
environments.</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-2014birken"><a name="inventory"></a>Inventory for
2014/birken</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/2014/birken/prog.c">prog.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/birken/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/birken/prog.alt.c">prog.alt.c</a>
- alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/birken/prog.orig.c">prog.orig.c</a>
- original source</li>
<li><a href="2014_birken.tar.bz2">2014_birken.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/2014/birken/.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/2014/birken/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/birken/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%2F2014%2Fbirken%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 -->
+258 -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,270 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 2014/deak/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>2014 deak</title>
<meta name="description" content="IOCCC year: 2014 IOCCC winner: deak winner index page">
<meta name="keywords" content="IOCCC,2014,deak,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>2014/deak</title>
<meta name="description" content="2014 IOCCC winner deak">
<meta name="keywords" content="IOCCC, 2014, IOCCC 2014, IOCCC winner, deak">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>2014 deak</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>2014/deak</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%2F2014%2Fdeak%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2014/deak/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../birken/index.html">&larr; birken</a>
<a class="Left" href="../index.html">&uarr; 2014 &uarr;</a>
<a class="Left" href="../endoh1/index.html">endoh1 &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#Ferenc_Deak">Ferenc Deak</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></span></code></pre></div>
<p>There is an alternate version that the author provided but fixed in
2023 to compile with modern systems and to allow one to reconfigure the
constants <code>X1</code>, <code>X2</code>, <code>Y1</code> and
<code>Y2</code> (which were magic numbers). See <a
href="#alternate-code">Alternate code</a> below.</p>
<h2 id="to-use">To use:</h2>
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</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">./prog</span></span></code></pre></div>
<p>Try changing bounding box coordinates in the source to explore
various regions of the fractal.</p>
<h2 id="alternate-code">Alternate code:</h2>
<p>The alternate code is included as <a href="prog.alt.c">prog.alt.c</a>
so you can more easily see the difference in what it might look like if
the C was more recognisable and also to let you reconfigure the
coordinates.</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>
<p>If you wish to redefine the coordinates you can do so by defining
<code>X1</code>, <code>X2</code>, <code>Y1</code> and/or
<code>Y2</code>, which default to: <code>-2</code>, <code>1</code>,
<code>-1.3</code> and <code>1.3</code> respectively. For instance:</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">make</span> clobber X1=-3 X2=2 Y1=-2.3 Y2=2.3 alt</span></code></pre></div>
<p>You may pick and choose which ones to redefine.</p>
<h3 id="alternate-use">Alternate use:</h3>
<p>Use <code>prog.alt</code> as you would <code>prog</code>.</p>
<h3 id="alternate-try">Alternate try:</h3>
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.alt.sh</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>We consider this entry a tribute to all “Abuse of the C preprocessor”
and Mandelbrot fractal drawing entries we’ve seen over the years.</p>
<p>We liked the use of unary notation facilitated by variadic
macros.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="portability">Portability</h3>
<p>The application was written on a standard Ubuntu 14.04 and tested
with gcc 4.9.1 and clang 3.5 on a 64 bit system (though this should not
matter). The application makes no assumption regarding any system
specific settings, and it only needs a console to run. The provided
Makefile is just to have an easy compilation. I don’t see any problems
porting it to different compiler/system as long as it supports the C99
standard.</p>
<h3 id="the-application">The application</h3>
<p>The purpose of the application is mainly to illustrate the weird
possibilities of the C preprocessor, rather than to be a full featured
console mode Mandelbrot drawer. There are tools much better suited for
drawing fractals.</p>
<p>The usage of recognizable elements from the C programming language in
the application source code is intentionally kept to a bare minimum. If
this phrase would not be true, the application would be the
following:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="dt">double</span> _<span class="op">[]={-</span><span class="dv">2</span></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="op">,</span><span class="dv">1</span><span class="op">,-</span><span class="fl">1.3</span> <span class="op">,</span><span class="fl">1.3</span><span class="op">,</span> <span class="dv">0</span><span class="op">,</span> <span class="dv">0</span><span class="op">,</span><span class="dv">0</span><span class="op">,</span><span class="dv">0</span></span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="op">,</span><span class="dv">0</span> <span class="op">,</span><span class="dv">0</span><span class="op">,</span><span class="dv">50</span><span class="op">,</span> <span class="dv">80</span><span class="op">,</span> <span class="dv">0</span><span class="op">,</span><span class="dv">0</span><span class="op">,</span><span class="dv">0</span> <span class="op">,</span><span class="dv">255</span></span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a><span class="op">,</span> <span class="dv">8</span><span class="op">,</span><span class="dv">0</span><span class="op">};</span> <span class="dt">int</span> main <span class="op">(</span></span>
<span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">int</span> j<span class="op">)</span> <span class="op">{</span><span class="cf">if</span> <span class="op">(</span>j<span class="op">==</span> <span class="dv">1</span> <span class="op">){</span> <span class="cf">if</span><span class="op">(</span></span>
<span id="cb7-6"><a href="#cb7-6" aria-hidden="true" tabindex="-1"></a> _<span class="op">[</span><span class="dv">12</span><span class="op">]</span> <span class="op">&gt;</span>_<span class="op">[</span><span class="dv">10</span><span class="op">]</span> <span class="op">)</span>_<span class="op">[</span><span class="dv">17</span><span class="op">]=</span><span class="dv">1</span> <span class="op">;}</span> <span class="cf">if</span></span>
<span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a> <span class="op">(</span>_<span class="op">[</span><span class="dv">13</span><span class="op">]</span> <span class="op">&gt;</span>_<span class="op">[</span><span class="dv">11</span> <span class="op">]</span> <span class="op">||</span>_<span class="op">[</span><span class="dv">17</span><span class="op">]==</span><span class="dv">1</span><span class="op">)</span> <span class="cf">return</span> <span class="dv">1</span></span>
<span id="cb7-8"><a href="#cb7-8" aria-hidden="true" tabindex="-1"></a> <span class="op">;</span>_<span class="op">[</span><span class="dv">6</span><span class="op">]</span> <span class="op">=</span> _ <span class="op">[</span><span class="dv">13</span><span class="op">]</span> <span class="op">/</span> _<span class="op">[</span><span class="dv">11</span><span class="op">]*(</span>_<span class="op">[</span><span class="dv">1</span><span class="op">]-</span>_<span class="op">[</span> <span class="dv">0</span><span class="op">])</span></span>
<span id="cb7-9"><a href="#cb7-9" aria-hidden="true" tabindex="-1"></a><span class="op">+</span>_<span class="op">[</span> <span class="dv">0</span><span class="op">];</span> _ <span class="op">[</span><span class="dv">7</span><span class="op">]=</span>_<span class="op">[</span><span class="dv">12</span><span class="op">]/</span>_<span class="op">[</span><span class="dv">10</span><span class="op">]*(</span>_<span class="op">[</span><span class="dv">3</span><span class="op">]-</span>_<span class="op">[</span><span class="dv">2</span><span class="op">]</span> <span class="op">)+</span>_</span>
<span id="cb7-10"><a href="#cb7-10" aria-hidden="true" tabindex="-1"></a><span class="op">[</span><span class="dv">2</span><span class="op">];</span>_<span class="op">[</span><span class="dv">8</span><span class="op">]=</span>_<span class="op">[</span><span class="dv">9</span><span class="op">]=</span>_<span class="op">[</span><span class="dv">14</span><span class="op">]=</span><span class="dv">0</span><span class="op">;</span>l2<span class="op">:</span>_<span class="op">[</span><span class="dv">4</span><span class="op">]=</span>_<span class="op">[</span><span class="dv">8</span><span class="op">]</span> <span class="op">*</span> _ <span class="op">[</span><span class="dv">8</span><span class="op">]</span></span>
<span id="cb7-11"><a href="#cb7-11" aria-hidden="true" tabindex="-1"></a><span class="op">;</span>_<span class="op">[</span> <span class="dv">5</span><span class="op">]=</span> _ <span class="op">[</span><span class="dv">9</span><span class="op">]*</span>_<span class="op">[</span><span class="dv">9</span><span class="op">];</span>_<span class="op">[</span><span class="dv">9</span><span class="op">]=</span><span class="dv">2</span><span class="op">*</span>_<span class="op">[</span><span class="dv">8</span><span class="op">]*</span>_<span class="op">[</span><span class="dv">9</span><span class="op">]+</span> _<span class="op">[</span><span class="dv">7</span></span>
<span id="cb7-12"><a href="#cb7-12" aria-hidden="true" tabindex="-1"></a> <span class="op">];</span>_<span class="op">[</span><span class="dv">8</span> <span class="op">]</span> <span class="op">=</span> _ <span class="op">[</span> <span class="dv">4</span> <span class="op">]-</span>_<span class="op">[</span><span class="dv">5</span><span class="op">]+</span>_<span class="op">[</span><span class="dv">6</span><span class="op">];</span>_<span class="op">[</span><span class="dv">14</span> <span class="op">]++</span></span>
<span id="cb7-13"><a href="#cb7-13" aria-hidden="true" tabindex="-1"></a> <span class="op">;</span><span class="cf">if</span><span class="op">((</span>_ <span class="op">[</span><span class="dv">14</span><span class="op">]&lt;</span> _ <span class="op">[</span><span class="dv">15</span><span class="op">])&amp;&amp;(</span>_<span class="op">[</span><span class="dv">4</span><span class="op">]+</span> _<span class="op">[</span> <span class="dv">5</span><span class="op">]</span></span>
<span id="cb7-14"><a href="#cb7-14" aria-hidden="true" tabindex="-1"></a> <span class="op">&lt;</span>_<span class="op">[</span><span class="dv">16</span> <span class="op">]))</span> <span class="cf">goto</span> l2<span class="op">;</span> putchar<span class="op">(</span></span>
<span id="cb7-15"><a href="#cb7-15" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot; #@*+ &quot;</span><span class="op">[(</span> <span class="dt">int</span><span class="op">)</span> _<span class="op">[</span><span class="dv">14</span><span class="op">]%</span></span>
<span id="cb7-16"><a href="#cb7-16" aria-hidden="true" tabindex="-1"></a><span class="dv">5</span> <span class="op">]);</span>_ <span class="op">[</span><span class="dv">13</span> <span class="op">]</span> <span class="op">++</span> <span class="op">;</span> main <span class="op">(</span></span>
<span id="cb7-17"><a href="#cb7-17" aria-hidden="true" tabindex="-1"></a><span class="dv">0</span><span class="op">)</span> <span class="op">;</span>_<span class="op">[</span><span class="dv">12</span><span class="op">]++;</span> _<span class="op">[</span><span class="dv">13</span><span class="op">]</span> <span class="op">=</span><span class="dv">0</span></span>
<span id="cb7-18"><a href="#cb7-18" aria-hidden="true" tabindex="-1"></a><span class="op">;</span><span class="cf">if</span><span class="op">(</span>_ <span class="op">[</span><span class="dv">17</span><span class="op">]</span> <span class="op">!=</span><span class="dv">1</span><span class="op">)</span> putchar</span>
<span id="cb7-19"><a href="#cb7-19" aria-hidden="true" tabindex="-1"></a><span class="op">(</span><span class="bn">0xa</span><span class="op">);</span> main<span class="op">(</span><span class="dv">1</span><span class="op">);}</span></span></code></pre></div>
<p>The application expects no parameters, the only way you can change
the behaviour is to modify the source code at the indicated location:
the line <code>/* &lt;-- Configure here: X1, X2, Y1, Y2 */</code> is
intentionally not obfuscated so that the adventurous programmer can
manually modify the coordinates of the fractal to be drawn on the
screen.</p>
<h3 id="compiler-warnings">Compiler warnings</h3>
<p>Yes, unfortunately there are compiler warnings of the kind
“initialization makes integer from pointer without a cast” but the
provided Makefile automatically disables them.</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-2014deak"><a name="inventory"></a>Inventory for
2014/deak</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/2014/deak/prog.c">prog.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/deak/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/deak/prog.alt.c">prog.alt.c</a>
- alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/deak/prog.orig.c">prog.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/deak/try.alt.sh">try.alt.sh</a>
- how to run alternative code</li>
<li><a href="2014_deak.tar.bz2">2014_deak.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/2014/deak/.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/2014/deak/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/deak/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%2F2014%2Fdeak%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 -->
+267 -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,279 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 2014/endoh1/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>2014 endoh1</title>
<meta name="description" content="IOCCC year: 2014 IOCCC winner: endoh1 winner index page">
<meta name="keywords" content="IOCCC,2014,endoh1,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>2014/endoh1</title>
<meta name="description" content="2014 IOCCC winner endoh1">
<meta name="keywords" content="IOCCC, 2014, IOCCC 2014, IOCCC winner, endoh1">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>2014 endoh1</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>2014/endoh1</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%2F2014%2Fendoh1%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2014/endoh1/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../deak/index.html">&larr; deak</a>
<a class="Left" href="../index.html">&uarr; 2014 &uarr;</a>
<a class="Left" href="../endoh2/index.html">endoh2 &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#Yusuke_Endoh">Yusuke Endoh</a><br>
Location: <a href="/temp-test-ioccc/location.html#JP">JP</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></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">./prog</span> <span class="op">&gt;</span> foo.c</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>
<p>The script will ask you if you wish to run <code>make rake</code> but
this is not necessary to fully enjoy the entry. <code>make rake</code>
will run the <a href="rake.sh">rake.sh</a> script and then
<code>prog</code> if all is built okay. If <code>rake</code> is not
installed then it will check that <code>gem</code> is installed. If
<code>gem</code> is not installed it will tell you where to get it and
then tell you how to install <code>rake</code>. Otherwise, if
<code>rake</code> is installed it will try running <code>rake</code> and
if that fails to run it will tell you to run a <code>gem</code> command
as either root or via sudo and then to try running
<code>make rake</code> or <code>./rake.sh</code> again. If
<code>rake</code> succeeds it will run <code>./prog</code> which can be
used to build <code>main.c</code>.</p>
<p>What is the difference between running <code>./prog</code> and
<code>main</code>?</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Big terminals with tiny fonts have their uses in certain cases. One
of them is:</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> treacl</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./treacl</span></span></code></pre></div>
<p>which is shorthand for:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> <span class="op">&lt;</span> prog.c <span class="op">&gt;</span> treacle.c</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> treacle</span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./treacle</span></span></code></pre></div>
<p>When using a smartphone to read the output, you may need to step back
to see the bigger picture because that picture is worth more than 1000
words.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="remarks">Remarks</h3>
<p>You may want to use a large display with a very small terminal
font.</p>
<h3 id="spoiler">Spoiler</h3>
<p>See <a href="spoilers.md">spoilers.md</a>.</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-2014endoh1"><a name="inventory"></a>Inventory for
2014/endoh1</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/2014/endoh1/prog.c">prog.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/prog.orig.c">prog.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/Rakefile">Rakefile</a>
- Ruby makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/rake.sh">rake.sh</a>
- make rake script</li>
<li><a href="read_me.html">read_me.html</a> - about the Q(uine)R code
generator</li>
<li><a href="spoilers.html">spoilers.html</a> - spoilers about Q(uine)R
code generator</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/try.sh">try.sh</a>
- how to run</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/alpha.rb">alpha.rb</a>
- support program for Rakefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/assemble.rb">assemble.rb</a>
- support program for Rakefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/ast-def.rb">ast-def.rb</a>
- support program for Rakefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/gen-prog.rb">gen-prog.rb</a>
- support program for Rakefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/gen-table.rb">gen-table.rb</a>
- support program for Rakefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/link.rb">link.rb</a>
- support program for Rakefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/machine.rb">machine.rb</a>
- support program for Rakefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/parse.rb">parse.rb</a>
- support program for Rakefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/prog-tmpl.c">prog-tmpl.c</a>
- source code template used by gen-prog</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/register.rb">register.rb</a>
- support program for Rakefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/serialize.rb">serialize.rb</a>
- support program for Rakefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/src.rb">src.rb</a>
- support program for Rakefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/tool.rb">tool.rb</a>
- support program for Rakefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/vm.c">vm.c</a>
- source code of the VM</li>
<li><a href="2014_endoh1.tar.bz2">2014_endoh1.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/2014/endoh1/.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/2014/endoh1/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/README.md">README.md</a>
- markdown source for index.html</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh1/spoilers.md">spoilers.md</a>
- spoilers about Q(uine)R code generator</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%2F2014%2Fendoh1%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 -->
+206 -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,218 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 2014/endoh2/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>2014 endoh2</title>
<meta name="description" content="IOCCC year: 2014 IOCCC winner: endoh2 winner index page">
<meta name="keywords" content="IOCCC,2014,endoh2,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>2014/endoh2</title>
<meta name="description" content="2014 IOCCC winner endoh2">
<meta name="keywords" content="IOCCC, 2014, IOCCC 2014, IOCCC winner, endoh2">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>2014 endoh2</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>2014/endoh2</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%2F2014%2Fendoh2%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2014/endoh2/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../endoh1/index.html">&larr; endoh1</a>
<a class="Left" href="../index.html">&uarr; 2014 &uarr;</a>
<a class="Left" href="../maffiodo1/index.html">maffiodo1 &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#Yusuke_Endoh">Yusuke Endoh</a><br>
Location: <a href="/temp-test-ioccc/location.html#JP">JP</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></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">./prog</span> <span class="op">&lt;</span> input <span class="op">&gt;</span> output</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="bu">echo</span> Hello <span class="kw">|</span> <span class="ex">./prog</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> Hello <span class="kw">|</span> <span class="ex">./prog</span> <span class="op">&gt;</span> hello.c</span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> hello</span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./hello</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>If you look closely at the source, you will see code that appears to
puts C code that includes itself. How and why? Perhaps it is in the DNA
code of the code? Perhaps there are 23 reasons? :-)</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="remarks">Remarks</h3>
<p>This chromosome program synthesizes a double helix. The helix can
also be compiled as a C program.</p>
<p>Enjoy DNA programming!</p>
<h3 id="for-more-information-background-reading">For more information /
background reading:</h3>
<ul>
<li><p>This program was inspired by Acme::DoubleHelix: <a
href="http://search.cpan.org/~xern/Acme-DoubleHelix-0.01/"
class="uri">http://search.cpan.org/~xern/Acme-DoubleHelix-0.01/</a></p></li>
<li><p>The synthesized helix just includes the original program at the
head. Do you see how <a href="prog.c">prog.c</a> determines whether it
was invoked as a standalone program or included as a header file? Note
that it does not use any gcc extension such as
<code>__INCLUDE_LEVEL__</code>.</p></li>
<li><p>The synthesized helix of course follows the base-pairing rules
for DNA: A is bonding only to T, and C is bonding only to G.</p></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-2014endoh2"><a name="inventory"></a>Inventory for
2014/endoh2</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/2014/endoh2/prog.c">prog.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh2/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh2/prog.orig.c">prog.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh2/try.sh">try.sh</a>
- how to run</li>
<li><a href="2014_endoh2.tar.bz2">2014_endoh2.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/2014/endoh2/.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/2014/endoh2/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/endoh2/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%2F2014%2Fendoh2%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 -->
+447 -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,459 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 2014/maffiodo1/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>2014 maffiodo1</title>
<meta name="description" content="IOCCC year: 2014 IOCCC winner: maffiodo1 winner index page">
<meta name="keywords" content="IOCCC,2014,maffiodo1,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>2014/maffiodo1</title>
<meta name="description" content="2014 IOCCC winner maffiodo1">
<meta name="keywords" content="IOCCC, 2014, IOCCC 2014, IOCCC winner, maffiodo1">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>2014 maffiodo1</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>2014/maffiodo1</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%2F2014%2Fmaffiodo1%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2014/maffiodo1/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../endoh2/index.html">&larr; endoh2</a>
<a class="Left" href="../index.html">&uarr; 2014 &uarr;</a>
<a class="Left" href="../maffiodo2/index.html">maffiodo2 &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#Sandro_Maffiodo">Sandro
Maffiodo</a><br> Location: <a
href="/temp-test-ioccc/location.html#IT">IT</a></p>
<!-- END: next line ends content generated by: bin/gen-author.sh -->
<h2 id="to-build">To build:</h2>
<p>This entry requires SDL to be installed. See <a
href="/faq.md#faq3_8">FAQ 3.8</a> if you don’t know how to do this for
your system.</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></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#2014-maffiodo1">2014 maffiodo1 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="fu">cat</span> game.level <span class="kw">|</span> <span class="ex">./prog</span> 320 200 800 300 128 144 game.rgba game.wav 10343679</span></code></pre></div>
<p>The parameters to the program are:</p>
<ol type="1">
<li>Window width.</li>
<li>Window height.</li>
<li>Level width.</li>
<li>Level height.</li>
<li>Sprites image width.</li>
<li>Sprites image height.</li>
<li>Filename of the sprites image (raw RGBA image).</li>
<li>Filename of the music (WAVE 8000 Hz 8bit Mono).</li>
<li>Sky color. This number depends on the system where you run the
program. See note on macOS.</li>
</ol>
<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="ex">./giana.sh</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./mario.sh</span></span></code></pre></div>
<p>If you end up telnetting to the server (feature of <a
href="mario.sh">mario.sh</a>) you can try:</p>
<pre><code>ls # show files including games
wumpus.bas # play Hunt the Wumpus
advent.gam # you know what this is! :-)
starwars # animated Star Wars &#39;film&#39;</code></pre>
<p>If you wish to change the width and height, defaulting at 640 x 480,
say to 800 x 800, try:</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="va">ROWS</span><span class="op">=</span>800 <span class="va">COLS</span><span class="op">=</span>800 <span class="ex">./mario.sh</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="va">ROWS</span><span class="op">=</span>800 <span class="va">COLS</span><span class="op">=</span>800 <span class="ex">./giana.sh</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>A classic for a particular generation. Like all good programs, being
data driven means you can do fun things in small spaces.</p>
<p>NOTE: the author states to use <code>tabsize=4</code> to see the
magic of the formatting of the code. In <code>vim</code> you can do:</p>
<pre><code>:set tabstop=4</code></pre>
<p>in command mode to see this effect. You don’t need to modify your
<code>.vimrc</code> file! You can also use <code>expand</code> as
described below by the author if your terminal has enough rows and you
don’t want to move about in the code. The vim command should immediately
take effect.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="remarks">Remarks</h3>
<p>Use <code>tabsize=4</code> to see the magic.</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="fu">expand</span> <span class="at">-t</span> 4 prog.c</span></code></pre></div>
<p>The program returns 0 if the player wins or <em>non-zero</em> if the
player loses so you can test it and make something useful (or not), like
this:</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> mario.level <span class="kw">|</span> <span class="ex">./prog</span> 320 200 800 300 128 144 mario.rgba mario8.wav 10343679 <span class="kw">&amp;&amp;</span> <span class="ex">telnet</span> telehack.com 23</span></code></pre></div>
<p>and type in: <code>starwars</code></p>
<p>This is an engine for <a
href="https://en.wikipedia.org/wiki/Platform_game">platform game</a>. It
can be used to create games like the legendary <a
href="http://en.wikipedia.org/wiki/Super_Mario_Bros.">Super Mario
Bros</a>.</p>
<p>With this simple and clear source code you can create all the games
you want, for free!</p>
<p>In my two tests I tried to create one level of <a
href="http://en.wikipedia.org/wiki/Super_Mario_Bros.">Super Mario
Bros</a> and one of <a
href="http://en.wikipedia.org/wiki/The_Great_Giana_Sisters">The Great
Giana Sisters</a>.</p>
<p>Both games are classic <a
href="https://en.wikipedia.org/wiki/Platform_game">platform games</a>
and both share the same fundamental rules:</p>
<ul>
<li><p>There is a character.</p></li>
<li><p>There are power-ups that can change the look of the character
and/or give the character more or different powers or
abilities!</p></li>
<li><p>There are walls, floors and ceilings. The character can move and
jump over these type of obstacles but cannot walk through them.</p></li>
<li><p>There are enemies and if the character collides with an enemy,
the character dies or loses its powers.</p></li>
</ul>
<h3 id="running-under-macos">Running under macOS</h3>
<p>[NOTE: this seems to no longer be the case as of 2023 and most likely
much earlier. However one can change the look of the game doing this
anyway:]</p>
<p>The color of the sky is wrong on macOS. You need to flip some bytes
from the last parameter of the program:</p>
<ul>
<li><p>MARIO LAST PARAMETER: <code>4292124159</code></p></li>
<li><p>GIANA LAST PARAMETER: <code>3243070463</code></p></li>
</ul>
<h3 id="regarding-how-to-compile">Regarding how to compile</h3>
<p>The code requires <code>SDL1</code>.</p>
<p>The build process will generate some warnings (~60 with clang)
about:</p>
<ul>
<li><code>incompatible pointer types</code>: because all pointers are
declared to <code>int</code> or <code>char</code>, to save bytes.</li>
<li><code>type specifier missing, defaults to 'int'</code>: because I
need to save bytes.</li>
<li><code>using the result of an assignment as a condition without parentheses</code>:
because <code>while(c=getchar())</code> is not evil.</li>
</ul>
<h3 id="how-it-works">How it works</h3>
<h2 id="parameters">Parameters</h2>
<ol type="1">
<li>Window width.</li>
<li>Window height.</li>
<li>Level width.</li>
<li>Level height.</li>
<li>Sprites image width.</li>
<li>Sprites image height.</li>
<li>Filename of the sprites image (raw RGBA image).</li>
<li>Filename of the music (WAVE 8000 Hz 8bit Mono).</li>
<li>Sky color. This number depends on the system where you run the
program. See note on macOS.</li>
</ol>
<h2 id="sprites">Sprites</h2>
<p>The program read a single image that contains all the game sprites.
The image must be a grid of 8xN sprites. The size of a single sprite
must be square. The program calculates the size in this way:</p>
<pre><code>sprite_size = image_width / 8</code></pre>
<p>Each sprite is identified by its position inside the grid, counting
line by line, from left to right (for example sprite 0 is the top left
sprite in the grid, sprite 8 is the first sprite of the second row of
the grid etc.).</p>
<p>Some positions of the grid have a predefined purpose:</p>
<pre><code>Position | Description
:-----------------|:--------------
0 | Player standing right
1 | Player walking right frame 0
2 | Player walking right frame 1
3 | Player jumping right
4 | Player standing left
5 | Player walking left frame 0
6 | Player walking left frame 1
7 | Player jumping left
8 *(second row)* | Super player standing right
9 | Super player walking right frame 0
10 | Super player walking right frame 1
11 | Super player jumping right
12 | Super player standing left
13 | Super player walking left frame 0
14 | Super player walking left frame 1
15 | Super player jumping left
24 | Player dead
32 | Player won
40 | Super player won</code></pre>
<p>All the others sprites can be used as you want, depending on the game
you want to create.</p>
<h2 id="levels">Levels</h2>
<p>The program reads the level description from <code>stdin</code>.</p>
<p>The level description is a sequence of rows where each row describe
an object. You can input as many objects as you want but the maximum
number of objects handled by the program is 333. You can modify this
value by editing the source here:</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a>C<span class="op">[</span><span class="dv">333</span><span class="op">*</span><span class="dv">7</span><span class="op">],</span>d<span class="op">=</span><span class="dv">333</span><span class="op">;</span></span></code></pre></div>
<p>Each row has six columns:</p>
<ol type="1">
<li><code>Screen X</code> : <code>x</code> position of the object in the
level.</li>
<li><code>Screen Y</code> : <code>y</code> position of the object in the
level.</li>
<li><code>Sprite</code> : <code>id</code> of the sprite to be used for
the object.</li>
<li><code>CLASSFLAGS</code> : a bitmask that describe how the object
behaves.</li>
<li><code>CLASSPARAM0</code>: a parameter that depends on
<code>CLASSFLAGS</code>.</li>
<li><code>CLASSPARAM1</code>: a parameter that depends on
<code>CLASSFLAGS</code>.</li>
</ol>
<p><code>CLASSFLAGS</code> must be a combination (bitwise OR) of some of
these constants:</p>
<ul>
<li><p><code>ENEMY</code> (<code>1</code>)</p>
<pre><code> An enemy. CLASSPARAM0 can be 0 if the enemies don&#39;t move, 1 if the
initial move direction is right, -1 if that direction is left. All
enemies that walk will change their direction after 20 steps. The
sprite of an enemy must have 2 other adjacent sprites: SPRITE-1,
used when the enemy dies, and SPRITE+1, used when it moves.</code></pre></li>
<li><p><code>BLOCK</code> (<code>2</code>)</p>
<pre><code> A wall. Player can walk over the object but can not pass through it.</code></pre></li>
<li><p><code>OBJECT BLOCK</code> (<code>4</code>)</p>
<pre><code> When the player hits the object from below, a new object is created.
CLASSFLAGS of the new object is defined in CLASSPARAM0. The sprite
used for the new object is defined in CLASSPARAM1. The sprite of the
new object must have an adjacent sprite: SPRITE+1, used when the
block is hit.</code></pre></li>
<li><p><code>POWERUP</code> (<code>8</code>)</p>
<pre><code> This is a power-up like the classic Mario mushroom. When the
character hits the power-up object, the character becomes the Super
character. If CLASSFLAGS has the bit ZOOM, the character height will
be doubled. The Super character can hit the enemies without dying,
but when this happens, the Super character goes back to being
normal.</code></pre></li>
<li><p><code>END</code> (<code>16</code>)</p>
<pre><code> When the player hits this object the level ends; the player wins.</code></pre></li>
<li><p><code>ZOOM</code> (<code>32</code>)</p>
<pre><code> This flag can be used with POWERUP to indicate a power-up that
will double the size of the player (like the Mario mushroom).</code></pre></li>
<li><p><code>DESTROY</code> (<code>64</code>)</p>
<pre><code> When the player hits the object (e.g. the classic Mario coin) the
object disappears but the engine does not count the points, so,
from the player point of view, this object is useless.</code></pre></li>
<li><p><code>DESTROYUP</code> (<code>128</code>)</p>
<pre><code> This object is like a BLOCK but when the player hits the object
from below, the object disappears.</code></pre></li>
</ul>
<p>If <code>CLASSFLAGS</code> is <code>0</code> the object only has an
aesthetic function.</p>
<p>The last row of the level descriptor must have all its columns set
equal to <code>-1</code>.</p>
<h3 id="limitations">Limitations</h3>
<p>Some classical features are missing: throwing objects, shooting,
multiple lives, score tracking. You can add those features if you
want!</p>
<p>The program allows only one level. It’s easy to add a menu and
multiple levels but the size of the engine would too big for the
contest.</p>
<p>When the <code>Super character</code> becomes bigger
(<code>ZOOM</code> flag), the character can collide with blocks and get
stuck inside them. This is a KNOWN BUG. When your player become bigger,
stay away from blocks!</p>
<p>There’s only one audio track (game effects are missing).</p>
<h3 id="credits">Credits</h3>
<p>Some of the sprites used in the examples are identical to those of
the original games; the others were designed by me.</p>
<p>The music used in the examples have been <a
href="https://en.wikipedia.org/wiki/Sample-rate_conversion">resampled</a>,
starting from the original versions for the <a
href="http://en.wikipedia.org/wiki/Amiga">Commodore Amiga</a> and <a
href="http://en.wikipedia.org/wiki/Nintendo_Entertainment_System">Nintendo
NES</a>.</p>
<p><a href="http://en.wikipedia.org/wiki/Super_Mario_Bros.">Super Mario
Bros</a> is a game created by <a
href="https://en.wikipedia.org/wiki/Nintendo">Nintendo Co., Ltd</a>. My
use of the <a
href="https://en.wikipedia.org/wiki/Sprite_(computer_graphics)">sprites</a>
does not intend to infringe the <a
href="https://en.wikipedia.org/wiki/Intellectual_property">intellectual
property</a> of Nintendo but only demonstrates the operation of the
program. From my point of view this is a tribute to the legendary game
<a href="http://en.wikipedia.org/wiki/Super_Mario_Bros.">Super Mario
Bros</a>!</p>
<p><a href="http://en.wikipedia.org/wiki/The_Great_Giana_Sisters">The
Great Giana Sisters</a> is the game created by <a
href="https://www.ign.com/games/producer/time-warp-productions">Time
Warp Productions</a> and my justification for the sprites for Mario are
the same for this game. Long live <a
href="http://en.wikipedia.org/wiki/The_Great_Giana_Sisters">The Great
Giana Sisters</a> !! :)</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-2014maffiodo1"><a name="inventory"></a>Inventory
for 2014/maffiodo1</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/2014/maffiodo1/prog.c">prog.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo1/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo1/prog.orig.c">prog.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo1/giana.sh">giana.sh</a>
- demonstrate with The Great Giana Sisters</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo1/mario.sh">mario.sh</a>
- demonstrate with Super Mario Brothers</li>
<li><a href="screenshot-giana.png">screenshot-giana.png</a> - gameplay
screenshot</li>
<li><a href="screenshot-mario.png">screenshot-mario.png</a> - gameplay
screenshot</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo1/giana.level">giana.level</a>
- game level data</li>
<li><a href="giana8.wav">giana8.wav</a> - sound file for game</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo1/mario.level">mario.level</a>
- game level data</li>
<li><a href="mario8.wav">mario8.wav</a> - sound file for game</li>
<li><a href="2014_maffiodo1.tar.bz2">2014_maffiodo1.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/2014/maffiodo1/.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/2014/maffiodo1/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo1/README.md">README.md</a>
- markdown source for index.html</li>
<li><a href="giana.rgba">giana.rgba</a> - raw RGBA image</li>
<li><a href="mario.rgba">mario.rgba</a> - raw RGBA image</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%2F2014%2Fmaffiodo1%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 -->
+250 -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,262 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 2014/maffiodo2/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>2014 maffiodo2</title>
<meta name="description" content="IOCCC year: 2014 IOCCC winner: maffiodo2 winner index page">
<meta name="keywords" content="IOCCC,2014,maffiodo2,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>2014/maffiodo2</title>
<meta name="description" content="2014 IOCCC winner maffiodo2">
<meta name="keywords" content="IOCCC, 2014, IOCCC 2014, IOCCC winner, maffiodo2">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>2014 maffiodo2</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>2014/maffiodo2</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%2F2014%2Fmaffiodo2%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2014/maffiodo2/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../maffiodo1/index.html">&larr; maffiodo1</a>
<a class="Left" href="../index.html">&uarr; 2014 &uarr;</a>
<a class="Left" href="../morgan/index.html">morgan &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#Sandro_Maffiodo">Sandro
Maffiodo</a><br> Location: <a
href="/temp-test-ioccc/location.html#IT">IT</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></span></code></pre></div>
<p>There is a 121 byte version provided by the author. See <a
href="#alternate-code">Alternate code</a> 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#2014-maffiodo2">2014 maffiodo2 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">./prog</span> arg</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="ex">./try.sh</span></span></code></pre></div>
<h2 id="alternate-code">Alternate code:</h2>
<p>This shorter version is provided by the author. It has a fixed ramp
and so not as fun but it’s 121 bytes instead of 140.</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>
<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="fu">cat</span> image.rgb <span class="kw">|</span> <span class="ex">./prog.alt</span></span></code></pre></div>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>On the face of it :-) given what this program does one might wonder
what makes this winner special. But when you realize the source is small
enough for posting to social media that has a small size limit.</p>
<p>Who will be the first to tweet this source? How many re-tweets will
such tweet get? And how many people will really understand the
tweet?</p>
<p>Judges’ 2023 update: Last year we would have referred to a <a
href="https://en.wikipedia.org/wiki/Mastodon_(social_network)#Comparison_to_Twitter">toot</a>,
as in a <a href="https://fosstodon.org/@ioccc">Mastodon</a>
<em>toot</em>. This year we might have mentioned the term <a
href="https://www.itechpost.com/articles/115087/20221116/mastodon-officially-replaced-toot-publish.htm">publish</a>
although we remain fond of the <a
href="https://gizmodo.com/mastodon-toot-retired-twitter-tweet-equivalent-1849786221">historic
Mastodon term, toot</a>.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="remarks">Remarks</h3>
<p>This program convert an image to an ASCII ART. The program reads a
raw RGB image from <code>stdin</code> and print the ASCII ART to
<code>stdout</code>.</p>
<p>The build process will raise some warnings about:</p>
<ul>
<li>declaration specifier missing, defaulting to ‘int’</li>
<li>implicitly declaring library function</li>
</ul>
<p>The program will crash if run without parameters.</p>
<h3 id="screen-size">Screen size</h3>
<p>If you have a terminal geometry than is different from the common
80x25 you can modify the <em>output width</em> by changing the value of
the first variable:</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>d<span class="op">=</span><span class="dv">80</span><span class="op">,</span></span></code></pre></div>
<h3 id="something-to-try">Something to try</h3>
<p>Type this:</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cat</span> image.rgb <span class="kw">|</span> <span class="ex">./prog</span> <span class="st">&quot; .:;Y0&quot;</span></span></code></pre></div>
<p>You can use your own image. Convert the image to a raw RGB image.
Using ImageMagick it’s very simple:</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="ex">convert</span> <span class="at">-geometry</span> 80x source.jpg image.rgb</span></code></pre></div>
<p>This program require one parameter or it will crash. The parameter of
the program is the <em>conversion ramp</em>. You can use different ramps
or create your own (for example using some letters of your name).</p>
<p>These are some ramps you can try:</p>
<div class="sourceCode" id="cb10"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> <span class="st">&quot; :1&quot;</span></span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> <span class="st">&quot; .:;Y0&quot;</span></span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> <span class="st">&quot; .:-=+*#%@&quot;</span></span>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> <span class="st">&quot; .,:!-iots&amp;8%#@$&quot;</span></span></code></pre></div>
<h3 id="byte-version">121 byte version</h3>
<p>An alternative version of this program is only 121bytes long:</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a>d<span class="op">=</span><span class="dv">80</span><span class="op">,</span>e<span class="op">,</span>j<span class="op">;</span>g<span class="op">(){</span>j<span class="op">+=</span>getchar<span class="op">();}</span>main<span class="op">(){</span><span class="cf">for</span><span class="op">(;;){</span>j<span class="op">=</span><span class="dv">0</span><span class="op">;</span>g<span class="op">();</span><span class="cf">if</span><span class="op">(</span>j<span class="op">&lt;</span><span class="dv">0</span><span class="op">)</span><span class="cf">break</span><span class="op">;</span>g<span class="op">(</span>g<span class="op">());</span>putchar<span class="op">(</span><span class="st">&quot; .:#@&quot;</span><span class="op">[</span>j<span class="op">/</span><span class="dv">3</span><span class="op">*</span><span class="dv">5</span><span class="op">&gt;&gt;</span><span class="dv">8</span><span class="op">]);</span><span class="cf">if</span><span class="op">(!(++</span>e<span class="op">%</span>d<span class="op">))</span>puts<span class="op">(</span><span class="st">&quot;&quot;</span><span class="op">);}}</span></span></code></pre></div>
<p>This alternative version has a <strong>fixed ramp</strong>. It’s
smaller but it’s not so fun to use…</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-2014maffiodo2"><a name="inventory"></a>Inventory
for 2014/maffiodo2</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/2014/maffiodo2/prog.c">prog.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo2/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo2/prog.alt.c">prog.alt.c</a>
- alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo2/prog.orig.c">prog.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo2/try.sh">try.sh</a>
- how to run</li>
<li><a href="2014_maffiodo2.tar.bz2">2014_maffiodo2.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/2014/maffiodo2/.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/2014/maffiodo2/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/maffiodo2/README.md">README.md</a>
- markdown source for index.html</li>
<li><a href="image.rgb">image.rgb</a> - sample input in the form of a
raw RGB image</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%2F2014%2Fmaffiodo2%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 -->
+235 -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,247 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 2014/morgan/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>2014 morgan</title>
<meta name="description" content="IOCCC year: 2014 IOCCC winner: morgan winner index page">
<meta name="keywords" content="IOCCC,2014,morgan,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>2014/morgan</title>
<meta name="description" content="2014 IOCCC winner morgan">
<meta name="keywords" content="IOCCC, 2014, IOCCC 2014, IOCCC winner, morgan">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>2014 morgan</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>2014/morgan</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%2F2014%2Fmorgan%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2014/morgan/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../maffiodo2/index.html">&larr; maffiodo2</a>
<a class="Left" href="../index.html">&uarr; 2014 &uarr;</a>
<a class="Left" href="../sinon/index.html">sinon &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#Yves-Marie_Morgan">Yves-Marie
Morgan</a><br> Location: <a
href="/temp-test-ioccc/location.html#FR">FR</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></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">./prog</span> [arg ..]</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>Think of this as a Maker Faire’s make. :-)</p>
<p>It works reasonably well. While not super ultra-featured, it does
fair well with the Makefile we supplied. Not only that, it helped
uncover a bug we had in our special Makefile rules.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="remarks">Remarks</h3>
<p>This program is a tiny <code>make(1)</code> clone.</p>
<p>It is able to parse a subset of the <code>make(1)</code> syntax and
will execute rules for goals given in arguments if they need to (based
on timestamp of dependencies of rule targets).</p>
<h2 id="supported-features">Supported features</h2>
<ul>
<li>Variable assignments (only recursive ones). Variable references with
recursion.</li>
<li>Environment variables are available.</li>
<li>It is possible to specify variables in command line:
<code>name=value</code>.</li>
<li>Variables given in command line will have precedence over variables
defined in Makefile, which will have precedence over environment
variables.</li>
<li>If no target given in command line, the first target defined will be
used.</li>
<li>Comments, escaped comments, escaped new lines.</li>
</ul>
<p>It should be able to build programs of previous years with the
provided <code>Makefile</code> found in previous contest archives.
Simply use this program instead of <code>make</code>. It will
recursively use itself for sub-make (the <code>MAKE=</code> assignment
inside <code>Makefile</code> will be ignored to continue using
itself).</p>
<h2 id="limitations-known-issues">Limitations / Known issues</h2>
<ul>
<li>There are a lot of memory leaks (not a single free).</li>
<li>The opened file is not closed.</li>
<li>The input file shall be named <code>Makefile</code>.</li>
<li>No diagnostic message, but the exit status is non zero to indicates
failure (failed command in a rule or missing target).</li>
<li>Only <code>$&lt;</code> and <code>$@</code> are supported for
automatic variables in commands.</li>
<li>No parallel execution (<code>-j</code> option).</li>
<li>No <code>:=</code> <code>+=</code> <code>?=</code> syntax for
variable assignment.</li>
<li>No built-in function available.</li>
<li>No pattern targets.</li>
<li>No pattern substitution variables.</li>
<li>No built-in rules.</li>
<li>No built-in variables (except the one from environment).</li>
<li>No conditional directives.</li>
</ul>
<h3 id="compilation-warnings">Compilation warnings</h3>
<p>With gcc 4.8.2 on Linux Ubuntu 14.04 64-bit :</p>
<pre><code>prog.c:22:15: warning: return makes integer from pointer without a cast [enabled by default]
prog.c:23:72: warning: signed and unsigned type in conditional expression [-Wsign-compare]
prog.c:12:11: warning: suggest parentheses around ‘&amp;&amp;’ within ‘||’ [-Wparentheses]</code></pre>
<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-2014morgan"><a name="inventory"></a>Inventory for
2014/morgan</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/2014/morgan/prog.c">prog.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/morgan/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/morgan/prog.orig.c">prog.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/morgan/try.sh">try.sh</a>
- how to run</li>
<li><a href="2014_morgan.tar.bz2">2014_morgan.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/2014/morgan/.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/2014/morgan/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/morgan/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%2F2014%2Fmorgan%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 -->
+258 -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,270 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 2014/sinon/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>2014 sinon</title>
<meta name="description" content="IOCCC year: 2014 IOCCC winner: sinon winner index page">
<meta name="keywords" content="IOCCC,2014,sinon,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>2014/sinon</title>
<meta name="description" content="2014 IOCCC winner sinon">
<meta name="keywords" content="IOCCC, 2014, IOCCC 2014, IOCCC winner, sinon">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>2014 sinon</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>2014/sinon</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%2F2014%2Fsinon%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2014/sinon/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../morgan/index.html">&larr; morgan</a>
<a class="Left" href="../index.html">&uarr; 2014 &uarr;</a>
<a class="Left" href="../skeggs/index.html">skeggs &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#Don_Yang">Don Yang</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></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">cp</span> <span class="at">-f</span> prog.c run.c<span class="kw">;</span> <span class="ex">./hecate.sh</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>
<p>This script will ask you if you wish to try again after each run.
Type in any character other than <code>y</code> or <code>Y</code> to
exit at this point.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Try to figure out how this entry determines the optimization level
with which it had been compiled. Is this an example of undefined
behavior or unspecified behavior?</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="summary">Summary</h3>
<p>Sinon is a game of timing, the goal is to eliminate all enemies in
under one minute.</p>
<p>To start, compile and run the program. To resume, compile and run the
output repeatedly until you have won/lost the game. For example:</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">cp</span> prog.c run.c</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="at">-O0</span> run.c <span class="at">-o</span> run <span class="kw">&amp;&amp;</span> <span class="ex">./run</span> <span class="kw">|</span> <span class="fu">tee</span> run.c</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="at">-O2</span> run.c <span class="at">-o</span> run <span class="kw">&amp;&amp;</span> <span class="ex">./run</span> <span class="kw">|</span> <span class="fu">tee</span> run.c</span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="ex">...</span></span></code></pre></div>
<h3 id="details">Details</h3>
<p>Sinon is played by compiling and running the output repeatedly. Two
factors determine what actions are taken:</p>
<ul>
<li>Time since last compilation.</li>
<li>Whether compiler optimizations are enabled or not.</li>
</ul>
<p>If you fire too quickly, the weapon will jam. If you fire too slowly,
you will not be able to eliminate all the enemies in time. Thus the
primary objective of the game is to time your compilations just
right.</p>
<p>Sinon has two weapons that are selected based on compiler
optimization level:</p>
<ul>
<li><p>“gcc -O2” or “clang -O2” will fire Hecate II, a powerful rifle
that requires longer time to cool off.</p></li>
<li><p>“gcc -O0” or “clang -O0” will fire Glock 18C, a less powerful
pistol that requires less time to cool off.</p></li>
</ul>
<p>Because the weapons cool off independently, the best strategy is to
alternate between the two weapons. It is fairly easy to win the game
with this strategy even with occasional jams.</p>
<p>If your compiler does not have the right optimizations, only Glock
18C would be available. It is still possible to win, but your timing
will need to be more precise. This is effectively playing the game on
“hard” mode. It is worth trying this mode even if you have the right
compilers.</p>
<h3 id="compatibility">Compatibility</h3>
<p>Sinon has been tested and verified to work on these platforms:</p>
<ul>
<li>gcc 4.4.3 on Linux.</li>
<li>gcc 4.4.5 on Linux.</li>
<li>gcc 4.8.2 on Linux.</li>
<li>gcc 4.8.3 on Cygwin/MingW.</li>
<li>clang 3.4-1 on Linux.</li>
<li>clang 3.4.2 on Cygwin.</li>
<li>gcc 4.3.5 on JS/Linux (playable but likely unwinnable, because it
takes too long to compile).</li>
<li>tcc 0.9.25 on JS/Linux (no optimization, so only “hard” mode is
available).</li>
</ul>
<p>Sinon is intended to be played in a 80x25 terminal.</p>
<h3 id="miscellaneous-features">Miscellaneous features</h3>
<p>Sinon might be the first game that uses compiler optimization level
as a primary input.</p>
<p>Sinon has a demo mode that plays the game automatically. Make sure
that there are no files named “run” and “run.c” in current directory
(they will be overwritten) and run:</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">perl</span> prog.c <span class="kw">|</span> <span class="fu">bash</span></span></code></pre></div>
<p>File size and CRC32 of <a href="prog.c">prog.c</a> are embedded in
line 7.</p>
<p>Process for making Sinon is included in <a
href="spoiler.html">spoiler.html</a>.</p>
<p>Layout of this code is based on Asada Shino, also known as “Sinon”,
from Sword Art Online.</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-2014sinon"><a name="inventory"></a>Inventory for
2014/sinon</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/2014/sinon/prog.c">prog.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/sinon/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/sinon/prog.orig.c">prog.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/sinon/glock.sh">glock.sh</a>
- how to run</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/sinon/hecate.sh">hecate.sh</a>
- how to run</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/sinon/try.sh">try.sh</a>
- how to run</li>
<li><a href="spoiler.html">spoiler.html</a> - SPOILER WARNING</li>
<li><a href="2014_sinon.tar.bz2">2014_sinon.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/2014/sinon/.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/2014/sinon/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/sinon/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%2F2014%2Fsinon%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 -->
+352 -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,364 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 2014/skeggs/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>2014 skeggs</title>
<meta name="description" content="IOCCC year: 2014 IOCCC winner: skeggs winner index page">
<meta name="keywords" content="IOCCC,2014,skeggs,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>2014/skeggs</title>
<meta name="description" content="2014 IOCCC winner skeggs">
<meta name="keywords" content="IOCCC, 2014, IOCCC 2014, IOCCC winner, skeggs">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>2014 skeggs</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>2014/skeggs</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%2F2014%2Fskeggs%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2014/skeggs/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../sinon/index.html">&larr; sinon</a>
<a class="Left" href="../index.html">&uarr; 2014 &uarr;</a>
<a class="Left" href="../vik/index.html">vik &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#Cel_Skeggs">Cel Skeggs</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></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">./prog</span></span></code></pre></div>
<p>HINT: Try pressing the left and right arrow keys as needed. Also try
pressing space/enter to select options. Pressing Q or Escape may end the
fun before you are ready. :-)</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>When the code looks like lemons, it is probably because the
LEMONPEOPLE, or at least the LEMONLORD was involved. :-)</p>
<p>Look at some of the C pre-processor macros in the source code. Ask
yourself why C source is being passed as arguments to some of those
macros.</p>
<p>Now you may observe, while it is running, that some C source code is
being written to a file and then compiled. And yet that compiled code is
somehow executed from <code>main()</code>. But how? How is
<code>main()</code> able to call code that was written and compiled just
in time for execution?</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="table-of-contents">TABLE OF CONTENTS</h3>
<ul>
<li>Backstory</li>
<li>Known compiler warnings</li>
<li>Obfuscation</li>
<li>Troubleshooting guide (IMPORTANT!)</li>
<li>Q&amp;A</li>
</ul>
<h3 id="backstory">BACKSTORY</h3>
<p>It was ten yours ago when THE LEMONPEOPLE invaded, juicing all in
their path.</p>
<p>Attempting to free the Earth from their tyranny, you have endured
pulpy and sour battles.</p>
<p>This has now culminated in you reaching the throne room of THE
LEMONLORD.</p>
<p>Armed with your right-facing curly brace, you charge into battle.</p>
<p>(Use left and right arrow keys and space/enter to select options.
Press Q or Escape to quit.)</p>
<h3 id="known-compiler-warnings">KNOWN COMPILER WARNINGS</h3>
<p>Unfortunately, it became very difficult to get this entry to fit
within the size requirements. It’s currently at 2052 according to <a
href="../iocccsize.c">iocccsize</a>, and 3994 according to
<code>wc -c</code>.</p>
<p>The current size is a third to a half of the original size before
compression.</p>
<p>Due to this, it does LOTS of things that subtly annoy compilers!</p>
<ul>
<li><ol start="10" type="1">
<li>data argument not used by format string</li>
</ol>
<p>This occurs because some of the <code>fprintf(3)</code> invocations
don’t use all their parameters. The program should still work
fine!</p></li>
<li><ol type="1">
<li>using the result of an assignment as a condition without
parentheses</li>
</ol>
<p>Somewhere, I needed to set a variable and then branch on the result.
The shortest way was to combine them. Some self-proclaimed “EXPERTS”
think this is a bad programming practice, but what do they know?
:P</p></li>
<li><ol type="1">
<li>implicit declaration of function ‘time’ is invalid in C99</li>
</ol>
<p>An <code>#include</code> statement is expensive, and I’m
broke.</p></li>
<li><ol type="1">
<li>control may reach end of non-void function</li>
</ol>
<p>Turns out that sometimes, a <code>return</code> statement is too
much. This will never actually occur, but some C compilers think they
know more about my program than I do! :P</p></li>
<li><p>(?) Under some systems, <code>-fPIC</code> is irrelevant for
shared libraries. If so, you should remove it from the
Makefile.</p></li>
</ul>
<h2
id="obfuscation-what-obfuscation-this-is-a-perfectly-normal-c-program">OBFUSCATION?
WHAT OBFUSCATION? THIS IS A PERFECTLY NORMAL C PROGRAM!</h2>
<h1 id="the-cool-part">THE COOL PART</h1>
<p>Take a close look at how it works. Notice that it’s passing C code to
certain macros…</p>
<p>Guess what? It’s a very simple kind of JIT compiler, though not used
as deeply as would be cool.</p>
<p>Essentially, it generates C code at runtime, dumps it to a file, and
then runs a C compiler on that file, telling the C compiler to generate
a shared library. Then it loads the shared library with
<code>dlopen(3)</code>, and…</p>
<p>Ignores the result?</p>
<p>That can’t be right.</p>
<p>Well, it is. Instead of using <code>dlsym(3)</code> like a normal
programmer, I mark one of the generated functions with
<code>__attribute__((constructor))</code>. This means that it gets
called immediately on load, so it can make its functions available.</p>
<p>But wait - how can it link into the main program, either? It has no
way to reference anything in the main executable!</p>
<p>But it does: I’m injecting certain addresses into the generated code,
which it then casts to pointers and accesses! It uses this to make
certain functions available to the main program, so the main program’s
generated code will then enter itself where it’s needed.</p>
<h1 id="the-not-so-cool-part">THE NOT-SO-COOL PART</h1>
<p>There are also lots of <code>#defines</code>.</p>
<p>No, these are not obfuscation. These are compression.</p>
<p>There is a little bit of obfuscation gained from using the
stringification operator. (I can never remember what it’s actually
called, but it’s the <code>#</code> operator in a preprocessor macro) -
this allows me to pass C code in arguments to the macros, meaning that
it gets interpreted as C code instead of a string by the <a
href="../iocccsize.c">iocccsize</a> tool, so it gets counted as smaller!
:D</p>
<h1 id="a-slightly-cool-part">A SLIGHTLY COOL PART</h1>
<p>As part of the JIT compiling, the program hides the fact that it
needs ncurses: it just links ncurses with one of the generated shared
libraries, and then can access the contents of the ncurses library!</p>
<h1 id="wait-what">WAIT WHAT</h1>
<p>Also, note where functions start and end…</p>
<p>I’ve messed with the syntax so that it’s not actually formatted
properly. It almost looks like it is, but it isn’t.</p>
<p>This isn’t significant obfuscation as long as you run it through a C
source code beautifier.</p>
<p>But wait… if you aren’t careful, running it through a C source code
beautifier won’t work. Remember how I’m interlacing generated C code
with actual C code? Note that this WRECKS some beautifiers. I hope you
have a good one!</p>
<p>(There’s an obvious way around this but I’m not going to spell it out
for you. That’d be too easy!)</p>
<h3 id="miscellaneous-stuff">MISCELLANEOUS STUFF</h3>
<p>Do note that there are some other miscellaneous obfuscations, but
they should be easy to understand once you figure out the ones
above.</p>
<h3 id="troubleshooting-guide">TROUBLESHOOTING GUIDE</h3>
<p>This program is a very easy program to cause to fail!</p>
<p>Some things to check</p>
<ul>
<li><p>On line 16, where it says <code>%cinclude "prog.c"</code>, is
<code>prog.c</code> the name of the original source code file?</p></li>
<li><p>Do you have ncurses installed?</p></li>
<li><p>Does your system have <code>ncurses.h</code> (like a nice system)
or <code>ncurses/ncurses.h</code> (like a rude system) ?</p>
<p>If it’s the latter (or some other path), you’ll need to update line
97.</p>
<p>(I had to do this under Cygwin.)</p></li>
<li><p>Does your system need <code>-fPIC</code> (or other arcane
invocations) to compile a shared library? If so, make sure that you
include it in the <code>-DCC</code> argument in the build
script.</p></li>
<li><p>Does your system have a vague dislike for <code>-fPIC</code>?
(Like Cygwin.) You might need to remove it from the build
script.</p></li>
<li><p>Does your system support
<code>__attribute__((constructor))</code>? It needs to.</p></li>
<li><p>Check the file <code>err</code>. Maybe it will help you figure
out why a runtime- generated program failed. The failing program should
be found in <code>t.c</code>.</p></li>
<li><p>Can’t run a beautifier on the source code? I’m not going to help
you there.</p></li>
</ul>
<p>I’ve tested it on the following platforms, in case you need to try it
on one:</p>
<ul>
<li>64-bit Windows 7 32-bit Cygwin with gcc 4.8.2 and standards c89,
c90, c99, and c11. Note that the program ran as 32-bit due to the
version of cygwin.</li>
<li>64-bit Arch Linux with gcc 4.9.1 and standards c89, c90, c99,
c11.</li>
<li>64-bit Arch Linux with clang 3.5.0 and standards c89 and c11.</li>
</ul>
<p>I ran out of time to test it on more systems.</p>
<h3 id="qa">Q&amp;A</h3>
<ul>
<li><p>Who am I?</p>
<p>Yes.</p></li>
<li><p>Why doesn’t your program require a pet fish license?</p>
<p>THE LEMONLORD’s pet LEMONFISH was not rendered in the game, and so
does not require a pet fish license.</p></li>
<li><p>Was this inspired by anything?</p>
<p>Yes, this was inspired by a minigame from an open-source codebase of
Space Station 13. I didn’t, however, look at the minigame at all during
the development of this entry.</p></li>
<li><p>What’s the length of this README file according to the <a
href="../iocccsize.c">iocccsize</a> tool?</p>
<p>$ ./iocccsize -i &lt; README.md 6057</p></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-2014skeggs"><a name="inventory"></a>Inventory for
2014/skeggs</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/2014/skeggs/prog.c">prog.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/skeggs/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/skeggs/prog.orig.c">prog.orig.c</a>
- original source</li>
<li><a href="2014_skeggs.tar.bz2">2014_skeggs.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/2014/skeggs/.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/2014/skeggs/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/skeggs/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%2F2014%2Fskeggs%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 -->
+242 -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,254 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 2014/vik/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>2014 vik</title>
<meta name="description" content="IOCCC year: 2014 IOCCC winner: vik winner index page">
<meta name="keywords" content="IOCCC,2014,vik,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>2014/vik</title>
<meta name="description" content="2014 IOCCC winner vik">
<meta name="keywords" content="IOCCC, 2014, IOCCC 2014, IOCCC winner, vik">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>2014 vik</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>2014/vik</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%2F2014%2Fvik%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2014/vik/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../skeggs/index.html">&larr; skeggs</a>
<a class="Left" href="../index.html">&uarr; 2014 &uarr;</a>
<a class="Left" href="../wiedijk/index.html">wiedijk &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#Daniel_Vik">Daniel Vik</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></span></code></pre></div>
<p>There is an alternate version that will theoretically work with
Windows compilers (if anything in Windows works :-) ). See the <a
href="#alternate-code">Alternate code</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: known bug - please help us fix</code></pre>
<p>For more detailed information see <a href="/bugs.md#2014-vik">2014
vik 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">./prog</span> <span class="op">&gt;</span> foo.c</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> <span class="st">&#39;Want to hear me beep?&#39;</span> <span class="kw">|</span> <span class="ex">./prog</span> <span class="op">&gt;</span> audio_file.raw</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="bu">echo</span> <span class="st">&#39;No. I want chocolate!&#39;</span> <span class="kw">|</span> <span class="ex">./prog</span> <span class="kw">|</span> <span class="ex">mplayer</span> <span class="at">-demuxer</span> rawaudio <span class="at">-</span></span></code></pre></div>
<h2 id="alternate-code">Alternate code:</h2>
<p>The alternate code, <a href="prog.alt.c">prog.alt.c</a>, is based on
the author’s instructions on how to get it to work with Windows.</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>prog.alt</code> as you would <code>prog</code> above as
well as below.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This program sets a new tone for obfuscation. But do you understand
what it says about obfuscation? Perhaps:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> <span class="op">&lt;</span> prog.c <span class="op">&gt;</span> prog.raw</span></code></pre></div>
<p>might speak to your coding style? If not, then perhaps:</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">./prog</span> <span class="op">&lt;</span> README.md <span class="kw">|</span> <span class="ex">mplayer</span> <span class="at">-demuxer</span> rawaudio <span class="at">-</span></span></code></pre></div>
<p>might help? :-)</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="remarks">Remarks</h3>
<p>This program converts ASCII text to Morse audio file and vice versa.
As far as I can tell, there are at least six chocolate references in
this program.</p>
<p>This program can convert text to Morse to a raw 44.1kHz stereo audio
file. Via streaming to <code>mplayer(1)</code>, you can listen to the
Morse audio.</p>
<p>Don’t forget the last ‘<code>-</code>’ as it makes
<code>mplayer(1)</code> read from <code>stdin</code>.</p>
<h2 id="convert-audio-file-with-morse-signals-to-text">Convert audio
file with Morse signals to text</h2>
<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">./prog</span> e <span class="op">&lt;</span> audio_file.raw</span></code></pre></div>
<p>or alternatively pass a .wav file as input.</p>
<p>The preferred input format 44.1kHz stereo, but it does a decent job
on mono input and different frequencies as well.</p>
<h3 id="portability">Portability</h3>
<p>The program is portable to most platforms. The only system dependency
is that the program relies on writing binary data to
<code>stdout</code>.</p>
<p>Microsoft compilers add a carriage return to newlines, and to compile
the program with this platform, the following line can be added to
<code>main()</code> before any code in order for the program to run
correctly:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a>_setmode<span class="op">(</span>_fileno<span class="op">(</span>stdout<span class="op">),</span> <span class="bn">0x8000</span><span class="op">);</span></span></code></pre></div>
<p>NOTE: see the <a href="prog.alt.c">alternate code</a> for this.</p>
<h3 id="known-issues">Known Issues</h3>
<p>The program uses a quite simple algorithm for detecting tone on and
off events in the Morse signal. Hence the program does not work well
with noisy input signals. I have tested it with several samples of man
made Morse recordings as well as computer generated ones.</p>
<p>Generally, any recording from ham radio transmissions does not decode
due to noise and echoes. Other man made recordings may decode, but some
characters can be incorrect due to too big variation in length of tones
and pauses. However I found some man made recordings on that decode
reasonable well.</p>
<p>If a recording doesn’t decode, you could try to pre-process the input
with a narrow bandpass filter on the frequency of the transmission.</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-2014vik"><a name="inventory"></a>Inventory for
2014/vik</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/2014/vik/prog.c">prog.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/vik/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/vik/prog.alt.c">prog.alt.c</a>
- alternative source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/vik/prog.orig.c">prog.orig.c</a>
- original source</li>
<li><a href="2014_vik.tar.bz2">2014_vik.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/2014/vik/.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/2014/vik/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/vik/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%2F2014%2Fvik%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 -->
+229 -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,241 @@
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- -->
<!-- file: 2014/wiedijk/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>2014 wiedijk</title>
<meta name="description" content="IOCCC year: 2014 IOCCC winner: wiedijk winner index page">
<meta name="keywords" content="IOCCC,2014,wiedijk,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>2014/wiedijk</title>
<meta name="description" content="2014 IOCCC winner wiedijk">
<meta name="keywords" content="IOCCC, 2014, IOCCC 2014, IOCCC winner, wiedijk">
</head>
<!-- END: this line ends content from: inc/head.default.html -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<h1>2014 wiedijk</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>2014/wiedijk</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%2F2014%2Fwiedijk%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/2014/wiedijk/index.html</a></p>
<!-- End Nu Html Checker -->
<div class="topnav">
<a class="Left" href="../vik/index.html">&larr; vik</a>
<a class="Left" href="../index.html">&uarr; 2014 &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#Freek_Wiedijk">Freek Wiedijk</a><br>
Location: <a href="/temp-test-ioccc/location.html#NL">NL</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></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">./prog</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>
<p>By default that will use <code>indent(1)</code> found by the shell
<code>type -P indent</code> and <code>sed(1)</code> found by the shell
<code>type -P sed</code> but if you want to change these, say to try a
different beautifier, you can do it like:</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="va">INDENT</span><span class="op">=</span>bcpp <span class="ex">./try.sh</span></span></code></pre></div>
<p>which would change it to use <code>bcpp(1)</code> instead of
<code>indent(1)</code>. Do similar for <code>sed(1)</code> only use the
name <code>SED</code>.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>C11 features definitely help this entry to be as concise as it
is.</p>
<p>The judges would like to think that they had almost understood how
this entry works.</p>
<p>If you win a bet by demonstrating this entry, please let us know.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="remarks">Remarks</h3>
<ul>
<li>Computes the factorial function.</li>
<li>No loops, no explicit recursion.</li>
<li>Untyped C without any casts, using a <code>w</code> word
datatype.</li>
<li>Varargs not essential, <code>w(*)(w,w*)</code> works just as
well.</li>
<li>Conforming to ISO C.</li>
<li>No warnings when compiled with
<code>-std=c99 -Wall -Wextra -pedantic</code>.</li>
<li>Comments in the code explain what this really is about.</li>
<li>C as a functional programming language: untyped lambda calculus
compiled to executable C functions.</li>
<li>Untagged closures (just a function pointer followed by some
values).</li>
<li>Recursion implemented through Curry’s paradoxical combinator
<code>Y</code>.</li>
<li>The readable implementation of <code>Y</code> is on lines
29-30:</li>
</ul>
<pre><code>W_f = \x.f(xx)
Y = \f.W_f W_f</code></pre>
<ul>
<li>A mixture of strict and lazy evaluation, with a <code>_</code> force
function (John Tromp notes that if Turing’s fixed-point combinator
<code>(\xy.y\z.xxyz)(\xy.y\z.xxyz)</code> had been used, all
applications could have been strict).</li>
<li>Uses <code>Y</code> to implement factorial on native
<code>int</code>s.</li>
<li>10! seconds = 6 weeks.</li>
<li>Answers the <a
href="https://hitchhikers.fandom.com/wiki/42">ultimate question of life,
the universe and everything</a>.</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-2014wiedijk"><a name="inventory"></a>Inventory for
2014/wiedijk</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/2014/wiedijk/prog.c">prog.c</a>
- winning source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/wiedijk/Makefile">Makefile</a>
- winner Makefile</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/wiedijk/prog.orig.c">prog.orig.c</a>
- original source</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/wiedijk/try.sh">try.sh</a>
- how to run</li>
<li><a href="2014_wiedijk.tar.bz2">2014_wiedijk.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/2014/wiedijk/.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/2014/wiedijk/.winner.json">.winner.json</a>
- description of winner in JSON</li>
<li><a
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2014/wiedijk/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%2F2014%2Fwiedijk%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 -->