Files
ioccc/2000/tomx/index.html
T
Landon Curt Noll a9ca93ec47 fix markdown footnote problem caused by pandoc
Add "<!-- BEFORE: 1st line of markdown file: FILE/PATH -->"
before the markdown content.  This line appears in the
generated HTML.

Add "<!-- AFTER: last line of markdown file: FILE/PATH -->"
after the markdown content.  This line appears in the
generated HTML.

We test a fix relating to problems produced by `pandoc(1)`
when footnotes are added at the end of generated HTML.
This test is made for `2000/bmeyer/index.html`.

Fixed exit 4 in `bin/md2html.sh that should be exit 5.

Changed `bin/md2html.sh` VERSION from to "1.3 2024-04-14"
to "1.4 2024-04-18".

Run `bin/readme2index.sh -v 1 2000/bmeyer` to perform the above.
2024-04-19 01:20:31 -07:00

339 lines
17 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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 -->
<!-- END: this line ends content from: inc/top.default.html -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<link rel="stylesheet" href="../../ioccc.css">
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap" rel="stylesheet">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>2000/tomx - Most Complete Program</title>
<link rel="icon" type="image/x-icon" href="../../favicon.ico">
<meta name="description" content="2000 IOCCC entry tomx - Most Complete Program">
<meta name="keywords" content="IOCCC, 2000, IOCCC 2000, IOCCC entry, tomx, Most Complete Program">
</head>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- END: this line ends content from: inc/head.default.html -->
<!-- -->
<!-- This web page was formed via the tool: bin/readme2index.sh -->
<!-- The content of main section of this web page came from: 2000/tomx/README.md -->
<!-- -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2000/tomx/README.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2000/tomx/README.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2000/tomx/README.md !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- Markdown content was converted into HTML via the tool: bin/md2html.sh -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/topbar.default.html -->
<div class="theader">
<nav class="topbar">
<div class="container">
<div class="logo">
IOCCC
</div>
<div class="topbar-items">
<div class="item">
<span class="item-header">
Home
</span>
<div class="sub-item">
<div class="outfit-font"><a href="../../index.html">IOCCC Home</a></div>
<div class="outfit-font"><a href="../../years.html">Winning Entries</a></div>
<div class="outfit-font"><a href="../../authors.html">People who have won</a></div>
<div class="outfit-font"><a href="../../location.html">Location of authors</a></div>
</div>
</div>
<div class="item">
<span class="item-header">
News
</span>
<div class="sub-item">
<div class="outfit-font"><a href="../../news.html">IOCCC News</a></div>
<div class="outfit-font"><a href="../../status.html">Contest status</a></div>
<div class="outfit-font"><a href="../../next/index.html">Rules and Guidelines</a></div>
<div class="outfit-font"><a href="../../faq.html#submit">How to enter the IOCCC</a></div>
<div class="outfit-font"><a href="../../faq.html">FAQ</a></div>
</div>
</div>
<div class="item">
<span class="item-header">
Bugs
</span>
<div class="sub-item">
<div class="outfit-font"><a href="../../bugs.html">Bugs &amp; (mis)features</a></div>
<div class="outfit-font"><a href="../../faq.html#fix_an_entry">Fixing IOCCC entries</a></div>
<div class="outfit-font"><a href="../../faq.html#fix_web_site">Fixing the web site</a></div>
<div class="outfit-font"><a href="../../faq.html#fix_author">Fixing author info</a></div>
<div class="outfit-font"><a href="../../thanks-for-help.html">Thanks for the help</a></div>
</div>
</div>
<div class="item">
<span class="item-header">
Judges
</span>
<div class="sub-item">
<div class="outfit-font"><a href="../../judges.html">The IOCCC Judges</a></div>
<div class="outfit-font"><a href="../../contact.html">Contacting the IOCCC</a></div>
</div>
</div>
</div>
</div>
</nav>
</div>
<!-- END: this line ends content from: inc/topbar.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<div class="header">
<img src="../../png/ioccc.png" alt="IOCCC image by Matt Zucker" width=300 height=110>
<h1>The International Obfuscated C Code Contest</h1>
<h2>2000/tomx - Most Complete Program</h2>
</div>
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/navbar.last.html -->
<div class="navbar">
<a class="Left" href="../thadgavin/index.html">&larr; thadgavin</a>
<a class="Left" href="../index.html">&uarr; 2000 &uarr;</a>
<a class="Left Disabled" href="#">last entry</a>
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/tomx.c">C code</a>
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/Makefile">Makefile</a>
<a class="Right" href="#inventory">Inventory</a>
<a class="Right" href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2000%2Ftomx%2Findex.html">&#x2713;</a>
</div>
<!-- END: this line ends content from: inc/navbar.last.html -->
<!-- START: this line starts content from: inc/before-content.default.html -->
<div class="content" id="content">
<!-- END: this line ends content from: inc/before-content.default.html -->
<!-- START: this line starts content for HTML phase 20 by: bin/output-index-author.sh via bin/md2html.sh -->
<!-- START: this line starts content generated by: bin/output-index-author.sh -->
<h2 id="author">Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Thomas_P_John">Thomas P John</a><br>
Location: <a href="../../location.html#NL">NL</a> - <em>Kingdom of the Netherlands</em> (<em>Netherlands</em>)</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
<!-- END: this line ends content for HTML phase 20 by: bin/output-index-author.sh via bin/md2html.sh -->
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- BEFORE: 1st line of markdown file: 2000/tomx/README.md -->
<h2 id="to-build">To build:</h2>
<pre><code> make</code></pre>
<p>There is an alternate version that compiles <a href="mkentry.c">mkentry.c</a>. See
<a href="#alternate-code">alternate code</a>.</p>
<h2 id="to-use">To use:</h2>
<pre><code> ./tomx</code></pre>
<h2 id="try">Try:</h2>
<pre><code> ./try.sh</code></pre>
<h2 id="alternate-code">Alternate code:</h2>
<p>This alternate code is based on the author’s remarks with a slight fix so that
it will do what it once did, compile and run <a href="mkentry.c">mkentry.c</a>. You can use
it in a similar way as <a href="tomx.c">tomx.c</a>, both executing the source file and
using it as a Makefile and running the code ends up running <code>mkentry</code>.</p>
<h3 id="alternate-build">Alternate build:</h3>
<pre><code> make alt</code></pre>
<h3 id="alternate-try">Alternate try:</h3>
<pre><code> ./try.alt.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Polyglots have come and gone, but this was the first one we’d seen
where one language <em>used</em> another to perform its tasks. An interesting
approach. Admittedly, it’s not all that obfuscated - but there’s more
to it than you might think, since you have to make sure that your
changes don’t change the shell code or the Makefile.</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
<h3 id="summary">Summary</h3>
<p>This program works as a C source file, a Makefile and also as a shell
(<code>/bin/sh</code>) script. But unlike some other multi-language programs, this one is
NOT meant to print <code>Hello, world</code> in all 3 cases (At least in the true sense
;-)). The C, Makefile and shell code build upon each other to create a C program (?)
which when executed as a shell script will compile itself through the C compiler
using a Makefile! - Pretty useful, Eh?</p>
<p>Probably, this is the first entry ever to fully satisfy Rule #1 (“Your entry
must be a complete program”) in the strictest sense;-)</p>
<h3 id="top-5-reasons-imho-why-this-code-is-an-entry-for-ioccc">Top 5 reasons (IMHO) why this code is an entry for IOCCC</h3>
<ol type="1">
<li><p>A glance at the source itself will tell you that most of the
Obfuscation is NOT in the C code per se, but in the comments
to the C code. (But sadly, I could not find an “International
Obfuscated C COMMENT contest”. So I HAD to send this entry
here to the IOCCC itself).</p></li>
<li><p>Of the 3 languages in the source, the least obfuscated is
C (But again, there was NO obfuscated make/shscript contest)
(Does this hint for a rule in IOCCC-2001 that the major
obfuscation should be in C and not elsewhere???. Mmmmm…).</p></li>
<li><p>Extending Argument #2… Obfuscation done in the C code
(comments?) creates obfuscated code for the other 2 languages.
This opens new possibilities to be explored in depth in future
<code>IOCCC</code>s.</p></li>
<li><p>LOOKS like a Makefile, WORKS like a shell script and COMPILES
like a C program.</p></li>
<li><p>Does something useful (See Notes #1 and #2 below).</p></li>
</ol>
<h3 id="notes">Notes</h3>
<ol type="1">
<li>The program could have been something other than the simple “Hello, world”
program that it is. It is possible to do <code>#include "prog2.c"</code> in the place of
the <code>main()</code>, leaving the complexities of the C file elsewhere and making this
source still acceptable to <code>make</code> and <code>sh</code>. The following modification to the
last few lines will compile the IOCCC’s famous <a href="mkentry.c">mkentry.c</a>.</li>
</ol>
<pre><code> .PHONY: /* true clean */
#undef true
#include &quot;mkentry.c&quot;</code></pre>
<p>Ain’t that useful?</p>
<ol start="2" type="1">
<li><p>By extending this program’s idea, It is possible to do some
very interesting things like generating C code on execution
by adding additional code in make/sh (open up a loop????).
This opens the possibilities of generating &amp; compiling some
(obfuscated?) C code. (Maybe should try this if this program
fails at IOCCC 2000)</p></li>
<li><p>Changing the <code>%:%.c</code> dependency to a <code>$(PROG):$(PROG).c</code> form
can compile this program with some other <code>make</code>s (I got it to
work in Windows using nmake and Gnuwin32’s sh ;-) )</p></li>
<li><p>Interesting things to do: try <code>./tomx.c clean</code>. This will
do the same as <code>make clean</code> :-)). Also: <code>./tomx.c all</code></p></li>
<li><p>Be careful about the tabs in the source code. Removing them
or converting tabs to spaces can be disastrous.</p></li>
</ol>
<!--
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
You are free to share and adapt this file under the terms of this license:
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
For more information, see:
https://creativecommons.org/licenses/by-sa/4.0/
-->
<!-- AFTER: last line of markdown file: 2000/tomx/README.md -->
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- START: this line starts content for HTML phase 22 by: bin/output-index-inventory.sh via bin/md2html.sh -->
<!-- START: this line starts content generated by: bin/output-index-inventory.sh -->
<div id="inventory">
<h1 id="inventory-for-2000tomx">Inventory for 2000/tomx</h1>
</div>
<p><a href="#top">Jump to top</a></p>
<h2 id="primary-files">Primary files</h2>
<ul>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/tomx.c">tomx.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/tomx.alt.c">tomx.alt.c</a> - alternative source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/tomx.orig.c">tomx.orig.c</a> - original source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/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/2000/tomx/try.sh">try.sh</a> - how to run</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/mkentry.c">mkentry.c</a> - IOCCC mkentry source from 1998</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2000_tomx.tar.bz2">2000_tomx.tar.bz2</a> - download entry tarball</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/README.md">README.md</a> - markdown source for this web page</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/.entry.json">.entry.json</a> - description of entry in JSON</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/.gitignore">.gitignore</a> - list of files that should not be committed under git</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/tomx/.path">.path</a> - directory path from top directory</li>
<li><a href="index.html">index.html</a> - this web page</li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
<!-- END: this line ends content for HTML phase 22 by: bin/output-index-inventory.sh via bin/md2html.sh -->
<!-- START: this line starts content from: inc/after-content.default.html -->
</div>
<!-- END: this line ends content from: inc/after-content.default.html -->
<!-- START: this line starts content from: inc/footer.default.html -->
<!--
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
You are free to share and adapt this file under the terms of this license:
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
For more information, see:
https://creativecommons.org/licenses/by-sa/4.0/
-->
<div class="footer">
<div id="copyright"><h2>Copyright and CC BY-SA 4.0 License</h2></div>
<p>All IOCCC content including this file and web page are:</p>
<b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copyright &copy; 1984-2024 by Landon Curt Noll. <a href="https://creativecommons.org/faq/#what-does-some-rights-reserved-mean">Some Rights Reserved</a>.</b>
<p>This work is licensed by Landon Curt Noll under:</p>
<p><b><a href="https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1"
target="_blank" rel="license noopener noreferrer" style="display:inline-block;">&nbsp;&nbsp;&nbsp;&nbsp;CC BY-SA 4.0
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="../../png/cc.png"
alt="cc inside circle symbol">
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="../../png/by.png"
alt="person inside circle symbol">
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="../../png/sa.png"
alt="arrow looping back on itself inside circle symbol">
</a></b></p>
<p>The <b>CC BY-SA 4.0 LEGAL CODE</b> for this license is found under:</p>
<p>&nbsp;&nbsp;&nbsp;<b><a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode.en">
https://creativecommons.org/licenses/by-sa/4.0/legalcode.en</a></b></p>
<p>You should <b>carefully review</b> all of the terms and conditions of the
<a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode.en">actual license</a>
before using the licensed material.</p>
<p>You may wish to review the <b><a href="../../license.html">highlights of some of the key
features and terms</a></b> of the <a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode.en">actual license</a>.</p>
<h2>Coda</h2>
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2000%2Ftomx%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 -->