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:
1 parent
893cd915b6
commit
c1466f5165
350 files changed
+95242
-4217
No files matched your search
+213
-13
@@ -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,225 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1993/ant/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>1993 ant</title>
|
||||
<meta name="description" content="IOCCC year: 1993 IOCCC winner: ant winner index page">
|
||||
<meta name="keywords" content="IOCCC,1993,ant,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>1993/ant</title>
|
||||
<meta name="description" content="1993 IOCCC winner ant">
|
||||
<meta name="keywords" content="IOCCC, 1993, IOCCC 1993, IOCCC winner, ant">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1993 ant</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>1993/ant</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%2F1993%2Fant%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1993/ant/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">↑ 1993 ↑</a>
|
||||
<a class="Left" href="../cmills/index.html">cmills →</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 & (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#Anthony_C_Howe">Anthony C.
|
||||
Howe</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#CA">CA</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: missing file - please provide it</code></pre>
|
||||
<p>For more detailed information see <a href="/bugs.md#1993-ant">1993
|
||||
ant 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">./ant</span> <span class="st">'ERE'</span> [file ...]</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="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>See the author’s POSIX P1003.2-like documentation file <a
|
||||
href="ant.txt">ant.txt</a> for more information.</p>
|
||||
<p>This program demonstrates that POSIX doesn’t guarantee readability.
|
||||
:-)</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>Some of the features of my entry are:</p>
|
||||
<ul>
|
||||
<li>“Lengthy” POSIX.2 style specification and manual :) :)</li>
|
||||
<li>Useful subset of POSIX.2 Extended Regular Expressions.</li>
|
||||
<li>Recursive ERE parser/compiler that generates an NFA railroad.</li>
|
||||
<li>Lazy NFA to DFA evaluation to improve performance speed.</li>
|
||||
<li>Code tested on a variety of platforms.</li>
|
||||
<li>Make driven test script.</li>
|
||||
<li>Can be compiled with ANSI or K&R C.</li>
|
||||
<li>Not a toy, but actually useful and usable on systems that use
|
||||
DOS.</li>
|
||||
<li>See also <a href="ant.txt">ant.txt</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-1993ant"><a name="inventory"></a>Inventory for
|
||||
1993/ant</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/1993/ant/ant.c">ant.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/ant.orig.c">ant.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/ant.txt">ant.txt</a>
|
||||
- ag man page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/ant.test.mk">ant.test.mk</a>
|
||||
- test suite</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/ants.txt">ants.txt</a>
|
||||
- lots of ASCII ants</li>
|
||||
<li><a href="1993_ant.tar.bz2">1993_ant.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/1993/ant/.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/1993/ant/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ant/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%2F1993%2Fant%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 -->
|
||||
+239
-13
@@ -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,251 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1993/cmills/index.html created by: fake.gen_index.sh version: 1.0.5 2023-10-31 -->
|
||||
<html lang="en">
|
||||
<!-- END: this line ends content from: inc/top.default.html -->
|
||||
<!-- -->
|
||||
<!-- This file was formed by the tool: bin/readme2index.sh version: 1.1 2024-01-16 -->
|
||||
<!-- -->
|
||||
<!-- START: this line starts content from: inc/head.default.html -->
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>1993 cmills</title>
|
||||
<meta name="description" content="IOCCC year: 1993 IOCCC winner: cmills winner index page">
|
||||
<meta name="keywords" content="IOCCC,1993,cmills,winner index page">
|
||||
<link rel="stylesheet" href="/temp-test-ioccc/ioccc.css">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>1993/cmills</title>
|
||||
<meta name="description" content="1993 IOCCC winner cmills">
|
||||
<meta name="keywords" content="IOCCC, 1993, IOCCC 1993, IOCCC winner, cmills">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1993 cmills</h1>
|
||||
<!-- END: this line ends content from: inc/body.default.html -->
|
||||
<!-- START: this line starts content from: inc/header.default.html -->
|
||||
|
||||
<p>XXX - fake content until readme2index is working - XXX</p>
|
||||
<div class="header">
|
||||
<img src="/temp-test-ioccc/png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
|
||||
<h1>The International Obfuscated C Code Contest</h1>
|
||||
<h2>1993/cmills</h2>
|
||||
</div>
|
||||
|
||||
<hr style="width:50%;text-align:left;margin-left:0">
|
||||
<!-- END: this line ends content from: inc/header.default.html -->
|
||||
<!-- START: this line starts content from: inc/topnav.mid.html -->
|
||||
|
||||
<!-- Start Nu Html Checker -->
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1993%2Fcmills%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1993/cmills/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../ant/index.html">← ant</a>
|
||||
<a class="Left" href="../index.html">↑ 1993 ↑</a>
|
||||
<a class="Left" href="../dgibson/index.html">dgibson →</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 & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#Christopher_Mills">Christopher
|
||||
Mills</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#US">US</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<p>We recommend you try the alt version first so you can get a better
|
||||
idea of what this entry was like back in 1993. See the <a
|
||||
href="#original-code">original code</a> section below to run the
|
||||
original.</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> alt</span></code></pre></div>
|
||||
<p>NOTE: this entry requires the <code>X11/Xlib.h</code> header file and
|
||||
the X11 library to compile. If you’re under macOS and do not know how to
|
||||
install and use X11 programs see <a href="/faq.md#faq3_7">FAQ 3.7 - How
|
||||
do I compile and use on macOS, an IOCCC winner that requires
|
||||
X11?</a>.</p>
|
||||
<p>To configure how many microseconds to sleep before updates try:</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber SLEEP=200 alt</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: known bug - please help us fix</code></pre>
|
||||
<p>For more detailed information see <a href="/bugs.md#1993-cmills">1993
|
||||
cmills in bugs.md</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="va">DISPLAY</span><span class="op">=</span><span class="st">"your_X_server_display"</span></span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="bu">export</span> <span class="va">DISPLAY</span></span>
|
||||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./cmills.alt</span> <span class="pp">[</span><span class="ss">speed</span><span class="pp">]</span> <span class="co"># must be run on an X11 server</span></span></code></pre></div>
|
||||
<p>where:</p>
|
||||
<p><code>speed</code> is update speed from 1 to 9 (default is 9).</p>
|
||||
<p>NOTE: in most cases <code>DISPLAY</code> should already be set.</p>
|
||||
<h2 id="original-code">Original code:</h2>
|
||||
<p>We recommend the version that uses <code>usleep(3)</code> to more
|
||||
easily see what is going on but you can use the original without any
|
||||
delays if you wish.</p>
|
||||
<h3 id="original-build">Original 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> all</span></code></pre></div>
|
||||
<h3 id="original-use">Original use:</h3>
|
||||
<p>Use <code>cmills</code> as you would <code>cmills.alt</code>
|
||||
above.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>From the San Jose Mercury News (May 15, 1993 page 20A “West Hackers
|
||||
trounce East in computer quiz game”):</p>
|
||||
<pre><code>"Since 1984, a contest has been held on Usenet for the most
|
||||
unreadable, creative, bizarre but working C program", Gates
|
||||
said. "What is the name of this contest"
|
||||
|
||||
"Windows," shot back Gassee, naming Microsoft's premier product
|
||||
- a product over which Apple sued Microsoft five years ago. Not
|
||||
the right answer - it's "The Obfuscated C Contest [sic]" - but
|
||||
it brought down the house of Apple partisans...</code></pre>
|
||||
<p>[The expression on Bill Gates’ face was a sight to behold, as
|
||||
reported to us by several who were there].</p>
|
||||
<p>You must set <code>$DISPLAY</code> in your environment or the program
|
||||
will dump core. This is not a bug as the author documented it as a
|
||||
feature. :-)</p>
|
||||
<p>The optional argument is integer which controls the speed of the
|
||||
program. By default the speed is 9. You may want to try 1.</p>
|
||||
<p>You will have to kill the program (i.e., ^C) to stop it.</p>
|
||||
<p>WARNING: Slow servers or servers with long request queues will
|
||||
continue to ‘run’ for a while after you have killed the program.</p>
|
||||
<p>This program makes your windows about as useful as their windows.
|
||||
:-)</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>The program uses a single backing pixmap (which is the size of the
|
||||
screen) for all of its subwindows (with a little bit of trickery to move
|
||||
the offset around). This is much better (and faster) than the obvious
|
||||
implementation which would require a full-screen pixmap and a separate
|
||||
backing pixmap for each subwindow.</p>
|
||||
<p>The chance that a window breaks is based on it’s kinetic energy,
|
||||
which in turn is based on it’s area and speed. How silly!</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-1993cmills"><a name="inventory"></a>Inventory for
|
||||
1993/cmills</h1>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - winner home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/cmills.c">cmills.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/cmills.alt.c">cmills.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/cmills.orig.c">cmills.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="1993_cmills.tar.bz2">1993_cmills.tar.bz2</a> - download
|
||||
winning source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/cmills/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-inventory.sh -->
|
||||
<!-- START: this line starts content from: inc/after-content.default.html -->
|
||||
|
||||
<!-- END: this line ends content from: inc/after-content.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-rightcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-row.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-row.default.html -->
|
||||
<!-- START: this line starts content from: inc/footer.default.html -->
|
||||
|
||||
<div class="footer">
|
||||
<hr>
|
||||
<h2>Coda</h2>
|
||||
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F1993%2Fcmills%2Findex.html">Nu HTML check this web page</a></p>
|
||||
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/footer.default.html -->
|
||||
<!-- START: this line starts content from: inc/bottom.default.html -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END: this line ends content from: inc/bottom.default.html -->
|
||||
+242
-13
@@ -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: 1993/dgibson/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>1993 dgibson</title>
|
||||
<meta name="description" content="IOCCC year: 1993 IOCCC winner: dgibson winner index page">
|
||||
<meta name="keywords" content="IOCCC,1993,dgibson,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>1993/dgibson</title>
|
||||
<meta name="description" content="1993 IOCCC winner dgibson">
|
||||
<meta name="keywords" content="IOCCC, 1993, IOCCC 1993, IOCCC winner, dgibson">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1993 dgibson</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>1993/dgibson</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%2F1993%2Fdgibson%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1993/dgibson/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../cmills/index.html">← cmills</a>
|
||||
<a class="Left" href="../index.html">↑ 1993 ↑</a>
|
||||
<a class="Left" href="../ejb/index.html">ejb →</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 & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#David_Gibson">David Gibson</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#null">unknown</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./dgibson.sh</span> <span class="pp">[</span><span class="ss">datafile</span><span class="pp">]</span></span></code></pre></div>
|
||||
<p>where:</p>
|
||||
<p><code>datafile</code> is the initial pattern (default: <a
|
||||
href="dgibson.data1">dgibson.data1</a>)</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>We have provided the shell script <a href="dgibson.sh">dgibson.sh</a>
|
||||
to make it easier to run this entry. Run this shell script several times
|
||||
to see what happens.</p>
|
||||
<p>There are a number of data files available:</p>
|
||||
<ul>
|
||||
<li><a href="dgibson.data1">dgibson.data1</a></li>
|
||||
<li><a href="dgibson.data2">dgibson.data2</a></li>
|
||||
<li><a href="dgibson.data3">dgibson.data3</a></li>
|
||||
<li><a href="dgibson.data4">dgibson.data4</a></li>
|
||||
<li><a href="dgibson.data5">dgibson.data5</a></li>
|
||||
</ul>
|
||||
<p>For <a href="dgibson.data5">dgibson.data5</a> you will need a large
|
||||
screen, lots of virtual memory and lots of time! The <a
|
||||
href="try.sh">try.sh</a> script will run <a
|
||||
href="dgibson.sh">dgibson.sh</a> on all the data files.</p>
|
||||
<p>Good luck trying to use a debugger on this entry! Life is not always
|
||||
pretty.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program plays the <a
|
||||
href="https://en.wikipedia.org/wiki/Conway's_Game_of_Life">Game of
|
||||
Life</a>.</p>
|
||||
<p>Life is a cellular automaton invented by J. H. Conway, in which each
|
||||
of a rectangular grid of cells can be alive or dead, and cells with more
|
||||
than 3 or less than 2 (out of 8) live neighbours die, and empty cells
|
||||
with exactly 3 neighbours give birth.</p>
|
||||
<h3 id="some-notes">Some notes</h3>
|
||||
<ul>
|
||||
<li>the “STAT n” information does not have to be present in the initial
|
||||
configuration</li>
|
||||
<li>the initial configuration should not have live cells around the
|
||||
edges</li>
|
||||
<li>the grid should be a perfect rectangle.</li>
|
||||
</ul>
|
||||
<p>Further features: the current generation number is preserved, and the
|
||||
grid automatically resizes itself as the object gets too big or too
|
||||
small.</p>
|
||||
<p>When writing this program, my goal was to make each cell in the life
|
||||
grid expand to the code which calculates the fate of that cell. In
|
||||
addition, the resulting program is a single expression, which makes it
|
||||
necessary to recurse <code>main()</code> in two “directions”
|
||||
simultaneously.</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-1993dgibson"><a name="inventory"></a>Inventory for
|
||||
1993/dgibson</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/1993/dgibson/dgibson.c">dgibson.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.orig.c">dgibson.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.sh">dgibson.sh</a>
|
||||
- how to run</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data1">dgibson.data1</a>
|
||||
- life cell layout</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data2">dgibson.data2</a>
|
||||
- life cell layout</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data3">dgibson.data3</a>
|
||||
- life cell layout</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data4">dgibson.data4</a>
|
||||
- life cell layout</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data5">dgibson.data5</a>
|
||||
- life cell layout</li>
|
||||
<li><a href="1993_dgibson.tar.bz2">1993_dgibson.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/1993/dgibson/.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/1993/dgibson/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/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%2F1993%2Fdgibson%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 -->
|
||||
+246
-13
@@ -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,258 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1993/ejb/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>1993 ejb</title>
|
||||
<meta name="description" content="IOCCC year: 1993 IOCCC winner: ejb winner index page">
|
||||
<meta name="keywords" content="IOCCC,1993,ejb,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>1993/ejb</title>
|
||||
<meta name="description" content="1993 IOCCC winner ejb">
|
||||
<meta name="keywords" content="IOCCC, 1993, IOCCC 1993, IOCCC winner, ejb">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1993 ejb</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>1993/ejb</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%2F1993%2Fejb%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1993/ejb/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../dgibson/index.html">← dgibson</a>
|
||||
<a class="Left" href="../index.html">↑ 1993 ↑</a>
|
||||
<a class="Left" href="../jonth/index.html">jonth →</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 & (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#E_Jay_Berkenbilt">E. Jay
|
||||
Berkenbilt</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#null">unknown</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./ejb</span> level</span></code></pre></div>
|
||||
<p>where:</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">level</span> a value from <span class="at">-128</span> to 127</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="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>A negative argument plays the patience puzzle. An argument greater
|
||||
than 0 plays the Tower of Hanoi puzzle. In either case the absolute
|
||||
value of the argument specifies the size of the respective puzzle. Refer
|
||||
to the files <a href="hanoi.md">hanoi.md</a> and <a
|
||||
href="patience.md">patience.md</a> for more information on these
|
||||
puzzles.</p>
|
||||
<p>Of course, you need a different kind of “patience” if you give the
|
||||
argument 127 to this program and want to see it finish!</p>
|
||||
<p>We note that this also works under macOS just fine.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="what-this-program-does">What this program does</h3>
|
||||
<h4 id="output-solution-to-towers-of-hanoi-for-five-rings">Output
|
||||
solution to Towers of Hanoi for five rings:</h4>
|
||||
<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">./ejb</span> 5</span></code></pre></div>
|
||||
<p>The format of the output for the Towers of Hanoi case is simply a
|
||||
text description of how to solve the puzzle.</p>
|
||||
<h4 id="output-solution-to-the-patience-puzzle-for-six-rings">Output
|
||||
solution to the Patience puzzle for six rings:</h4>
|
||||
<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">./ejb</span> <span class="at">-6</span></span></code></pre></div>
|
||||
<p>For the patience puzzle, the output is a sequence binary codes
|
||||
representing successive states of the puzzle. The rightmost digit
|
||||
represents the first ring. A <code>1</code> means the ring is on the
|
||||
<code>U</code>; a <code>0</code> means it is off the <code>U</code>. The
|
||||
program prints the word <code>"Invalid"</code> in response to illegal
|
||||
command line parameters.</p>
|
||||
<h3 id="motivation">Motivation</h3>
|
||||
<p>Most people who have written software for other people have been
|
||||
asked to count lines of code. Naturally, this brings up the
|
||||
controversial question of exactly what defines a line of code. This
|
||||
program serves to show that counting semicolons will not always provide
|
||||
a meaningful measure of code size. This is especially true in this
|
||||
program where the number of semicolons itself is ambiguous. Does it have
|
||||
two or three? In addition, the only C keyword this program uses besides
|
||||
type names and qualifiers is <code>return</code>, and the only function
|
||||
defined in the code is <code>main()</code>. The level of complexity of
|
||||
the program without multiple semicolons, statements, and functions is
|
||||
achieved by abusing C operators, especially the comma operator.
|
||||
Considerable use of <code>||</code>, <code>&&</code>, and
|
||||
<code>?:</code> helps too. In addition, <code>main()</code> is called
|
||||
recursively. The NULL pointer that terminates <code>argv</code> is used
|
||||
to pass additional information into <code>main()</code>. Even though the
|
||||
algorithms used by this code are simple, this program is still hard to
|
||||
follow even when indented properly. (It is pretty hard to indent this
|
||||
code reasonably, however.)</p>
|
||||
<p>Although this program has only been tested on UNIX systems it will
|
||||
probably run on just about any machine with an ANSI C compiler. It does
|
||||
not use the C preprocessor at all. The only functions it uses are
|
||||
<code>atoi()</code>, <code>malloc()</code>, <code>memset()</code>,
|
||||
<code>printf()</code>, and <code>puts()</code>. It does, however,
|
||||
require that the architecture it runs on have bytes that are at least
|
||||
eight bits long and pointers that are at least four bytes long. In
|
||||
addition, it requires an ANSI compiler since it uses
|
||||
<code>signed char</code> and ANSI-style function declarations.</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-1993ejb"><a name="inventory"></a>Inventory for
|
||||
1993/ejb</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/1993/ejb/ejb.c">ejb.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/ejb.orig.c">ejb.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="hanoi.html">hanoi.html</a> - about the Towers of Hanoi
|
||||
puzzle</li>
|
||||
<li><a href="patience.html">patience.html</a> - about the Patience
|
||||
puzzle</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="1993_ejb.tar.bz2">1993_ejb.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/1993/ejb/.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/1993/ejb/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/hanoi.md">hanoi.md</a>
|
||||
- markdown source for hanoi.html</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/patience.md">patience.md</a>
|
||||
- markdown source for patience.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%2F1993%2Fejb%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 -->
|
||||
+193
-13
@@ -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,205 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1993/jonth/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>1993 jonth</title>
|
||||
<meta name="description" content="IOCCC year: 1993 IOCCC winner: jonth winner index page">
|
||||
<meta name="keywords" content="IOCCC,1993,jonth,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>1993/jonth</title>
|
||||
<meta name="description" content="1993 IOCCC winner jonth">
|
||||
<meta name="keywords" content="IOCCC, 1993, IOCCC 1993, IOCCC winner, jonth">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1993 jonth</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>1993/jonth</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%2F1993%2Fjonth%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1993/jonth/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../ejb/index.html">← ejb</a>
|
||||
<a class="Left" href="../index.html">↑ 1993 ↑</a>
|
||||
<a class="Left" href="../leo/index.html">leo →</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 & (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#Jon_Thingvold">Jon Thingvold</a><br>
|
||||
Location: <a href="/temp-test-ioccc/location.html#NO">NO</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<p>NOTE: this entry requires <code>X11/Xlib.h</code> header file and the
|
||||
X11 library to compile. macOS users running Mountain Lion and later will
|
||||
need to download and install <a
|
||||
href="https://www.xquartz.org">XQuartz</a> in order to compile and run
|
||||
this entry.</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> all</span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./jonth</span> <span class="co"># must be run on an X11 server</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Use <code>h</code> and <code>l</code> to shift objects left or right.
|
||||
Use <code>k</code> to rotate and press SPACE to drop.</p>
|
||||
<p>This program’s output may be even more obfuscated when played on
|
||||
inverse video. :-)</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This is <code>jonth</code> (<code>jon's t(h)etris</code>) for the X
|
||||
Window System.</p>
|
||||
<p>This program is also an example of data abstraction. The X array is
|
||||
after initialization hidden by the well defined macros <code>t</code>,
|
||||
<code>u</code> and <code>F</code>.</p>
|
||||
<p>This program is highly portable as it runs on a “Notebook” size
|
||||
SPARC. This program will not work on machines where
|
||||
<code>sizeof(int)!=sizeof(void *)</code>.</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>This file is Copyright (c) 2023 by Landon Curt Noll. All Rights
|
||||
Reserved. You are free to share and adapt this file under the terms of
|
||||
this license:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<!-- START: this line starts content generated by: bin/gen-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-1993jonth"><a name="inventory"></a>Inventory for
|
||||
1993/jonth</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/1993/jonth/jonth.c">jonth.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/jonth/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/jonth/jonth.orig.c">jonth.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="1993_jonth.tar.bz2">1993_jonth.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/1993/jonth/.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/1993/jonth/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/jonth/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%2F1993%2Fjonth%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 -->
|
||||
+241
-13
@@ -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,253 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1993/leo/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>1993 leo</title>
|
||||
<meta name="description" content="IOCCC year: 1993 IOCCC winner: leo winner index page">
|
||||
<meta name="keywords" content="IOCCC,1993,leo,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>1993/leo</title>
|
||||
<meta name="description" content="1993 IOCCC winner leo">
|
||||
<meta name="keywords" content="IOCCC, 1993, IOCCC 1993, IOCCC winner, leo">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1993 leo</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>1993/leo</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%2F1993%2Fleo%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1993/leo/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../jonth/index.html">← jonth</a>
|
||||
<a class="Left" href="../index.html">↑ 1993 ↑</a>
|
||||
<a class="Left" href="../lmfjyh/index.html">lmfjyh →</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 & (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#Leonid_A_Broukhis">Leonid A.
|
||||
Broukhis</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#US">US</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<p>To have the computer guess:</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./leo</span> <span class="pp">[</span><span class="ss">colors</span><span class="pp">]</span></span></code></pre></div>
|
||||
<p>To guess the computer’s number:</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./mind</span> <span class="pp">[</span><span class="ss">colors</span><span class="pp">]</span></span></code></pre></div>
|
||||
<p>where:</p>
|
||||
<p>[colors] is the number of possible colors (1 to 15) (default: 6)</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>By default, the number of colors is 6. You may specify a value of
|
||||
between 1 and 15 colors. See the author’s notes for instructions of how
|
||||
to play.</p>
|
||||
<p>We look forward to more entries from the newer members of the
|
||||
International Internet community.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program plays
|
||||
[Mastermind](https://en.wikipedia.org/wiki/Mastermind_(board_game), if
|
||||
you call it by a name ending by ‘d’, otherwise it <em>solves</em>
|
||||
Mastermind. Call it without parameters to use 6 digits (colors), or
|
||||
indicate the number of possible digits (you cannot change the number of
|
||||
positions so easily).</p>
|
||||
<p>The number in parentheses is the number of possible combinations,
|
||||
based on previous questions and answers. If you solve the puzzle, “(1)”
|
||||
indicates that your previous moves are enough to give correct answer. If
|
||||
the program acts as solver and terminates prematurely, it means that
|
||||
you’re mistaken in your answers to its question(s). Question marks
|
||||
indicate the number of digits you have to enter (either 4 when you guess
|
||||
or 2 when computer guesses).</p>
|
||||
<p>Note that the program uses the same code for both player and solver,
|
||||
and the only place where it makes a difference is the interactive part.
|
||||
Many obfuscations have been made to achieve this. An expression giving
|
||||
<code>(bulls * 16 + cows)</code> from two numbers is, however, quite
|
||||
straightforward :-) , as well as the arithmetic of binary coded
|
||||
colors-base numbers is.</p>
|
||||
<h3
|
||||
id="limitations-maximum-number-of-digits-colors-is-14-1..f.">Limitations:
|
||||
maximum number of digits (colors) is 14 (1..F).</h3>
|
||||
<p>Suggestions: Use terminal (or emulator) with non-destructive
|
||||
backspaces. Do “disable scrolling” on cmdtool or similar emulators.</p>
|
||||
<h4 id="bugs">Bugs</h4>
|
||||
<p>Please don’t type ^D at the prompt!!</p>
|
||||
<h5 id="example-suppose-we-think-of-1234">EXAMPLE: Suppose we think of
|
||||
1234</h5>
|
||||
<pre><code>$ ./leo
|
||||
(1296): 6433
|
||||
?? 12 # one 3 is a bull, another is a cow, and 4 is a cow
|
||||
(160): 5363
|
||||
?? 02 # both 3's are cows
|
||||
(21): 4231
|
||||
?? 22 # 2 and 3 are bulls, 4 and 1 are cows
|
||||
(2): 4132
|
||||
?? 13 # 3 is a bull; 1, 2 and 4 are cows
|
||||
(1): 1234
|
||||
?? 40 # you may enter everything there</code></pre>
|
||||
<h5 id="example-guess-the-computers-number">EXAMPLE: Guess the
|
||||
computer’s number</h5>
|
||||
<pre><code>$ ./mind
|
||||
(1296): ???? 1122 # my strategy isn't the best, just as example
|
||||
00
|
||||
(256): ???? 3344
|
||||
20
|
||||
(18): ???? 5566
|
||||
02
|
||||
(6): ???? 3654
|
||||
11
|
||||
(2): ???? 3355
|
||||
00
|
||||
(1): ???? 6444
|
||||
40 # we have guessed the number</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-1993leo"><a name="inventory"></a>Inventory for
|
||||
1993/leo</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/1993/leo/leo.c">leo.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/leo/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/leo/leo.orig.c">leo.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="1993_leo.tar.bz2">1993_leo.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/1993/leo/.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/1993/leo/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/leo/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%2F1993%2Fleo%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 -->
|
||||
+324
-13
@@ -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,336 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1993/lmfjyh/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>1993 lmfjyh</title>
|
||||
<meta name="description" content="IOCCC year: 1993 IOCCC winner: lmfjyh winner index page">
|
||||
<meta name="keywords" content="IOCCC,1993,lmfjyh,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>1993/lmfjyh</title>
|
||||
<meta name="description" content="1993 IOCCC winner lmfjyh">
|
||||
<meta name="keywords" content="IOCCC, 1993, IOCCC 1993, IOCCC winner, lmfjyh">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1993 lmfjyh</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>1993/lmfjyh</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%2F1993%2Flmfjyh%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1993/lmfjyh/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../leo/index.html">← leo</a>
|
||||
<a class="Left" href="../index.html">↑ 1993 ↑</a>
|
||||
<a class="Left" href="../plummer/index.html">plummer →</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 & (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#Jyrki_Holopainen">Jyrki
|
||||
Holopainen</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#FI">FI</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<p>If you have gcc < 2.3.3 you can build this entry like:</p>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<p>This will create a file called
|
||||
<code>";main(){puts("Hello World!");}char*C=".c</code> which would print
|
||||
<code>Hello World!</code> when compiled.</p>
|
||||
<p>For an explanation of why and how this works see the author’s
|
||||
remarks. The gist of the entry itself, however, is the file name
|
||||
<em>itself <strong>is</strong> the code</em>.</p>
|
||||
<p>NOTE: we delete the temporary file whether or not the compilation
|
||||
succeeds because it is an unsafe filename and not doing so would cause
|
||||
problems for anyone running <code>make</code>.</p>
|
||||
<p>This entry will not compile with gcc < 2.3.3 as it relies on a bug
|
||||
which was fixed in gcc 2.3.3 which was fixed a very long time ago now.
|
||||
There is an alternate version for <a
|
||||
href="https://www.collinsdictionary.com/dictionary/english/everyone">those
|
||||
of us</a> with gcc >= 2.3.3. See <a href="#alternate-code">Alternate
|
||||
code</a> section below for more details.</p>
|
||||
<p>However, there is an another version that will be compiled in the
|
||||
extremely likely case this fails. This should happen automatically. See
|
||||
<a href="#alternate-code">Alternate code</a> below for more details on
|
||||
it.</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#1993-lmfjyh">1993
|
||||
lmfjyh in bugs.md</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<p>If you have gcc < 2.3.3 (i.e. the entry can compile):</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./lmfjyh</span></span></code></pre></div>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>This version does what the code did but in a way that will work with
|
||||
modern compilers. We’d like to say there’s something special about it
|
||||
but there isn’t. Nonetheless it will be compiled in case the original
|
||||
entry fails to compile (which will happen unless you have gcc <
|
||||
2.3.3.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<p>Should you wish to build this version manually:</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>lmfjyh.alt</code> as you would <code>lmfjyh</code> above.
|
||||
Note that other code could also be done with the bug that the entry
|
||||
abuses but that would have to be manually programmed for this version;
|
||||
see the author’s remarks for more details.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>There’s more than one way to get around disk quotas. :-)</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>“Practical and efficient method of compressing source code”.</p>
|
||||
<h3 id="introduction">Introduction</h3>
|
||||
<p>I will shortly present a totally new compression method. It may be
|
||||
used to compress any types of files, but it works best with C-source
|
||||
code.</p>
|
||||
<p>As an example, I have taken a simple “Hello world!” program that
|
||||
should be familiar to all C-programmers.</p>
|
||||
<h4 id="listing-1-a-simple-hello-world-program">Listing 1: A simple
|
||||
“Hello World” program</h4>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>main<span class="op">()</span></span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span>
|
||||
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a> puts<span class="op">(</span><span class="st">"Hello World!"</span><span class="op">);</span></span>
|
||||
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
|
||||
<h3 id="packing-method">Packing method</h3>
|
||||
<p>Normally a file name is used only to identify the file, but this new
|
||||
revolutionary method introduces a totally new concept: <strong>THE FILE
|
||||
NAME <em>IS</em> THE PROGRAM</strong>. There is no need to waste
|
||||
valuable disk space to store source code. The program is embedded in the
|
||||
file name, only a minor portion of it is inside the file.</p>
|
||||
<h4 id="listing-2-compressed-hello-world">Listing 2: Compressed “Hello
|
||||
world”</h4>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="dt">char</span><span class="op">*</span>_<span class="op">=</span>__FILE__<span class="op">;</span></span></code></pre></div>
|
||||
<h4 id="listing-3-code-embedded-in-the-file-name">Listing 3: Code
|
||||
embedded in the file name</h4>
|
||||
<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="st">";main(){puts("</span>Hello World<span class="op">!</span><span class="st">");}char*C="</span><span class="op">.</span>c</span></code></pre></div>
|
||||
<p>The sample program in listing 1 is 36 bytes long. By using the new
|
||||
compression method, the example program may be squeezed to sixteen
|
||||
bytes. In the example the compression ratio is 2:1. It is evident that
|
||||
the longer the program is, the better the compression ratio is. The
|
||||
maximum compression ratio in a UNIX environment is 254:16 which equals
|
||||
approximately to 16:1. By using the method a one megabyte of source code
|
||||
file can be compressed to 64 kilobytes.</p>
|
||||
<p>One might easily think that the program could be compressed to a
|
||||
single byte by writing a one character long preprocessor directive in
|
||||
the source file and defining the actual source code in the command line,
|
||||
e.g. <code>cc hello.c -DX='main(){puts ...'</code>. With this method
|
||||
nothing is gained, since the compiling commands must be stored in a
|
||||
file, and that takes even more space than writing the code in a source
|
||||
file as presented in listing 1.</p>
|
||||
<h3 id="packing-files-in-a-unix-environment">Packing files in a UNIX
|
||||
environment</h3>
|
||||
<p>In a UNIX environment it is possible to write almost any program by
|
||||
including the code in file names. Since <code>/</code> is used to
|
||||
separate path components and cannot therefore exist in a file name, all
|
||||
features of the C language cannot be used.</p>
|
||||
<p>In C, the <code>/</code> is used as a division operator and it may
|
||||
also be a part of a comment start and end identifier. This, however, is
|
||||
not a dangerous limitation, since practice has shown that comments are
|
||||
almost totally unnecessary. A real programmer can more easily understand
|
||||
pure source code, and misleading comments are disastrous. The division
|
||||
operation may be replaced with <code>pow(x, -1)</code> and
|
||||
multiplication when using real numbers or with <code>div()</code>
|
||||
function when using integers.</p>
|
||||
<p>Large programs must be separated into small modules. This enforces
|
||||
people to write better programs, since monolithic programming style
|
||||
cannot be used. Program development will also be faster, no extra code
|
||||
needs be recompiled after changes have been made.</p>
|
||||
<h3 id="usage-with-currently-available-tools">Usage with currently
|
||||
available tools</h3>
|
||||
<p>I have tested how well this new method works with currently available
|
||||
programming tools.</p>
|
||||
<p>Any ANSI conforming C-compiler that runs under a REAL operating
|
||||
system should be able to compile the code (there might be problems with
|
||||
some older UNIX variants).</p>
|
||||
<h3 id="compilers">Compilers</h3>
|
||||
<p>These worked:</p>
|
||||
<ul>
|
||||
<li>gcc versions 2.0, 2.1, 2.3.2 (ld failed at AIX with gcc 2.1)</li>
|
||||
<li>cc (HP-UX)</li>
|
||||
<li>cc (VAX)</li>
|
||||
</ul>
|
||||
<p>These failed miserably:</p>
|
||||
<ul>
|
||||
<li>cc (SunOS/Solaris) - could not start cpp properly</li>
|
||||
<li>cc/xlc (AIX) - could not open source</li>
|
||||
</ul>
|
||||
<h3 id="other-tools">Other tools</h3>
|
||||
<h4 id="debuggers-tested-at-sunos-4.1.2">Debuggers: (tested at SunOS
|
||||
4.1.2)</h4>
|
||||
<ul>
|
||||
<li><p><code>dbx</code> - Quit with a very ‘informative’ error message:
|
||||
<code>"dbx: fatal error: Is a directory"</code></p></li>
|
||||
<li><p>gdb - Printed almost the same error message
|
||||
<code>": Is a directory"</code>. It was, however, possible to step
|
||||
through the code but not list it.</p></li>
|
||||
</ul>
|
||||
<h4 id="lints">Lints</h4>
|
||||
<p>None of the lints tested environments were able to parse the
|
||||
file.</p>
|
||||
<h3 id="conclusions">Conclusions</h3>
|
||||
<p>The method can be used to compress any type of file and the
|
||||
compression ratios are even better when compressing files other than C
|
||||
source. For example plain text files may be compressed with INFINITE
|
||||
compression ratio. It is trivial task to compress a 100 kilobytes long
|
||||
text file in about 400 files whose lengths are zero bytes. The drawback
|
||||
is that the files must be unpacked before they can be used, so a large
|
||||
amount of temporary disk space is needed, while C source is totally
|
||||
usable in the compressed form.</p>
|
||||
<p>Evidently, there is a long way to go before this new programming
|
||||
technique may be widely used, since currently there are only few tools
|
||||
supporting it. The advantages over the traditional methods are, however,
|
||||
so great that there is no doubt that this method will be new
|
||||
standard.</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-1993lmfjyh"><a name="inventory"></a>Inventory for
|
||||
1993/lmfjyh</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/1993/lmfjyh/lmfjyh.c">lmfjyh.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/lmfjyh/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/lmfjyh/lmfjyh.alt.c">lmfjyh.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/lmfjyh/lmfjyh.orig.c">lmfjyh.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="1993_lmfjyh.tar.bz2">1993_lmfjyh.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/1993/lmfjyh/.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/1993/lmfjyh/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/lmfjyh/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%2F1993%2Flmfjyh%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 -->
|
||||
@@ -49,6 +49,22 @@
|
||||
"display_via_github" : true,
|
||||
"winners_text" : "original source"
|
||||
},
|
||||
{
|
||||
"file_path" : "try.alt.sh",
|
||||
"inventory_order" : 100,
|
||||
"OK_to_edit" : true,
|
||||
"display_as" : "shellscript",
|
||||
"display_via_github" : true,
|
||||
"winners_text" : "how to run alternative code"
|
||||
},
|
||||
{
|
||||
"file_path" : "try.sh",
|
||||
"inventory_order" : 100,
|
||||
"OK_to_edit" : true,
|
||||
"display_as" : "shellscript",
|
||||
"display_via_github" : true,
|
||||
"winners_text" : "how to run"
|
||||
},
|
||||
{
|
||||
"file_path" : "1993_plummer.tar.bz2",
|
||||
"inventory_order" : 300,
|
||||
|
||||
+300
-13
@@ -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,312 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1993/plummer/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>1993 plummer</title>
|
||||
<meta name="description" content="IOCCC year: 1993 IOCCC winner: plummer winner index page">
|
||||
<meta name="keywords" content="IOCCC,1993,plummer,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>1993/plummer</title>
|
||||
<meta name="description" content="1993 IOCCC winner plummer">
|
||||
<meta name="keywords" content="IOCCC, 1993, IOCCC 1993, IOCCC winner, plummer">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1993 plummer</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>1993/plummer</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%2F1993%2Fplummer%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1993/plummer/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../lmfjyh/index.html">← lmfjyh</a>
|
||||
<a class="Left" href="../index.html">↑ 1993 ↑</a>
|
||||
<a class="Left" href="../rince/index.html">rince →</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 & (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#Mark_Plummer">Mark Plummer</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> alt</span></code></pre></div>
|
||||
<p>We recommend that you try the alternate version first to get a better
|
||||
idea of what this entry looked like back in 1993. The alternate version
|
||||
sleeps (via <code>usleep(3)</code>) in between writes, defaulting at
|
||||
1000 microseconds (but reconfigurable). If you wish to see the original
|
||||
entry then see <a href="#original-code">original code</a> below.</p>
|
||||
<p>If you wish to speed the entry up, say to 500 microseconds between
|
||||
writes, try:</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber SLEEP=500 alt</span></code></pre></div>
|
||||
<p>Alternatively if you wish to slow it down, say to 1500 microseconds
|
||||
between writes, try:</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber SLEEP=1500 alt</span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./plummer.alt</span> number arg</span></code></pre></div>
|
||||
<p>where:</p>
|
||||
<ul>
|
||||
<li>number is a number (try 21701)</li>
|
||||
<li>arg is any argument</li>
|
||||
</ul>
|
||||
<p>Wait until you’re bored enough to send intr/ctrl-c to exit or until
|
||||
the <a href="https://hitchhikers.fandom.com/wiki/Vogon">Vogons</a> build
|
||||
that <a href="https://hitchhikers.fandom.com/wiki/Bypass">hyperspace
|
||||
bypass</a>.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.alt.sh</span></span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.alt.sh</span> 21701</span>
|
||||
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a><span class="va">SLEEP</span><span class="op">=</span>500 <span class="ex">./try.alt.sh</span></span>
|
||||
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a><span class="va">SLEEP</span><span class="op">=</span>900 <span class="ex">./try.alt.sh</span> 789789789789789</span>
|
||||
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb5-9"><a href="#cb5-9" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.alt.sh</span> 789789789</span>
|
||||
<span id="cb5-10"><a href="#cb5-10" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb5-11"><a href="#cb5-11" aria-hidden="true" tabindex="-1"></a><span class="va">SLEEP</span><span class="op">=</span>400 <span class="ex">./try.alt.sh</span> 42424242424242</span>
|
||||
<span id="cb5-12"><a href="#cb5-12" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb5-13"><a href="#cb5-13" aria-hidden="true" tabindex="-1"></a><span class="va">SLEEP</span><span class="op">=</span>1000 <span class="ex">./try.alt.sh</span> xyzzyzzyx</span>
|
||||
<span id="cb5-14"><a href="#cb5-14" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb5-15"><a href="#cb5-15" aria-hidden="true" tabindex="-1"></a><span class="va">SLEEP</span><span class="op">=</span>1200 <span class="ex">./try.alt.sh</span> xyzzyzzyx 5555</span></code></pre></div>
|
||||
<h2 id="original-code">Original code:</h2>
|
||||
<p>This version, the original, does not sleep in between writes, and is
|
||||
thus much faster (depending on the <code>SLEEP</code> parameter
|
||||
specified in the build of <code>alt</code>, of course).</p>
|
||||
<h3 id="original-build">Original build:</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">make</span> all</span></code></pre></div>
|
||||
<h3 id="original-use">Original use:</h3>
|
||||
<p>Use <code>plummer</code> as you would <code>plummer.alt</code>
|
||||
above.</p>
|
||||
<h3 id="original-try">Original try:</h3>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> 21701</span>
|
||||
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> 789789789789789</span>
|
||||
<span id="cb7-6"><a href="#cb7-6" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> 789789789</span>
|
||||
<span id="cb7-8"><a href="#cb7-8" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb7-9"><a href="#cb7-9" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> 42424242424242</span>
|
||||
<span id="cb7-10"><a href="#cb7-10" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb7-11"><a href="#cb7-11" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> xyzzyzzyx</span>
|
||||
<span id="cb7-12"><a href="#cb7-12" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb7-13"><a href="#cb7-13" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> xyzzyzzyx 5555</span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>For extra credit: What happens when ‘number’ contains non-numeric
|
||||
characters, and why?</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program prints out all numbers up to a given number of digits on
|
||||
a single line. When the largest number is reached, the program starts
|
||||
again with 0. It takes two arguments: the first argument specifies the
|
||||
number to start counting from and uses leading <code>0</code>s to
|
||||
indicate the number of digits, the second argument can be anything but
|
||||
must be present.</p>
|
||||
<p>Variable names are single characters chosen for their similarity to
|
||||
other characters (<code>O</code> for <code>0</code> (zero),
|
||||
<code>l</code> for <code>1</code> (one), <code>S</code> for
|
||||
<code>5</code> (five) in some fonts, and <code>_</code> for … well
|
||||
nothing really, but it is easy to miss). To prevent the need for
|
||||
<code>strlen()</code>, the fact that argv is laid out sequentially is
|
||||
exploited
|
||||
(i.e. <code>argv[i + 1] == argv[i] + strlen(argv[i]) + 1</code>). This
|
||||
is not portable (by the books), but it seems to work everywhere I try
|
||||
(actually, for VMS, that only holds for <code>i > 1</code>). Also, I
|
||||
depend on the fact that a carriage return causes the line just written
|
||||
to be overwritten. <code>lint</code> (and most compilers) complain that
|
||||
there is no control path leading to a return from <code>main()</code>.
|
||||
At 125 characters, it still fits on a single line (for those of us who
|
||||
don’t mind ruining our eyes with 132 column screens).</p>
|
||||
<h3 id="spoiler">Spoiler:</h3>
|
||||
<p>The first statement points the base of <code>l</code> (the argument
|
||||
vector) to be the first argument by incrementing it. It then assigns
|
||||
<code>O</code> to point to the character before the first character of
|
||||
the second argument which also happens to be the NUL termination of the
|
||||
first argument. <code>*O</code> gets a <code>\r</code> assigned to it.
|
||||
Finally <code>0</code> is assigned to the first character of the second
|
||||
argument which has the effect of NUL terminating the first argument
|
||||
after the carriage return had removed its NUL termination. I really
|
||||
tried to make the last part of that statement part of the original
|
||||
expression, but the best I could do was attach it with a comma (against
|
||||
the advice of K&R). The for loop runs the next for loop continuously
|
||||
(actually until the machine crashes or the user gets tired of seeing the
|
||||
counting). The next for loop is the meat of the program. In the
|
||||
initialization statement, the string pointed to by <code>l</code> (the
|
||||
first argument containing the digits used for counting followed by a
|
||||
<code>\r</code>) is printed, and <code>_</code> is started at the least
|
||||
significant digit in the string. In the test portion, <code>_</code> is
|
||||
ensured not to be past the beginning of the string (the most significant
|
||||
digit), and the digit pointed to by <code>_</code> is incremented and
|
||||
checked to be sure that it <em>is</em> greater than <code>9</code>
|
||||
(written here as <code>(S+*O+S)*S</code>). If the test fails, either the
|
||||
string has been incremented or each digit in the string has been reset
|
||||
to <code>0</code>. If the test succeeded, the iteration statement
|
||||
assigns <code>0</code> (written here as <code>(S+*O)*S</code> (which has
|
||||
the added bonus of having the code be a cry for help)) to
|
||||
<code>*_</code> and decrements <code>_</code> to point to the next more
|
||||
significant digit to be incremented; it is done only when a carry
|
||||
situation results (<code>*_</code> has been incremented past
|
||||
<code>9</code>).</p>
|
||||
<p>The inspiration for this program came from actual code which dealt
|
||||
with scanning for a unique temporary filename by appending a
|
||||
successively larger number to the end of a string.</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-1993plummer"><a name="inventory"></a>Inventory for
|
||||
1993/plummer</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/1993/plummer/plummer.c">plummer.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/plummer.alt.c">plummer.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/plummer.orig.c">plummer.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/try.alt.sh">try.alt.sh</a>
|
||||
- how to run alternative code</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="1993_plummer.tar.bz2">1993_plummer.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/1993/plummer/.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/1993/plummer/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/plummer/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%2F1993%2Fplummer%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 -->
|
||||
+342
-13
@@ -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,354 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1993/rince/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>1993 rince</title>
|
||||
<meta name="description" content="IOCCC year: 1993 IOCCC winner: rince winner index page">
|
||||
<meta name="keywords" content="IOCCC,1993,rince,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>1993/rince</title>
|
||||
<meta name="description" content="1993 IOCCC winner rince">
|
||||
<meta name="keywords" content="IOCCC, 1993, IOCCC 1993, IOCCC winner, rince">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1993 rince</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>1993/rince</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%2F1993%2Frince%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1993/rince/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../plummer/index.html">← plummer</a>
|
||||
<a class="Left" href="../index.html">↑ 1993 ↑</a>
|
||||
<a class="Left" href="../schnitzi/index.html">schnitzi →</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 & (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#James_Bonfield">James
|
||||
Bonfield</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#GB">GB</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<p>NOTE: there are two alternate versions of this program, both allowing
|
||||
one to slow down the game and the second one with movements more
|
||||
familiar to vi users. 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: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="/bugs.md#1993-rince">1993
|
||||
rince 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">./rince</span> <span class="pp">[</span><span class="ss">cabbage</span><span class="pp">]</span></span></code></pre></div>
|
||||
<p>where:</p>
|
||||
<p><code>[cabbage]</code> is a CABBAGE description file (default:
|
||||
<code>rince.c</code>)</p>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>Some people may want to slow down the game by increasing the value 17
|
||||
in the lines:</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> timeval v<span class="op">=</span> <span class="op">{</span><span class="dv">0</span><span class="op">,</span><span class="dv">1</span><span class="op"><<</span><span class="dv">17</span><span class="op">}</span> <span class="op">;</span></span></code></pre></div>
|
||||
<p>and</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>refresh<span class="op">(),</span>c<span class="op">=</span>select<span class="op">(</span>k<span class="op">,&</span>y<span class="op">,</span><span class="dv">0</span><span class="op">,</span><span class="dv">0</span><span class="op">,(</span>v<span class="op">.</span>tv_usec<span class="op">=</span><span class="dv">1</span><span class="op"><<</span><span class="dv">17</span><span class="op">,&</span>v<span class="op">))?</span>getch<span class="op">():</span><span class="dv">0</span><span class="op">;</span></span></code></pre></div>
|
||||
<p>to another value like 18 or 19 which you can do with the alternate
|
||||
code.</p>
|
||||
<p>In the case of <a href="rince.alt2.c">rince.alt2.c</a> the movement
|
||||
keys for the default game are slightly different and will feel more
|
||||
familiar to vi users: <code>h</code> for left, <code>l</code> for right
|
||||
(that was not changed) and <code>k</code> for fire (that was also not
|
||||
changed).</p>
|
||||
<h3 id="alternate-build">Alternate build:</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">make</span> SLEEP=18 clobber alt</span></code></pre></div>
|
||||
<p>Replace 18 with whatever number you wish.</p>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>rince.alt</code> or <code>rince.alt2</code> as you would
|
||||
<code>rince</code> above.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The author has provided several CABBAGE files for your amusement:</p>
|
||||
<ul>
|
||||
<li><p><a href="rince.data1">rince.data1</a> plays
|
||||
[Breakout](https://en.wikipedia.org/wiki/Breakout_(video_game). Keys are
|
||||
<code>,</code> for left, <code>/</code> for right, and <code>.</code>
|
||||
for ‘fire the ball’.</p></li>
|
||||
<li><p><a href="rince.data2">rince.data2</a> plays the old <a
|
||||
href="/1991/rince/rince.c">Rince</a> (<a
|
||||
href="/1991/rince/README.md">README.md</a> game from IOCCC
|
||||
1991.</p></li>
|
||||
<li><p><a href="rince.data3">rince.data3</a> Sokoban screen 11. You are
|
||||
the <code>o</code> character. You must push the money <code>m</code>
|
||||
into the dotted region of the screen. The game is considered finished
|
||||
when all the <code>m</code>s are then <code>M</code>s.</p></li>
|
||||
<li><p><a href="rince.data4">rince.data4</a> Sokoban screen 13. Same
|
||||
rules as above.</p></li>
|
||||
</ul>
|
||||
<p>For a brief design description, see <a
|
||||
href="design.md">design.md</a>.</p>
|
||||
<h3 id="warning-for-sunos-4.1.x">WARNING for SunOS 4.1.x:</h3>
|
||||
<p>If you are running SunOS 4.1.x (assuming you can find an ANSI
|
||||
compiler in the first place), this program may be used to log out very
|
||||
quickly. Unfortunately, you can’t do anything else with it.</p>
|
||||
<h3 id="additional-notes">Additional notes</h3>
|
||||
<p>Some people report that <code>rince</code> dumps core on their
|
||||
system.</p>
|
||||
<p>On some systems that use gcc, the <code>curses.h</code> used by gcc
|
||||
(typically <code>/usr/local/include/curses.h</code> if not
|
||||
<code>/usr/include/curses.h</code>) is not compatible with the curses
|
||||
library (typically <code>/lib/libcurses.a</code> for static libraries)
|
||||
used. It has been suggested that the following gcc command may help:</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">gcc</span> <span class="at">-fno-builtin</span> <span class="at">-I</span>/usr/include <span class="at">-o</span> rince rince.c <span class="at">-lcurses</span> <span class="at">-ltermcap</span></span></code></pre></div>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This is a Cellular Automata Based, Beautifully Abysmal Game
|
||||
Environment (or CABBAGE for short). To execute the program simply type
|
||||
<code>./rince gamefile</code>, where <code>gamefile</code> is a game
|
||||
description file. A few are supplied for your enjoyment. Alternatively,
|
||||
with no arguments it will default to using it’s own datafile (the source
|
||||
code in fact). This happens to be a game of <a
|
||||
href="https://en.wikipedia.org/wiki/Space_Invaders">Space Invaders</a>.
|
||||
To prevent people from firing too often a very simple method is
|
||||
employed; you must move after firing to be able to fire again.</p>
|
||||
<h3 id="keys">Keys</h3>
|
||||
<ul>
|
||||
<li><code>j</code> - Left</li>
|
||||
<li><code>l</code> - Right</li>
|
||||
<li><code>k</code> - Fire</li>
|
||||
</ul>
|
||||
<p>This is a new breed of generic games. For instance:</p>
|
||||
<p>Game play : Whatever you define Keys : Whatever you define Score : If
|
||||
you can figure out how to update it! Levels : Ahh well… it’s not
|
||||
<em>totally</em> generic.</p>
|
||||
<p>The proper definition for usage would be:
|
||||
<code>./rince [data_filename]</code></p>
|
||||
<h3 id="portability">Portability</h3>
|
||||
<p>I have compiled in on the following systems:</p>
|
||||
<pre><code>System OS Compiler (and flags)
|
||||
DECstation 5000/240 Ultrix 4.2A c89 -std
|
||||
SPARCstation 1+ SunOS 4.1 gcc -ansi -pedantic
|
||||
SPARCstation 10/31 Solaris 2.1 gcc -ansi -pedantic (*)
|
||||
DECAlpha 3000/500 OSF/1 V1.2 c89 -std
|
||||
SGI Indigo (R4000) IRIX 4.0.5F cc -ansi
|
||||
Alliant FX2800 Conentrix 3.0.0 fxc</code></pre>
|
||||
<p>* I never said it worked! The guidelines state that you dislike
|
||||
programs that won’t <em>compile</em> under both BSD or SysV
|
||||
<code>Unix</code>. This compiles, and indeed runs on all the others
|
||||
(both BSD and SysV) correctly.</p>
|
||||
<p>Alas, on Solaris it compiles, but mysteriously stops displaying
|
||||
output after a while until you quit with control-c, when it all catches
|
||||
up again. I think the problem may lie in either <code>select(2)</code>,
|
||||
or curses, (or perhaps conflict of the two).</p>
|
||||
<p>The use of <code>select(2)</code> no doubt makes it less portable to
|
||||
STRICT SysV machines. However I have tested this on several so-called
|
||||
SysV machines, and all of them support <code>select(2)</code>. In fact,
|
||||
the <code>select(2)</code> they support appears to be more portable
|
||||
between them than their <code>poll()</code> call.</p>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<p>I have tried to use as many different obfuscation techniques,
|
||||
including some of which (such as <code>sizeof</code> confusion) I have
|
||||
not seen in any winners (hmmm - perhaps there’s a reason for that…) so
|
||||
far. Also, very poor structure (yes, I use <code>goto</code>’s) has led
|
||||
to apparently having an <code>fgets()</code> as the last line of main.
|
||||
Note that I have still tried to aim at least some efficiency (provided
|
||||
it makes things slightly more obfuscated of course). One such thing is
|
||||
the way I dynamically allocate a 2-dimensional array using only ONE
|
||||
<code>malloc()</code>. Hence this program could be used as a tutorial
|
||||
for all those people who consistently ask this question in the C
|
||||
newsgroups.</p>
|
||||
<p>Also, the program does require a volatile type (especially when
|
||||
optimising) to perform correctly. This is the first time I have ever
|
||||
truly needed this when not accessing memory external to this process
|
||||
:-)</p>
|
||||
<p>Of course, all the usual obfuscation lurks within, such as combining
|
||||
multiple for loops into single ones; warped and twisted logic; plus a
|
||||
plethora of other minor oddities. It’s up to you to discover some of
|
||||
them of course… Sometimes I have sacrificed length for obfuscation. It
|
||||
is all too easy to change the arguments in <code>main()</code> to one
|
||||
character identifiers, but in my opinion they add to obfuscation in this
|
||||
case by being longer.</p>
|
||||
<p><code>lint</code> complains about lots of things. Firstly the use of
|
||||
curses immediately makes <code>lint</code> complain. The Alpha’s
|
||||
<code>lint</code> gave me some positive encouragement!
|
||||
<code>precedence confusion possible: parenthesize!</code> :-) :-)
|
||||
<code>main()</code> does not return correctly, because, basically, it
|
||||
doesn’t return.</p>
|
||||
<h3 id="bugs">Bugs</h3>
|
||||
<p>Very little error checking is performed. I do check for not being
|
||||
able to open the requested filename and return 1 upon failure. However,
|
||||
badly formatted data files will cause major problems. No other checking
|
||||
(such as insufficient memory) is performed.</p>
|
||||
<p>There is no ‘end of game’ checking method. Hence games like Sokoban
|
||||
rely on the user to decide when they have had enough. Also, there is no
|
||||
quit mechanism other than control-c.</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-1993rince"><a name="inventory"></a>Inventory for
|
||||
1993/rince</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/1993/rince/rince.c">rince.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.alt.c">rince.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.alt2.c">rince.alt2.c</a>
|
||||
- alternate alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.orig.c">rince.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a href="design.html">design.html</a> - implementation notes</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data1">rince.data1</a>
|
||||
- CABBAGE data file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data2">rince.data2</a>
|
||||
- CABBAGE data file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data3">rince.data3</a>
|
||||
- CABBAGE data file</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data4">rince.data4</a>
|
||||
- CABBAGE data file</li>
|
||||
<li><a href="1993_rince.tar.bz2">1993_rince.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/1993/rince/.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/1993/rince/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/design.md">design.md</a>
|
||||
- markdown source for design.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%2F1993%2Frince%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 -->
|
||||
+261
-13
@@ -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,273 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1993/schnitzi/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>1993 schnitzi</title>
|
||||
<meta name="description" content="IOCCC year: 1993 IOCCC winner: schnitzi winner index page">
|
||||
<meta name="keywords" content="IOCCC,1993,schnitzi,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>1993/schnitzi</title>
|
||||
<meta name="description" content="1993 IOCCC winner schnitzi">
|
||||
<meta name="keywords" content="IOCCC, 1993, IOCCC 1993, IOCCC winner, schnitzi">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1993 schnitzi</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>1993/schnitzi</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%2F1993%2Fschnitzi%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1993/schnitzi/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../rince/index.html">← rince</a>
|
||||
<a class="Left" href="../index.html">↑ 1993 ↑</a>
|
||||
<a class="Left" href="../vanb/index.html">vanb →</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 & (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#Mark_Schnitzius">Mark
|
||||
Schnitzius</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#null">unknown</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<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#1993-schnitzi">1993 schnitzi 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">./schnitzi</span> file</span></code></pre></div>
|
||||
<p>where</p>
|
||||
<p><code>file</code> is a file containing some text.</p>
|
||||
<p>Certain input will cause the program to fail as described in the
|
||||
bugs.md file.</p>
|
||||
<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">./schnitzi</span> schnitzi.info</span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="co"># ask some questions suggested by the author, noted below</span></span></code></pre></div>
|
||||
<p>We also suggest you ask the program the following questions:</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">Who</span> is Mark Schnitzus<span class="pp">?</span></span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="ex">Who</span> was Jack the Ripper <span class="pp">?</span></span></code></pre></div>
|
||||
<p>Notice how it still manages to answer the first question despite
|
||||
there being an intentional spelling error there.</p>
|
||||
<p>Try feeding the program source to the program and ask both:</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">What</span> is cat <span class="pp">?</span></span>
|
||||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="ex">What</span> is cat<span class="pp">?</span></span></code></pre></div>
|
||||
<p>What happens if you ask it other questions with and without a space
|
||||
before the <code>?</code>?</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>After this program prints the contents of ‘file’, ask it some
|
||||
questions related to the text.</p>
|
||||
<p>The author suggests the following questions when using <a
|
||||
href="schnitzi.info">schnitzi.info</a>:</p>
|
||||
<ul>
|
||||
<li>Who is Mark Schnitzius?</li>
|
||||
<li>What exactly does this program do?</li>
|
||||
<li>What language is it written in?</li>
|
||||
<li>Has the Loch Ness monster really been captured?</li>
|
||||
<li>Who was Hitler?</li>
|
||||
<li>Were the NASA Moon landings faked?</li>
|
||||
<li>Is it true that Elvis is alive?</li>
|
||||
<li>Do colorless green ideas sleep furiously?</li>
|
||||
</ul>
|
||||
<p>We suggest you try using the body (minus the header and signature
|
||||
line) of a Usenet article. You might want to try something from
|
||||
alt.flame. :-)</p>
|
||||
<p>NOTE: If you have certain <code>'</code> in the question this entry
|
||||
might fail.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>I wanted to write a program that would read in a text file in natural
|
||||
language (such as English) and answer questions about that text file. I
|
||||
thought this might be a complicated task, and I was right – it took me
|
||||
over 800 bytes. Of course, it doesn’t always work, but that’s AI for
|
||||
you.</p>
|
||||
<p>This program accepts the name of a text file as the first parameter.
|
||||
For example, to run it on the supplied data file called ‘schnitzi.info’
|
||||
you would type <code>./schnitzi schnitzi.info</code>. It echoes the
|
||||
file, then gives you a prompt where you may type in questions about that
|
||||
text. The more words you use which are actually present in the text
|
||||
file, the better results you get. You’ll need to hit <code>ctrl-c</code>
|
||||
to break out of the program. Just hitting <code>return</code> at the
|
||||
prompt will reprint the paragraph.</p>
|
||||
<p>If you’re curious as to how it works, I guess you could feed in the
|
||||
source as the input file and ask “How does this work?” at the prompt,
|
||||
but I’m not guaranteeing any results…</p>
|
||||
<h3 id="compilation-notes">Compilation notes</h3>
|
||||
<ul>
|
||||
<li><p>The use of <code>strcasecmp(3)</code> may be non-standard.
|
||||
<code>strcmp(3)</code> can be substituted for it, with a slight
|
||||
performance penalty.</p></li>
|
||||
<li><p>This program depends on the first command-line parameter,
|
||||
typically called <code>argv[0]</code>, to hold the name of the
|
||||
executable. It is my understanding that this property of
|
||||
<code>argv[0]</code> is not guaranteed on some systems.</p></li>
|
||||
</ul>
|
||||
<h3 id="obfuscation">Obfuscation</h3>
|
||||
<ul>
|
||||
<li><p>It uses a hidden string to test for punctuation.</p></li>
|
||||
<li><p>The layout, variable names, and expression format have been
|
||||
chosen in such a way as to cause visual confusion.</p></li>
|
||||
<li><p>It uses uses external <code>system(3)</code> calls to echo the
|
||||
text file and break up the question into individual words with a
|
||||
recursive call.</p></li>
|
||||
<li><p>It uses a clever hack to simulate artificial
|
||||
intelligence.</p></li>
|
||||
</ul>
|
||||
<p>The text for the info file, by the way, consists largely of headlines
|
||||
from the Weekly World News.</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-1993schnitzi"><a name="inventory"></a>Inventory
|
||||
for 1993/schnitzi</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/1993/schnitzi/schnitzi.c">schnitzi.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/schnitzi.orig.c">schnitzi.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/schnitzi.info">schnitzi.info</a>
|
||||
- some interesting statements</li>
|
||||
<li><a href="1993_schnitzi.tar.bz2">1993_schnitzi.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/1993/schnitzi/.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/1993/schnitzi/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/schnitzi/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%2F1993%2Fschnitzi%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 -->
|
||||
+332
-13
@@ -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,344 @@
|
||||
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<!-- -->
|
||||
<!-- file: 1993/vanb/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>1993 vanb</title>
|
||||
<meta name="description" content="IOCCC year: 1993 IOCCC winner: vanb winner index page">
|
||||
<meta name="keywords" content="IOCCC,1993,vanb,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>1993/vanb</title>
|
||||
<meta name="description" content="1993 IOCCC winner vanb">
|
||||
<meta name="keywords" content="IOCCC, 1993, IOCCC 1993, IOCCC winner, vanb">
|
||||
</head>
|
||||
|
||||
<!-- END: this line ends content from: inc/head.default.html -->
|
||||
<!-- START: this line starts content from: inc/body.default.html -->
|
||||
|
||||
<body>
|
||||
|
||||
<h1>1993 vanb</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>1993/vanb</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%2F1993%2Fvanb%2Findex.html">Nu Html check https://ioccc-src.github.io/temp-test-ioccc/1993/vanb/index.html</a></p>
|
||||
<!-- End Nu Html Checker -->
|
||||
<div class="topnav">
|
||||
<a class="Left" href="../schnitzi/index.html">← schnitzi</a>
|
||||
<a class="Left" href="../index.html">↑ 1993 ↑</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 & (mis)features</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_a_winner">Fixing IOCCC winners</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_web_site">Fixing the web site</a>
|
||||
<a href="/temp-test-ioccc/faq.html#fix_author">Fixing winner info</a>
|
||||
<a href="/temp-test-ioccc/thanks-for-help.html">Thanks for the help</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="/temp-test-ioccc/judges.html">The IOCCC Judges</a>
|
||||
<a href="/temp-test-ioccc/contact.html">Contacting the IOCCC</a>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sidenav">
|
||||
<a href="#top">Jump to top</a>
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/sidenav.default.html -->
|
||||
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
|
||||
|
||||
<div class="rightcolumn">
|
||||
|
||||
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
|
||||
<!-- START: this line starts content from: inc/before-content.default.html -->
|
||||
|
||||
<a name="content"></a>
|
||||
|
||||
<!-- END: this line ends content from: inc/before-content.default.html -->
|
||||
<!-- START: this line starts content generated by: bin/gen-author.sh -->
|
||||
|
||||
<p><a name="author"><strong>Author:</strong></a> <br><br>Name: <a
|
||||
href="/temp-test-ioccc/winners.html#David_Van_Brackle">David Van
|
||||
Brackle</a><br> Location: <a
|
||||
href="/temp-test-ioccc/location.html#null">unknown</a></p>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/gen-author.sh -->
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<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#1993-vanb">1993
|
||||
vanb 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">./vanb</span> <span class="st">'exp'</span></span></code></pre></div>
|
||||
<p>where <code>exp</code> is an octal expression. See below for how it
|
||||
can also have hexadecimal and decimal numbers.</p>
|
||||
<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>
|
||||
<p>What happens if you use something other than valid digits?</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The octal expression may contain:</p>
|
||||
<pre><code>unary operators: +, -
|
||||
binary operators +, -, *, /, %
|
||||
hex numbers: x or X followed by hex digits
|
||||
decimal numbers: d or D followed by decimal digits
|
||||
octal numbers: octal digits
|
||||
grouping: ()</code></pre>
|
||||
<p>No spaces are allowed in the expression. To avoid shell expansion,
|
||||
one should surround the expression in single quotes.</p>
|
||||
<p>It is a good thing that this program consists of only one expression,
|
||||
otherwise it might become hard to understand. :-)</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>The program does no error checking - erroneous expressions will
|
||||
produce spurious results. Note that unary <code>-</code> is an operator.
|
||||
Thus, decimal <code>-46</code> would be entered as <code>-d46</code> and
|
||||
not <code>d-46</code>.</p>
|
||||
<h3 id="what-makes-this-program-special">What Makes This Program
|
||||
Special:</h3>
|
||||
<ol start="0" type="1">
|
||||
<li><p>Of course, the fact that the program takes input and produces
|
||||
output in octal, rather than a more useful system like decimal, makes it
|
||||
“special”.</p></li>
|
||||
<li><p>The entire program consists of a single expression, returned from
|
||||
<code>main()</code>.</p></li>
|
||||
<li><p>There are no global or local variables other than the parameters
|
||||
to <code>main()</code>.</p></li>
|
||||
<li><p>All of the constants in the program are expressed in octal -
|
||||
including the <code>printf(3)</code> string.</p></li>
|
||||
<li><p>The variables are given names which cause visual confusion with
|
||||
the octal constants.</p></li>
|
||||
<li><p>The program is formatted like a Roman numeral 8. The significance
|
||||
of 8 is obvious. I chose Roman numerals because it is a numbering system
|
||||
even more arcane than octal. It’s not very ‘deceptive’, but it’s
|
||||
difficult to deceptively format a program which has no explicit control
|
||||
structures (other than <code>?:</code>s).</p></li>
|
||||
<li><p>Many simple tasks are done many times. I tried to do these
|
||||
differently each time, to make the program harder to
|
||||
understand.</p></li>
|
||||
</ol>
|
||||
<h3 id="how-it-works">How It Works:</h3>
|
||||
<p>It’s a recursive descent parser, calling <code>main()</code> for all
|
||||
of its recursion. <code>O2</code> is a state variable, telling
|
||||
<code>main()</code> what grammar non-terminal to parse.
|
||||
<code>**O7</code> is the next character. <code>O3</code> is an
|
||||
intermediate result. Whenever you see a construct like:</p>
|
||||
<pre><code>!(expression with O2)?</code></pre>
|
||||
<p>it’s decrementing and testing <code>O2</code> to see what state it’s
|
||||
in. Comparisons involving <code>**O7</code> and octal constants are
|
||||
looking for certain characters.</p>
|
||||
<p>Here’s the grammar (<code>'e'</code> denotes the empty string) :</p>
|
||||
<pre><code><E> ::= <T><E'>
|
||||
<E'> ::= +<T><E'> | -<T><E'> | e
|
||||
<T> ::= <F><T'>
|
||||
<T'> ::= *<F><T'> | /<F><T'> | %<F><T'> | e
|
||||
<F> ::= +<F> | -<F> | (<E><C> | d<D> | D<D> | x<X> | X<X> | <O>
|
||||
<C> ::= )
|
||||
<D> ::= [0-9]<D> | e
|
||||
<X> ::= [0-9]<X> | [A-F]<X> | [a-f]<X> | e
|
||||
<O> ::= [0-7]<O> | e</code></pre>
|
||||
<p>Here’s how the grammar nonterminals map to octal state numbers:</p>
|
||||
<pre><code><E> is 012
|
||||
<E'> is 011
|
||||
<T> is 010
|
||||
<T'> is 07
|
||||
<F> is 06
|
||||
<C> is 013
|
||||
<D> is 04
|
||||
<X> is 05
|
||||
<O> is 03</code></pre>
|
||||
<p>Here’s a version of the program before it got formatted into the
|
||||
VIII, augmented with comments showing where each state begins.
|
||||
<code>N1</code> and <code>N2</code> are notes:</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><span class="pp">#define O5 main</span></span>
|
||||
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a>O5<span class="op">(</span>O2<span class="op">,</span>O7<span class="op">,</span>O3<span class="op">)</span><span class="dt">char</span><span class="op">**</span>O7<span class="op">;</span></span>
|
||||
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span>
|
||||
<span id="cb9-4"><a href="#cb9-4" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span></span>
|
||||
<span id="cb9-5"><a href="#cb9-5" aria-hidden="true" tabindex="-1"></a><span class="co">/* N1 */</span> <span class="op">!(</span>O2<span class="op">+=~</span><span class="bn">01</span><span class="op">+</span><span class="bn">01</span><span class="op">)</span> <span class="op">?</span>\</span>
|
||||
<span id="cb9-6"><a href="#cb9-6" aria-hidden="true" tabindex="-1"></a> <span class="bn">00</span><span class="op">:</span></span>
|
||||
<span id="cb9-7"><a href="#cb9-7" aria-hidden="true" tabindex="-1"></a><span class="co">/* N2 */</span> <span class="op">!(</span>O2<span class="op">-=</span><span class="bn">02</span><span class="op">></span><span class="bn">01</span><span class="op">)</span> <span class="op">?</span>\</span>
|
||||
<span id="cb9-8"><a href="#cb9-8" aria-hidden="true" tabindex="-1"></a> printf<span class="op">(</span><span class="st">"</span><span class="sc">\045</span><span class="er">\1</span><span class="st">57</span><span class="sc">\012</span><span class="st">"</span><span class="op">,</span>O5<span class="op">(</span><span class="bn">012</span><span class="op">,</span>O7<span class="op">+</span><span class="bn">01</span><span class="op">,</span><span class="bn">00</span><span class="op">)):</span></span>
|
||||
<span id="cb9-9"><a href="#cb9-9" aria-hidden="true" tabindex="-1"></a><span class="co">/* O */</span> <span class="op">!(</span>O2<span class="op">-=</span><span class="bn">02</span><span class="op">>></span><span class="bn">01</span><span class="op">)</span> <span class="op">?</span>\</span>
|
||||
<span id="cb9-10"><a href="#cb9-10" aria-hidden="true" tabindex="-1"></a> <span class="op">(**</span>O7<span class="op"><=</span><span class="bn">067</span> <span class="op">&&</span> <span class="op">**</span>O7<span class="op">></span><span class="bn">057</span> <span class="op">?</span> O5<span class="op">(</span><span class="bn">03</span><span class="op">,</span>O7<span class="op">,*(*</span>O7<span class="op">)++-</span><span class="bn">060</span><span class="op">+</span><span class="bn">010</span><span class="op">*</span>O3<span class="op">):</span>O3<span class="op">):</span></span>
|
||||
<span id="cb9-11"><a href="#cb9-11" aria-hidden="true" tabindex="-1"></a><span class="co">/* D */</span> <span class="op">!(</span>O2<span class="op">-=-</span>O3<span class="op">-~</span>O3<span class="op">)</span> <span class="op">?</span>\</span>
|
||||
<span id="cb9-12"><a href="#cb9-12" aria-hidden="true" tabindex="-1"></a> <span class="op">(</span><span class="bn">072</span><span class="op">>**</span>O7 <span class="op">&&</span> <span class="bn">060</span><span class="op"><=**</span>O7 <span class="op">?</span> O5<span class="op">(</span><span class="bn">04</span><span class="op">,</span>O7<span class="op">,</span><span class="bn">012</span><span class="op">*</span>O3<span class="op">-</span><span class="bn">060</span><span class="op">+*(*</span>O7<span class="op">)++):</span>O3<span class="op">):</span></span>
|
||||
<span id="cb9-13"><a href="#cb9-13" aria-hidden="true" tabindex="-1"></a><span class="co">/* X */</span> <span class="op">!(</span>O2<span class="op">-=!</span>O3<span class="op">+!!</span>O3<span class="op">)</span> <span class="op">?</span>\</span>
|
||||
<span id="cb9-14"><a href="#cb9-14" aria-hidden="true" tabindex="-1"></a> <span class="op">(**</span>O7<span class="op">></span><span class="bn">057</span> <span class="op">&&</span> <span class="op">**</span>O7<span class="op"><=</span><span class="bn">071</span> <span class="op">?</span> O5<span class="op">(</span><span class="bn">05</span><span class="op">,</span>O7<span class="op">,*(*</span>O7<span class="op">)+++</span>O3<span class="op">*</span><span class="bn">020</span><span class="op">-</span><span class="bn">060</span><span class="op">):</span></span>
|
||||
<span id="cb9-15"><a href="#cb9-15" aria-hidden="true" tabindex="-1"></a> <span class="op">**</span>O7<span class="op"><=</span><span class="bn">0106</span> <span class="op">&&</span> <span class="bn">0101</span><span class="op"><=**</span>O7 <span class="op">?</span> O5<span class="op">(</span><span class="bn">05</span><span class="op">,</span>O7<span class="op">,</span><span class="bn">020</span><span class="op">*</span>O3<span class="op">+*(*</span>O7<span class="op">)++-</span><span class="bn">067</span><span class="op">):</span></span>
|
||||
<span id="cb9-16"><a href="#cb9-16" aria-hidden="true" tabindex="-1"></a> <span class="bn">0140</span><span class="op"><**</span>O7 <span class="op">&&</span> <span class="op">**</span>O7<span class="op"><</span><span class="bn">0147</span> <span class="op">?</span> O5<span class="op">(</span><span class="bn">05</span><span class="op">,</span>O7<span class="op">,-</span><span class="bn">0127</span><span class="op">+*(*</span>O7<span class="op">)+++</span><span class="bn">020</span><span class="op">*</span>O3<span class="op">):</span>O3<span class="op">):</span></span>
|
||||
<span id="cb9-17"><a href="#cb9-17" aria-hidden="true" tabindex="-1"></a><span class="co">/* F */</span> <span class="op">!(</span>O2<span class="op">-=</span><span class="bn">02</span><span class="op">-</span><span class="bn">01</span><span class="op">)</span> <span class="op">?</span>\</span>
|
||||
<span id="cb9-18"><a href="#cb9-18" aria-hidden="true" tabindex="-1"></a> <span class="op">(**</span>O7<span class="op">==</span><span class="bn">050</span> <span class="op">?</span> <span class="bn">050</span><span class="op">**++*</span>O7<span class="op">,</span>O5<span class="op">(</span><span class="bn">013</span><span class="op">,</span>O7<span class="op">,</span>O5<span class="op">(</span><span class="bn">012</span><span class="op">,</span>O7<span class="op">,</span><span class="bn">00</span><span class="op">)):</span></span>
|
||||
<span id="cb9-19"><a href="#cb9-19" aria-hidden="true" tabindex="-1"></a> <span class="op">**</span>O7<span class="op"><</span><span class="bn">056</span> <span class="op">&&</span> <span class="bn">054</span><span class="op"><**</span>O7 <span class="op">?</span> <span class="bn">055</span><span class="op">**++*</span>O7<span class="op">,-</span>O5<span class="op">(</span><span class="bn">06</span><span class="op">,</span>O7<span class="op">,</span><span class="bn">00</span><span class="op">):</span></span>
|
||||
<span id="cb9-20"><a href="#cb9-20" aria-hidden="true" tabindex="-1"></a> <span class="bn">054</span><span class="op">>**</span>O7 <span class="op">&&</span> <span class="bn">052</span><span class="op"><**</span>O7 <span class="op">?</span> <span class="bn">050</span><span class="op">**(*</span>O7<span class="op">)++,</span>O5<span class="op">(</span><span class="bn">06</span><span class="op">,</span>O7<span class="op">,</span><span class="bn">00</span><span class="op">):</span></span>
|
||||
<span id="cb9-21"><a href="#cb9-21" aria-hidden="true" tabindex="-1"></a> <span class="op">!(**</span>O7<span class="op">^</span><span class="bn">0170</span><span class="op">)||!(</span><span class="bn">0130</span><span class="op">^**</span>O7<span class="op">)</span> <span class="op">?</span> <span class="op">*++*</span>O7<span class="op">,</span>O5<span class="op">(</span><span class="bn">05</span><span class="op">,</span>O7<span class="op">,</span><span class="bn">00</span><span class="op">):</span></span>
|
||||
<span id="cb9-22"><a href="#cb9-22" aria-hidden="true" tabindex="-1"></a> <span class="op">**</span>O7<span class="op">==</span><span class="bn">0144</span><span class="op">||**</span>O7<span class="op">==</span><span class="bn">0104</span> <span class="op">?</span> <span class="op">++*</span>O7<span class="op">,</span>O5<span class="op">(</span><span class="bn">04</span><span class="op">,</span>O7<span class="op">,</span><span class="bn">00</span><span class="op">):</span>O5<span class="op">(</span><span class="bn">03</span><span class="op">,</span>O7<span class="op">,</span><span class="bn">00</span><span class="op">)):</span></span>
|
||||
<span id="cb9-23"><a href="#cb9-23" aria-hidden="true" tabindex="-1"></a><span class="co">/* T' */</span> <span class="op">!--</span>O2 <span class="op">?</span>\</span>
|
||||
<span id="cb9-24"><a href="#cb9-24" aria-hidden="true" tabindex="-1"></a> <span class="op">(**</span>O7<span class="op">==</span><span class="bn">052</span> <span class="op">?</span> O5<span class="op">(</span><span class="bn">07</span><span class="op">,</span>O7<span class="op">,</span>O3<span class="op">*(*++*</span>O7<span class="op">,</span>O5<span class="op">(</span><span class="bn">06</span><span class="op">,</span>O7<span class="op">,</span><span class="bn">00</span><span class="op">))):</span></span>
|
||||
<span id="cb9-25"><a href="#cb9-25" aria-hidden="true" tabindex="-1"></a> <span class="op">!(</span><span class="bn">045</span><span class="op">-**</span>O7<span class="op">)</span> <span class="op">?</span> O5<span class="op">(</span><span class="bn">07</span><span class="op">,</span>O7<span class="op">,</span>O3<span class="op">%(</span><span class="bn">03</span><span class="op">+(*</span>O7<span class="op">)++,</span>O5<span class="op">(</span><span class="bn">06</span><span class="op">,</span>O7<span class="op">,</span><span class="bn">00</span><span class="op">))):</span></span>
|
||||
<span id="cb9-26"><a href="#cb9-26" aria-hidden="true" tabindex="-1"></a> <span class="op">!(**</span>O7<span class="op">^</span><span class="bn">057</span><span class="op">)</span> <span class="op">?</span> O5<span class="op">(</span><span class="bn">07</span><span class="op">,</span>O7<span class="op">,</span>O3<span class="op">/(</span><span class="bn">03</span><span class="op">-*++*</span>O7<span class="op">,</span>O5<span class="op">(</span><span class="bn">06</span><span class="op">,</span>O7<span class="op">,</span><span class="bn">00</span><span class="op">))):</span>O3<span class="op">):</span></span>
|
||||
<span id="cb9-27"><a href="#cb9-27" aria-hidden="true" tabindex="-1"></a><span class="co">/* T */</span> <span class="op">!(</span>O2<span class="op">+=</span><span class="bn">01</span><span class="op">-</span><span class="bn">02</span><span class="op">)</span> <span class="op">?</span>\</span>
|
||||
<span id="cb9-28"><a href="#cb9-28" aria-hidden="true" tabindex="-1"></a> O5<span class="op">(</span><span class="bn">07</span><span class="op">,</span>O7<span class="op">,</span>O5<span class="op">(</span><span class="bn">06</span><span class="op">,</span>O7<span class="op">,</span><span class="bn">00</span><span class="op">)):</span></span>
|
||||
<span id="cb9-29"><a href="#cb9-29" aria-hidden="true" tabindex="-1"></a><span class="co">/* E' */</span> <span class="op">!(</span>O2<span class="op">+=-</span><span class="bn">02</span><span class="op">/</span><span class="bn">02</span><span class="op">)</span> <span class="op">?</span>\</span>
|
||||
<span id="cb9-30"><a href="#cb9-30" aria-hidden="true" tabindex="-1"></a> <span class="op">(!(**</span>O7<span class="op">-</span><span class="bn">053</span><span class="op">)?</span>O5<span class="op">(</span><span class="bn">011</span><span class="op">,</span>O7<span class="op">,</span>O3<span class="op">+(++*</span>O7<span class="op">,</span>O5<span class="op">(</span><span class="bn">010</span><span class="op">,</span>O7<span class="op">,</span><span class="bn">00</span><span class="op">))):</span></span>
|
||||
<span id="cb9-31"><a href="#cb9-31" aria-hidden="true" tabindex="-1"></a> <span class="op">!(</span><span class="bn">055</span><span class="op">^**</span>O7<span class="op">)</span> <span class="op">?</span> O5<span class="op">(</span><span class="bn">011</span><span class="op">,</span>O7<span class="op">,</span>O3<span class="op">-(</span><span class="bn">03</span><span class="op">+*(*</span>O7<span class="op">)++,</span>O5<span class="op">(</span><span class="bn">010</span><span class="op">,</span>O7<span class="op">,</span><span class="bn">00</span><span class="op">))):</span>O3<span class="op">):</span></span>
|
||||
<span id="cb9-32"><a href="#cb9-32" aria-hidden="true" tabindex="-1"></a><span class="co">/* E */</span> <span class="op">!(</span>O2<span class="op">-=</span><span class="bn">0563</span><span class="op">&</span><span class="bn">0215</span><span class="op">)</span> <span class="op">?</span>\</span>
|
||||
<span id="cb9-33"><a href="#cb9-33" aria-hidden="true" tabindex="-1"></a> O5<span class="op">(</span><span class="bn">011</span><span class="op">,</span>O7<span class="op">,</span>O5<span class="op">(</span><span class="bn">010</span><span class="op">,</span>O7<span class="op">,</span><span class="bn">00</span><span class="op">)):</span></span>
|
||||
<span id="cb9-34"><a href="#cb9-34" aria-hidden="true" tabindex="-1"></a><span class="co">/* C */</span> <span class="op">(++*</span>O7<span class="op">,</span>O3<span class="op">);</span></span>
|
||||
<span id="cb9-35"><a href="#cb9-35" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
|
||||
<p>Note <code>N1</code>: It should never enter this state, unless the
|
||||
user invokes the program with no parameters, in which case it just
|
||||
returns 0.</p>
|
||||
<p>Note <code>N2</code>: Since the program is properly invoked with 1
|
||||
parameter, this is the first state it will go into. This state just
|
||||
invokes printf, and sends the parser to state <code>012</code> (which is
|
||||
<code><E></code>).</p>
|
||||
<p>The <code>E</code> and <code>T</code> states work like this:</p>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="dt">int</span> e<span class="op">(){</span> <span class="cf">return</span> eprime<span class="op">(</span> t<span class="op">()</span> <span class="op">);</span> <span class="op">}</span></span></code></pre></div>
|
||||
<p>The <code>E'</code> and <code>T'</code> states work like this:</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><span class="dt">int</span> eprime<span class="op">(</span> <span class="dt">int</span> intermediate <span class="op">)</span></span>
|
||||
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span>
|
||||
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span><span class="op">(</span> ch <span class="op">==</span> <span class="ch">'+'</span> <span class="op">)</span></span>
|
||||
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a> <span class="op">{</span></span>
|
||||
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a> ch <span class="op">=</span> nextchar<span class="op">();</span></span>
|
||||
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> eprime<span class="op">(</span> intermediate <span class="op">+</span> t<span class="op">()</span> <span class="op">);</span></span>
|
||||
<span id="cb11-7"><a href="#cb11-7" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
|
||||
<span id="cb11-8"><a href="#cb11-8" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span> <span class="cf">return</span> intermediate<span class="op">;</span></span>
|
||||
<span id="cb11-9"><a href="#cb11-9" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
|
||||
<p>The <code>D</code>, <code>X</code> and <code>O</code> states work
|
||||
like this (they assume that they’re initially called with
|
||||
<code>0</code>):</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="dt">int</span> octal<span class="op">(</span> <span class="dt">int</span> intermediate <span class="op">)</span></span>
|
||||
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span>
|
||||
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span><span class="op">(</span> ch<span class="op">>=</span><span class="ch">'0'</span> <span class="op">&&</span> ch<span class="op"><=</span><span class="ch">'7'</span> <span class="op">)</span></span>
|
||||
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a> <span class="op">{</span></span>
|
||||
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true" tabindex="-1"></a> intermediate <span class="op">=</span> intermediate <span class="op">*</span> <span class="dv">8</span> <span class="op">+</span> ch <span class="op">-</span> <span class="ch">'0'</span><span class="op">;</span></span>
|
||||
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true" tabindex="-1"></a> ch <span class="op">=</span> nextchar<span class="op">();</span></span>
|
||||
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> octal<span class="op">(</span> intermediate <span class="op">);</span></span>
|
||||
<span id="cb12-8"><a href="#cb12-8" aria-hidden="true" tabindex="-1"></a> <span class="op">}</span></span>
|
||||
<span id="cb12-9"><a href="#cb12-9" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span> <span class="cf">return</span> intermediate<span class="op">;</span></span>
|
||||
<span id="cb12-10"><a href="#cb12-10" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
|
||||
<p><code>F</code> and <code>C</code> work similarly.</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-1993vanb"><a name="inventory"></a>Inventory for
|
||||
1993/vanb</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/1993/vanb/vanb.c">vanb.c</a>
|
||||
- winning source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/Makefile">Makefile</a>
|
||||
- winner Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/vanb.alt.c">vanb.alt.c</a>
|
||||
- alternative source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/vanb.orig.c">vanb.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="1993_vanb.tar.bz2">1993_vanb.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/1993/vanb/.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/1993/vanb/.winner.json">.winner.json</a>
|
||||
- description of winner in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/vanb/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%2F1993%2Fvanb%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 -->
|
||||
Reference in new issue
Block a user