Files
ioccc/2000/thadgavin/index.html
T

327 lines
16 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">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>2000/thadgavin - Most Portable Output</title>
<link rel="icon" type="image/x-icon" href="../../favicon.ico">
<meta name="description" content="2000 IOCCC entry thadgavin - Most Portable Output">
<meta name="keywords" content="IOCCC, 2000, IOCCC 2000, IOCCC entry, thadgavin, Most Portable Output">
</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/thadgavin/README.md -->
<!-- -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2000/thadgavin/README.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2000/thadgavin/README.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2000/thadgavin/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/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/thadgavin - Most Portable Output</h2>
</div>
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/topnav.mid.html -->
<div class="topnav">
<a class="Left" href="../schneiderwent/index.html">&larr; schneiderwent</a>
<a class="Left" href="../index.html">&uarr; 2000 &uarr;</a>
<a class="Left" href="../tomx/index.html">tomx &rarr;</a>
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/thadgavin/thadgavin.c">C code</a>
<a class="Right" href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/thadgavin/Makefile">Makefile</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="../../index.html">IOCCC Home</a>
<a href="../../years.html">Winning Entries</a>
<a href="../../authors.html">People who have won</a>
<a href="../../location.html">Location of authors</a>
</div>
<hr>
<div class="sidenav">
<a href="../../news.html">IOCCC News</a>
<a href="../../status.html">Contest status</a>
<a href="../../next/index.html">Rules and Guidelines</a>
<a href="../../faq.html#submit">How to enter the IOCCC</a>
<a href="../../faq.html">FAQ</a>
</div>
<hr>
<div class="sidenav">
<a href="../../bugs.html">Bugs &amp; (mis)features</a>
<a href="../../faq.html#fix_an_entry">Fixing IOCCC entries</a>
<a href="../../faq.html#fix_web_site">Fixing the web site</a>
<a href="../../faq.html#fix_author">Fixing author info</a>
<a href="../../thanks-for-help.html">Thanks for the help</a>
</div>
<hr>
<div class="sidenav">
<a href="../../judges.html">The IOCCC Judges</a>
<a href="../../contact.html">Contacting the IOCCC</a>
</div>
<hr>
<div class="sidenav">
<a href="#top">Jump to top</a>
</div>
<!-- END: this line ends content from: inc/sidenav.default.html -->
<!-- START: this line starts content from: inc/end-leftcolumn.default.html -->
</div>
<!-- END: this line ends content from: inc/end-leftcolumn.default.html -->
<!-- START: this line starts content from: inc/begin-rightcolumn.default.html -->
<div class="rightcolumn">
<!-- END: this line ends content from: inc/begin-rightcolumn.default.html -->
<!-- START: this line starts content from: inc/before-content.default.html -->
<a name="content"></a>
<!-- END: this line ends content from: inc/before-content.default.html -->
<!-- START: this line starts content for HTML phase 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="authors"><a name="author"></a>Authors:</h2>
<ul>
<li>Name: <a href="../../authors.html#Gavin_Buttimore">Gavin Buttimore</a><br>
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
<br><br></li>
<li>Name: <a href="../../authors.html#Thaddaeus_Frogley">Thaddaeus Frogley</a><br>
Location: <a href="../../location.html#GB">GB</a> - <em>United Kingdom of Great Britain and Northern Ireland</em> (<em>United Kingdom</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 -->
<h2 id="to-build">To build:</h2>
<pre><code> make alt</code></pre>
<p>NOTE: if you don’t have curses or SDL1 installed both modes will fail to compile. In
that case see the <a href="../../faq.html#SDL">FAQ 3.8 - How do I compile an IOCCC entry that requires SDL1
or SDL2?</a> and <a href="../../faq.html#curses">FAQ 3.9 - How do I compile an IOCCC entry that
requires (n)curses?</a> for more information.</p>
<p>We recommend that you use the alternate code so you can see what this entry
looked like back in 2000 (with a configurable speed). See the
<a href="#original-code">original code</a> section for the original entry.</p>
<h2 id="to-use">To use:</h2>
<pre><code> ./thadgavin.alt</code></pre>
<p>You can press ‘q’ at any time to exit.</p>
<h2 id="try">Try:</h2>
<p>If you have SDL1 installed:</p>
<pre><code> ./thadgavin_sdl</code></pre>
<p>Whereas the curses version has an early exit the SDL version does not. You will
have to kill it yourself.</p>
<p>You might also wish to reconfigure the speed at which the programs run. The code
calls <code>usleep(3)</code> with two default values, one for SDL and one for curses. The
curses and SDL macros are defined in the Makefile in a way that makes it easy to
redefine the values: <code>SLEEP</code> is how long the program sleeps (in microseconds)
between output with curses and <code>SDL_SLEEP</code> is how long it sleeps (also in
microseconds) for the SDL version.</p>
<p>To change the SDL one to something like <code>15000</code> you can do:</p>
<pre><code> make SDL_SLEEP=15000 clobber alt</code></pre>
<p>and to change the curses one to <code>40</code>:</p>
<pre><code> make SLEEP=40 clobber alt</code></pre>
<p>Then use the program(s) in the same way.</p>
<p>The different macros is because the curses version is already much slower and so
it’s better to not tie the two values together. You may of course redefine both
in the same command.</p>
<h2 id="original-code">Original code:</h2>
<p>WARNING: if you are sensitive to rapid movement or if you want to see better
what is going on then please use the alternate code as described above. If you
wish to see the original entry see below.</p>
<p>NOTE: in curses mode you might want to type <code>reset</code> after execution of this
program if your terminal is messed up after exiting the program (send intr,
typically ctrl-c) as the program does not call <code>endwin()</code>. Using <code>reset</code> will
clear the screen. The alt code, as noted above, allows one to quit early so this
is not a problem there.</p>
<h3 id="original-build">Original build:</h3>
<pre><code> make all</code></pre>
<h3 id="original-use">Original use:</h3>
<pre><code> ./thadgavin</code></pre>
<h3 id="original-try">Original try:</h3>
<p>If you have SDL1 installed:</p>
<pre><code> ./thadgavin_sdl</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This entry is a nice play by the rules. It can use curses, if the
SDL graphic library is not present, and is quite good at that,
but the colors used in graphic mode (16 bit depth) are unfortunately
less than dazzling. We could not test this entry in DOS mode.</p>
<h2 id="authors-remarks">Authors’ remarks:</h2>
<h3 id="to-use-under-dos">To use under DOS:</h3>
<p>Compile using DJGPP as follows:</p>
<pre><code> gcc thadgavin.c -o thadgavin.exe -Wall -lm -O6 -mpentium -fomit-frame-pointer -ffast-math</code></pre>
<h3 id="to-use-under-windows-x-windows-or-macos-using-the-simple-directmedia-layer">To use under Windows, X-Windows or macOS using the Simple DirectMedia Layer:</h3>
<pre><code> gcc -O6 -lpthread -g -o thadgavin thadgavin.c -lSDL -DSDL -lm</code></pre>
<h3 id="to-use-curses">To use curses:</h3>
<pre><code> gcc -O6 -lpthread -g -o thadgavin thadgavin.c -lncurses -lm</code></pre>
<h3 id="warnings">Warnings</h3>
<p>In gcc you might get the following warning:</p>
<pre><code> thadgavin.c.c:46: warning: passing arg 2 of `SDL_SetColors&#39; from incompatible pointer type</code></pre>
<p>In Microsoft Visual Studio you may get warnings as follows:</p>
<pre><code> thadgavin.c(46) : warning C4133: &#39;function&#39; : incompatible types - from &#39;unsigned
char *&#39; to &#39;struct SDL_Color *&#39;
thadgavin.c(63) : warning C4026: function declared with formal parameter list
thadgavin.c(77) : warning C4244: &#39;=&#39; : conversion from &#39;double &#39; to &#39;unsigned
char &#39;, possible loss of data</code></pre>
<p>But don’t worry, this is completely normal.</p>
<h3 id="recommended-dosage">Recommended dosage:</h3>
<p>At least 3 minutes taken 3 times a day when tired.</p>
<p>Do not exceed 3 times recommended dose. May cause sickness, dizziness, nausea.</p>
<!--
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/
-->
<!-- 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 -->
<h1 id="inventory-for-2000thadgavin"><a name="inventory"></a>Inventory for 2000/thadgavin</h1>
<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/thadgavin/thadgavin.c">thadgavin.c</a> - entry source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/thadgavin/Makefile">Makefile</a> - entry Makefile</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/thadgavin/thadgavin.alt.c">thadgavin.alt.c</a> - alternative source</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/thadgavin/thadgavin.orig.c">thadgavin.orig.c</a> - original source</li>
</ul>
<h2 id="secondary-files">Secondary files</h2>
<ul>
<li><a href="2000_thadgavin.tar.bz2">2000_thadgavin.tar.bz2</a> - download entry tarball</li>
<li><a href="index.html">index.html</a> - this web page</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2000/thadgavin/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/thadgavin/.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/thadgavin/.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/thadgavin/.path">.path</a> - directory path from top directory</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 -->
<!-- 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 -->
<!--
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">
<h2><a name="copyright"></a>Copyright and CC BY-SA 4.0 License</h2>
<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 xmlns:cc="http://creativecommons.org/ns#" ><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%2Fthadgavin%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 -->