improved indentation and whitespace for markdown code blocks
All code blocks in markdown have been intended by at least 4 spaces. We add `--tab-stop=8` to all `pandoc(1)` executions in order to set a better tab stop indentation, especially for tab intended code blocks. Changed `bin/pandoc-wrapper.sh` VERSION from "1.5.3 2024-03-26" to "1.6 2024-03-31". Fixed `1991/brnstnd/sorta.README.md` so that the sorta code is code blocks. Removed unneeded paragraph group in copyright in `inc/footer.default.html`. Fixed excess whitespace after list Author on entry `index.html` page. Changed `bin/output-index-author.sh` VERSION from "1.5.2 2024-03-26" to "1.6 2024-03-31". Performed `make www` to perform the above and test under macOS. TODO: Fix the problem of the initial line of code being extra intended. TODO: Fix excess whitespace around code that is inline.
This commit is contained in:
1 parent
b84c27ce02
commit
a996f8d2b8
734 files changed
+16723
-16963
No files matched your search
+4
-4
@@ -60,7 +60,7 @@ Any of the following, though not required, would be a plus:
|
||||
If you think this may be you, send an email before 31 Dec 1995, to:
|
||||
|
||||
```
|
||||
judges@toad.com (use the Subject: 3rd judge)
|
||||
judges@toad.com (use the Subject: 3rd judge)
|
||||
```
|
||||
|
||||
Include in your message:
|
||||
@@ -82,7 +82,7 @@ access to put up some IOCCC html pages, please send an email (say prior
|
||||
to 31 Dec 1995) to:
|
||||
|
||||
```
|
||||
judges@toad.com (use the Subject: www site)
|
||||
judges@toad.com (use the Subject: www site)
|
||||
```
|
||||
|
||||
describing your site and any other appropriate comments. Thanks!
|
||||
@@ -107,8 +107,8 @@ Also include anything else that you would like to see in future contests.
|
||||
Send such email to:
|
||||
|
||||
```
|
||||
...!{sun,pacbell,uunet,pyramid}!hoptoad!judges
|
||||
judges@toad.com
|
||||
...!{sun,pacbell,uunet,pyramid}!hoptoad!judges
|
||||
judges@toad.com
|
||||
```
|
||||
|
||||
If you use, distribute or publish these entries in some way, please drop
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make all
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./dodsond1
|
||||
./dodsond1
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Don_Dodson">Don Dodson</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,9 +141,9 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- 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>
|
||||
<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>
|
||||
<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">./dodsond1</span></span></code></pre></div>
|
||||
<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">./dodsond1</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>At the prompt, try entering <code>E3</code>.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
|
||||
+10
-10
@@ -1,7 +1,7 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make all
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ code](#alternate-code) section below.
|
||||
The current status of this entry is:
|
||||
|
||||
```
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
```
|
||||
|
||||
For more detailed information see [1994 dodsond2 bugs](../../bugs.html#1994_dodsond2).
|
||||
@@ -24,7 +24,7 @@ For more detailed information see [1994 dodsond2 bugs](../../bugs.html#1994_dods
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./dodsond2
|
||||
./dodsond2
|
||||
```
|
||||
|
||||
|
||||
@@ -40,21 +40,21 @@ from working in some cases.
|
||||
### Alternate build:
|
||||
|
||||
```sh
|
||||
make alt
|
||||
make alt
|
||||
```
|
||||
|
||||
The default number of arrows in this version is 3 but if you want to change it,
|
||||
say to 5, try:
|
||||
|
||||
```sh
|
||||
make clobber ARROWS=5 alt
|
||||
make clobber ARROWS=5 alt
|
||||
```
|
||||
|
||||
|
||||
### Alternate use:
|
||||
|
||||
```sh
|
||||
./dodsond2.alt
|
||||
./dodsond2.alt
|
||||
```
|
||||
|
||||
|
||||
@@ -72,16 +72,16 @@ The original source code was submitted as a GZIP compressed file
|
||||
that the _file(1)_ command reports as:
|
||||
|
||||
```
|
||||
dodsond2.gz: gzip compressed data, last modified: Mon Aug 29 21:54:39 1994, max compression, from Unix, original size modulo 2^32 2652
|
||||
dodsond2.gz: gzip compressed data, last modified: Mon Aug 29 21:54:39 1994, max compression, from Unix, original size modulo 2^32 2652
|
||||
```
|
||||
|
||||
The [dodsond2.gz](dodsond2.gz) file was submitted as source
|
||||
in an effort to get around the 1994 version of Rule 2:
|
||||
|
||||
```
|
||||
2) Your entry must be <= 3217 bytes in length. The number of characters
|
||||
excluding whitespace (tab, space, newline), and excluding any ; { or }
|
||||
followed by either whitespace or end of file, must be <= 1536.
|
||||
2) Your entry must be <= 3217 bytes in length. The number of characters
|
||||
excluding whitespace (tab, space, newline), and excluding any ; { or }
|
||||
followed by either whitespace or end of file, must be <= 1536.
|
||||
```
|
||||
|
||||
Indeed, when [dodsond2.gz](dodsond2.gz) is uncompressed, it is identical
|
||||
|
||||
+11
-12
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Don_Dodson">Don Dodson</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,28 +141,28 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- 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>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> all</span></code></pre></div>
|
||||
<p>There is an alternate version that allows you to cheat, giving you configurable
|
||||
amount of arrows at the start of the game. 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>
|
||||
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#1994_dodsond2">1994 dodsond2 bugs</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">./dodsond2</span></span></code></pre></div>
|
||||
<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">./dodsond2</span></span></code></pre></div>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>This version allows you to choose how many arrows to start with, instead of the
|
||||
default 0. If one tries specifying a value < 0 it will set it to 0.</p>
|
||||
<p>Fun fact: this version helped uncover and fix a bug that prevented the entry
|
||||
from working in some cases.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> alt</span></code></pre></div>
|
||||
<p>The default number of arrows in this version is 3 but if you want to change it,
|
||||
say to 5, try:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber ARROWS=5 alt</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> clobber ARROWS=5 alt</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./dodsond2.alt</span></span></code></pre></div>
|
||||
<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">./dodsond2.alt</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Each year people find new ways to squeeze more and more out of the
|
||||
contest rules. Next year, entries that use compression utilities
|
||||
@@ -172,12 +171,12 @@ the contest!</p>
|
||||
<h3 id="a-historical-note">A historical note:</h3>
|
||||
<p>The original source code was submitted as a GZIP compressed file
|
||||
that the <em>file(1)</em> command reports as:</p>
|
||||
<pre><code>dodsond2.gz: gzip compressed data, last modified: Mon Aug 29 21:54:39 1994, max compression, from Unix, original size modulo 2^32 2652</code></pre>
|
||||
<pre><code> dodsond2.gz: gzip compressed data, last modified: Mon Aug 29 21:54:39 1994, max compression, from Unix, original size modulo 2^32 2652</code></pre>
|
||||
<p>The <a href="dodsond2.gz">dodsond2.gz</a> file was submitted as source
|
||||
in an effort to get around the 1994 version of Rule 2:</p>
|
||||
<pre><code>2) Your entry must be <= 3217 bytes in length. The number of characters
|
||||
excluding whitespace (tab, space, newline), and excluding any ; { or }
|
||||
followed by either whitespace or end of file, must be <= 1536.</code></pre>
|
||||
<pre><code> 2) Your entry must be <= 3217 bytes in length. The number of characters
|
||||
excluding whitespace (tab, space, newline), and excluding any ; { or }
|
||||
followed by either whitespace or end of file, must be <= 1536.</code></pre>
|
||||
<p>Indeed, when <a href="dodsond2.gz">dodsond2.gz</a> is uncompressed, it is identical
|
||||
to the <a href="dodsond2.c">dodsond2.c</a> file you find today.</p>
|
||||
<p>The IOCCC rules and guidelines were modified in an effort to address
|
||||
|
||||
+32
-33
@@ -1,14 +1,14 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make all
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./horton A B C D
|
||||
./horton A B C D
|
||||
```
|
||||
|
||||
`A`, `B`, `C` and `D` are numeric arguments.
|
||||
@@ -17,7 +17,7 @@ make all
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -30,14 +30,14 @@ version.
|
||||
### Alternate build:
|
||||
|
||||
```sh
|
||||
make alt
|
||||
make alt
|
||||
```
|
||||
|
||||
|
||||
### Alternate use:
|
||||
|
||||
```sh
|
||||
./horton.alt A B C D
|
||||
./horton.alt A B C D
|
||||
```
|
||||
|
||||
Where A, B, C and D are numbers like with `horton`.
|
||||
@@ -46,7 +46,7 @@ Where A, B, C and D are numbers like with `horton`.
|
||||
### Alternate try:
|
||||
|
||||
```sh
|
||||
./try.alt.sh
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@ It's easily modified to graph *any* 96x160 bitmap on a dumb terminal.
|
||||
See the [gtface](gtface.c) program for another example. Try:
|
||||
|
||||
```sh
|
||||
make gtface
|
||||
./gtface < gtface.data
|
||||
make gtface
|
||||
./gtface < gtface.data
|
||||
```
|
||||
|
||||
For more information, see my article
|
||||
@@ -90,31 +90,30 @@ For more information, see my article
|
||||
[Using GraphTab; USENIX ;login: Sept/Oct 1992, pages 28-31](login_sept92-pp28-31.pdf).
|
||||
|
||||
```
|
||||
|
||||
MMMM,M,MM"MM,,,
|
||||
,,MMMMMMMMM"""""""",
|
||||
,MMMMM""" ",
|
||||
,MMM" "
|
||||
MMM M
|
||||
MM
|
||||
MM" " M
|
||||
M " , ,,,,, ,,,,,,,,,MM
|
||||
"MMMM"M,MMMMM MMMM M M"MMM,
|
||||
,M"MMMM"MM"MMM""M""MMMM""M"M
|
||||
, MM M M,M M" "M",, M "M "
|
||||
M ,M," ,M "M, ,,,", M
|
||||
M , M"MMM",,M,M,,""" , ,
|
||||
",," , " "MMMMMMMM " , "
|
||||
,M , ""M,MMMMMMMM,M " ,,
|
||||
,MM, MMMMMMMMMMMMMM,", M,
|
||||
M,M,MM"M"M" """M"MM,M M
|
||||
,MMMMMM M,MMMMM"M MM""M
|
||||
M MMMMMM,M M"M"" M MMMM", ,
|
||||
"M"MMMMMMMMMM"M ,MMMMM M ,,
|
||||
"" MMMMMMM,M,MM,M,,,MMM"M ,
|
||||
," , "MMMMMMM"MM"M,,,,MMMMM , ,,
|
||||
M ," MMMMMM"MM""M ,MMMMM,M, M
|
||||
, MMMM,MMMM"M"M"M,MM,M,", "
|
||||
MMMM,M,MM"MM,,,
|
||||
,,MMMMMMMMM"""""""",
|
||||
,MMMMM""" ",
|
||||
,MMM" "
|
||||
MMM M
|
||||
MM
|
||||
MM" " M
|
||||
M " , ,,,,, ,,,,,,,,,MM
|
||||
"MMMM"M,MMMMM MMMM M M"MMM,
|
||||
,M"MMMM"MM"MMM""M""MMMM""M"M
|
||||
, MM M M,M M" "M",, M "M "
|
||||
M ,M," ,M "M, ,,,", M
|
||||
M , M"MMM",,M,M,,""" , ,
|
||||
",," , " "MMMMMMMM " , "
|
||||
,M , ""M,MMMMMMMM,M " ,,
|
||||
,MM, MMMMMMMMMMMMMM,", M,
|
||||
M,M,MM"M"M" """M"MM,M M
|
||||
,MMMMMM M,MMMMM"M MM""M
|
||||
M MMMMMM,M M"M"" M MMMM", ,
|
||||
"M"MMMMMMMMMM"M ,MMMMM M ,,
|
||||
"" MMMMMMM,M,MM,M,,,MMM"M ,
|
||||
," , "MMMMMMM"MM"M,,,,MMMMM , ,,
|
||||
M ," MMMMMM"MM""M ,MMMMM,M, M
|
||||
, MMMM,MMMM"M"M"M,MM,M,", "
|
||||
```
|
||||
|
||||
|
||||
|
||||
+33
-35
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Mary_Ann_Horton">Mary Ann Horton</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,22 +141,22 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- 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>
|
||||
<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>
|
||||
<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">./horton</span> A B C D</span></code></pre></div>
|
||||
<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">./horton</span> A B C D</span></code></pre></div>
|
||||
<p><code>A</code>, <code>B</code>, <code>C</code> and <code>D</code> are numeric arguments.</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>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>This confuses cb greatly. See <a href="horton.alt.c">horton.alt.c</a> for an unobfuscated/enhanced
|
||||
version.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> alt</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./horton.alt</span> A B C D</span></code></pre></div>
|
||||
<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">./horton.alt</span> A B C D</span></code></pre></div>
|
||||
<p>Where A, B, C and D are numbers like with <code>horton</code>.</p>
|
||||
<h3 id="alternate-try">Alternate try:</h3>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.alt.sh</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.alt.sh</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Try to figure out how this program prints, for a given slope, the
|
||||
right character. And for extra credit, try to figure out which
|
||||
@@ -177,35 +176,34 @@ cogs in the wheels of the grand plot to overthrow the cubics!</p>
|
||||
<p>Oh, by the way, it uses a self-contained graphtab and frame buffer.
|
||||
It’s easily modified to graph <em>any</em> 96x160 bitmap on a dumb terminal.</p>
|
||||
<p>See the <a href="gtface.c">gtface</a> program for another example. Try:</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> gtface</span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./gtface</span> <span class="op"><</span> gtface.data</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> gtface</span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./gtface</span> <span class="op"><</span> gtface.data</span></code></pre></div>
|
||||
<p>For more information, see my article</p>
|
||||
<p><a href="login_sept92-pp28-31.pdf">Using GraphTab; USENIX ;login: Sept/Oct 1992, pages 28-31</a>.</p>
|
||||
<pre><code>
|
||||
MMMM,M,MM"MM,,,
|
||||
,,MMMMMMMMM"""""""",
|
||||
,MMMMM""" ",
|
||||
,MMM" "
|
||||
MMM M
|
||||
MM
|
||||
MM" " M
|
||||
M " , ,,,,, ,,,,,,,,,MM
|
||||
"MMMM"M,MMMMM MMMM M M"MMM,
|
||||
,M"MMMM"MM"MMM""M""MMMM""M"M
|
||||
, MM M M,M M" "M",, M "M "
|
||||
M ,M," ,M "M, ,,,", M
|
||||
M , M"MMM",,M,M,,""" , ,
|
||||
",," , " "MMMMMMMM " , "
|
||||
,M , ""M,MMMMMMMM,M " ,,
|
||||
,MM, MMMMMMMMMMMMMM,", M,
|
||||
M,M,MM"M"M" """M"MM,M M
|
||||
,MMMMMM M,MMMMM"M MM""M
|
||||
M MMMMMM,M M"M"" M MMMM", ,
|
||||
"M"MMMMMMMMMM"M ,MMMMM M ,,
|
||||
"" MMMMMMM,M,MM,M,,,MMM"M ,
|
||||
," , "MMMMMMM"MM"M,,,,MMMMM , ,,
|
||||
M ," MMMMMM"MM""M ,MMMMM,M, M
|
||||
, MMMM,MMMM"M"M"M,MM,M,", "</code></pre>
|
||||
<pre><code> MMMM,M,MM"MM,,,
|
||||
,,MMMMMMMMM"""""""",
|
||||
,MMMMM""" ",
|
||||
,MMM" "
|
||||
MMM M
|
||||
MM
|
||||
MM" " M
|
||||
M " , ,,,,, ,,,,,,,,,MM
|
||||
"MMMM"M,MMMMM MMMM M M"MMM,
|
||||
,M"MMMM"MM"MMM""M""MMMM""M"M
|
||||
, MM M M,M M" "M",, M "M "
|
||||
M ,M," ,M "M, ,,,", M
|
||||
M , M"MMM",,M,M,,""" , ,
|
||||
",," , " "MMMMMMMM " , "
|
||||
,M , ""M,MMMMMMMM,M " ,,
|
||||
,MM, MMMMMMMMMMMMMM,", M,
|
||||
M,M,MM"M"M" """M"MM,M M
|
||||
,MMMMMM M,MMMMM"M MM""M
|
||||
M MMMMMM,M M"M"" M MMMM", ,
|
||||
"M"MMMMMMMMMM"M ,MMMMM M ,,
|
||||
"" MMMMMMM,M,MM,M,,,MMM"M ,
|
||||
," , "MMMMMMM"MM"M,,,,MMMMM , ,,
|
||||
M ," MMMMMM"MM""M ,MMMMM,M, M
|
||||
, MMMM,MMMM"M"M"M,MM,M,", "</code></pre>
|
||||
<!--
|
||||
|
||||
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
|
||||
|
||||
+6
-6
@@ -1,14 +1,14 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make all
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./imc [NUMBER]
|
||||
./imc [NUMBER]
|
||||
```
|
||||
|
||||
where `[NUMBER]` is an optional number. Default is 5.
|
||||
@@ -17,7 +17,7 @@ where `[NUMBER]` is an optional number. Default is 5.
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -61,9 +61,9 @@ useful the exclusive-or operator was while writing function `s()`.
|
||||
Here are the descriptions of the functions in the library:
|
||||
|
||||
```
|
||||
o(n,a,q,d): makes a magic square of order n when n is odd and at least 3.
|
||||
s(n,a,q,d): makes a magic square of order n when n equals 4.
|
||||
e(n,a,q,d): makes a magic square of order n when n is even and at least 6.
|
||||
o(n,a,q,d): makes a magic square of order n when n is odd and at least 3.
|
||||
s(n,a,q,d): makes a magic square of order n when n equals 4.
|
||||
e(n,a,q,d): makes a magic square of order n when n is even and at least 6.
|
||||
```
|
||||
|
||||
In the above, `a` (of type `int *`) points to an area of memory in which
|
||||
|
||||
+7
-8
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Ian_Collier">Ian Collier</a><br>
|
||||
Location: <a href="../../location.html#GB">GB</a> - <em>United Kingdom of Great Britain and Northern Ireland</em> (<em>United Kingdom</em>)
|
||||
<br><br></li>
|
||||
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 -->
|
||||
@@ -142,12 +141,12 @@ Location: <a href="../../location.html#GB">GB</a> - <em>United Kingdom of Great
|
||||
<!-- 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>
|
||||
<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>
|
||||
<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">./imc</span> <span class="pp">[</span><span class="ss">NUMBER</span><span class="pp">]</span></span></code></pre></div>
|
||||
<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">./imc</span> <span class="pp">[</span><span class="ss">NUMBER</span><span class="pp">]</span></span></code></pre></div>
|
||||
<p>where <code>[NUMBER]</code> is an optional number. Default is 5.</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>
|
||||
<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>This entry’s algorithm is as magic as its output!</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
@@ -176,9 +175,9 @@ used to make the random squares are quite complex without being shrouded
|
||||
in obfuscated code! :-) Incidentally, I was surprised to find out how
|
||||
useful the exclusive-or operator was while writing function <code>s()</code>.</p>
|
||||
<p>Here are the descriptions of the functions in the library:</p>
|
||||
<pre><code>o(n,a,q,d): makes a magic square of order n when n is odd and at least 3.
|
||||
s(n,a,q,d): makes a magic square of order n when n equals 4.
|
||||
e(n,a,q,d): makes a magic square of order n when n is even and at least 6.</code></pre>
|
||||
<pre><code> o(n,a,q,d): makes a magic square of order n when n is odd and at least 3.
|
||||
s(n,a,q,d): makes a magic square of order n when n equals 4.
|
||||
e(n,a,q,d): makes a magic square of order n when n is even and at least 6.</code></pre>
|
||||
<p>In the above, <code>a</code> (of type <code>int *</code>) points to an area of memory in which
|
||||
the magic square will be stored and <code>q</code> (also of type <code>int *</code>) points to
|
||||
an area of memory of length at least <code>n*sizeof(int)</code> bytes which can be
|
||||
|
||||
+4
-4
@@ -175,7 +175,7 @@ able to link to the other IOCCC judges by some form of a video link</li>
|
||||
<li>loves chocolate and other fine foods :-)</li>
|
||||
</ul>
|
||||
<p>If you think this may be you, send an email before 31 Dec 1995, to:</p>
|
||||
<pre><code>judges@toad.com (use the Subject: 3rd judge)</code></pre>
|
||||
<pre><code> judges@toad.com (use the Subject: 3rd judge)</code></pre>
|
||||
<p>Include in your message:</p>
|
||||
<ul>
|
||||
<li>Your name, address, email address and phone number</li>
|
||||
@@ -190,7 +190,7 @@ email at the above address.</p>
|
||||
If you have a well known stable site that would be willing to give us
|
||||
access to put up some IOCCC html pages, please send an email (say prior
|
||||
to 31 Dec 1995) to:</p>
|
||||
<pre><code>judges@toad.com (use the Subject: www site)</code></pre>
|
||||
<pre><code> judges@toad.com (use the Subject: www site)</code></pre>
|
||||
<p>describing your site and any other appropriate comments. Thanks!</p>
|
||||
<h2 id="a-few-notes-regarding-future-contests">A few notes regarding future contests</h2>
|
||||
<p>Due to changes in the USENIX conference calendar, the 1995 contest will
|
||||
@@ -205,8 +205,8 @@ Rules differ from year to year, sometimes in significant ways.</p>
|
||||
<p>Please send us comments and suggestions what we have expressed above.
|
||||
Also include anything else that you would like to see in future contests.
|
||||
Send such email to:</p>
|
||||
<pre><code>...!{sun,pacbell,uunet,pyramid}!hoptoad!judges
|
||||
judges@toad.com</code></pre>
|
||||
<pre><code> ...!{sun,pacbell,uunet,pyramid}!hoptoad!judges
|
||||
judges@toad.com</code></pre>
|
||||
<p>If you use, distribute or publish these entries in some way, please drop
|
||||
us a line. We enjoy seeing who, where and how the contest is used,
|
||||
as well as details on how to provide fixes to any of the entries.</p>
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make all
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ make all
|
||||
The current status of this entry is:
|
||||
|
||||
```
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
```
|
||||
|
||||
For more detailed information see [1994 ldb bugs](../../bugs.html#1994_ldb).
|
||||
@@ -19,16 +19,16 @@ For more detailed information see [1994 ldb bugs](../../bugs.html#1994_ldb).
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./ldb < file
|
||||
./ldb < file
|
||||
|
||||
some_command | ./ldb
|
||||
some_command | ./ldb
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
|
||||
+6
-7
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Laurion_Burchall">Laurion Burchall</a><br>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,17 +141,17 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<!-- 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>
|
||||
<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>
|
||||
<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>
|
||||
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#1994_ldb">1994 ldb bugs</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">./ldb</span> <span class="op"><</span> file</span>
|
||||
<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">./ldb</span> <span class="op"><</span> file</span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="ex">some_command</span> <span class="kw">|</span> <span class="ex">./ldb</span></span></code></pre></div>
|
||||
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">some_command</span> <span class="kw">|</span> <span class="ex">./ldb</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<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>Trigraphs are natural obfuscators. Most C-beautifiers become C-uglifiers
|
||||
because they don’t handle them correctly.</p>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make all
|
||||
make all
|
||||
```
|
||||
|
||||
There are two alternate versions, one that has an increased buffer size and one
|
||||
@@ -15,7 +15,7 @@ code](#alternate-code) section for how to use.
|
||||
The current status of this entry is:
|
||||
|
||||
```
|
||||
STATUS: uses gets() - change to fgets() if possible
|
||||
STATUS: uses gets() - change to fgets() if possible
|
||||
```
|
||||
|
||||
For more detailed information see [1994 schnitzi bugs](../../bugs.html#1994_schnitzi).
|
||||
@@ -24,14 +24,14 @@ For more detailed information see [1994 schnitzi bugs](../../bugs.html#1994_schn
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./schnitzi < textfile
|
||||
./schnitzi < textfile
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ buffer size. This is due to a comment which is explained in more detail in
|
||||
### Alternate build:
|
||||
|
||||
```sh
|
||||
make alt
|
||||
make alt
|
||||
```
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ feeding the source code to it will not work right.
|
||||
### Alternate try:
|
||||
|
||||
```sh
|
||||
./try.alt.sh
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ feeding the source code to it will not work right.
|
||||
Try:
|
||||
|
||||
```sh
|
||||
./schnitzi < schnitzi.c
|
||||
./schnitzi < schnitzi.c
|
||||
```
|
||||
|
||||
Compare the output of the program with its source. Sure the output
|
||||
@@ -97,14 +97,14 @@ line; for instance, for the file 'info', the program
|
||||
would be run as follows:
|
||||
|
||||
```sh
|
||||
./schnitzi < info
|
||||
./schnitzi < info
|
||||
```
|
||||
|
||||
The program generates interesting results when its source file is
|
||||
used as input:
|
||||
|
||||
```sh
|
||||
./schnitzi < schnitzi.c
|
||||
./schnitzi < schnitzi.c
|
||||
```
|
||||
|
||||
The result of this command is a program which does the exact same
|
||||
|
||||
+10
-11
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Mark_Schnitzius">Mark Schnitzius</a><br>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,19 +141,19 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<!-- 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>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> all</span></code></pre></div>
|
||||
<p>There are two alternate versions, one that has an increased buffer size and one
|
||||
that uses <code>fgets()</code>; neither are completely functional.
|
||||
See below section bugs and (mis)features for details and the <a href="#alternate-code">alternate
|
||||
code</a> section for how to use.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: uses gets() - change to fgets() if possible</code></pre>
|
||||
<pre><code> STATUS: uses gets() - change to fgets() if possible</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#1994_schnitzi">1994 schnitzi bugs</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> <span class="op"><</span> textfile</span></code></pre></div>
|
||||
<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> <span class="op"><</span> textfile</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>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>The first version, <code>schnitzi.alt.c</code>, uses <code>fgets(3)</code> but when fed its own code
|
||||
it will generate code that still uses <code>gets(3)</code>. What’s more is it will not
|
||||
@@ -164,15 +163,15 @@ its own source code it will generate code that can compile but with the original
|
||||
buffer size. This is due to a comment which is explained in more detail in
|
||||
<a href="../../bugs.html#1994_schnitzi">1994/schnitzi bugs</a>.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> alt</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>schnitzi.alt</code> and <code>schnitzi.alt2</code> as you would <code>schnitzi</code> above except that
|
||||
feeding the source code to it will not work right.</p>
|
||||
<h3 id="alternate-try">Alternate try:</h3>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.alt.sh</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.alt.sh</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Try:</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./schnitzi</span> <span class="op"><</span> schnitzi.c</span></code></pre></div>
|
||||
<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">./schnitzi</span> <span class="op"><</span> schnitzi.c</span></code></pre></div>
|
||||
<p>Compare the output of the program with its source. Sure the output
|
||||
is different, but there is more than meets the <code>diff</code>’s eye. Can you
|
||||
find out why?</p>
|
||||
@@ -188,10 +187,10 @@ second row is written down the second column, etc. The program
|
||||
is run by redirecting a file into the executable on the command
|
||||
line; for instance, for the file ‘info’, the program
|
||||
would be run as follows:</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./schnitzi</span> <span class="op"><</span> info</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./schnitzi</span> <span class="op"><</span> info</span></code></pre></div>
|
||||
<p>The program generates interesting results when its source file is
|
||||
used as input:</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./schnitzi</span> <span class="op"><</span> schnitzi.c</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./schnitzi</span> <span class="op"><</span> schnitzi.c</span></code></pre></div>
|
||||
<p>The result of this command is a program which does the exact same
|
||||
thing – in other words, both the program and the “flipped”
|
||||
version of itself work identically (you’ll need to redirect the
|
||||
|
||||
+11
-11
@@ -1,7 +1,7 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make all
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ make all
|
||||
The current status of this entry is:
|
||||
|
||||
```
|
||||
STATUS: missing file - please provide it
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
STATUS: missing file - please provide it
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
```
|
||||
|
||||
For more detailed information see [1994 shapiro bugs](../../bugs.html#1994_shapiro).
|
||||
@@ -20,7 +20,7 @@ For more detailed information see [1994 shapiro bugs](../../bugs.html#1994_shapi
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./shapiro &
|
||||
./shapiro &
|
||||
```
|
||||
|
||||
Now find the clock in the same terminal window (or console if at the console).
|
||||
@@ -29,14 +29,14 @@ Now find the clock in the same terminal window (or console if at the console).
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./shapiro
|
||||
^Z
|
||||
bg
|
||||
ps x
|
||||
fg
|
||||
^C
|
||||
./shapiro
|
||||
^Z
|
||||
bg
|
||||
ps x
|
||||
fg
|
||||
^C
|
||||
|
||||
./shapiro_t1
|
||||
./shapiro_t1
|
||||
```
|
||||
|
||||
Notice what you see in the output of `ps`! Observe too what happens after you
|
||||
|
||||
+12
-13
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Andrew_Shapiro">Andrew T. Shapiro</a><br>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,24 +141,24 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<!-- 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>
|
||||
<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>
|
||||
<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
|
||||
STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<pre><code> STATUS: missing file - please provide it
|
||||
STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#1994_shapiro">1994 shapiro bugs</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">./shapiro</span> <span class="kw">&</span></span></code></pre></div>
|
||||
<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">./shapiro</span> <span class="kw">&</span></span></code></pre></div>
|
||||
<p>Now find the clock in the same terminal window (or console if at the console).</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">./shapiro</span></span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">^Z</span></span>
|
||||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="bu">bg</span></span>
|
||||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="fu">ps</span> x</span>
|
||||
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="bu">fg</span></span>
|
||||
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a><span class="ex">^C</span></span>
|
||||
<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">./shapiro</span></span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">^Z</span></span>
|
||||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> <span class="bu">bg</span></span>
|
||||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">ps</span> x</span>
|
||||
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a> <span class="bu">fg</span></span>
|
||||
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a> <span class="ex">^C</span></span>
|
||||
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a><span class="ex">./shapiro_t1</span></span></code></pre></div>
|
||||
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a> <span class="ex">./shapiro_t1</span></span></code></pre></div>
|
||||
<p>Notice what you see in the output of <code>ps</code>! Observe too what happens after you
|
||||
bring it back to the foreground.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
|
||||
+44
-45
@@ -125,18 +125,18 @@
|
||||
<h1 id="hints">HINTS</h1>
|
||||
<p>For the first program (<a href="shapiro.c">shapiro.c</a>):</p>
|
||||
<p>This is a very simple program:</p>
|
||||
<pre><code> 1. #include <stdio.h>
|
||||
2. main()
|
||||
3. {
|
||||
4. int K,L,M=0;
|
||||
5. FILE *J;
|
||||
6. J=fopen(__FILE__,"r");
|
||||
7. for(;
|
||||
8. (L=getc(J))>=0;
|
||||
9. L>='J'&&L<='J'+15 &&
|
||||
10. ((M=!M)?K=L:putchar(K-'J'|(L-'J'<<4)))
|
||||
11. );
|
||||
12. exit(0);}</code></pre>
|
||||
<pre><code> 1. #include <stdio.h>
|
||||
2. main()
|
||||
3. {
|
||||
4. int K,L,M=0;
|
||||
5. FILE *J;
|
||||
6. J=fopen(__FILE__,"r");
|
||||
7. for(;
|
||||
8. (L=getc(J))>=0;
|
||||
9. L>='J'&&L<='J'+15 &&
|
||||
10. ((M=!M)?K=L:putchar(K-'J'|(L-'J'<<4)))
|
||||
11. );
|
||||
12. exit(0);}</code></pre>
|
||||
<p>Lines 1-5 are basic stuff. Line 6 opens the source code for input. Line 7 is the
|
||||
loop. Line 8 reads in each character in the file (placed in <code>L</code>) while not >= 0.
|
||||
Line 9 is an <code>if</code> expression which filters out all characters not between <code>J</code>
|
||||
@@ -152,35 +152,34 @@ contiguous ASCII characters free for the encoding. Because of this the
|
||||
second program is mostly included as a comment. However, some of the
|
||||
characters of the encoded program are also source code for the decoder.</p>
|
||||
<h3 id="for-the-second-program-with-time.h">For the second program (with time.h):</h3>
|
||||
<pre><code> 1 #include <stdio.h>
|
||||
2 #include <time.h>
|
||||
3 #define o(j,k,m,n,l) {fprintf(j,a[k],m,n,a[l]);fflush(j);}
|
||||
4 char *a[]={"%c+------------+\n","%c+%3d %-8s+\n","seconds","minutes",
|
||||
5 "hours","%s\n","\0337\033[%d;65;H%s\0338"};
|
||||
6 int b[]={0,0,17,14,11,0};
|
||||
7 main(v,c)
|
||||
8 int v;
|
||||
9 char ** c;
|
||||
10 {
|
||||
11 char d[40],*e,f=6;
|
||||
12 time_t g;
|
||||
13 FILE *h,*i;
|
||||
14 while (--f && !pipe(d) && !fork());
|
||||
15 h=fdopen(6-f<<1,"a");
|
||||
16 i=fdopen((6-f<<1)+1,"r");
|
||||
17 for(;;){
|
||||
18 if(f){
|
||||
19 fgets(d,40,i);
|
||||
20 d[strlen(d)-1]='\0';
|
||||
21 if(*d=='0'+f){ sprintf(*c,"%s\n",d+1); o(stdout,6,6-f,d+1,0) }
|
||||
22 if(*d>'0'+f) o(h,5,d,0,0)
|
||||
23 }else{
|
||||
24 time(&g);
|
||||
25 e=asctime(localtime(&g));
|
||||
26 for(v=1;v<6;v++) o(h,v!=1&&v!=6-1,v+'0',atoi(e+b[v]),v)
|
||||
27 sleep(1);
|
||||
28 }}}
|
||||
</code></pre>
|
||||
<pre><code> 1 #include <stdio.h>
|
||||
2 #include <time.h>
|
||||
3 #define o(j,k,m,n,l) {fprintf(j,a[k],m,n,a[l]);fflush(j);}
|
||||
4 char *a[]={"%c+------------+\n","%c+%3d %-8s+\n","seconds","minutes",
|
||||
5 "hours","%s\n","\0337\033[%d;65;H%s\0338"};
|
||||
6 int b[]={0,0,17,14,11,0};
|
||||
7 main(v,c)
|
||||
8 int v;
|
||||
9 char ** c;
|
||||
10 {
|
||||
11 char d[40],*e,f=6;
|
||||
12 time_t g;
|
||||
13 FILE *h,*i;
|
||||
14 while (--f && !pipe(d) && !fork());
|
||||
15 h=fdopen(6-f<<1,"a");
|
||||
16 i=fdopen((6-f<<1)+1,"r");
|
||||
17 for(;;){
|
||||
18 if(f){
|
||||
19 fgets(d,40,i);
|
||||
20 d[strlen(d)-1]='\0';
|
||||
21 if(*d=='0'+f){ sprintf(*c,"%s\n",d+1); o(stdout,6,6-f,d+1,0) }
|
||||
22 if(*d>'0'+f) o(h,5,d,0,0)
|
||||
23 }else{
|
||||
24 time(&g);
|
||||
25 e=asctime(localtime(&g));
|
||||
26 for(v=1;v<6;v++) o(h,v!=1&&v!=6-1,v+'0',atoi(e+b[v]),v)
|
||||
27 sleep(1);
|
||||
28 }}}</code></pre>
|
||||
<p>Lines 1 and 2 have to be there. Think of <code>o</code> in line 3 as send message with
|
||||
<code>j</code>,<code>k</code> and <code>m</code> as where, format and what. Lines 4 and 5 are all the text
|
||||
strings. Line 6 is the offsets into the time string for the hours, minutes and
|
||||
@@ -206,10 +205,10 @@ to the string we just put there.</li>
|
||||
(<code>"\0337\033[%d;65;H%s\0338"</code>) If you can read VTxxx (and I read books printed
|
||||
as ANSI/VTxxx codes for fun :-) ) you know this is the sequence for:</li>
|
||||
</ol>
|
||||
<pre><code>remember where we are,
|
||||
go somewhere else,
|
||||
print the message,
|
||||
and return to where we started.</code></pre>
|
||||
<pre><code> remember where we are,
|
||||
go somewhere else,
|
||||
print the message,
|
||||
and return to where we started.</code></pre>
|
||||
<p>Line 22 says if this message is not for us (the number is bigger than ours)
|
||||
send it to <code>h</code> (up).</p>
|
||||
<p>Lines 24 to 27 are the master code. Here we get the time and convert it
|
||||
|
||||
+44
-45
@@ -6,18 +6,18 @@ For the first program ([shapiro.c](shapiro.c)):
|
||||
This is a very simple program:
|
||||
|
||||
```
|
||||
1. #include <stdio.h>
|
||||
2. main()
|
||||
3. {
|
||||
4. int K,L,M=0;
|
||||
5. FILE *J;
|
||||
6. J=fopen(__FILE__,"r");
|
||||
7. for(;
|
||||
8. (L=getc(J))>=0;
|
||||
9. L>='J'&&L<='J'+15 &&
|
||||
10. ((M=!M)?K=L:putchar(K-'J'|(L-'J'<<4)))
|
||||
11. );
|
||||
12. exit(0);}
|
||||
1. #include <stdio.h>
|
||||
2. main()
|
||||
3. {
|
||||
4. int K,L,M=0;
|
||||
5. FILE *J;
|
||||
6. J=fopen(__FILE__,"r");
|
||||
7. for(;
|
||||
8. (L=getc(J))>=0;
|
||||
9. L>='J'&&L<='J'+15 &&
|
||||
10. ((M=!M)?K=L:putchar(K-'J'|(L-'J'<<4)))
|
||||
11. );
|
||||
12. exit(0);}
|
||||
```
|
||||
|
||||
Lines 1-5 are basic stuff. Line 6 opens the source code for input. Line 7 is the
|
||||
@@ -41,35 +41,34 @@ characters of the encoded program are also source code for the decoder.
|
||||
### For the second program (with time.h):
|
||||
|
||||
```
|
||||
1 #include <stdio.h>
|
||||
2 #include <time.h>
|
||||
3 #define o(j,k,m,n,l) {fprintf(j,a[k],m,n,a[l]);fflush(j);}
|
||||
4 char *a[]={"%c+------------+\n","%c+%3d %-8s+\n","seconds","minutes",
|
||||
5 "hours","%s\n","\0337\033[%d;65;H%s\0338"};
|
||||
6 int b[]={0,0,17,14,11,0};
|
||||
7 main(v,c)
|
||||
8 int v;
|
||||
9 char ** c;
|
||||
10 {
|
||||
11 char d[40],*e,f=6;
|
||||
12 time_t g;
|
||||
13 FILE *h,*i;
|
||||
14 while (--f && !pipe(d) && !fork());
|
||||
15 h=fdopen(6-f<<1,"a");
|
||||
16 i=fdopen((6-f<<1)+1,"r");
|
||||
17 for(;;){
|
||||
18 if(f){
|
||||
19 fgets(d,40,i);
|
||||
20 d[strlen(d)-1]='\0';
|
||||
21 if(*d=='0'+f){ sprintf(*c,"%s\n",d+1); o(stdout,6,6-f,d+1,0) }
|
||||
22 if(*d>'0'+f) o(h,5,d,0,0)
|
||||
23 }else{
|
||||
24 time(&g);
|
||||
25 e=asctime(localtime(&g));
|
||||
26 for(v=1;v<6;v++) o(h,v!=1&&v!=6-1,v+'0',atoi(e+b[v]),v)
|
||||
27 sleep(1);
|
||||
28 }}}
|
||||
|
||||
1 #include <stdio.h>
|
||||
2 #include <time.h>
|
||||
3 #define o(j,k,m,n,l) {fprintf(j,a[k],m,n,a[l]);fflush(j);}
|
||||
4 char *a[]={"%c+------------+\n","%c+%3d %-8s+\n","seconds","minutes",
|
||||
5 "hours","%s\n","\0337\033[%d;65;H%s\0338"};
|
||||
6 int b[]={0,0,17,14,11,0};
|
||||
7 main(v,c)
|
||||
8 int v;
|
||||
9 char ** c;
|
||||
10 {
|
||||
11 char d[40],*e,f=6;
|
||||
12 time_t g;
|
||||
13 FILE *h,*i;
|
||||
14 while (--f && !pipe(d) && !fork());
|
||||
15 h=fdopen(6-f<<1,"a");
|
||||
16 i=fdopen((6-f<<1)+1,"r");
|
||||
17 for(;;){
|
||||
18 if(f){
|
||||
19 fgets(d,40,i);
|
||||
20 d[strlen(d)-1]='\0';
|
||||
21 if(*d=='0'+f){ sprintf(*c,"%s\n",d+1); o(stdout,6,6-f,d+1,0) }
|
||||
22 if(*d>'0'+f) o(h,5,d,0,0)
|
||||
23 }else{
|
||||
24 time(&g);
|
||||
25 e=asctime(localtime(&g));
|
||||
26 for(v=1;v<6;v++) o(h,v!=1&&v!=6-1,v+'0',atoi(e+b[v]),v)
|
||||
27 sleep(1);
|
||||
28 }}}
|
||||
```
|
||||
|
||||
Lines 1 and 2 have to be there. Think of `o` in line 3 as send message with
|
||||
@@ -99,10 +98,10 @@ to the string we just put there.
|
||||
as ANSI/VTxxx codes for fun :-) ) you know this is the sequence for:
|
||||
|
||||
```
|
||||
remember where we are,
|
||||
go somewhere else,
|
||||
print the message,
|
||||
and return to where we started.
|
||||
remember where we are,
|
||||
go somewhere else,
|
||||
print the message,
|
||||
and return to where we started.
|
||||
```
|
||||
|
||||
Line 22 says if this message is not for us (the number is bigger than ours)
|
||||
|
||||
+3
-3
@@ -1,21 +1,21 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make all
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./smr
|
||||
./smr
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
|
||||
+4
-5
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Szymon_Rusinkiewicz">Szymon Rusinkiewicz</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,11 +141,11 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- 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>
|
||||
<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>
|
||||
<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">./smr</span></span></code></pre></div>
|
||||
<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">./smr</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<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>Nearly every year, one or more people would submit what they claimed
|
||||
was the world’s smallest self reproducing program. While the sizes
|
||||
|
||||
+25
-28
@@ -1,7 +1,7 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make all
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ code](#alternate-code) below.
|
||||
The current status of this entry is:
|
||||
|
||||
```
|
||||
STATUS: known bug - please help us fix
|
||||
STATUS: known bug - please help us fix
|
||||
```
|
||||
|
||||
For more detailed information see [1994 tvr bugs](../../bugs.html#1994_tvr).
|
||||
@@ -23,7 +23,7 @@ For more detailed information see [1994 tvr bugs](../../bugs.html#1994_tvr).
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./tvr mode screensize/2 < colormapfile
|
||||
./tvr mode screensize/2 < colormapfile
|
||||
```
|
||||
|
||||
Mode may be a value from 0 to 12.
|
||||
@@ -32,8 +32,8 @@ Mode may be a value from 0 to 12.
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.color.sh # for colour displays
|
||||
./try.bw.sh # for Black & White displays
|
||||
./try.color.sh # for colour displays
|
||||
./try.bw.sh # for Black & White displays
|
||||
```
|
||||
|
||||
|
||||
@@ -45,14 +45,14 @@ The author provided us a spoiler version that might be of interest to some.
|
||||
### Alternate build:
|
||||
|
||||
```sh
|
||||
make alt
|
||||
make alt
|
||||
```
|
||||
|
||||
|
||||
### Alternate use:
|
||||
|
||||
```sh
|
||||
./tvr.alt altmode screensize/2 < colormapfile
|
||||
./tvr.alt altmode screensize/2 < colormapfile
|
||||
```
|
||||
|
||||
where `altmode` `1` - `4` correspond to mode `0` - `3` in the original entry and
|
||||
@@ -62,8 +62,8 @@ where `altmode` `1` - `4` correspond to mode `0` - `3` in the original entry and
|
||||
### Alternate try:
|
||||
|
||||
```sh
|
||||
./try.alt.color.sh # for colour displays
|
||||
./try.alt.bw.sh # for Black & White displays
|
||||
./try.alt.color.sh # for colour displays
|
||||
./try.alt.bw.sh # for Black & White displays
|
||||
```
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ the fourth is a variation of that with more nice effects.
|
||||
### Usage:
|
||||
|
||||
```sh
|
||||
./tvr mode screensize/2 < colormapfile
|
||||
./tvr mode screensize/2 < colormapfile
|
||||
```
|
||||
|
||||
|
||||
@@ -169,15 +169,15 @@ compatible compiler (`gcc -ansi -pedantic` will do fine).
|
||||
This entry has been tested on wide variety of machines including:
|
||||
|
||||
```
|
||||
Machine OS
|
||||
------- --
|
||||
Decstation 5000/240 Ultrix 4.3A
|
||||
DECAlpha 3000/300 OSF/1 v1.3 and v2.0
|
||||
IBM RS6000 AIX v3
|
||||
SPARCStation IPX SunOS 4.1.3
|
||||
i486 Linux v1.1.8 (binarysize 3576 bytes
|
||||
using `gcc -O6 -s -N` ;)
|
||||
HP 9000/730 HP-UX
|
||||
Machine OS
|
||||
------- --
|
||||
Decstation 5000/240 Ultrix 4.3A
|
||||
DECAlpha 3000/300 OSF/1 v1.3 and v2.0
|
||||
IBM RS6000 AIX v3
|
||||
SPARCStation IPX SunOS 4.1.3
|
||||
i486 Linux v1.1.8 (binarysize 3576 bytes
|
||||
using `gcc -O6 -s -N` ;)
|
||||
HP 9000/730 HP-UX
|
||||
```
|
||||
|
||||
Also, many of the X server and X library versions have been tested and the
|
||||
@@ -205,20 +205,17 @@ Well, obfuscated or not, some of the effects are very nice ;)
|
||||
Mandelbrot set is calculated from the formula
|
||||
|
||||
```
|
||||
|
||||
2
|
||||
Z = Z + Z
|
||||
n+1 n 0
|
||||
2
|
||||
Z = Z + Z
|
||||
n+1 n 0
|
||||
```
|
||||
|
||||
and the Julia set is calculated from the formula
|
||||
|
||||
```
|
||||
|
||||
2
|
||||
Z = Z + C
|
||||
n+1 n
|
||||
|
||||
2
|
||||
Z = Z + C
|
||||
n+1 n
|
||||
```
|
||||
|
||||
where `C` is the same throughout the picture. Both calculation are finished
|
||||
|
||||
+26
-30
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Teemu_Rantanen">Teemu Rantanen</a><br>
|
||||
Location: <a href="../../location.html#FI">FI</a> - <em>Republic of Finland </em> (<em>Finland</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#FI">FI</a> - <em>Republic of Finland </em> (<em>Finland</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,30 +141,30 @@ Location: <a href="../../location.html#FI">FI</a> - <em>Republic of Finland </em
|
||||
<!-- 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>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> all</span></code></pre></div>
|
||||
<p>The author provided a spoiler version as alt code. See <a href="#alternate-code">Alternate
|
||||
code</a> below.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: known bug - please help us fix</code></pre>
|
||||
<pre><code> STATUS: known bug - please help us fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#1994_tvr">1994 tvr bugs</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">./tvr</span> mode screensize/2 <span class="op"><</span> colormapfile</span></code></pre></div>
|
||||
<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">./tvr</span> mode screensize/2 <span class="op"><</span> colormapfile</span></code></pre></div>
|
||||
<p>Mode may be a value from 0 to 12.</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.color.sh</span> <span class="co"># for colour displays</span></span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.bw.sh</span> <span class="co"># for Black & White displays</span></span></code></pre></div>
|
||||
<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.color.sh</span> <span class="co"># for colour displays</span></span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.bw.sh</span> <span class="co"># for Black & White displays</span></span></code></pre></div>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>The author provided us a spoiler version that might be of interest to some.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> alt</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./tvr.alt</span> altmode screensize/2 <span class="op"><</span> colormapfile</span></code></pre></div>
|
||||
<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">./tvr.alt</span> altmode screensize/2 <span class="op"><</span> colormapfile</span></code></pre></div>
|
||||
<p>where <code>altmode</code> <code>1</code> - <code>4</code> correspond to mode <code>0</code> - <code>3</code> in the original entry and
|
||||
<code>altmode 0</code> calculates Mandelbrot/Julian sets correctly.</p>
|
||||
<h3 id="alternate-try">Alternate 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.alt.color.sh</span> <span class="co"># for colour displays</span></span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.alt.bw.sh</span> <span class="co"># for Black & White displays</span></span></code></pre></div>
|
||||
<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.alt.color.sh</span> <span class="co"># for colour displays</span></span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.alt.bw.sh</span> <span class="co"># for Black & White displays</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This entry requires the use of X11. It will form two windows (hopefully your
|
||||
window manager will ask you where to place these in your display) which you
|
||||
@@ -209,7 +208,7 @@ noise.</p>
|
||||
second is a variation of that. The third makes nice 3D-look-a-like effects and
|
||||
the fourth is a variation of that with more nice effects.</p>
|
||||
<h3 id="usage">Usage:</h3>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./tvr</span> mode screensize/2 <span class="op"><</span> colormapfile</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./tvr</span> mode screensize/2 <span class="op"><</span> colormapfile</span></code></pre></div>
|
||||
<p>The first parameter is the operating-mode of the program. There are 4 fractal
|
||||
pairs and 3 display modes, making total of 12 modes. <code>screensize</code> is half of the
|
||||
actual <code>screenlength/width</code>. I.e. if you use 128 as a second parameter, you will
|
||||
@@ -239,15 +238,15 @@ display).</p>
|
||||
highest level of optimization possible. You will also need an ANSI
|
||||
compatible compiler (<code>gcc -ansi -pedantic</code> will do fine).</p>
|
||||
<p>This entry has been tested on wide variety of machines including:</p>
|
||||
<pre><code>Machine OS
|
||||
------- --
|
||||
Decstation 5000/240 Ultrix 4.3A
|
||||
DECAlpha 3000/300 OSF/1 v1.3 and v2.0
|
||||
IBM RS6000 AIX v3
|
||||
SPARCStation IPX SunOS 4.1.3
|
||||
i486 Linux v1.1.8 (binarysize 3576 bytes
|
||||
using `gcc -O6 -s -N` ;)
|
||||
HP 9000/730 HP-UX</code></pre>
|
||||
<pre><code> Machine OS
|
||||
------- --
|
||||
Decstation 5000/240 Ultrix 4.3A
|
||||
DECAlpha 3000/300 OSF/1 v1.3 and v2.0
|
||||
IBM RS6000 AIX v3
|
||||
SPARCStation IPX SunOS 4.1.3
|
||||
i486 Linux v1.1.8 (binarysize 3576 bytes
|
||||
using `gcc -O6 -s -N` ;)
|
||||
HP 9000/730 HP-UX</code></pre>
|
||||
<p>Also, many of the X server and X library versions have been tested and the
|
||||
program should be highly portable. The program may slow down considerably on
|
||||
machines where table references are slow as the program makes extensive use of
|
||||
@@ -265,16 +264,13 @@ left out of the program because speed of animation was one of the key issues.
|
||||
Well, obfuscated or not, some of the effects are very nice ;)</p>
|
||||
<h3 id="memory-refreshment">Memory refreshment</h3>
|
||||
<p>Mandelbrot set is calculated from the formula</p>
|
||||
<pre><code>
|
||||
2
|
||||
Z = Z + Z
|
||||
n+1 n 0</code></pre>
|
||||
<pre><code> 2
|
||||
Z = Z + Z
|
||||
n+1 n 0</code></pre>
|
||||
<p>and the Julia set is calculated from the formula</p>
|
||||
<pre><code>
|
||||
2
|
||||
Z = Z + C
|
||||
n+1 n
|
||||
</code></pre>
|
||||
<pre><code> 2
|
||||
Z = Z + C
|
||||
n+1 n</code></pre>
|
||||
<p>where <code>C</code> is the same throughout the picture. Both calculation are finished
|
||||
when <code>|Z| >= 2.0</code>. For the other fractals, the basic methods are the same but
|
||||
the formula is different (look at the source ;) )</p>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make all
|
||||
make all
|
||||
```
|
||||
|
||||
There is an alternate version that uses more memory. See [alternate
|
||||
@@ -11,20 +11,20 @@ code](#alternate-code) below for more details.
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./weisberg
|
||||
./weisberg
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
If you have `primes(1)` installed you might also wish to try:
|
||||
|
||||
```sh
|
||||
./primes.sh number
|
||||
./primes.sh number
|
||||
```
|
||||
|
||||
where `number` is a positive number, defaulting to 15. The [try.sh](try.sh)
|
||||
@@ -41,14 +41,14 @@ something with you might try this version.
|
||||
### Alternate build:
|
||||
|
||||
```sh
|
||||
make alt
|
||||
make alt
|
||||
```
|
||||
|
||||
|
||||
### Alternate use:
|
||||
|
||||
```sh
|
||||
./weisberg.alt
|
||||
./weisberg.alt
|
||||
```
|
||||
|
||||
Lesser systems will find this alternative version a good way to create
|
||||
|
||||
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Jeff_Weisberg">Jeff Weisberg</a><br>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,15 +141,15 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em>
|
||||
<!-- 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>
|
||||
<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>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> all</span></code></pre></div>
|
||||
<p>There is an alternate version that uses more memory. See <a href="#alternate-code">alternate
|
||||
code</a> below for more details.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weisberg</span></span></code></pre></div>
|
||||
<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">./weisberg</span></span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<p>If you have <code>primes(1)</code> installed you might also wish to try:</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./primes.sh</span> number</span></code></pre></div>
|
||||
<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">./primes.sh</span> number</span></code></pre></div>
|
||||
<p>where <code>number</code> is a positive number, defaulting to 15. The <a href="try.sh">try.sh</a>
|
||||
script will also do this.</p>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
@@ -158,9 +157,9 @@ script will also do this.</p>
|
||||
have some 512 Megabytes of virtual memory lying around with to do
|
||||
something with you might try this version.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> alt</span></code></pre></div>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./weisberg.alt</span></span></code></pre></div>
|
||||
<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">./weisberg.alt</span></span></code></pre></div>
|
||||
<p>Lesser systems will find this alternative version a good way to create
|
||||
a core file. :-)</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
|
||||
+30
-30
@@ -1,7 +1,7 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make alt
|
||||
make alt
|
||||
```
|
||||
|
||||
We recommend that you try the alternate version first as the original entry
|
||||
@@ -16,7 +16,7 @@ see [Original code](#original-code) below.
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./westley.alt
|
||||
./westley.alt
|
||||
```
|
||||
|
||||
The purpose of the game is to escape the dungeon. Depending on the compiler line
|
||||
@@ -40,14 +40,14 @@ For something more interesting try compiling it with different `cc -D` arguments
|
||||
and then run the program each time. For example:
|
||||
|
||||
```sh
|
||||
cc -Describe -Door westley.alt.c -o westley.alt && ./westley.alt
|
||||
cc -Describe -Drain westley.alt.c -o westley.alt && ./westley.alt
|
||||
cc -Describe -Door westley.alt.c -o westley.alt && ./westley.alt
|
||||
cc -Describe -Drain westley.alt.c -o westley.alt && ./westley.alt
|
||||
```
|
||||
|
||||
To see the game from start to finish, try:
|
||||
|
||||
```sh
|
||||
./try.alt.sh
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ reason that we recommend you try it first.
|
||||
### Original build:
|
||||
|
||||
```sh
|
||||
make all
|
||||
make all
|
||||
```
|
||||
|
||||
There are a variety of different `-D` flags you can give to `cc` that change the
|
||||
@@ -96,14 +96,14 @@ For something more interesting try compiling it with different `cc -D`
|
||||
arguments:
|
||||
|
||||
```sh
|
||||
cc -Describe -Door westley.c
|
||||
cc -Describe -Drain westley.c
|
||||
cc -Describe -Door westley.c
|
||||
cc -Describe -Drain westley.c
|
||||
```
|
||||
|
||||
To see the game from start to complete, try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ For spoilers see the end of the notes from the author below.
|
||||
To use:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ error messages (for missing `#include` files) as output. To begin,
|
||||
try to compile the program with no options:
|
||||
|
||||
```sh
|
||||
cc westley.c
|
||||
cc westley.c
|
||||
```
|
||||
|
||||
This will fail, producing an error message for a missing `#include`
|
||||
@@ -160,7 +160,7 @@ To "do" things, all words must start with `-D`. For example, to
|
||||
look at the door, do:
|
||||
|
||||
```sh
|
||||
cc -Describe -Door prog.c
|
||||
cc -Describe -Door prog.c
|
||||
```
|
||||
|
||||
...and you will get another error message telling you about the door.
|
||||
@@ -177,24 +177,24 @@ Here is a walk-through for the game, including a few dead-ends:
|
||||
### SPOILER
|
||||
|
||||
```sh
|
||||
cc -Describe -Door westley.c
|
||||
cc -Describe -Drain westley.c
|
||||
cc -Describe -Dwarf westley.c
|
||||
cc -Describe -Debris westley.c # or -Dungeon
|
||||
cc -Describe -Desk westley.c
|
||||
cc -Describe -Dime westley.c
|
||||
cc -Describe -Directory westley.c
|
||||
cc -Dial -DUNgeon0614 westley.c
|
||||
cc -Drink -Daiquiri westley.c
|
||||
cc -Drop -Daiquiri westley.c
|
||||
cc -Drop -Dwarf -Daiquiri westley.c # or -Drop -Down -Daiquiri
|
||||
cc -Describe -Document westley.c
|
||||
cc -Depress -Dotted -Dog westley.c
|
||||
cc -Depress -Dalmatian westley.c # also accepts "Dalmation" [sic]
|
||||
cc -Deposit -Dime westley.c
|
||||
cc -Drop -Donut westley.c
|
||||
cc -Drop -Donut -Down -Drain westley.c # or -Drop -Dwarf -Donut
|
||||
# (at this point, you win!)
|
||||
cc -Describe -Door westley.c
|
||||
cc -Describe -Drain westley.c
|
||||
cc -Describe -Dwarf westley.c
|
||||
cc -Describe -Debris westley.c # or -Dungeon
|
||||
cc -Describe -Desk westley.c
|
||||
cc -Describe -Dime westley.c
|
||||
cc -Describe -Directory westley.c
|
||||
cc -Dial -DUNgeon0614 westley.c
|
||||
cc -Drink -Daiquiri westley.c
|
||||
cc -Drop -Daiquiri westley.c
|
||||
cc -Drop -Dwarf -Daiquiri westley.c # or -Drop -Down -Daiquiri
|
||||
cc -Describe -Document westley.c
|
||||
cc -Depress -Dotted -Dog westley.c
|
||||
cc -Depress -Dalmatian westley.c # also accepts "Dalmation" [sic]
|
||||
cc -Deposit -Dime westley.c
|
||||
cc -Drop -Donut westley.c
|
||||
cc -Drop -Donut -Down -Drain westley.c # or -Drop -Dwarf -Donut
|
||||
# (at this point, you win!)
|
||||
```
|
||||
|
||||
Note that the game has no real state information; you can type these
|
||||
|
||||
+31
-32
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Brian_Westley">Brian Westley</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -142,7 +141,7 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- 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>
|
||||
<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>
|
||||
<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 as the original entry
|
||||
requires (for better display) 80 columns and 8 character tabs with wraparound.</p>
|
||||
<p>The alt code uses the same logic as the original code except that the original
|
||||
@@ -150,7 +149,7 @@ code used <code>#include</code>s of files that do not exist to generate the mess
|
||||
compiler errors) whereas the alt code uses <code>printf(3)</code>. For the original entry
|
||||
see <a href="#original-code">Original code</a> below.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./westley.alt</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./westley.alt</span></span></code></pre></div>
|
||||
<p>The purpose of the game is to escape the dungeon. Depending on the compiler line
|
||||
you will get a different message when you run the program. One compiler line
|
||||
will make you win the game (escape the dungeon) and others will show something
|
||||
@@ -165,10 +164,10 @@ from start to finish.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>For something more interesting try compiling it with different <code>cc -D</code> arguments
|
||||
and then run the program each time. For example:</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">cc</span> <span class="at">-Describe</span> <span class="at">-Door</span> westley.alt.c <span class="at">-o</span> westley.alt <span class="kw">&&</span> <span class="ex">./westley.alt</span></span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Drain</span> westley.alt.c <span class="at">-o</span> westley.alt <span class="kw">&&</span> <span class="ex">./westley.alt</span></span></code></pre></div>
|
||||
<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">cc</span> <span class="at">-Describe</span> <span class="at">-Door</span> westley.alt.c <span class="at">-o</span> westley.alt <span class="kw">&&</span> <span class="ex">./westley.alt</span></span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Drain</span> westley.alt.c <span class="at">-o</span> westley.alt <span class="kw">&&</span> <span class="ex">./westley.alt</span></span></code></pre></div>
|
||||
<p>To see the game from start to finish, try:</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.alt.sh</span></span></code></pre></div>
|
||||
<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.alt.sh</span></span></code></pre></div>
|
||||
<h2 id="original-code">Original code:</h2>
|
||||
<p>The purpose of the game is to escape the dungeon <strong>via the compiler line
|
||||
where you get <em>messages as compiler errors</em></strong>. Depending on the compiler line you
|
||||
@@ -178,7 +177,7 @@ game!</p>
|
||||
wraparound. The alternate code does not have this limitation and it is for this
|
||||
reason that we recommend you try it first.</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>
|
||||
<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>
|
||||
<p>There are a variety of different <code>-D</code> flags you can give to <code>cc</code> that change the
|
||||
message you get. You might wish to look at the <a href="westley.c">source code</a> to get a
|
||||
better idea or see below in the <a href="#original-try">Original try</a> section for
|
||||
@@ -197,15 +196,15 @@ error messages; there is no running the program.</p>
|
||||
<h3 id="original-try">Original try:</h3>
|
||||
<p>For something more interesting try compiling it with different <code>cc -D</code>
|
||||
arguments:</p>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Door</span> westley.c</span>
|
||||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Drain</span> westley.c</span></code></pre></div>
|
||||
<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">cc</span> <span class="at">-Describe</span> <span class="at">-Door</span> westley.c</span>
|
||||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Drain</span> westley.c</span></code></pre></div>
|
||||
<p>To see the game from start to complete, try:</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<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></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Not all compiler errors are bad.</p>
|
||||
<p>For spoilers see the end of the notes from the author below.</p>
|
||||
<p>To use:</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>This program, in accordance with the rules, compiles into a legal
|
||||
C program without human intervention. However, it simply compiles
|
||||
@@ -214,7 +213,7 @@ to actually compile the program.</p>
|
||||
<p>This program is a simple adventure game which uses only C preprocessor
|
||||
error messages (for missing <code>#include</code> files) as output. To begin,
|
||||
try to compile the program with no options:</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> westley.c</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> westley.c</span></code></pre></div>
|
||||
<p>This will fail, producing an error message for a missing <code>#include</code>
|
||||
file as the opening description. Your terminal should be set for
|
||||
80 columns, 8 character tabs, and wraparound, as there is no way
|
||||
@@ -233,7 +232,7 @@ to reliably output newlines. You should see something like this
|
||||
missing include file name, which functions as the game text.</p>
|
||||
<p>To “do” things, all words must start with <code>-D</code>. For example, to
|
||||
look at the door, do:</p>
|
||||
<div class="sourceCode" id="cb11"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Door</span> prog.c</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb11"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Door</span> prog.c</span></code></pre></div>
|
||||
<p>…and you will get another error message telling you about the door.
|
||||
(note: some compilers will stop after the first missing include file,
|
||||
while others will continue to try compiling; the latter will repeat
|
||||
@@ -242,24 +241,24 @@ with “verbose” turned on).</p>
|
||||
<p>The goal of the game is to escape the dungeon.</p>
|
||||
<p>Here is a walk-through for the game, including a few dead-ends:</p>
|
||||
<h3 id="spoiler">SPOILER</h3>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Door</span> westley.c</span>
|
||||
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Drain</span> westley.c</span>
|
||||
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Dwarf</span> westley.c</span>
|
||||
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Debris</span> westley.c <span class="co"># or -Dungeon</span></span>
|
||||
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Desk</span> westley.c</span>
|
||||
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Dime</span> westley.c</span>
|
||||
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Directory</span> westley.c</span>
|
||||
<span id="cb12-8"><a href="#cb12-8" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Dial</span> <span class="at">-DUNgeon0614</span> westley.c</span>
|
||||
<span id="cb12-9"><a href="#cb12-9" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Drink</span> <span class="at">-Daiquiri</span> westley.c</span>
|
||||
<span id="cb12-10"><a href="#cb12-10" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Drop</span> <span class="at">-Daiquiri</span> westley.c</span>
|
||||
<span id="cb12-11"><a href="#cb12-11" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Drop</span> <span class="at">-Dwarf</span> <span class="at">-Daiquiri</span> westley.c <span class="co"># or -Drop -Down -Daiquiri</span></span>
|
||||
<span id="cb12-12"><a href="#cb12-12" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Document</span> westley.c</span>
|
||||
<span id="cb12-13"><a href="#cb12-13" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Depress</span> <span class="at">-Dotted</span> <span class="at">-Dog</span> westley.c</span>
|
||||
<span id="cb12-14"><a href="#cb12-14" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Depress</span> <span class="at">-Dalmatian</span> westley.c <span class="co"># also accepts "Dalmation" [sic]</span></span>
|
||||
<span id="cb12-15"><a href="#cb12-15" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Deposit</span> <span class="at">-Dime</span> westley.c</span>
|
||||
<span id="cb12-16"><a href="#cb12-16" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Drop</span> <span class="at">-Donut</span> westley.c</span>
|
||||
<span id="cb12-17"><a href="#cb12-17" aria-hidden="true" tabindex="-1"></a><span class="fu">cc</span> <span class="at">-Drop</span> <span class="at">-Donut</span> <span class="at">-Down</span> <span class="at">-Drain</span> westley.c <span class="co"># or -Drop -Dwarf -Donut</span></span>
|
||||
<span id="cb12-18"><a href="#cb12-18" aria-hidden="true" tabindex="-1"></a><span class="co"># (at this point, you win!)</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Door</span> westley.c</span>
|
||||
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Drain</span> westley.c</span>
|
||||
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Dwarf</span> westley.c</span>
|
||||
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Debris</span> westley.c <span class="co"># or -Dungeon</span></span>
|
||||
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Desk</span> westley.c</span>
|
||||
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Dime</span> westley.c</span>
|
||||
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Directory</span> westley.c</span>
|
||||
<span id="cb12-8"><a href="#cb12-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Dial</span> <span class="at">-DUNgeon0614</span> westley.c</span>
|
||||
<span id="cb12-9"><a href="#cb12-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Drink</span> <span class="at">-Daiquiri</span> westley.c</span>
|
||||
<span id="cb12-10"><a href="#cb12-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Drop</span> <span class="at">-Daiquiri</span> westley.c</span>
|
||||
<span id="cb12-11"><a href="#cb12-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Drop</span> <span class="at">-Dwarf</span> <span class="at">-Daiquiri</span> westley.c <span class="co"># or -Drop -Down -Daiquiri</span></span>
|
||||
<span id="cb12-12"><a href="#cb12-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Document</span> westley.c</span>
|
||||
<span id="cb12-13"><a href="#cb12-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Depress</span> <span class="at">-Dotted</span> <span class="at">-Dog</span> westley.c</span>
|
||||
<span id="cb12-14"><a href="#cb12-14" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Depress</span> <span class="at">-Dalmatian</span> westley.c <span class="co"># also accepts "Dalmation" [sic]</span></span>
|
||||
<span id="cb12-15"><a href="#cb12-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Deposit</span> <span class="at">-Dime</span> westley.c</span>
|
||||
<span id="cb12-16"><a href="#cb12-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Drop</span> <span class="at">-Donut</span> westley.c</span>
|
||||
<span id="cb12-17"><a href="#cb12-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Drop</span> <span class="at">-Donut</span> <span class="at">-Down</span> <span class="at">-Drain</span> westley.c <span class="co"># or -Drop -Dwarf -Donut</span></span>
|
||||
<span id="cb12-18"><a href="#cb12-18" aria-hidden="true" tabindex="-1"></a> <span class="co"># (at this point, you win!)</span></span></code></pre></div>
|
||||
<p>Note that the game has no real state information; you can type these
|
||||
commands in any order, at any time. Also note that word order is
|
||||
unimportant.</p>
|
||||
|
||||
Reference in new issue
Block a user