From 463d126a9f1ae20a9c34c8026b3b9a6ac6f7200e Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Thu, 18 Apr 2024 04:14:51 -0700 Subject: [PATCH 1/2] Improve thanks-for-fixes up through 1992 For each YYYY header it is a link to the respective index.html page. For each entry the index.html file for the entry is in the section name of the entry (it used to not be a link there but rather in another line with the source code on the same line). The source code is in a subsection (that is the index.html is '#' and source code is '##') below the index.html link. (The rest of the years might happen later today or it might not happen until another day due to a timing conflict here.) --- Makefile | 19 ++- thanks-for-help.html | 281 +++++++++++++++++++++++++++---------------- thanks-for-help.md | 246 ++++++++++++++++++++++++------------- 3 files changed, 358 insertions(+), 188 deletions(-) diff --git a/Makefile b/Makefile index 3ae242191..639a9fdcf 100644 --- a/Makefile +++ b/Makefile @@ -381,8 +381,25 @@ gen_top_html: ${GEN_TOP_HTML} ${GEN_TOP_HTML} -v 1 @echo '=-=-=-=-= IOCCC complete make $@ =-=-=-=-=' -# a fishy rule :-) +# Say, can you see +# By the dawn's early light +# What so proudly we hailed +# At the twilight's last gleaming? # +# Whose broad stripes and bright stars +# Through the perilous fight +# O'er the ramparts we watched +# Were so gallantly, yeah, streaming? +# +# And the rockets' red glare +# The bombs bursting in air +# Gave proof through the night +# That our flag was still there +# +# O say, does that star-spangled banner yet wave +# O'er the land of the free and the home of the brave +# +# Just kidding .. So Long, and Thanks for All the Fish :-) thanks: ${GEN_TOP_HTML} thanks-for-help.md @echo "Thanks for all the help ..." @${GEN_TOP_HTML} diff --git a/thanks-for-help.html b/thanks-for-help.html index a5e4aef48..e9409ca06 100644 --- a/thanks-for-help.html +++ b/thanks-for-help.html @@ -156,10 +156,11 @@ on a IOCCC entry by entry basis.
Cody fixed this to work for macOS.
The problem was to do with the way that the read(2) function was redefined.
@@ -178,7 +179,8 @@ the famous tattoo which we also include here:
…which was done in 2005 by Thomas Scovell.
Cody fixed this to not require -traditional-cpp which some compilers like
clang do not support. Fixing -traditional-cpp is, as noted later on, very
@@ -227,7 +229,8 @@ but not clang - or at least some versions.
To see the difference from start to fixed:
cd 1984/decot ; make diff_orig_prog
Cody also fixed this to not crash when no arg is specified. Note that if the arg @@ -235,7 +238,8 @@ is not a positive number it will not do anything useful or anything at all. This was fixed on 30 October 2023 after the bug status was changed from INABIAF (it’s not a bug it’s a feature) to bug.
Cody provided an alternate version,
an improved version of the judges, so that everyone can enjoy it with systems
@@ -255,10 +259,11 @@ copy of it as to what it should have been at the time, in the fabulous
- Both Cody and Yusuke fixed this; Yusuke got this to not crash and Cody fixed it
to work with macOS.1985
+1985
\n in the string - can you
why?) but to make it more friendly to users Cody made it print a \n prior to
returning to the shell. The original code does not have this change.
Cody, out of abundance of caution, added a second arg to main() because some
versions of clang object to the number of args of main(), saying that it must
@@ -293,7 +299,8 @@ way.
primes(6) is installed or not, but it only does it once with the
default value).
Cody fixed this to compile with modern compilers. In the past one could get away
with defining some macro to #define and then use #foo to have the same
@@ -303,7 +310,8 @@ changed the #o lines to #define. Also unistd.h
that Cody added. See the index.html for details.
Cody also provided the try.alt.sh script.
Cody added the alt code which allows one to resize the maze and he also added the try.alt.sh script that randomly selects sizes @@ -312,7 +320,8 @@ enter a number, in an infinite loop, exiting if any non-digits are in input (this includes negative numbers which in the code actually sets it back to 39, the default).
Cody fixed this very twisted entry to not require -traditional-cpp. Fixing
-traditional-cpp is, as noted later on, very complicated, but Cody would like
@@ -400,24 +409,28 @@ rule).
Cody also added the try.sh and try.alt.sh scripts.
Cody made the C file executable so one does not have to do sh ./applin.c or ./applin; they can do either ./applin.c or ./applin.
Cody made this use fgets().
Cody also added the try.sh script which also feeds to the
program the added input.txt file.
Cody fixed this to compile and work with clang (it already worked with gcc).
The problem was that clang is more strict about the type of second arg to
@@ -426,7 +439,8 @@ caused a segfault. By adding a new variable, char *t, initialising
and then using t instead of s it compiles and runs successfully under clang
and gcc.
Cody got this to compile and work with clang and gcc. He noted that he tried to keep the ASCII art as close to the original as possible. The line lengths are @@ -465,13 +479,15 @@ was possible to silence it. In particular:
which can be disabled. It results in the same behaviour but this way no warnings are produced.
Cody noticed and fixed a funny mistake in the Makefile where a
-Wno-strict-prototypes was in the wrong location, suggesting that there is a
-D needed to compile the entry.
Cody restored the original entry which was a single line. The code being longer (in 1986 a one liner could be longer) was split to three lines to @@ -480,7 +496,8 @@ one line.
Cody also added the stein.sh script which runs the two commands that we suggest in order to get it to show clean output.
Cody fixed this so that it does not require -traditional-cpp. This took a fair
bit of tinkering as this entry very twisted; fixing -traditional-cpp is, as
@@ -544,14 +561,16 @@ work with gcc but it still required -traditional-cpp.
There might have been other changes as well.
Cody made this look more like the original entry by restoring the #define of
define. It’s not used but it now looks closer to the original.
strings.h and because it’s identical in use to strchr(3)
that for System V we had to do this) Cody added to the Makefile
-Dindex=strchr.
Cody added the try.sh script and the C file
goto.c and the text file goto.txt
for demonstration purposes. Notice that the program is case sensitive which
running the program on the text file demonstrates.
Cody added back the documented checks for invalid input which no longer worked
and instead resulted in either accepting the level, whether or not it was a
@@ -606,12 +627,14 @@ immediately goes back to the prompting of the level.
well (the one with the board and the one without, the entry itself with the
size constraints of the contest).
Cody made this use fgets(3).
Cody also added the try.sh script.
Cody fixed this for modern systems. The problem was 'assignment to cast is illegal, lvalue casts are not supported'. For the original file see the
index.html file. Unfortunately this ruins some symmetry. To try and resolve this
@@ -623,10 +646,11 @@ look more symmetrical now.
Cody also added to the Makefile -include stdio.h in the nowadays very
unlikely(?) but nevertheless suggested case that putchar() is not available.
-1988
+1988
Cody fixed this twisted entry (as we called it :-) ) for modern compilers,
including making it no longer require -traditional-cpp. Fixing
@@ -681,19 +705,22 @@ macro in place it’s just no longer used.
version in case you have an older compiler or wish to try -traditional-cpp.
Cody also provided the try.sh script.
Cody fixed this to work for modern systems. The problem was that the important
function, a redefinition of exit(), was not being called in main(). The
original version is in 1988/isaak/isaak.alt.c. See the
index.html file for more details.
Cody added the alt code which is code that we suggested at the time of
publication, in the remarks, to help understand the entry, and for fun.
Cody fixed this for modern systems. It did not compile with clang because it
requires the second and third args of main() to be `char ** but even before
@@ -709,11 +736,13 @@ once did. The format of pain() is exactly like how main()main() returns !pain(...) like main() used to do
to itself and pain() does now.
Cody made this use fgets(3).
Cody provided an alternate version so that
this will work with compilers like clang. An alternate version had to be
@@ -726,7 +755,8 @@ original. See the index.html file for details on the alternate code.
doing this) that with a slight modification this entry can be C++ instead. We don’t
thank him for this ghastly point! :-)
The original version, provided as alternate code,
was fixed by Misha Dynin, based on the judges’ remarks, so that this would work
@@ -737,10 +767,11 @@ entry as seeing the code with the result at once is far more beautiful.
Cody also changed the ints to be float as that’s what they are printed as:
not strictly necessary but nonetheless more correct, even if not warned against.
-1989
+1989
Cody got this to work with modern systems. The main issues were that an
#include had to be added along with fixing the path (due to . not being in
@@ -767,7 +798,8 @@ might end up failing to work even after changing it back. This was resolved by:<
if [ .. ] was changed in the C code as well as the script.
Cody also added the try.sh script.
To prevent annoying output to /dev/tty we changed the code to simulate the
output via strings(1) but Cody removed the ill-famed useless use of cat to
@@ -782,7 +814,8 @@ code directly, to match that of the main entry. As we simulate the functionality
anyway, and since one may still run the code or the script (for the original
entry and the alt code) anyway, it works out well.
Cody fixed this to work with modern compilers. Modern compilers do not allow
code like:
@@ -809,7 +842,8 @@ result in:
shell returned 2
because the alt rule had what normally is in the ${PROG}.alt rule.
Cody fixed an infinite loop where the program would print the same thing over
and over again, flooding the screen. The problem is that there was a for loop
@@ -826,7 +860,8 @@ uses the alt code, allowing one to configure the alt build. See the index.html
for details. The fix described above was fixed in this version too, after it was
discovered and fixed.
Cody fixed a segfault under macOS that prevented it from working. The problem
was that the int (from #define f) should be a long. This became apparent when
@@ -835,7 +870,8 @@ he was using lldb and saw that the type of a pointer was too long :
which has the trace function that the author included but commented out. See the
index.html for details.
Yusuke Endoh fixed this to compile under modern systems. To see the changes made, try:
@@ -843,7 +879,8 @@ made, try:(It adds the C token pasting operator ## instead of /**/.)
Cody also added the try.sh script.
Cody and Yusuke fixed this entry: Yusuke fixed this to compile with gcc and Cody fixed it for clang and made some other fixes as well.
@@ -866,11 +903,13 @@ various other things, so that now the alt version, which is better, can be used. IOCCC Tetris working (this of course was not his only reason :-) )Cody fixed this for clang, except that two versions generated by the program cannot be compiled by clang due to inherent defects in the compiler and how the @@ -888,19 +927,25 @@ might just not be possible.
The way it was fixed might be hard to see and describe but this is an attempt.
Because main()’s args were all ints, main() had to call a new function
which is allowed to have args as int (instead of main()’s args being int and
-the rest being char **) but this is not as straight forward as it is for other entries (if you look at the code you might see what is meant; the function called ispain()`).
char **) but this is not as straight forward as it is for other
+entries (if you look at the code you might see what is meant; the function called
+is pain()).
The args of main() had to be set to the right type but only three args, not
four, even though the original program has four args. This is because not all
versions of clang support four args and that is one of the issues with version 2
and 3 as it generates main() to have four args and the wrong type, all ints.
In the call to the new function, pain(), from main(), one of the char **s is used twice, once asargcwith bitwise AND with 2, naturally first being cast to anint((int)ABBA&2), and once as achar **, the fourth arg to
+
In the call to the new function, pain(), from main(), one of the char **s
+is used twice, once as argc with bitwise AND with 2, naturally first being
+cast to an int ((int)ABBA&2), and once as a char **, the fourth arg to
pain() (yes even though pain() takes all ints).
The argc,, meanwhile, tang, is used once and the second arg, char **gnat is
+
The argc, meanwhile, tang, is used once and the second arg, char **gnat is
used once (observe how tang is gnat spelt backwards as this is one of the
things that makes this a masterpiece and very hard if not impossible to fix
completely). Fortunately it is not actually necessary to use all four args (of
main()) in the call which might or might not be surprising, especially as it
-uses one of the args, a char **, instead of anint(through casts), twice rather than just passing in for the fourth arg (the fourth arg passed in is the third arg tomain()`).
char **, instead of an int (through casts), twice
+rather than just passing in for the fourth arg (the fourth arg passed in is the
+third arg to main()).
This program heavily uses recursion and depending on the number of args it will
print out output normally, ROT13 it, show it backwards or both. Along with the
ROT13 and reversed output of the code, it is the comments that create the
@@ -923,10 +968,11 @@ will work for compilers like gcc and one can then use the
The Cody also added an alternate version which allows Turbo-C
@@ -942,13 +988,15 @@ question (i.e. it was only tested in the original entry). YMMV.compile.sh script allows one to specify the compiler with the CC
environmental variable; see the index.html for details.1990
+1990
-Wno-implicit-int. The newline added by the
judges was retained.
Yusuke got this to work in modern systems (it previously resulted in a bus error).
Cody made this use fgets(3).
Yusuke and Cody in conjunction fixed this for modern systems (both fixed a different compiler error but more fixes were also made).
@@ -960,7 +1008,8 @@ operator itself.fopen(). Cody also changed a char * used for file I/O to be a proper FILE * and fixed a typo in LANDER.BAS.
Cody also made this use fgets(3).
Cody fixed this for modern systems. There were two problems to be resolved.
One can no longer do:
@@ -975,7 +1024,8 @@ but later Cody added it back to make it more like the original). with if the C preprocessor botches single quotes in cpp expansion.Cody also added the try.sh script.
Cody fixed the script to work properly in modern environments including writing
to and extracting from stdout and relying on the exit code in the commands to
@@ -988,20 +1038,23 @@ the time.
oops twice from invalid
input but which now works.
Cody added the alt code which was suggested by the judges
in the case that your compiler cannot compile X=g()... but it actually does
something else and is recommended by the author as well.
Yusuke suggested -ansi to get the entry to compile due to trigraphs and Cody
suggested -trigraphs. Both work but we used Yusuke’s idea.
Cody added the try.sh script to show exactly what the entry does.
Cody fixed this to work with modern compilers; exit(3) returns void but the
function was used in a binary expression so this wouldn’t even compile.
fgets() in the same way that the original entry is. This way
version is equivalent in function, like the
author intended, but more compact.
Cody fixed this to compile with modern systems.
He also fixed some bugs that impacted the usability of this program including some @@ -1045,14 +1099,16 @@ original program and some of the programs it generates.
used in order to get this to work initially (prior to this output was there but incomplete).Cody fixed the paths in the Makefile so that this would build in Linux (it worked fine in macOS).
He also changed the Makefile to use bash not zsh as not all systems have
zsh and the Makefile actually sets SHELL to bash.
Cody fixed this for modern systems. It had 1s in places for a short int which was changed to just 1. Since it’s instructional to see the
differences he has provided an alternate version,
@@ -1065,10 +1121,11 @@ and to not crash if no arg is specified.
The alt code did NOT have arg checks added as it is actually a copy of the original code.
Cody added alt code that will be a bit easier to use for those familiar with vim in the following ways:
@@ -1082,7 +1139,8 @@ those familiar with vim in the following ways:The other keys were left unchanged.
Cody fixed this for modern systems. There were two invalid operands to binary
expression (char * and void and int and void) to resolve and
@@ -1095,7 +1153,8 @@ slightly more like the original, even though it’s unused.
Cody also added the try.sh script and try.txt which the script uses.
Cody fixed this so that the coordinates being specified would not crash the
program. This happened because the function that calls atoi(3) took an arg
@@ -1110,14 +1169,16 @@ him): k for forward, h for left and l for
more useful way to exit, just entering q followed by enter, rather than
completing or killing the program.
As some systems like macOS can be particular about not declaring functions Cody
added to the Makefile some -include options. These appear to not be strictly
necessary but it was done due to other syscalls being a problem not being
declared first.
Cody fixed a segfault that prevented this entry from working in any condition
and he also made it work for clang. He also added checks for NULL FILE *s.
@@ -1192,7 +1253,8 @@ The definition of whether that should be a bug to fix or a feature to not fix
was pondered and changed numerous times and ultimately that problem with this
entry was fixed. It has not been done in all.
Cody made it look much more like the original entry even after the fix that increased the count in characters from 80 to 106, getting it back down to just @@ -1210,7 +1272,8 @@ some fun input for fun but mostly different output. He added a great string from Brian Westley and Cody also added several of his own (can you figure out exactly which ones? :-) )
Cody fixed it so that the messages that show if you won or lost will be seen after the end of the game. The reason it did not work before is curses was ended @@ -1223,7 +1286,8 @@ remove the maximum number of moves you may make and another to let you configure the maximum number of moves, even if that is making it harder to win. Naturally the above fix was applied to these versions too.
Cody fixed a segfault in this program which prevented it from working. The
problem was that the read-only char array char *z[] was being written to. The
@@ -1241,10 +1305,11 @@ version that supposedly (:-) ) always wins.
Cody also fixed the make clobber rule where a file was left lying about when it should have been removed.
Cody fixed the code so that it will try opening the file the code was compiled
from (__FILE__), not adgrep.c, as the latter does not exist: adgrep is
@@ -1294,7 +1359,8 @@ and some of the tools this entry generates. Unlike other scripts, it does not
clear the screen after compilation so that one can see how the other files are
generated.
Cody fixed this to compile with modern systems. Note that in 1996 a bug fix was
applied to the code, provided as the alt code as that version is not obfuscated.
@@ -1306,7 +1372,8 @@ return void.
Cody fixed the Makefile so that the program will actually work with it (or at
least the rule to clobber files and link am to ant). The issue was that the
@@ -1324,7 +1391,8 @@ necessary to include time.h so Cody did this as well as this exists
systems too.
Cody also added the try.sh script.
Cody added a check for the right number of args, exiting 1 if not enough (2) used. This was not originally done but at a time it was changed to be considered @@ -1333,7 +1401,8 @@ verified that it was consistent with the bugs.html file.
He also added the try.sh script to try out some commands that we suggested and some additional ones that he provide for some fun.
Cody fixed the alt code to compile. The problem was it assumed that
exit(3) returns a value, not void. This was fixed with a ,0.
Cody fixed a crash that prevented this entry from working in some cases in some systems (like macOS) by disabling the optimiser in the Makefile.
@@ -1357,16 +1427,18 @@ fromstdin after starting the program). Ideally fgets(3)1992/gson in bugs.html for more
details if you’re interested in trying to understand it (or fix?).
Cody provided the try.sh script.
The original code, imc.orig.c, assumed that exit(3)
-returned a value but this will cause problems where exit(3) returns void. The
+returned a value but this will cause problems where exit(3) returns void. The
source code was modified to avoid this problem but like Cody did with other fixes
he made this more like the original by redefining exit to use the comma
operator so that it could be used in binary expressions.
It was observed that on modern systems this goes much too quick. Yusuke created
a patch that calls usleep(3) but Cody thought the value was too slow so he
@@ -1387,7 +1459,8 @@ changing this.
Yusuke also noted that there is a bug in the program where right after starting
it moves towards the right but if you click the mouse it goes back.
Yusuke supplied a patch which makes this work with gcc. Due to how it works (see
Judges’ remarks in the index.html file) this will not work with clang.
@@ -1397,11 +1470,13 @@ demonstrate it as using make was problematic.
NOTE: this entry cannot work with clang due to different compiler messages (it
will compile fine but it won’t work). See bugs.html for details.
Cody made this more portable by changing the void main() to be int main().
Cody added the original file back as it was deemed that the export restrictions
should no longer be a cause of concern for this entry. Doing this did require a
@@ -1412,7 +1487,8 @@ participates in the IOCCC, that it must be our fault! :-)
Cody also added the try.sh script that runs a few commands
that we suggested as well as one he provided.
Cody fixed an infinite loop if one were to input numbers < 0 or > 077. The
problem was that it tried to use scanf(3) with the format specifier "%o %o" in a
@@ -1423,8 +1499,11 @@ processed or some error occurs) or a function it called returned non-zero.
new char arrays (always cleared in the beginning of the loop) and then using
strtol(3) with a base of 8 (as it’s octal), checking for < 0 || > 077 on
both numbers (using "%o %o" does not solve the problem).
+This was deemed a problem to fix as the Judges’ remarks hinted that this was how
+it used to be.
Cody fixed this to work for clang by changing the third and fourth arg of
main() to be char ** insidemain(); clang requires args 2 - 4 to bechar
@@ -1465,12 +1544,12 @@ encourage you to try the original without two args :-)
1993
-1993/ant (index.html)
+1993/ant (index.html)
Cody added the try.sh script and a data file,
ants.txt, full of ants for the script.
Yusuke suggested that with modern systems this goes too fast so he added a call
to usleep(3) in a patch he made. Cody made it configurable at compilation by
@@ -1526,7 +1605,7 @@ index.html files for details.
entry and the alt version, both allowing one to change the args (and in the case
of the alt one allowing one to change the amount to sleep).
Yusuke supplied a patch to get this to work in modern systems. This fix also
applies the compatibility issue of select(2) described in the index.html file.
@@ -1542,7 +1621,7 @@ compile time. See the index.html for details.
Cody made this use fgets(3) not gets(3).
Cody fixed this to work with clang. The problem was that the third arg to main()
was not a char **. InsteadO5()(which wasmain()via-DO5=main`) is now
@@ -1612,7 +1691,7 @@ shorter PDF file,
newsletter was found on the Internet Wayback Machine and the article was
extracted as a PDF in the macOS Preview.app (File -> Print feature).
-1994/imc (index.html)
+1994/imc (index.html)
Cody also added inclusion of unistd.h for getpid(2). While strictly speaking
@@ -1659,7 +1738,7 @@ now there is more important work to do so that the next contest can run.
Cody also added the try.sh and
try.alt.sh scripts.
Cody fixed a bug on systems where EOF != -1. The problem is that getc() and
the related functions do not return -1 on EOF or error but rather EOF.
@@ -1700,7 +1779,7 @@ lines of the weisberg, feeding it to primes(1), showin
primes. It only does the reversed output because the program actually prints
primes.
Cody converted the spoiler compiler options (provided by the author) to be
compiler commands and added a script try.sh to
@@ -1788,7 +1867,7 @@ entry decrypts the text or something like that.
1996
Cody fixed a segfault in this program that prevented it from working right and
also fixed an infinite loop in the try commands.
@@ -1876,7 +1955,7 @@ loop so having it in a script is less desired).
method suggested for SunOS rather than having to update the Makefile manually or
running a more complicated command: now one can just run make.
Cody fixed a segfault in this entry as well as it displaying environmental
variables. Although the scripts showed correct output, it somewhat lessened the
@@ -2163,11 +2242,11 @@ more confusing (even if not confusing).
Cody made this more portable by changing the void main to int main.
Cody also added the try.sh script.
Cody fixed an infinite loop that occurred if invalid input was entered, flooding
the screen with:
@@ -2228,7 +2307,7 @@ details) the source code is now executable by default.
2001
Cody fixed both the supplementary program and the program itself (both of which
segfaulted and once that was fixed only the binary was modified; it was not run
@@ -2429,7 +2508,7 @@ the author. The other problems are documented so were not fixed. See
index.html for details.
Cody also added the try.sh script.
Cody added the script try.sh to automate a heap of commands
that we, the IOCCC judges, suggested, as well as some additional ones that he
@@ -2439,7 +2518,7 @@ described in the index.html, based on the author’s remarks.
2004
@@ -3168,7 +3247,7 @@ theoretically make it work in Windows.
Cody also added the try.sh and
try.alt.sh scripts.
@@ -3350,7 +3429,7 @@ Firefox both had the problem.
implicitly (Linux doesn’t seem to but macOS does).
Cody also added the try.sh script.
diff --git a/thanks-for-help.md b/thanks-for-help.md
index 4cc36ae17..8b3140296 100644
--- a/thanks-for-help.md
+++ b/thanks-for-help.md
@@ -29,12 +29,13 @@ on a IOCCC entry by entry basis.
-# 1984
+# [1984](1984/index.html)
-## [1984/anonymous](1984/anonymous/anonymous.c) ([index.html](1984/anonymous/index.html))
+# [1984/anonymous](1984/anonymous/index.html)
+## Source code: [anonymous.c](1984/anonymous/anonymous.c)
[Cody](#cody) fixed this to work for macOS.
@@ -61,7 +62,8 @@ Scovell](https://web.archive.org/web/20070120220721/https://thomasscovell.com/ta
-## [1984/decot](1984/decot/decot.c) ([index.html](1984/decot/index.html]))
+# [1984/decot](1984/decot/index.html)
+## Source code: [decot.c](1984/decot/decot.c)
[Cody](#cody) fixed this to not require `-traditional-cpp` which some compilers like
@@ -128,7 +130,8 @@ To see the difference from start to fixed:
-## [1984/laman](1984/laman/laman.c) ([index.html](1984/laman/index.html]))
+# [1984/laman](1984/laman/index.html)
+## Source code: [laman.c](1984/laman/laman.c)
[Cody](#cody) added the [try.sh](1984/laman/try.sh) script.
@@ -140,7 +143,8 @@ This was fixed on 30 October 2023 after the bug status was changed from INABIAF
-## [1984/mullender](1984/mullender/mullender.c) ([index.html](1984/mullender/index.html]))
+# [1984/mullender](1984/mullender/index.html)
+## Source code: [mullender.c](1984/mullender/mullender.c)
[Cody](#cody) provided an [alternate version](1984/mullender/mullender.alt.c),
@@ -164,12 +168,13 @@ Repo](https://github.com/dspinellis/unix-history-repo/tree/Research-Release).
-# 1985
+# [1985](1985/index.html)
-## [1985/applin](1985/applin/applin.c) ([index.html](1985/applin/index.html]))
+# [1984/applin](1985/applin/index.html)
+## Source code: [applin.c](1985/applin/applin.c)
Both [Cody](#cody) and [Yusuke](#yusuke) fixed this; Yusuke got this to not crash and Cody fixed it
@@ -195,7 +200,8 @@ returning to the shell. The original code does not have this change.
-## [1985/august](1985/august/august.c) ([index.html](1985/august/index.html))
+# [1985/august](1985/august/index.html)
+## Source code: [august.c](1985/august/august.c)
[Cody](#cody), out of abundance of caution, added a second arg to `main()` because some
@@ -216,7 +222,8 @@ default value).
-## [1985/lycklama](1985/lycklama/lycklama.c) ([index.html](1985/lycklama/index.html]))
+# [1985/lycklama](1985/lycklama/index.html)
+## Source code: [lycklama.c](1985/lycklama/lycklama.c)
[Cody](#cody) fixed this to compile with modern compilers. In the past one could get away
@@ -231,7 +238,8 @@ Cody also provided the [try.alt.sh](1985/lycklama/try.alt.sh) script.
-## [1985/shapiro](1985/shapiro/shapiro.c) ([index.html](1985/shapiro/index.html]))
+# [1985/shapiro](1985/1985/lycklama/index.html)
+## Source code: [index.html](1985/shapiro/shapiro.c])
[Cody](#cody) added the alt code which allows one to resize the maze and he also added
@@ -243,7 +251,8 @@ the default).
-## [1985/sicherman](1985/sicherman/sicherman.c) ([index.html](1985/sicherman/index.html]))
+# [1985/sicherman](1985/sicherman/index.html)
+## Source code: [1985/sicherman](1985/sicherman/sicherman.c)
[Cody](#cody) fixed this _very twisted entry_ to not require `-traditional-cpp`. Fixing
@@ -362,12 +371,13 @@ Cody also added the [try.sh](1985/sicherman/try.sh) and
-# 1986
+# [1986](1986/index.html)
-## [1986/applin](1986/applin/applin.c) ([index.html](1986/applin/index.html]))
+# [1986/applin](1986/applin/index.html])
+## Source code: [applin.c](1986/applin/applin.c)
[Cody](#cody) made the C file executable so one does not have to do `sh
@@ -375,14 +385,16 @@ Cody also added the [try.sh](1985/sicherman/try.sh) and
-## [1986/bright](1986/bright/bright.c) ([index.html](1986/bright/index.html]))
+# [1986/bright](1986/bright/index.html)
+## Source code: [bright.c](1986/bright/bright.c)
[Cody](#cody) added the [try.sh](1986/bright/try.sh) script.
-## [1986/hague](1986/hague/hague.c) ([index.html](1986/hague/index.html]))
+# [1986/hague](1986/hague/index.html])
+## Source code: [hague.c](1986/hague/hague.c)
[Cody](#cody) made this use `fgets()`.
@@ -392,7 +404,8 @@ program the added `input.txt` file.
-## [1986/holloway](1986/holloway/holloway.c) ([index.html](1986/holloway/index.html]))
+# [1986/holloway](1986/holloway/index.html)
+## Source code: [holloway.c](1986/holloway/holloway.c)
[Cody](#cody) fixed this to compile and work with clang (it already worked with gcc).
@@ -404,7 +417,8 @@ and gcc.
-## [1986/marshall](1986/marshall/marshall.c) ([index.html](1986/marshall/index.html]))
+# [1986/marshall](1986/marshall/index.html)
+## Source code: [marshall.c](1986/marshall/marshall.c)
[Cody](#cody) got this to compile and work with clang and gcc. He noted that he tried to
@@ -466,7 +480,8 @@ are produced.
-## [1986/pawka](1986/pawka/pawka.c) ([index.html](1986/pawka/index.html))
+# [1986/pawka](1986/pawka/index.html)
+## Source code: [pawka.c](1986/pawka/pawka.c)
[Cody](#cody) noticed and fixed a funny mistake in the Makefile where a
@@ -475,7 +490,8 @@ are produced.
-## [1986/stein](1986/stein/stein.c) ([index.html](1986/stein/index.html]))
+# [1986/stein](1986/stein/index.html)
+## Source code: [stein.c](1986/stein/stein.c)
[Cody](#cody) restored the original entry which was a single line. The code
@@ -488,7 +504,8 @@ commands that we suggest in order to get it to show clean output.
-## [1986/wall](1986/wall/wall.c) ([index.html](1986/wall/index.html]))
+# [1986/wall](1986/wall/index.html)
+## Source code: [wall.c](1986/wall/wall.c)
[Cody](#cody) fixed this so that it does not require `-traditional-cpp`. This took a fair
@@ -599,19 +616,21 @@ There might have been other changes as well.
-# 1987
+# [1987](1987/index.html)
-## [1987/biggar](1987/biggar/biggar.c) ([index.html](1987/biggar/index.html))
+# [1987/biggar](1987/biggar/index.html)
+## Source code: [biggar.c](1987/biggar/biggar.c)
[Cody](#cody) added the [try.sh](1987/biggar/try.sh) script.
-## [1987/heckbert](1987/heckbert/heckbert.c) ([index.html](1987/heckbert/index.html))
+# [1987/heckbert](1987/heckbert/index.html)
+## Source code: [heckbert.c](1987/heckbert/heckbert.c)
[Cody](#cody) made this look more like the original entry by restoring the `#define` of
@@ -627,7 +646,8 @@ that for System V we had to do this) Cody added to the Makefile
-## [1987/hines](1987/hines/hines.c) ([index.html](1987/hines/index.html))
+# [1987/hines](1987/hines/index.html)
+## Source code: [hines.c](1987/hines/hines.c)
[Cody](#cody) added the [try.sh](1987/hines/try.sh) script and the C file
@@ -637,7 +657,8 @@ running the program on the text file demonstrates.
-## [1987/lievaart](1987/lievaart/lievaart.c) ([index.html](1987/lievaart/index.html))
+# [1987/lievaart](1987/lievaart/index.html)
+## Source code: [lievaart.c](1987/lievaart/lievaart.c)
[Cody](#cody) added back the documented checks for invalid input which no longer worked
@@ -684,7 +705,8 @@ size constraints of the contest).
-## [1987/wall](1987/wall/wall.c) ([index.html](1987/wall/index.html]))
+# [1987/wall](1987/wall/index.html)
+## Source code: [wall.c](1987/wall/wall.c)
[Cody](#cody) made this use `fgets(3)`.
@@ -693,7 +715,8 @@ Cody also added the [try.sh](1987/wall/try.sh) script.
-## [1987/westley](1987/westley/westley.c) ([index.html](1987/westley/index.html]))
+# [1987/westley](1987/westley/index.html)
+## Source code: [westley.c](1987/westley/westley.c)
[Cody](#cody) fixed this for modern systems. The problem was `'assignment to cast is
@@ -710,12 +733,13 @@ unlikely(?) but nevertheless suggested case that `putchar()` is not available.
-# 1988
+# [1988](1988/index.html)
-## [1988/dale](1988/dale/dale.c) ([index.html](1988/dale/index.html]))
+# [1988/dale](1988/dale/index.html)
+## Source code: [dale.c](1988/dale/dale.c)
[Cody](#cody) fixed this twisted entry (as we called it :-) ) for modern compilers,
@@ -797,7 +821,8 @@ Cody also provided the [try.sh](1988/dale/try.sh) script.
-## [1988/isaak](1988/isaak/isaak.c) ([index.html](1988/isaak/index.html]))
+# [1988/isaak](1988/isaak/index.html)
+## Source code: [isaak.c](1988/isaak/isaak.c)
[Cody](#cody) fixed this to work for modern systems. The problem was that the important
@@ -807,7 +832,8 @@ index.html file for more details.
-## [1988/litmaath](1988/litmaath/litmaath.c) ([index.html](1988/litmaath/index.html))
+# [1988/litmaath](1988/litmaath/index.html)
+## Source code: [litmaath.c](1988/litmaath/litmaath.c)
[Cody](#cody) added the alt code which is code that we suggested at the time of
@@ -815,7 +841,8 @@ publication, in the remarks, to help understand the entry, and for fun.
-## [1988/phillipps](1988/phillipps/phillipps.c) ([index.html](1988/phillipps/index.html]))
+# [1988/phillipps](1988/phillipps/index.html)
+## Source code: [phillipps.c](1988/phillipps/phillipps.c)
[Cody](#cody) fixed this for modern systems. It did not compile with clang because it
@@ -836,14 +863,16 @@ to itself and `pain()` does now.
-## [1988/reddy](1988/reddy/reddy.c) ([index.html](1988/reddy/index.html))
+# [1988/reddy](1988/reddy/index.html)
+## Source code: [reddy.c](1988/reddy/reddy.c)
[Cody](#cody) made this use `fgets(3)`.
-## [1988/spinellis](1988/spinellis/spinellis.c) ([index.html](1988/spinellis/index.html]))
+# [1988/spinellis](1988/spinellis/index.html)
+## Source code: [spinellis.c](1988/spinellis/spinellis.c)
[Cody](#cody) provided an [alternate version](1988/spinellis/spinellis.alt.c) so that
@@ -861,7 +890,8 @@ thank him for this ghastly point! :-)
-## [1988/westley](1988/westley/westley.c) ([index.html](1988/westley/index.html]))
+# [1988/westley](1988/westley/index.html)
+## Source code: [westley.c](1988/westley/westley.c)
The [original version](1988/westley/westley.alt.c), provided as alternate code,
@@ -879,12 +909,13 @@ not strictly necessary but nonetheless more correct, even if not warned against.
-# 1989
+# [1989](1989/index.html)
-## [1989/fubar](1989/fubar/fubar.c) ([index.html](1989/fubar/index.html]))
+# [1989/fubar](1989/fubar/index.html)
+## Source code: [fubar.c](1989/fubar/fubar.c)
[Cody](#cody) got this to work with modern systems. The main issues were that an
@@ -920,7 +951,8 @@ Cody also added the [try.sh](1989/fubar/try.sh) script.
-## [1989/jar.1](1989/jar.1/jar.1.c) ([index.html](1989/jar.1/index.html]))
+# [1989/jar.1](1989/jar.1/index.html)
+## Source code: [jar.1.c](1989/jar.1/jar.1.c)
To prevent annoying output to `/dev/tty` we changed the code to simulate the
@@ -939,7 +971,8 @@ entry and the alt code) anyway, it works out well.
-## [1989/jar.2](1989/jar.2/jar.2.c) ([index.html](1989/jar.2/index.html]))
+# [1989/jar.2](1989/jar.2/index.html)
+## Source code: [jar.2.c](1989/jar.2/jar.2.c)
[Cody](#cody) fixed this to work with modern compilers. Modern compilers do not allow
@@ -980,7 +1013,8 @@ because the `alt` rule had what normally is in the `${PROG}.alt` rule.
-## [1989/ovdluhe](1989/ovdluhe/ovdluhe.c) ([index.html](1989/ovdluhe/index.html]))
+# [1989/ovdluhe](1989/ovdluhe/index.html)
+## Source code: [ovdluhe.c](1989/ovdluhe/ovdluhe.c)
[Cody](#cody) fixed an infinite loop where the program would print the same thing over
@@ -1002,7 +1036,8 @@ discovered and fixed.
-## [1989/paul](1989/paul/paul.c) ([index.html](1989/paul/index.html]))
+# [1989/paul](1989/paul/index.html)
+## Source code: [paul.c](1989/paul/paul.c)
[Cody](#cody) fixed a segfault under macOS that prevented it from working. The problem
@@ -1015,7 +1050,8 @@ index.html for details.
-## [1989/robison](1989/robison/robison.c) ([index.html](1989/robison/index.html]))
+# [1989/robison](1989/robison/index.html)
+## Source code: [robison.c](1989/robison/robison.c)
[Yusuke Endoh](#yusuke) fixed this to compile under modern systems. To see the changes
@@ -1032,7 +1068,8 @@ Cody also added the [try.sh](1989/robison/try.sh) script.
-## [1989/tromp](1989/tromp/tromp.c) ([index.html](1989/tromp/index.html]))
+# [1989/tromp](1989/tromp/index.html)
+## Source code: [tromp.c](1989/tromp/tromp.c)
[Cody](#cody) and [Yusuke](#yusuke) fixed this entry: Yusuke fixed this to compile with gcc and Cody
@@ -1063,14 +1100,16 @@ not his only reason :-) )
-## [1989/vanb](1989/vanb/vanb.c) ([index.html](1989/vanb/index.html]))
+# [1989/vanb](1989/vanb/index.html)
+## Source code: [vanb.c](1989/vanb/vanb.c)
[Cody](#cody) added the [try.sh](1989/vanb/try.sh) script.
-## [1989/westley](1989/westley/westley.c) ([index.html](1989/westley/index.html]))
+# [1989/westley](1989/westley/index.html)
+## Source code: [westley.c](1989/westley/westley.c)
[Cody](#cody) fixed this for clang, except that two versions generated by the program
@@ -1091,7 +1130,7 @@ might just not be possible.
The way it was fixed might be hard to see and describe but this is an attempt.
Because `main()`'s args were all `int`s, `main()` had to call a new function
which is allowed to have args as `int` (instead of `main()`'s args being int and
-the rest being `char **) but this is not as straight forward as it is for other
+the rest being `char **`) but this is not as straight forward as it is for other
entries (if you look at the code you might see what is meant; the function called
is `pain()`).
@@ -1100,17 +1139,17 @@ four**, even though the original program has four args. This is because not all
versions of clang support four args and that is one of the issues with version 2
and 3 as it generates `main()` to have four args and the wrong type, all `int`s.
-In the call to the new function, `pain()`, from `main()`, one of the `char **s
+In the call to the new function, `pain()`, from `main()`, one of the `char **`s
is used twice, once as `argc` with bitwise AND with 2, naturally first being
-cast to an `int` (`(int)ABBA&2`), and once as a `char **, the fourth arg to
+cast to an `int` (`(int)ABBA&2`), and once as a `char **`, the fourth arg to
`pain()` (yes even though `pain()` takes all `int`s).
-The argc,, meanwhile, `tang`, is used once and the second arg, `char **gnat` is
+The argc, meanwhile, `tang`, is used once and the second arg, `char **gnat` is
used once (observe how `tang` is `gnat` spelt backwards as this is one of the
things that makes this a masterpiece and very hard if not impossible to fix
completely). Fortunately it is not actually necessary to use all four args (of
`main()`) in the call which might or might not be surprising, especially as it
-uses one of the args, a `char **, instead of an `int` (through casts), twice
+uses one of the args, a `char **`, instead of an `int` (through casts), twice
rather than just passing in for the fourth arg (the fourth arg passed in is the
third arg to `main()`).
@@ -1142,12 +1181,13 @@ environmental variable; see the index.html for details.
-# 1990
+# [1990](1990/index.html)
-## [1990/baruch](1990/baruch/baruch.c) ([index.html](1990/baruch/index.html]))
+# [1990/baruch](1990/baruch/index.html)
+## Source code: [baruch.c](1990/baruch/baruch.c)
[Cody](#cody) added the [try.sh](1990/baruch/try.sh) script.
@@ -1169,7 +1209,8 @@ judges was retained.
-## [1990/cmills](1990/cmills/cmills.c) ([index.html](1990/cmills/index.html]))
+# [1990/cmills](1990/cmills/index.html)
+## Source code: [cmills.c](1990/cmills/cmills.c)
[Yusuke](#yusuke) got this to work in modern systems (it previously resulted in a bus
@@ -1179,7 +1220,8 @@ error).
-## [1990/dds](1990/dds/dds.c) ([index.html](1990/dds/index.html]))
+# [1990/dds](1990/dds/index.html)
+## Source code: [dds.c](1990/dds/dds.c)
[Yusuke](#yusuke) and [Cody](#cody) in conjunction fixed this for modern systems (both fixed a
@@ -1198,7 +1240,8 @@ Cody also made this use `fgets(3)`.
-## [1990/dg](1990/dg/dg.c) ([index.html](1990/dg/index.html]))
+# [1990/dg](1990/dg/index.html)
+## Source code: [dg.c](1990/dg/dg.c)
[Cody](#cody) fixed this for modern systems. There were two problems to be resolved.
@@ -1223,7 +1266,8 @@ Cody also added the [try.sh](1990/dg/try.sh) script.
-## [1990/jaw](1990/jaw/jaw.c) ([index.html](1990/jaw/index.html]))
+# [1990/jaw](1990/jaw/index.html)
+## Source code: [jaw.c](1990/jaw/jaw.c)
[Cody](#cody) fixed the script to work properly in modern environments including writing
@@ -1242,7 +1286,8 @@ input but which now works.
-## [1990/pjr](1990/pjr/pjr.c) ([index.html](1990/pjr/index.html]))
+# [1990/pjr](1990/pjr/index.html)
+## Source code: [pjr.c](1990/pjr/pjr.c)
[Cody](#cody) added the [alt code](1990/pjr/pjr.alt.c) which was suggested by the judges
@@ -1251,7 +1296,8 @@ something else and is recommended by the author as well.
-## [1990/scjones](1990/scjones/scjones.c) ([index.html](1990/scjones/index.html]))
+# [1990/scjones](1990/scjones/index.html)
+## Source code: [scjones.c](1990/scjones/scjones.c)
[Yusuke](#yusuke) suggested `-ansi` to get the entry to compile due to trigraphs and [Cody](#cody)
@@ -1262,7 +1308,8 @@ entry does.
-## [1990/tbr](1990/tbr/tbr.c) ([index.html](1990/tbr/index.html]))
+# [1990/tbr](1990/tbr/index.html)
+## Source code: [tbr.c](1990/tbr/tbr.c)
[Cody](#cody) fixed this to work with modern compilers; `exit(3)` returns void but the
@@ -1282,7 +1329,8 @@ author intended, but more compact.
-## [1990/theorem](1990/theorem/theorem.c) ([index.html](1990/theorem/index.html]))
+# [1990/theorem](1990/theorem/index.html)
+## Source code: [theorem.c](1990/theorem/theorem.c)
[Cody](#cody) fixed this to compile with modern systems.
@@ -1325,7 +1373,8 @@ incomplete).
-## [1990/stig](1990/stig/stig.c) ([index.html](1990/stig/index.html))
+# [1990/stig](1990/stig/index.html)
+## Source code: [stig.c](1990/stig/stig.c)
[Cody](#cody) fixed the paths in the Makefile so that this would build in Linux (it
@@ -1336,7 +1385,8 @@ He also changed the Makefile to use `bash` not `zsh` as not all systems have
-## [1990/westley](1990/westley/westley.c) ([index.html](1990/westley/index.html]))
+# [1990/westley](1990/westley/index.html)
+## Source code: [westley.c](1990/westley/westley.c)
[Cody](#cody) fixed this for modern systems. It had `1s` in places for a `short
@@ -1357,12 +1407,13 @@ original code.
-# 1991
+# [1991](1991/index.html)
-## [1991/ant](1991/ant/ant.c) ([index.html](1991/ant/index.html]))
+# [1991/ant](1991/ant/index.html)
+## Source code: [ant.c](1991/ant/ant.c)
[Cody](#cody) added [alt code](1991/ant/ant.alt.c) that will be a bit easier to use for
@@ -1379,7 +1430,8 @@ The other keys were left unchanged.
-## [1991/brnstnd](1991/brnstnd/brnstnd.c) ([index.html](1991/brnstnd/index.html]))
+# [1991/brnstnd](1991/brnstnd/index.html)
+## Source code: [brnstnd.c](1991/brnstnd/brnstnd.c)
[Cody](#cody) fixed this for modern systems. There were two invalid operands to binary
@@ -1397,7 +1449,8 @@ Cody also added the [try.sh](1991/brnstnd/try.sh) script and
-## [1991/buzzard](1991/buzzard/buzzard.c) ([index.html](1991/buzzard/index.html]))
+# [1991/buzzard](1991/buzzard/index.html)
+## Source code: [buzzard.c](1991/buzzard/buzzard.c)
[Cody](#cody) fixed this so that the coordinates being specified would not crash the
@@ -1417,7 +1470,8 @@ completing or killing the program.
-## [1991/davidguy](1991/davidguy/davidguy.c) ([index.html](1991/davidguy/index.html]))
+# [1991/davidguy](1991/davidguy/index.html)
+## Source code: [davidguy.c](1991/davidguy/davidguy.c)
As some systems like macOS can be particular about not declaring functions [Cody](#cody)
@@ -1427,7 +1481,8 @@ declared first.
-## [1991/dds](1991/dds/dds.c) ([index.html](1991/dds/index.html]))
+# [1991/dds](1991/dds/index.html)
+## Source code: [dds.c](1991/dds/dds.c)
[Cody](#cody) fixed a segfault that prevented this entry from working in any condition
@@ -1558,7 +1613,8 @@ entry was fixed. It has not been done in all.
-## [1991/fine](1991/fine/fine.c) ([index.html](1991/fine/index.html))
+# [1991/fine](1991/fine/index.html)
+## Source code: [fine.c](1991/fine/fine.c)
[Cody](#cody) made it look much more like the original entry even after the fix that
@@ -1583,7 +1639,8 @@ which ones? :-) )
-## [1991/rince](1991/rince/rince.c) ([index.html](1991/rince/index.html))
+# [1991/rince](1991/rince/index.html)
+## Source code: [rince.c](1991/rince/rince.c)
[Cody](#cody) fixed it so that the messages that show if you won or lost will be seen
@@ -1600,7 +1657,8 @@ the above fix was applied to these versions too.
-## [1991/westley](1991/westley/westley.c) ([index.html](1991/westley/index.html]))
+# [1991/westley](1991/westley/index.html)
+## Source code: [westley.c](1991/westley/westley.c)
[Cody](#cody) fixed a segfault in this program which prevented it from working. The
@@ -1624,12 +1682,13 @@ should have been removed.
-# 1992
+# [1992](1992/index.html)
-## [1992/adrian](1992/adrian/adrian.c) ([index.html](1992/adrian/index.html]))
+# [1992/adrian](1992/adrian/index.html)
+## Source code: [adrian.c](1992/adrian/adrian.c)
[Cody](#cody) fixed the code so that it will try opening the file the code was compiled
@@ -1706,7 +1765,8 @@ generated.
-## [1992/albert](1992/albert/albert.c) ([index.html](1992/albert/index.html]))
+# [1992/albert](1992/albert/index.html)
+## Source code: [albert.c](1992/albert/albert.c)
[Cody](#cody) fixed this to compile with modern systems. Note that in 1996 a bug fix was
@@ -1722,7 +1782,8 @@ the alt code.
-## [1992/ant](1992/ant/ant.c) ([index.html](1992/ant/index.html]))
+# [1992/ant](1992/ant/index.html)
+## Source code: [ant.c](1992/ant/ant.c)
[Cody](#cody) fixed the Makefile so that the program will actually work with it (or at
@@ -1746,7 +1807,8 @@ Cody also added the [try.sh](1992/ant/try.sh) script.
-## [1992/buzzard.1](1992/buzzard.1/buzzard.1.c) ([index.html](1992/buzzard.1/index.html))
+# [1992/buzzard.1](1992/buzzard.1/index.html)
+## Source code: [buzzard.1.c](1992/buzzard.1/buzzard.1.c)
[Cody](#cody) added a check for the right number of args, exiting 1 if not enough (2)
@@ -1759,7 +1821,8 @@ commands that we suggested and some additional ones that he provide for some fun
-## [1992/buzzard.2](1992/buzzard.2/buzzard.2.c) ([index.html](1992/buzzard.2/index.html))
+# [1992/buzzard.2](1992/buzzard.2/index.html)
+## Source code: [buzzard.2.c](1992/buzzard.2/buzzard.2.c)
[Cody](#cody) fixed the alt code to compile. The problem was it assumed that
@@ -1771,7 +1834,8 @@ and its alt code.
-## [1992/gson](1992/gson/gson.c) ([index.html](1992/gson/index.html]))
+# [1992/gson](1992/gson/index.html)
+## Source code: [gson.c](1992/gson/gson.c)
[Cody](#cody) fixed a crash that prevented this entry from working in some cases in some
@@ -1793,20 +1857,22 @@ details if you're interested in trying to understand it (or fix?).
-## [1992/imc](1992/imc/imc.c) ([index.html](1992/imc/index.html]))
+# [1992/imc](1992/imc/index.html)
+## Source code: [imc.c](1992/imc/imc.c)
[Cody](#cody) provided the [try.sh](1992/imc/try.sh) script.
The original code, [imc.orig.c](1992/imc/imc.orig.c), assumed that `exit(3)`
-returned a value but this will cause problems where `exit(3)` returns void. The
+returned a value but this will cause problems where `exit(3)` returns `void`. The
source code was modified to avoid this problem but like Cody did with other fixes
he made this more like the original by redefining `exit` to use the comma
operator so that it could be used in binary expressions.
-## [1992/kivinen](1992/kivinen/kivinen.c) ([index.html](1992/kivinen/index.html]))
+# [1992/kivinen](1992/kivinen/index.html)
+## Source code: [kivinen.c](1992/kivinen/kivinen.c)
It was observed that on modern systems this goes much too quick. [Yusuke](#yusuke) created
@@ -1834,7 +1900,8 @@ it moves towards the right but if you click the mouse it goes back.
-## [1992/lush](1992/lush/lush.c) ([index.html](1992/lush/index.html]))
+# [1992/lush](1992/lush/index.html)
+## Source code: [lush.c](1992/lush/lush.c)
[Yusuke](#yusuke) supplied a patch which makes this work with gcc. Due to how it works (see
@@ -1850,14 +1917,16 @@ will compile fine but it won't work). See [bugs.html](bugs.html) for details.
-## [1992/marangon](1992/marangon/marangon.c) ([index.html](1992/marangon/index.html))
+# [1992/marangon](1992/marangon/index.html)
+## Source code: [marangon.c](1992/marangon/marangon.c)
[Cody](#cody) made this more portable by changing the `void main()` to be `int main()`.
-## [1992/nathan](1992/nathan/nathan.c) ([index.html](1992/nathan/index.html))
+# [1992/nathan](1992/nathan/index.html)
+## Source code: [nathan.c](1992/nathan/nathan.c)
[Cody](#cody) added the original file back as it was deemed that the export restrictions
@@ -1873,7 +1942,8 @@ that we suggested as well as one he provided.
-## [1992/vern](1992/vern/vern.c) ([index.html](1992/vern/index.html]))
+# [1992/vern](1992/vern/index.html)
+## Source code: [vern.c](1992/vern/vern.c)
[Cody](#cody) fixed an infinite loop if one were to input numbers < `0` or > `077`. The
@@ -1887,9 +1957,13 @@ new char arrays (always cleared in the beginning of the loop) and then using
`strtol(3)` with a base of `8` (as it's octal), checking for `< 0 || > 077` on
both numbers (using `"%o %o"` does not solve the problem).
+This was deemed a problem to fix as the Judges' remarks hinted that this was how
+it used to be.
+
-## [1992/westley](1992/westley/westley.c) ([index.html](1992/westley/index.html]))
+# [1992/westley](1992/westley/index.html)
+## Source code: [westley.c](1992/westley/westley.c)
[Cody](#cody) fixed this to work for clang by changing the third and fourth arg of
From 04f6b532eeb93c0f21ce5bcf011c1845baf505e9 Mon Sep 17 00:00:00 2001
From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com>
Date: Thu, 18 Apr 2024 05:53:54 -0700
Subject: [PATCH 2/2] Improve links in thanks for 1993 and 1994
---
thanks-for-help.html | 96 +++++++++++++++++++++++++++-----------------
thanks-for-help.md | 80 +++++++++++++++++++++++-------------
2 files changed, 110 insertions(+), 66 deletions(-)
diff --git a/thanks-for-help.html b/thanks-for-help.html
index e9409ca06..69cec58fd 100644
--- a/thanks-for-help.html
+++ b/thanks-for-help.html
@@ -1541,33 +1541,38 @@ world or just the
args (2). And not that we need the help or anything for this :-) but we
encourage you to try the original without two args :-)
-1993
+1993
Cody added the try.sh script and a data file,
ants.txt, full of ants for the script.
Yusuke suggested that with modern systems this goes too fast so he added a call
to usleep(3) in a patch he made. Cody made it configurable at compilation by
using a macro. This is in the alt version which is the recommended one to try
first.
Cody fixed the dgibson.sh script to work
which assumed that . is in the path.
Cody also added the try.sh script which runs the above
mentioned script on all the data files.
Both Cody and Yusuke fixed this so that it will work with modern systems. Yusuke
provided some fixes of the X code and Cody fixed the C pre-processor directives
@@ -1578,12 +1583,14 @@ so that it would compile. It used to be that you could get away with code like:<
case but that’s no longer the case so the offending lines had #define
prepended to them.
Cody fixed this to work with modern compilers. This involved different header
files for functions.
Cody added an alternate
version which does what the program did
@@ -1593,9 +1600,11 @@ the alternate version, not the actual entry.
would be compiled if gcc < 2.3.3) whether or not compilation succeeds (which is
highly unlikely).
-Cody added check for two args.
+Cody added check for two args during a time that this was considered a
+bug to fix.
Cody also added an alternate version which uses
usleep(3) so you can see what is happening with faster systems. This version
also checks for two args and it is the one we recommend one try first. See the
@@ -1605,7 +1614,8 @@ index.html files for details.
entry and the alt version, both allowing one to change the args (and in the case
of the alt one allowing one to change the amount to sleep).
Yusuke supplied a patch to get this to work in modern systems. This fix also
applies the compatibility issue of select(2) described in the index.html file.
@@ -1617,11 +1627,13 @@ users. The slowing down was based on our suggestion that it might be desired to
slow down but Cody did it in such a way that makes it easy to configure at
compile time. See the index.html for details.
Cody made this use fgets(3) not gets(3).
Cody fixed this to work with clang. The problem was that the third arg to main()
was not a char **. InsteadO5()(which wasmain()via-DO5=main`) is now
@@ -1642,10 +1654,11 @@ work).
this code. Other code is also described there.
Cody also added the try.sh script.
-1994
+1994
Cody fixed an infinite loop that could happen when you shoot an arrow
and end up having no arrows, thus making one force quit the game. The problem
@@ -1672,13 +1685,14 @@ Now the counters are reset. The way this bug was fixed is that there is now a
counter for how many you have found and how many you shot in addition to the two
that already existed, how many you had and how many were stolen.
-Cody fixed this to check that four args were specified. With the use of the C
-pre-processor macro and inclusion of stdlib.h in the Makefile the layout of the
-source is exactly the same column width and no additional lines were added. This
-was done during one of the times where this was changed to bug to fix status, for
-better or worse.
+Cody fixed this to check that four args were specified (at a time it
+was considered a bug to fix). With the use of the C pre-processor macro and
+inclusion of stdlib.h in the Makefile the layout of the source is exactly the
+same column width and no additional lines were added. This was done during one
+of the times where this was changed to bug to fix status, for better or worse.
Cody also fixed the Makefile which was causing alt code to be compiled when it
shouldn’t be.
Cody also added the scripts try.sh and
@@ -1691,7 +1705,8 @@ shorter PDF file,
newsletter was found on the Internet Wayback Machine and the article was
extracted as a PDF in the macOS Preview.app (File -> Print feature).
Cody also added inclusion of unistd.h for getpid(2). While strictly speaking
@@ -1699,7 +1714,8 @@ this was not necessary (in multiple systems) it can sometimes be a problem and
as it was noticed it was changed (the only case this was done except in the
entries that actually did not work because of missing or incorrect prototypes).
Cody fixed this so it would compile and work with modern compilers. The problem
was that srand() returns void but it was used in a || expression. Thus the
@@ -1719,7 +1735,8 @@ than 231 in length if the program chooses that line it might print the first 231
characters or it might print (up to) the next 231 characters and so on.
Cody also added the try.sh script.
Cody added two alt versions, one which uses
fgets() but when fed its own source code cannot
@@ -1738,7 +1755,8 @@ now there is more important work to do so that the next contest can run.
Cody also added the try.sh and
try.alt.sh scripts.
Cody fixed a bug on systems where EOF != -1. The problem is that getc() and
the related functions do not return -1 on EOF or error but rather EOF.
@@ -1748,11 +1766,13 @@ where EOF != -1 it could result in an infinite loop.
For an interesting problem that occurred here and what was done to solve it,
check the bugs.html file.
Cody added the try scripts, four total, colour and black and white
pairs for the original entry and the alt code. These scripts are
@@ -1767,7 +1787,8 @@ to use fgets() and the inclusion of stdio.h had to be
more like the original entry this was done in the Makefile. The alt code was
also changed to use fgets(3).
Cody changed the Makefile to make this program more user friendly and easier to
use with other tools as well by making the program output not a space after each
@@ -1779,7 +1800,8 @@ lines of the weisberg, feeding it to primes(1), showin
primes. It only does the reversed output because the program actually prints
primes.
Cody converted the spoiler compiler options (provided by the author) to be
compiler commands and added a script try.sh to
@@ -1834,7 +1856,7 @@ added.
-1995/leo (index.html)
+1995/leo (index.html)
At our change in how to deal with spoilers, Cody also uudecoded the spoiler provided
@@ -1851,7 +1873,7 @@ calls which has the four args.
@@ -1920,7 +1942,7 @@ either different output or the same output that we briefly pointed out.
Cody fixed this to not segfault under macOS. The problem was that the function
pointer w, which points to XCreateWindow(), did not specify the parameters of
@@ -1955,7 +1977,7 @@ loop so having it in a script is less desired).
method suggested for SunOS rather than having to update the Makefile manually or
running a more complicated command: now one can just run make.
Cody fixed a segfault in this entry as well as it displaying environmental
variables. Although the scripts showed correct output, it somewhat lessened the
@@ -2063,7 +2085,7 @@ code look like the original with just an extra arg.
Cody also added the try.sh script to show the output of some
of the expressions that we selected.
Cody fixed invalid data types which prevented this entry from working, causing a
segfault. This showed itself in two parts which required two fixes, one for
@@ -2242,7 +2264,7 @@ more confusing (even if not confusing).
Cody made this more portable by changing the void main to int main.
Cody also added the try.sh script.
@@ -2508,7 +2530,7 @@ the author. The other problems are documented so were not fixed. See
index.html for details.
Cody also added the try.sh script.
Cody added the script try.sh to automate a heap of commands
that we, the IOCCC judges, suggested, as well as some additional ones that he
@@ -2651,7 +2673,7 @@ chose the word IOCCC instead of AAA).
Cody made this use fgets(3).
He also changed the time factor in the data files as the animations went too
diff --git a/thanks-for-help.md b/thanks-for-help.md
index 8b3140296..bccd1f295 100644
--- a/thanks-for-help.md
+++ b/thanks-for-help.md
@@ -2009,12 +2009,13 @@ encourage you to try the original without two args :-)
-# 1993
+# [1993](1993/index.html)
-## [1993/ant](1993/ant/ant.c) ([index.html](1993/ant/index.html]))
+# [1993/ant](1993/ant/index.html)
+## Source code: [ant.c](1993/ant/ant.c)
[Cody](#cody) added the [try.sh](1993/ant/try.sh) script and a data file,
@@ -2022,7 +2023,8 @@ encourage you to try the original without two args :-)
-## [1993/cmills](1993/cmills/cmills.c) ([index.html](1993/cmills/index.html]))
+# [1993/cmills](1993/cmills/index.html)
+## Source code: [cmills.c](1993/cmills/cmills.c)
[Yusuke](#yusuke) suggested that with modern systems this goes too fast so he added a call
@@ -2032,7 +2034,8 @@ first.
-## [1993/dgibson](1993/dgibson/dgibson.c) ([index.html](1993/dgibson/index.html]))
+# [1993/dgibson](1993/dgibson/index.html)
+## Source code: [dgibson.c](1993/dgibson/dgibson.c)
[Cody](#cody) fixed the [dgibson.sh](1993/dgibson/dgibson.sh) script to work
@@ -2043,14 +2046,16 @@ mentioned script on all the data files.
-## [1993/ejb](1993/ejb/ejb.c) ([index.html](1993/ejb/index.html]))
+# [1993/ejb](1993/ejb/index.html)
+## Source code: [ejb.c](1993/ejb/ejb.c)
[Cody](#cody) added the [try.sh](1993/ejb/try.sh) script.
-## [1993/jonth](1993/jonth/jonth.c) ([index.html](1993/jonth/index.html]))
+# [1993/jonth](1993/jonth/index.html)
+## Source code: [jonth.c](1993/jonth/jonth.c)
Both [Cody](#cody) and [Yusuke](#yusuke) fixed this so that it will work with modern systems. Yusuke
@@ -2068,7 +2073,8 @@ prepended to them.
-## [1993/leo](1993/leo/leo.c) ([index.html](1993/leo/index.html]))
+# [1993/leo](1993/leo/index.html)
+## Source code: [leo.c](1993/leo/leo.c)
[Cody](#cody) fixed this to work with modern compilers. This involved different header
@@ -2076,7 +2082,8 @@ files for functions.
-## [1993/lmfjyh](1993/lmfjyh/lmfjyh.c) ([index.html](1993/lmfjyh/index.html]))
+# [1993/lmfjyh](1993/lmfjyh/index.html)
+## Source code: [lmfjyh.c](1993/lmfjyh/lmfjyh.c)
[Cody](#cody) added an [alternate
@@ -2090,10 +2097,12 @@ highly unlikely).
-## [1993/plummer](1993/plummer/plummer.c) ([index.html](1993/plummer/index.html]))
+# [1993/plummer](1993/plummer/index.html)
+## Source code: [plummer.c](1993/plummer/plummer.c)
-[Cody](#cody) added check for two args.
+[Cody](#cody) added check for two args during a time that this was considered a
+bug to fix.
Cody also added an [alternate version](1993/plummer/plummer.alt.c) which uses
`usleep(3)` so you can see what is happening with faster systems. This version
@@ -2107,7 +2116,8 @@ of the alt one allowing one to change the amount to sleep).
-## [1993/rince](1993/rince/rince.c) ([index.html](1993/rince/index.html]))
+# [1993/rince](1993/rince/index.html)
+## Source code: [rince.c](1993/rince/rince.c)
[Yusuke](#yusuke) supplied a patch to get this to work in modern systems. This fix also
@@ -2124,14 +2134,16 @@ compile time. See the index.html for details.
-## [1993/schnitzi](1993/schnitzi/schnitzi.c) ([index.html](1993/schnitzi/index.html]))
+# [1993/schnitzi](1993/schnitzi/index.html)
+## Source code: [schnitzi.c](1993/schnitzi/schnitzi.c)
[Cody](#cody) made this use `fgets(3)` not `gets(3)`.
-## [1993/vanb](1993/vanb/vanb.c) ([index.html](1993/vanb/index.html]))
+# [1993/vanb](1993/vanb/index.html)
+## Source code: [vanb.c](1993/vanb/vanb.c)
[Cody](#cody) fixed this to work with clang. The problem was that the third arg to main()
@@ -2164,12 +2176,13 @@ Cody also added the [try.sh](1993/vanb/try.sh) script.
-# 1994
+# [1994](1994/index.html)
-## [1994/dodsond2](1994/dodsond2/dodsond2.c) ([index.html](1994/dodsond2/index.html))
+# [1994/dodsond2](1994/dodsond2/index.html)
+## Source code: [1994/dodsond2](1994/dodsond2/dodsond2.c)
[Cody](#cody) fixed an infinite loop that could happen when you shoot an arrow
@@ -2202,14 +2215,15 @@ that already existed, how many you had and how many were stolen.
-## [1994/horton](1994/horton/horton.c) ([index.html](1994/horton/index.html))
+# [1994/horton](1994/horton/index.html)
+## Source code: [1994/horton](1994/horton/horton.c)
-[Cody](#cody) fixed this to check that four args were specified. With the use of the C
-pre-processor macro and inclusion of `stdlib.h` in the Makefile the layout of the
-source is exactly the same column width and no additional lines were added. This
-was done during one of the times where this was changed to bug to fix status, for
-better or worse.
+[Cody](#cody) fixed this to check that four args were specified (at a time it
+was considered a bug to fix). With the use of the C pre-processor macro and
+inclusion of `stdlib.h` in the Makefile the layout of the source is exactly the
+same column width and no additional lines were added. This was done during one
+of the times where this was changed to bug to fix status, for better or worse.
Cody also fixed the Makefile which was causing alt code to be compiled when it
shouldn't be.
@@ -2227,7 +2241,8 @@ extracted as a PDF in the macOS `Preview.app` (`File -> Print` feature).
-## [1994/imc](1994/imc/imc.c) ([index.html](1994/imc/index.html]))
+# [1994/imc](1994/imc/index.html)
+## Source code: [imc.c](1994/imc/imc.c)
[Cody](#cody) added the [try.sh](1994/imc/try.sh) script.
@@ -2239,7 +2254,8 @@ entries that actually did not work because of missing or incorrect prototypes).
-## [1994/ldb](1994/ldb/ldb.c) ([index.html](1994/ldb/index.html]))
+# [1994/ldb](1994/ldb/index.html)
+## Source code: [ldb.c](1994/ldb/ldb.c)
[Cody](#cody) fixed this so it would compile and work with modern compilers. The problem
@@ -2265,7 +2281,8 @@ Cody also added the [try.sh](1994/ldb/try.sh) script.
-## [1994/schnitzi](1994/schnitzi/schnitzi.c) ([index.html](1994/schnitzi/index.html]))
+# [1994/schnitzi](1994/schnitzi/index.html)
+## Source code: [schnitzi.c](1994/schnitzi/schnitzi.c)
[Cody](#cody) added two alt versions, [one which uses
@@ -2289,7 +2306,8 @@ Cody also added the [try.sh](1994/schnitzi/try.sh) and
-## [1994/shapiro](1994/shapiro/shapiro.c) ([index.html](1994/shapiro/index.html]))
+# [1994/shapiro](1994/shapiro/index.html)
+## Source code: [shapiro.c](1994/shapiro/shapiro.c)
[Cody](#cody) fixed a bug on systems where `EOF != -1`. The problem is that `getc()` and
@@ -2303,14 +2321,16 @@ check the [bugs.html](bugs.html) file.
-## [1994/smr](1994/smr/smr.c) ([index.html](1994/smr/index.html]))
+# [1994/smr](1994/smr/index.html)
+## Source code: [smr.c](1994/smr/smr.c)
[Cody](#cody) added the [try.sh](1994/smr/try.sh) script.
-## [1994/tvr](1994/tvr/tvr.c) ([index.html](1994/tvr/index.html]))
+# [1994/tvr](1994/tvr/index.html)
+## Source code: [1994/tvr](1994/tvr/tvr.c)
[Cody](#cody) added the try scripts, four total, colour and black and white
@@ -2329,7 +2349,8 @@ also changed to use `fgets(3)`.
-## [1994/weisberg](1994/weisberg/weisberg.c) ([index.html](1994/weisberg/index.html]))
+# [1994/weisberg](1994/weisberg/index.html)
+## Source code: [weisberg.c](1994/weisberg/weisberg.c)
[Cody](#cody) changed the Makefile to make this program more user friendly and easier to
@@ -2345,7 +2366,8 @@ primes.
-## [1994/westley](1994/westley/westley.c) ([index.html](1994/westley/index.html]))
+# [1994/westley](1994/westley/index.html)
+## Source code: [westley.c](1994/westley/westley.c)
[Cody](#cody) converted the spoiler compiler options (provided by the author) to be