Merge pull request #2495 from xexyl/93html

This commit is contained in:
Landon Curt Noll authored and GitHub committed 2024-06-23 11:59:36 -07:00
commit 6537990aa5
26 files changed
+104 -112

No files matched your search

+8 -8
View File
@@ -25,15 +25,15 @@ not be able to compile the entry, sorry!
## A few notes regarding future contests: ## A few notes regarding future contests:
Be sure to wait until the 1994 rules are posted before submitting entries. Be sure to wait until the [1994 rules](../1994/rules.txt) are posted before
Rules differ from year to year, sometimes in significant ways. submitting entries. Rules differ from year to year, sometimes in significant
ways.
In 1994, we will retract the guideline that discouraged the use of C In [1994](../1994/index.html), we will retract the guideline that discouraged
constructs such as `3["curds"]`. At one time, certain ANSI compilers did the use of C constructs such as `3["curds"]`. At one time, certain ANSI
not consider such expressions to be valid ANSI C. Alert readers noted compilers did not consider such expressions to be valid ANSI C. Alert readers
that the current ANSI standard considered them to be valid. We were noted that the current ANSI standard considered them to be valid. We were
unable to find an ANSI C compiler that flagged such expressions as unable to find an ANSI C compiler that flagged such expressions as errors.
errors.
Please send us comments and suggestions what we have expressed above. Please send us comments and suggestions what we have expressed above.
Also include anything else that you would like to see in future contests. Also include anything else that you would like to see in future contests.
+1
View File
@@ -10,6 +10,7 @@
The current status of this entry is: The current status of this entry is:
``` ```
STATUS: INABIAF - please DO NOT fix
STATUS: missing file - please provide it STATUS: missing file - please provide it
``` ```
+2 -1
View File
@@ -405,7 +405,8 @@ Location: <a href="../../location.html#CA">CA</a> - <em>Canada</em></li>
<pre><code> make all</code></pre> <pre><code> make all</code></pre>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3> <h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p> <p>The current status of this entry is:</p>
<pre><code> STATUS: missing file - please provide it</code></pre> <pre><code> STATUS: INABIAF - please DO NOT fix
STATUS: missing file - please provide it</code></pre>
<p>For more detailed information see <a href="../../bugs.html#1993_ant">1993/ant in bugs.html</a>.</p> <p>For more detailed information see <a href="../../bugs.html#1993_ant">1993/ant in bugs.html</a>.</p>
<h2 id="to-use">To use:</h2> <h2 id="to-use">To use:</h2>
<pre><code> ./ant &#39;ERE&#39; [file ...]</code></pre> <pre><code> ./ant &#39;ERE&#39; [file ...]</code></pre>
+14 -17
View File
@@ -1,18 +1,17 @@
## To build: ## To build:
We recommend you try the alt version first so you can get a better idea of what We recommend you try the alternate version first so you can get a better idea of what
this entry was like back in 1993. See the [original code](#original-code) this entry was like back in 1993 (though see the [known bug in
section below to run the original. bugs.html](../../bugs.html#1993_cmills)). See the [original code](#original-code)
section below to run the original (the bug also exists here).
``` <!---sh--> ``` <!---sh-->
make alt make alt
``` ```
NOTE: this entry requires the `X11/Xlib.h` header file and the X11 library to NOTE: this entry requires the `X11/Xlib.h` header file and the X11 library to
compile. If you're under macOS and do not know how to install and use X11 compile. If you don't have the X11 installed see the [FAQ on how to compile and
programs see [FAQ 3.7 - How do I compile and use on macOS, an IOCCC entry that run an entry that requires X11](../../faq.html#X11).
requires X11?](../../faq.html#X11macos).
To configure how many microseconds to sleep before updates try: To configure how many microseconds to sleep before updates try:
@@ -71,16 +70,14 @@ Use `cmills` as you would `cmills.alt` above.
From the San Jose Mercury News (May 15, 1993 page 20A "West Hackers From the San Jose Mercury News (May 15, 1993 page 20A "West Hackers
trounce East in computer quiz game"): trounce East in computer quiz game"):
``` > "Since 1984, a contest has been held on Usenet for the most unreadable,
"Since 1984, a contest has been held on Usenet for the most creative, bizarre but working C program", Gates said. "What is the name of this
unreadable, creative, bizarre but working C program", Gates contest?"
said. "What is the name of this contest" >
> "**Windows**," shot back _Gassee_, naming Microsoft's premier product - a
"Windows," shot back Gassee, naming Microsoft's premier product product over which Apple sued Microsoft five years ago. Not the right answer -
- a product over which Apple sued Microsoft five years ago. Not it's "**The Obfuscated C Contest** [sic]" - but it brought down the house of Apple
the right answer - it's "The Obfuscated C Contest [sic]" - but partisans...
it brought down the house of Apple partisans...
```
[The expression on Bill Gates' face was a sight to behold, as reported [The expression on Bill Gates' face was a sight to behold, as reported
to us by several who were there]. to us by several who were there].
+15 -14
View File
@@ -402,14 +402,14 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
<!-- BEFORE: 1st line of markdown file: 1993/cmills/README.md --> <!-- BEFORE: 1st line of markdown file: 1993/cmills/README.md -->
<h2 id="to-build">To build:</h2> <h2 id="to-build">To build:</h2>
<p>We recommend you try the alt version first so you can get a better idea of what <p>We recommend you try the alternate version first so you can get a better idea of what
this entry was like back in 1993. See the <a href="#original-code">original code</a> this entry was like back in 1993 (though see the <a href="../../bugs.html#1993_cmills">known bug in
section below to run the original.</p> bugs.html</a>). See the <a href="#original-code">original code</a>
section below to run the original (the bug also exists here).</p>
<pre><code> make alt</code></pre> <pre><code> make alt</code></pre>
<p>NOTE: this entry requires the <code>X11/Xlib.h</code> header file and the X11 library to <p>NOTE: this entry requires the <code>X11/Xlib.h</code> header file and the X11 library to
compile. If you’re under macOS and do not know how to install and use X11 compile. If you don’t have the X11 installed see the <a href="../../faq.html#X11">FAQ on how to compile and
programs see <a href="../../faq.html#X11macos">FAQ 3.7 - How do I compile and use on macOS, an IOCCC entry that run an entry that requires X11</a>.</p>
requires X11?</a>.</p>
<p>To configure how many microseconds to sleep before updates try:</p> <p>To configure how many microseconds to sleep before updates try:</p>
<pre><code> make clobber SLEEP=200 alt</code></pre> <pre><code> make clobber SLEEP=200 alt</code></pre>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3> <h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
@@ -433,14 +433,15 @@ on but you can use the original without any delays if you wish.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2> <h2 id="judges-remarks">Judges’ remarks:</h2>
<p>From the San Jose Mercury News (May 15, 1993 page 20A “West Hackers <p>From the San Jose Mercury News (May 15, 1993 page 20A “West Hackers
trounce East in computer quiz game”):</p> trounce East in computer quiz game”):</p>
<pre><code> &quot;Since 1984, a contest has been held on Usenet for the most <blockquote>
unreadable, creative, bizarre but working C program&quot;, Gates <p>“Since 1984, a contest has been held on Usenet for the most unreadable,
said. &quot;What is the name of this contest&quot; creative, bizarre but working C program”, Gates said. “What is the name of this
contest?”</p>
&quot;Windows,&quot; shot back Gassee, naming Microsoft&#39;s premier product <p>“<strong>Windows</strong>,” shot back <em>Gassee</em>, naming Microsoft’s premier product - a
- a product over which Apple sued Microsoft five years ago. Not product over which Apple sued Microsoft five years ago. Not the right answer -
the right answer - it&#39;s &quot;The Obfuscated C Contest [sic]&quot; - but it’s “<strong>The Obfuscated C Contest</strong> [sic]” - but it brought down the house of Apple
it brought down the house of Apple partisans...</code></pre> partisans…</p>
</blockquote>
<p>[The expression on Bill Gates’ face was a sight to behold, as reported <p>[The expression on Bill Gates’ face was a sight to behold, as reported
to us by several who were there].</p> to us by several who were there].</p>
<p>You must set <code>$DISPLAY</code> in your environment or the program will <p>You must set <code>$DISPLAY</code> in your environment or the program will
+2 -1
View File
@@ -13,7 +13,8 @@
where: where:
`datafile` is the initial pattern (default is the [dgibson.data1](%%REPO_URL%%/1993/dgibson/dgibson.data1) file) `datafile` is the initial pattern (default is the
[dgibson.data1](%%REPO_URL%%/1993/dgibson/dgibson.data1) file).
## Try: ## Try:
+2 -1
View File
@@ -406,7 +406,8 @@ Location: <a href="../../location.html#ZA">ZA</a> - <em>Republic of South Africa
<h2 id="to-use">To use:</h2> <h2 id="to-use">To use:</h2>
<pre><code> ./dgibson.sh [datafile]</code></pre> <pre><code> ./dgibson.sh [datafile]</code></pre>
<p>where:</p> <p>where:</p>
<p><code>datafile</code> is the initial pattern (default is the <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data1">dgibson.data1</a> file)</p> <p><code>datafile</code> is the initial pattern (default is the
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/dgibson/dgibson.data1">dgibson.data1</a> file).</p>
<h2 id="try">Try:</h2> <h2 id="try">Try:</h2>
<pre><code> ./try.sh</code></pre> <pre><code> ./try.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2> <h2 id="judges-remarks">Judges’ remarks:</h2>
+3 -7
View File
@@ -11,11 +11,7 @@
./ejb level ./ejb level
``` ```
where: where `level` is a value from `-128` to `127`.
``` <!---sh-->
level a value from -128 to 127
```
## Try: ## Try:
@@ -88,8 +84,8 @@ reasonably, however.)
Although this program has only been tested on UNIX systems it will probably run Although this program has only been tested on UNIX systems it will probably run
on just about any machine with an ANSI C compiler. It does not use the C on just about any machine with an ANSI C compiler. It does not use the C
preprocessor at all. The only functions it uses are `atoi()`, `malloc()`, preprocessor at all. The only functions it uses are `atoi(3)`, `malloc(3)`,
`memset()`, `printf()`, and `puts()`. It does, however, require that the `memset(3)`, `printf(3)`, and `puts(3)`. It does, however, require that the
architecture it runs on have bytes that are at least eight bits long and architecture it runs on have bytes that are at least eight bits long and
pointers that are at least four bytes long. In addition, it requires an ANSI pointers that are at least four bytes long. In addition, it requires an ANSI
compiler since it uses `signed char` and ANSI-style function declarations. compiler since it uses `signed char` and ANSI-style function declarations.
+3 -4
View File
@@ -405,8 +405,7 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
<pre><code> make all</code></pre> <pre><code> make all</code></pre>
<h2 id="to-use">To use:</h2> <h2 id="to-use">To use:</h2>
<pre><code> ./ejb level</code></pre> <pre><code> ./ejb level</code></pre>
<p>where:</p> <p>where <code>level</code> is a value from <code>-128</code> to <code>127</code>.</p>
<pre><code> level a value from -128 to 127</code></pre>
<h2 id="try">Try:</h2> <h2 id="try">Try:</h2>
<pre><code> ./try.sh</code></pre> <pre><code> ./try.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2> <h2 id="judges-remarks">Judges’ remarks:</h2>
@@ -451,8 +450,8 @@ indented properly. (It is pretty hard to indent this code
reasonably, however.)</p> reasonably, however.)</p>
<p>Although this program has only been tested on UNIX systems it will probably run <p>Although this program has only been tested on UNIX systems it will probably run
on just about any machine with an ANSI C compiler. It does not use the C on just about any machine with an ANSI C compiler. It does not use the C
preprocessor at all. The only functions it uses are <code>atoi()</code>, <code>malloc()</code>, preprocessor at all. The only functions it uses are <code>atoi(3)</code>, <code>malloc(3)</code>,
<code>memset()</code>, <code>printf()</code>, and <code>puts()</code>. It does, however, require that the <code>memset(3)</code>, <code>printf(3)</code>, and <code>puts(3)</code>. It does, however, require that the
architecture it runs on have bytes that are at least eight bits long and architecture it runs on have bytes that are at least eight bits long and
pointers that are at least four bytes long. In addition, it requires an ANSI pointers that are at least four bytes long. In addition, it requires an ANSI
compiler since it uses <code>signed char</code> and ANSI-style function declarations.</p> compiler since it uses <code>signed char</code> and ANSI-style function declarations.</p>
+1 -1
View File
@@ -514,7 +514,7 @@ restoration of ring 1 and the removal of ring 3. This is
because ring 1 is always movable, and ring 3 is currently because ring 1 is always movable, and ring 3 is currently
the second ring still attached to the <code>U</code>. This constraint the second ring still attached to the <code>U</code>. This constraint
leads to a recursive solution to the puzzle. Like the leads to a recursive solution to the puzzle. Like the
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/ejb/hanoi.md">Towers of Hanoi</a>, the number of steps to solve this puzzle is <a href="hanoi.html">Towers of Hanoi</a>, the number of steps to solve this puzzle is
exponential in the number of rings.</p> exponential in the number of rings.</p>
<hr style="width:10%;text-align:left;margin-left:0"> <hr style="width:10%;text-align:left;margin-left:0">
<p>Jump to: <a href="#">top</a></p> <p>Jump to: <a href="#">top</a></p>
+1 -1
View File
@@ -139,7 +139,7 @@ restoration of ring 1 and the removal of ring 3. This is
because ring 1 is always movable, and ring 3 is currently because ring 1 is always movable, and ring 3 is currently
the second ring still attached to the `U`. This constraint the second ring still attached to the `U`. This constraint
leads to a recursive solution to the puzzle. Like the leads to a recursive solution to the puzzle. Like the
[Towers of Hanoi](%%REPO_URL%%/1993/ejb/hanoi.md), the number of steps to solve this puzzle is [Towers of Hanoi](hanoi.html), the number of steps to solve this puzzle is
exponential in the number of rings. exponential in the number of rings.
+8 -8
View File
@@ -405,14 +405,14 @@ classic K&amp;R C was allowed so long as ANSI C compilers could still
compile the entry. If you do not have an ANSI C compiler, you may compile the entry. If you do not have an ANSI C compiler, you may
not be able to compile the entry, sorry!</p> not be able to compile the entry, sorry!</p>
<h2 id="a-few-notes-regarding-future-contests">A few notes regarding future contests:</h2> <h2 id="a-few-notes-regarding-future-contests">A few notes regarding future contests:</h2>
<p>Be sure to wait until the 1994 rules are posted before submitting entries. <p>Be sure to wait until the <a href="../1994/rules.txt">1994 rules</a> are posted before
Rules differ from year to year, sometimes in significant ways.</p> submitting entries. Rules differ from year to year, sometimes in significant
<p>In 1994, we will retract the guideline that discouraged the use of C ways.</p>
constructs such as <code>3["curds"]</code>. At one time, certain ANSI compilers did <p>In <a href="../1994/index.html">1994</a>, we will retract the guideline that discouraged
not consider such expressions to be valid ANSI C. Alert readers noted the use of C constructs such as <code>3["curds"]</code>. At one time, certain ANSI
that the current ANSI standard considered them to be valid. We were compilers did not consider such expressions to be valid ANSI C. Alert readers
unable to find an ANSI C compiler that flagged such expressions as noted that the current ANSI standard considered them to be valid. We were
errors.</p> unable to find an ANSI C compiler that flagged such expressions as errors.</p>
<p>Please send us comments and suggestions what we have expressed above. <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. Also include anything else that you would like to see in future contests.
Send such email to:</p> Send such email to:</p>
+5 -5
View File
@@ -1,9 +1,9 @@
## To build: ## To build:
NOTE: this entry requires `X11/Xlib.h` header file and the X11 library to NOTE: this entry requires the `X11/Xlib.h` header file and the X11 library to
compile. macOS users running Mountain Lion and later will need to download and compile. See [the FAQ on how to run entries that require X11](../../faq.html#X11) if
install [XQuartz](https://www.xquartz.org) in order to compile and run this you need help.
entry.
``` <!---sh--> ``` <!---sh-->
make all make all
@@ -30,7 +30,7 @@ on inverse video. :-)
This is `jonth` (`jon's t(h)etris`) for the X Window System. This is `jonth` (`jon's t(h)etris`) for the X Window System.
This program is also an example of data abstraction. The X array is This program is also an example of data abstraction. The `X` array is
after initialization hidden by the well defined macros `t`, `u` and `F`. after initialization hidden by the well defined macros `t`, `u` and `F`.
This program is highly portable as it runs on a "Notebook" size SPARC. This program is highly portable as it runs on a "Notebook" size SPARC.
+4 -5
View File
@@ -402,10 +402,9 @@ Location: <a href="../../location.html#NO">NO</a> - <em>Kingdom of Norway</em> (
<!-- BEFORE: 1st line of markdown file: 1993/jonth/README.md --> <!-- BEFORE: 1st line of markdown file: 1993/jonth/README.md -->
<h2 id="to-build">To build:</h2> <h2 id="to-build">To build:</h2>
<p>NOTE: this entry requires <code>X11/Xlib.h</code> header file and the X11 library to <p>NOTE: this entry requires the <code>X11/Xlib.h</code> header file and the X11 library to
compile. macOS users running Mountain Lion and later will need to download and compile. See <a href="../../faq.html#X11">the FAQ on how to run entries that require X11</a> if
install <a href="https://www.xquartz.org">XQuartz</a> in order to compile and run this you need help.</p>
entry.</p>
<pre><code> make all</code></pre> <pre><code> make all</code></pre>
<h2 id="to-use">To use:</h2> <h2 id="to-use">To use:</h2>
<pre><code> ./jonth # must be run on an X11 server</code></pre> <pre><code> ./jonth # must be run on an X11 server</code></pre>
@@ -416,7 +415,7 @@ rotate and press SPACE to drop.</p>
on inverse video. :-)</p> on inverse video. :-)</p>
<h2 id="authors-remarks">Author’s remarks:</h2> <h2 id="authors-remarks">Author’s remarks:</h2>
<p>This is <code>jonth</code> (<code>jon's t(h)etris</code>) for the X Window System.</p> <p>This is <code>jonth</code> (<code>jon's t(h)etris</code>) for the X Window System.</p>
<p>This program is also an example of data abstraction. The X array is <p>This program is also an example of data abstraction. The <code>X</code> array is
after initialization hidden by the well defined macros <code>t</code>, <code>u</code> and <code>F</code>.</p> after initialization hidden by the well defined macros <code>t</code>, <code>u</code> and <code>F</code>.</p>
<p>This program is highly portable as it runs on a “Notebook” size SPARC. <p>This program is highly portable as it runs on a “Notebook” size SPARC.
This program will not work on machines where <code>sizeof(int)!=sizeof(void *)</code>.</p> This program will not work on machines where <code>sizeof(int)!=sizeof(void *)</code>.</p>
+2 -2
View File
@@ -38,7 +38,7 @@ International Internet community.
This program plays This program plays
[Mastermind](https://en.wikipedia.org/wiki/Mastermind_&#x28;board_game&#x29;), if you call [Mastermind](https://en.wikipedia.org/wiki/Mastermind_&#x28;board_game&#x29;), if you call
it by a name ending by 'd', otherwise it _solves_ Mastermind. Call it without it by a name ending by `d`, otherwise it _solves_ Mastermind. Call it without
parameters to use 6 digits (colors), or indicate the number of possible digits parameters to use 6 digits (colors), or indicate the number of possible digits
(you cannot change the number of positions so easily). (you cannot change the number of positions so easily).
@@ -66,7 +66,7 @@ backspaces. Do "disable scrolling" on cmdtool or similar emulators.
#### Bugs #### Bugs
Please don't type ^D at the prompt!! Please don't type `^D` at the prompt!!
##### EXAMPLE: Suppose we think of 1234 ##### EXAMPLE: Suppose we think of 1234
+2 -2
View File
@@ -419,7 +419,7 @@ International Internet community.</p>
<h2 id="authors-remarks">Author’s remarks:</h2> <h2 id="authors-remarks">Author’s remarks:</h2>
<p>This program plays <p>This program plays
<a href="https://en.wikipedia.org/wiki/Mastermind_(board_game)">Mastermind</a>, if you call <a href="https://en.wikipedia.org/wiki/Mastermind_(board_game)">Mastermind</a>, if you call
it by a name ending by ‘d’, otherwise it <em>solves</em> Mastermind. Call it without it by a name ending by <code>d</code>, otherwise it <em>solves</em> Mastermind. Call it without
parameters to use 6 digits (colors), or indicate the number of possible digits parameters to use 6 digits (colors), or indicate the number of possible digits
(you cannot change the number of positions so easily).</p> (you cannot change the number of positions so easily).</p>
<p>The number in parentheses is the number of possible combinations, <p>The number in parentheses is the number of possible combinations,
@@ -439,7 +439,7 @@ of binary coded colors-base numbers is.</p>
<p>Suggestions: Use terminal (or emulator) with non-destructive <p>Suggestions: Use terminal (or emulator) with non-destructive
backspaces. Do “disable scrolling” on cmdtool or similar emulators.</p> backspaces. Do “disable scrolling” on cmdtool or similar emulators.</p>
<h4 id="bugs">Bugs</h4> <h4 id="bugs">Bugs</h4>
<p>Please don’t type ^D at the prompt!!</p> <p>Please don’t type <code>^D</code> at the prompt!!</p>
<h5 id="example-suppose-we-think-of-1234">EXAMPLE: Suppose we think of 1234</h5> <h5 id="example-suppose-we-think-of-1234">EXAMPLE: Suppose we think of 1234</h5>
<pre><code> $ ./leo <pre><code> $ ./leo
(1296): 6433 (1296): 6433
+3 -5
View File
@@ -28,9 +28,8 @@ _a long time ago_ (.. _in a galaxy far, far away_?).
If `make all` fails to compile, a suggestion of compiling and running If `make all` fails to compile, a suggestion of compiling and running
the alternate version is printed. This alternate version is a variant the alternate version is printed. This alternate version is a variant
for [those of us](https://www.collinsdictionary.com/dictionary/english/everyone) for those of us with gcc >= 2.3.3 or using clang. See [Alternate
with gcc >= 2.3.3 or using clang. See [Alternate code](#alternate-code) code](#alternate-code) section below for more details.
section below for more details.
### Bugs and (Mis)features: ### Bugs and (Mis)features:
@@ -57,7 +56,6 @@ If you have gcc < 2.3.3 (i.e. the entry can compile):
This version does what the code did but in a way that will work with modern This version does what the code did but in a way that will work with modern
compilers. We'd like to say there's something special about it but there isn't. compilers. We'd like to say there's something special about it but there isn't.
Nonetheless it will be compiled in case the original entry fails to compile.
### Alternate build: ### Alternate build:
@@ -201,7 +199,7 @@ These failed miserably:
- `dbx` - Quit with a very 'informative' error message: - `dbx` - Quit with a very 'informative' error message:
`"dbx: fatal error: Is a directory"` `"dbx: fatal error: Is a directory"`
- gdb - Printed almost the same error message `": Is a directory"`. - `gdb` - Printed almost the same error message `": Is a directory"`.
It was, however, possible to step through the code but It was, however, possible to step through the code but
not list it. not list it.
+4 -6
View File
@@ -418,9 +418,8 @@ on a bug which was later fixed in gcc 2.3.3, and that happened
<em>a long time ago</em> (.. <em>in a galaxy far, far away</em>?).</p> <em>a long time ago</em> (.. <em>in a galaxy far, far away</em>?).</p>
<p>If <code>make all</code> fails to compile, a suggestion of compiling and running <p>If <code>make all</code> fails to compile, a suggestion of compiling and running
the alternate version is printed. This alternate version is a variant the alternate version is printed. This alternate version is a variant
for <a href="https://www.collinsdictionary.com/dictionary/english/everyone">those of us</a> for those of us with gcc &gt;= 2.3.3 or using clang. See <a href="#alternate-code">Alternate
with gcc &gt;= 2.3.3 or using clang. See <a href="#alternate-code">Alternate code</a> code</a> section below for more details.</p>
section below for more details.</p>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3> <h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p> <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>
@@ -430,8 +429,7 @@ section below for more details.</p>
<pre><code> ./lmfjyh</code></pre> <pre><code> ./lmfjyh</code></pre>
<h2 id="alternate-code">Alternate code:</h2> <h2 id="alternate-code">Alternate code:</h2>
<p>This version does what the code did but in a way that will work with modern <p>This version does what the code did but in a way that will work with modern
compilers. We’d like to say there’s something special about it but there isn’t. compilers. We’d like to say there’s something special about it but there isn’t.</p>
Nonetheless it will be compiled in case the original entry fails to compile.</p>
<h3 id="alternate-build">Alternate build:</h3> <h3 id="alternate-build">Alternate build:</h3>
<p>Should you wish to build this version manually:</p> <p>Should you wish to build this version manually:</p>
<pre><code> make alt</code></pre> <pre><code> make alt</code></pre>
@@ -518,7 +516,7 @@ with some older UNIX variants).</p>
<ul> <ul>
<li><p><code>dbx</code> - Quit with a very ‘informative’ error message: <li><p><code>dbx</code> - Quit with a very ‘informative’ error message:
<code>"dbx: fatal error: Is a directory"</code></p></li> <code>"dbx: fatal error: Is a directory"</code></p></li>
<li><p>gdb - Printed almost the same error message <code>": Is a directory"</code>. <li><p><code>gdb</code> - Printed almost the same error message <code>": Is a directory"</code>.
It was, however, possible to step through the code but It was, however, possible to step through the code but
not list it.</p></li> not list it.</p></li>
</ul> </ul>
+5 -6
View File
@@ -64,8 +64,7 @@ bypass](https://hitchhikers.fandom.com/wiki/Bypass).
## Original code: ## Original code:
This version, the original, does not sleep in between writes, and is thus much This version, the original, does not sleep in between writes, and is thus much
faster (depending on the `SLEEP` parameter specified in the build of `alt`, of faster, at least with modern systems.
course).
### Original build: ### Original build:
@@ -117,7 +116,7 @@ but must be present.
Variable names are single characters chosen for their similarity to other Variable names are single characters chosen for their similarity to other
characters (`O` for `0` (zero), `l` for `1` (one), `S` for `5` (five) in some characters (`O` for `0` (zero), `l` for `1` (one), `S` for `5` (five) in some
fonts, and `_` for ... well nothing really, but it is easy to miss). To fonts, and `_` for ... well nothing really, but it is easy to miss). To
prevent the need for `strlen()`, the fact that argv is laid out sequentially is prevent the need for `strlen(3)`, the fact that argv is laid out sequentially is
exploited (i.e. `argv[i + 1] == argv[i] + strlen(argv[i]) + 1`). This is not exploited (i.e. `argv[i + 1] == argv[i] + strlen(argv[i]) + 1`). This is not
portable (by the books), but it seems to work everywhere I try (actually, for portable (by the books), but it seems to work everywhere I try (actually, for
VMS, that only holds for `i > 1`). Also, I depend on the fact that a carriage VMS, that only holds for `i > 1`). Also, I depend on the fact that a carriage
@@ -131,11 +130,11 @@ who don't mind ruining our eyes with 132 column screens).
The first statement points the base of `l` (the argument vector) to The first statement points the base of `l` (the argument vector) to
be the first argument by incrementing it. It then assigns `O` to be the first argument by incrementing it. It then assigns `O` to
point to the character before the first character of the second point to the character before the first character of the second
argument which also happens to be the NUL termination of the first argument which also happens to be the `NUL` termination of the first
argument. `*O` gets a `\r` assigned to it. Finally `0` is assigned to argument. `*O` gets a `\r` assigned to it. Finally `0` is assigned to
the first character of the second argument which has the effect of the first character of the second argument which has the effect of
NUL terminating the first argument after the carriage return had `NUL` terminating the first argument after the carriage return had
removed its NUL termination. I really tried to make the last part removed its `NUL` termination. I really tried to make the last part
of that statement part of the original expression, but the best I of that statement part of the original expression, but the best I
could do was attach it with a comma (against the advice of K&R). could do was attach it with a comma (against the advice of K&R).
The for loop runs the next for loop continuously (actually until The for loop runs the next for loop continuously (actually until
+5 -6
View File
@@ -441,8 +441,7 @@ bypass</a>.</p>
SLEEP=1200 ./try.alt.sh xyzzyzzyx 5555</code></pre> SLEEP=1200 ./try.alt.sh xyzzyzzyx 5555</code></pre>
<h2 id="original-code">Original code:</h2> <h2 id="original-code">Original code:</h2>
<p>This version, the original, does not sleep in between writes, and is thus much <p>This version, the original, does not sleep in between writes, and is thus much
faster (depending on the <code>SLEEP</code> parameter specified in the build of <code>alt</code>, of faster, at least with modern systems.</p>
course).</p>
<h3 id="original-build">Original build:</h3> <h3 id="original-build">Original build:</h3>
<pre><code> make all</code></pre> <pre><code> make all</code></pre>
<h3 id="original-use">Original use:</h3> <h3 id="original-use">Original use:</h3>
@@ -474,7 +473,7 @@ but must be present.</p>
<p>Variable names are single characters chosen for their similarity to other <p>Variable names are single characters chosen for their similarity to other
characters (<code>O</code> for <code>0</code> (zero), <code>l</code> for <code>1</code> (one), <code>S</code> for <code>5</code> (five) in some characters (<code>O</code> for <code>0</code> (zero), <code>l</code> for <code>1</code> (one), <code>S</code> for <code>5</code> (five) in some
fonts, and <code>_</code> for … well nothing really, but it is easy to miss). To fonts, and <code>_</code> for … well nothing really, but it is easy to miss). To
prevent the need for <code>strlen()</code>, the fact that argv is laid out sequentially is prevent the need for <code>strlen(3)</code>, the fact that argv is laid out sequentially is
exploited (i.e. <code>argv[i + 1] == argv[i] + strlen(argv[i]) + 1</code>). This is not exploited (i.e. <code>argv[i + 1] == argv[i] + strlen(argv[i]) + 1</code>). This is not
portable (by the books), but it seems to work everywhere I try (actually, for portable (by the books), but it seems to work everywhere I try (actually, for
VMS, that only holds for <code>i &gt; 1</code>). Also, I depend on the fact that a carriage VMS, that only holds for <code>i &gt; 1</code>). Also, I depend on the fact that a carriage
@@ -486,11 +485,11 @@ who don’t mind ruining our eyes with 132 column screens).</p>
<p>The first statement points the base of <code>l</code> (the argument vector) to <p>The first statement points the base of <code>l</code> (the argument vector) to
be the first argument by incrementing it. It then assigns <code>O</code> to be the first argument by incrementing it. It then assigns <code>O</code> to
point to the character before the first character of the second point to the character before the first character of the second
argument which also happens to be the NUL termination of the first argument which also happens to be the <code>NUL</code> termination of the first
argument. <code>*O</code> gets a <code>\r</code> assigned to it. Finally <code>0</code> is assigned to argument. <code>*O</code> gets a <code>\r</code> assigned to it. Finally <code>0</code> is assigned to
the first character of the second argument which has the effect of the first character of the second argument which has the effect of
NUL terminating the first argument after the carriage return had <code>NUL</code> terminating the first argument after the carriage return had
removed its NUL termination. I really tried to make the last part removed its <code>NUL</code> termination. I really tried to make the last part
of that statement part of the original expression, but the best I of that statement part of the original expression, but the best I
could do was attach it with a comma (against the advice of K&amp;R). could do was attach it with a comma (against the advice of K&amp;R).
The for loop runs the next for loop continuously (actually until The for loop runs the next for loop continuously (actually until
+5 -4
View File
@@ -78,7 +78,8 @@ The author has provided several CABBAGE files for your amusement:
for left, `/` for right, and `.` for 'fire the ball'. for left, `/` for right, and `.` for 'fire the ball'.
- [rince.data2](%%REPO_URL%%/1993/rince/rince.data2) plays the old [James Bonfield](../../authors.html#James_Bonfield)'s - [rince.data2](%%REPO_URL%%/1993/rince/rince.data2) plays the old [James Bonfield](../../authors.html#James_Bonfield)'s
([1991/rince](../../1991/rince/index.html) game from IOCCC 1991. ([1991/rince](../../1991/rince/index.html) game from [IOCCC
1991](../../1991/index.html)).
- [rince.data3](%%REPO_URL%%/1993/rince/rince.data3) Sokoban screen 11. You are the `o` character. - [rince.data3](%%REPO_URL%%/1993/rince/rince.data3) Sokoban screen 11. You are the `o` character.
You must push the money `m` into the dotted region of the screen. The game is You must push the money `m` into the dotted region of the screen. The game is
@@ -166,7 +167,7 @@ conflict of the two).
The use of `select(2)` no doubt makes it less portable to STRICT SysV machines. The use of `select(2)` no doubt makes it less portable to STRICT SysV machines.
However I have tested this on several so-called SysV machines, and all of them However I have tested this on several so-called SysV machines, and all of them
support `select(2)`. In fact, the `select(2)` they support appears to be more support `select(2)`. In fact, the `select(2)` they support appears to be more
portable between them than their `poll()` call. portable between them than their `poll(2)` call.
### Obfuscation ### Obfuscation
@@ -174,11 +175,11 @@ portable between them than their `poll()` call.
I have tried to use as many different obfuscation techniques, including I have tried to use as many different obfuscation techniques, including
some of which (such as `sizeof` confusion) I have not seen in any entries some of which (such as `sizeof` confusion) I have not seen in any entries
(hmmm - perhaps there's a reason for that...) so far. Also, very poor (hmmm - perhaps there's a reason for that...) so far. Also, very poor
structure (yes, I use `goto`'s) has led to apparently having an `fgets()` as structure (yes, I use `goto`'s) has led to apparently having an `fgets(3)` as
the last line of main. Note that I have still tried to aim at least some the last line of main. Note that I have still tried to aim at least some
efficiency (provided it makes things slightly more obfuscated of course). efficiency (provided it makes things slightly more obfuscated of course).
One such thing is the way I dynamically allocate a 2-dimensional array One such thing is the way I dynamically allocate a 2-dimensional array
using only ONE `malloc()`. Hence this program could be used as a tutorial using only ONE `malloc(3)`. Hence this program could be used as a tutorial
for all those people who consistently ask this question in the C for all those people who consistently ask this question in the C
newsgroups. newsgroups.
+5 -4
View File
@@ -437,7 +437,8 @@ changed).</p>
<a href="https://en.wikipedia.org/wiki/Breakout_(video_game)">Breakout</a>. Keys are <code>,</code> <a href="https://en.wikipedia.org/wiki/Breakout_(video_game)">Breakout</a>. Keys are <code>,</code>
for left, <code>/</code> for right, and <code>.</code> for ‘fire the ball’.</p></li> for left, <code>/</code> for right, and <code>.</code> for ‘fire the ball’.</p></li>
<li><p><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data2">rince.data2</a> plays the old <a href="../../authors.html#James_Bonfield">James Bonfield</a>’s <li><p><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data2">rince.data2</a> plays the old <a href="../../authors.html#James_Bonfield">James Bonfield</a>’s
(<a href="../../1991/rince/index.html">1991/rince</a> game from IOCCC 1991.</p></li> (<a href="../../1991/rince/index.html">1991/rince</a> game from <a href="../../1991/index.html">IOCCC
1991</a>).</p></li>
<li><p><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data3">rince.data3</a> Sokoban screen 11. You are the <code>o</code> character. <li><p><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1993/rince/rince.data3">rince.data3</a> Sokoban screen 11. You are the <code>o</code> character.
You must push the money <code>m</code> into the dotted region of the screen. The game is You must push the money <code>m</code> into the dotted region of the screen. The game is
considered finished when all the <code>m</code>s are then <code>M</code>s.</p></li> considered finished when all the <code>m</code>s are then <code>M</code>s.</p></li>
@@ -496,16 +497,16 @@ conflict of the two).</p>
<p>The use of <code>select(2)</code> no doubt makes it less portable to STRICT SysV machines. <p>The use of <code>select(2)</code> no doubt makes it less portable to STRICT SysV machines.
However I have tested this on several so-called SysV machines, and all of them However I have tested this on several so-called SysV machines, and all of them
support <code>select(2)</code>. In fact, the <code>select(2)</code> they support appears to be more support <code>select(2)</code>. In fact, the <code>select(2)</code> they support appears to be more
portable between them than their <code>poll()</code> call.</p> portable between them than their <code>poll(2)</code> call.</p>
<h3 id="obfuscation">Obfuscation</h3> <h3 id="obfuscation">Obfuscation</h3>
<p>I have tried to use as many different obfuscation techniques, including <p>I have tried to use as many different obfuscation techniques, including
some of which (such as <code>sizeof</code> confusion) I have not seen in any entries some of which (such as <code>sizeof</code> confusion) I have not seen in any entries
(hmmm - perhaps there’s a reason for that…) so far. Also, very poor (hmmm - perhaps there’s a reason for that…) so far. Also, very poor
structure (yes, I use <code>goto</code>’s) has led to apparently having an <code>fgets()</code> as structure (yes, I use <code>goto</code>’s) has led to apparently having an <code>fgets(3)</code> as
the last line of main. Note that I have still tried to aim at least some the last line of main. Note that I have still tried to aim at least some
efficiency (provided it makes things slightly more obfuscated of course). efficiency (provided it makes things slightly more obfuscated of course).
One such thing is the way I dynamically allocate a 2-dimensional array One such thing is the way I dynamically allocate a 2-dimensional array
using only ONE <code>malloc()</code>. Hence this program could be used as a tutorial using only ONE <code>malloc(3)</code>. Hence this program could be used as a tutorial
for all those people who consistently ask this question in the C for all those people who consistently ask this question in the C
newsgroups.</p> newsgroups.</p>
<p>Also, the program does require a volatile type (especially when <p>Also, the program does require a volatile type (especially when
+1 -1
View File
@@ -79,7 +79,7 @@ The author suggests the following questions when using
- Do colorless green ideas sleep furiously? - Do colorless green ideas sleep furiously?
We suggest you try using the body (minus the header and signature line) We suggest you try using the body (minus the header and signature line)
of a Usenet article. You might want to try something from alt.flame. :-) of a Usenet article. You might want to try something from _alt.flame_. :-)
NOTE: If you have certain `'` in the question this entry might fail. NOTE: If you have certain `'` in the question this entry might fail.
+1 -1
View File
@@ -443,7 +443,7 @@ some questions related to the text.</p>
<li>Do colorless green ideas sleep furiously?</li> <li>Do colorless green ideas sleep furiously?</li>
</ul> </ul>
<p>We suggest you try using the body (minus the header and signature line) <p>We suggest you try using the body (minus the header and signature line)
of a Usenet article. You might want to try something from alt.flame. :-)</p> of a Usenet article. You might want to try something from <em>alt.flame</em>. :-)</p>
<p>NOTE: If you have certain <code>'</code> in the question this entry might fail.</p> <p>NOTE: If you have certain <code>'</code> in the question this entry might fail.</p>
<h2 id="authors-remarks">Author’s remarks:</h2> <h2 id="authors-remarks">Author’s remarks:</h2>
<p>I wanted to write a program that would read in a text file in <p>I wanted to write a program that would read in a text file in
+1 -1
View File
@@ -1297,7 +1297,7 @@ the index.html file for details.</p>
<h3 id="information-1993rinceindex.html">Information: <a href="1993/rince/index.html">1993/rince/index.html</a></h3> <h3 id="information-1993rinceindex.html">Information: <a href="1993/rince/index.html">1993/rince/index.html</a></h3>
<p>Although the code checks if the file can be opened or not, badly formatted files <p>Although the code checks if the file can be opened or not, badly formatted files
will cause problems. No other checks are performed either.</p> will cause problems. No other checks are performed either.</p>
<p>There is no end of game checking method so you will have to quit the game <p>There is no end of game checking function so you will have to quit the game
through ctrl-c or such.</p> through ctrl-c or such.</p>
<div id="1993_schnitzi"> <div id="1993_schnitzi">
<h2 id="schnitzi">1993/schnitzi</h2> <h2 id="schnitzi">1993/schnitzi</h2>
+1 -1
View File
@@ -1313,7 +1313,7 @@ the index.html file for details.
Although the code checks if the file can be opened or not, badly formatted files Although the code checks if the file can be opened or not, badly formatted files
will cause problems. No other checks are performed either. will cause problems. No other checks are performed either.
There is no end of game checking method so you will have to quit the game There is no end of game checking function so you will have to quit the game
through ctrl-c or such. through ctrl-c or such.