From 76cef25333277d4f0680da8c0b85c01525a73e2b Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Sat, 1 Jul 2023 09:49:26 -0700 Subject: [PATCH] Fixes to thanks for fixes file At least one entry was missing (1984/anonymous). Some entries were removed. One such entry was not ever broken but instead when I had renamed a file (to markdown) I forgot to update the DATA variable in the Makefile which then broke compilation. This was seen in the log and mistakenly believed that there was something wrong with the entry when there wasn't. Other entries removed were not fixes but notes. Various README.md files have been updated for this sometimes just formatting merely because I opened the file because for instance there is an alternate version (many by me) that is referred to. I'd not be surprised if more README.md files have to be updated for this much better system but these will be found in time when I do another pass (and some years I have not checked at all yet). --- 1987/wall/README.md | 6 +- 1987/westley/README.md | 8 +- 1988/spinellis/README.md | 10 +- 1988/westley/README.md | 28 +- 1991/dds/README.md | 28 +- 1996/westley/README.md | 4 + 1998/schweikh1/README.md | 22 +- 2001/dgbeards/README.md | 6 +- 2013/cable3/README.md | 4 +- bugs.md | 18 +- thanks-for-fixes.md | 638 +++++++++++++++++++++------------------ 11 files changed, 405 insertions(+), 367 deletions(-) diff --git a/1987/wall/README.md b/1987/wall/README.md index cd6111c4a..d9662af84 100644 --- a/1987/wall/README.md +++ b/1987/wall/README.md @@ -62,10 +62,10 @@ quit # for the cat version What we found amazing was how the flow of control was transferred between subroutines. Careful inspection will show that the array of -pointers to functions named 'vi' refers to functions which seem to not +pointers to functions named `vi` refers to functions which seem to not be directly called. Even so, these pointers to functions are being -used as an argument to signal. Can you determine why this is being -done and how it is being exploited? +used as an argument to `signal()` (used both with and without an arg - but +how?). Can you determine why this is being done and how it is being exploited? Some compilers complained about this file, so we changed: `=++I` to `= ++I`. diff --git a/1987/westley/README.md b/1987/westley/README.md index 2dca78a4e..b4048c4fa 100644 --- a/1987/westley/README.md +++ b/1987/westley/README.md @@ -1,11 +1,7 @@ # Best Layout -Brian Westley (aka Merlyn Leroy on usenet) -Starfire Consulting -1121 Hamline Ave. N. #17 -St. Paul, MN -55108 -US +Brian Westley (aka Merlyn Leroy on usenet)
+US
## To build: diff --git a/1988/spinellis/README.md b/1988/spinellis/README.md index 5022d92d8..7d3fcb496 100644 --- a/1988/spinellis/README.md +++ b/1988/spinellis/README.md @@ -13,9 +13,8 @@ make all and then type a C program into followed by EOF (usually `^D`, ctrl-d). -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made a version (also -one line) for clang. See the Alternate code section below for how to use. -Thank you Cody for your assistance! +An alternate version (also one-line) that will work with clang has been +provided. See the Alternate code section below for how to use. ## Try: @@ -61,12 +60,9 @@ NOTE: you need to make clobber first for this entry to work right. ## Judges' remarks: -We enjoyed this entry this year, however in the future programs must be able to +We enjoyed this entry this year; however in the future programs must be able to be compiled from within a Makefile without the need of human intervention. -Meanwhile Cody was twisted enough to point out (though to be fair he felt sick -doing this) that with a slight modification this entry can be C++ instead. We don't -thank him for this ghastly point! :-) ## Author's remarks: diff --git a/1988/westley/README.md b/1988/westley/README.md index 31e596581..cea7c3418 100644 --- a/1988/westley/README.md +++ b/1988/westley/README.md @@ -1,11 +1,7 @@ # Best layout Merlyn LeRoy (Brian Westley) -Rosemount, Inc. -1121 Hamline Ave. N. #17 -St. Paul, MN -55108 -U.S.A. +US ## To build: @@ -14,8 +10,9 @@ U.S.A. make all ``` -NOTE: this version is a fixed version for modern C compilers. The Alternate -code below is the original. +NOTE: this version is a fixed version for modern C compilers. See the Alternate +code section below for how to use the original. + ## Try: @@ -23,18 +20,6 @@ code below is the original. ./westley ``` -### Alternate code: - -The alternate code in [westley.alt.c](westley.alt.c) is the original version -submitted to the contest. If you have an old enough compiler you can run it -like: - -```sh -make alt -``` - -Use `westley.alt` as you would `westley` above. - ## Judges' remarks: Your compiler must parse @@ -53,10 +38,13 @@ by changing the #define line to: #define _ F-->00||F-OO--; ``` +This is what the modified code in [westley.c](westley.c) does whereas the alt +code is the original. + You might enjoy looking at the output of: ```sh -cc -E westley.c +cc -E westley.alt.c ``` ### Alternate code: diff --git a/1991/dds/README.md b/1991/dds/README.md index ee39a677d..31e21dc6d 100644 --- a/1991/dds/README.md +++ b/1991/dds/README.md @@ -64,12 +64,12 @@ other types of files? ### Alternate code: -The alternate code allows this entry to work successfully even with clang. [Cody -Boone Ferguson](/winners.html#Cody_Boone_Ferguson) notes that unfortunately it's -something of a hack or maybe even a kludge. This however seems important because -it works well and allows for not messing with the `s` string which is quite -complicated. Even changing the length could break functionality and indeed the -length would have to be longer for this to work with clang. +The alternate code allows this entry to work successfully even with clang. +Unfortunately it's something of a hack or maybe even a kludge. This however +seems important because it works well and allows for not messing with the `s` +string which is quite complicated. Even changing the length could break +functionality and indeed the length would have to be longer for this to work +with clang. How does it work? The code (which you will see in [dds.c](dds.c)) does a `return system(q-6);` which equates to `return system("cc a.c");` but clang by default, @@ -79,13 +79,12 @@ that the compilation failed with clang (because it didn't use `make` so no [LANDER.BAS](LANDER.BAS)) due to a return from `main()` without a return value and the use of functions not yet declared. -Now as noted since the string `s` is complicated and to not -inadvertently mess something up Cody changed that code to `system("make a");` -and then added the right rule to the Makefile. Thus for the alternative version -you now need both `make` and `cc`. If you use gcc you may change the system() -call to what was given in this description to get a more authentic feel. If you -do this you must then run `./a.out` not `./a`! Thus to use the alternative -version: +Now as noted since the string `s` is complicated and to not inadvertently mess +something up it was changed so that the code uses `system("make a");` and then an +appropriate rule was added to the Makefile. Thus for the alternative version you +now need both `make` and `cc`. If you use gcc you can change the `system()` call +to what was given in this description to get a more authentic feel. If you do +this you must then run `./a.out` not `./a`! Thus to use the alternative version: ```sh make clobber alt @@ -101,9 +100,6 @@ produced? How does `a.c` relate to [LANDER.BAS](LANDER.BAS)? This obfuscated program translates BASIC programs into obfuscated C programs by way of an obfuscated algorithm. -NOTE: Due to minor problems with some strict ANSI C compilers, we -have supplied a more portable ANSI version. - ## Author's remarks: diff --git a/1996/westley/README.md b/1996/westley/README.md index 16f841089..cc1c79178 100644 --- a/1996/westley/README.md +++ b/1996/westley/README.md @@ -21,6 +21,10 @@ sh ./clock1 ``` +NOTE: the original version had a display problem in modern systems which +somewhat affected the usability of the program. See the Alternate code section +for details on the original version. + ## Try: diff --git a/1998/schweikh1/README.md b/1998/schweikh1/README.md index e74cbefbc..88e8b6259 100644 --- a/1998/schweikh1/README.md +++ b/1998/schweikh1/README.md @@ -14,6 +14,9 @@ Germany make all ``` +An alternate version for this entry works with macOS. See the Alternate code +section below for more details. + ## To run: @@ -23,11 +26,11 @@ make all ### Alternate code: -As noted above the alternate version works with macOS but there are some important notes as -well as a description of how it works (spoilers for the original version as -well). +As noted above the alternate version works with macOS but there are some +important notes as well as a description of how it works (spoilers for the +original version as well). -An MacBook Pro Max with the M1 chip some header files report an +With a MacBook Pro Max with the M1 chip some header files report an unsupported architecture and unsupported compiler (error, warning). However the defines are still found okay. @@ -60,7 +63,14 @@ This allows for opening the right files. The problem with the macOS is `/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include` which is why the different command line and the different numbers. -To use this version use `schweikh1.alt` instead. +To use this version use: + + +```sh +make alt +``` + +Use `schweikh1.alt` as you would `schweikh1` above. ## Judges' remarks: @@ -73,7 +83,7 @@ standard headers. This code is a wonder; it's a wonder that it compiles. I wonder whether or not it should. The innovative realization that you can -use special characters, such as `'\n'`, in #file directives alone +use special characters, such as `'\n'`, in `#file` directives alone merits some recognition. I've included most of the author's remarks; they're fairly thorough. diff --git a/2001/dgbeards/README.md b/2001/dgbeards/README.md index aceb0b5fc..ef56e09a9 100644 --- a/2001/dgbeards/README.md +++ b/2001/dgbeards/README.md @@ -1,9 +1,6 @@ # Best AI Doug Beardsley -Southern Adventist University -359 Davis Rd. NW -Cleveland, TN 37312 US @@ -24,7 +21,8 @@ make ### Alternate code: The author provided a way to speed it up a bit and also how to make it so it -doesn't crash on losing. +doesn't crash on losing. The idea that it crashes on losing was too good to +lose but this alternate version has the former change. To compile: diff --git a/2013/cable3/README.md b/2013/cable3/README.md index 48c095539..eb654abf1 100644 --- a/2013/cable3/README.md +++ b/2013/cable3/README.md @@ -1,7 +1,7 @@ # Largest small system emulator - Adrian Cable - +Adrian Cable
+ ## To build: diff --git a/bugs.md b/bugs.md index d0dd88e0d..d0deb98b7 100644 --- a/bugs.md +++ b/bugs.md @@ -1335,6 +1335,12 @@ There was no IOCCC in 1999. # 2000 +## [2000/dlowe](2000/dlowe/dlowe.c) ([README.md](2000/dlowe/README.md)) +## STATUS: doesn't work with some platforms - please help us fix + +This entry crashes in macOS. This will be looked at later. + + [2000/primenum](2000/primenum/primenum.c) ([README.md](2000/primenum/README.md)) ## STATUS: INABIAF - please **DO NOT** fix @@ -1658,7 +1664,7 @@ in the process some of the generated code fails. What might the translation of the comment end up being? Here's an example: -``` +```c system(" echo Line 2;sed -n -e 2,77p out> c.c;cc c.c -c "); ``` @@ -1699,6 +1705,7 @@ does not exist. This entry requires that `sed` and `cc` are in the path. + ## [2005/mynx](2005/mynx/mynx.c) ([README.md](2005/mynx/README.md)) ## STATUS: INABIAF - please **DO NOT** fix @@ -2085,6 +2092,15 @@ Abort trap: 6 but this is expected and the file `ioccc.html` will be generated properly. +## [2018/poikola](2018/poikola/prog.c) ([README.md](2018/poikola/README.md])) +## STATUS: INABIAF - please **DO NOT** fix + +Some have reported that Terminal.app in macOS does not work and one might need a +different terminal emulator like that from [XQuartz](https://www.xquartz.org) +but [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) reported that this +works fine in macOS Ventura with Terminal.app. YMMV of course. + + # 2019 diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index 665262545..eb322e282 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -13,21 +13,21 @@ Ferguson](/winners.html#Cody_Boone_Ferguson) who is responsible for many of the improvements including many, many complicated bug fixes like [2001/anonymous](2001/anonymous/anonymous.c), making entries not require `-traditional-cpp`, fixing entries to compile with clang, providing alternate -code where useful or necessary, typo and consistency fixes. Thank you **very -much** for the extensive efforts in helping improve the IOCCC presentation of -past IOCCC winners! +code where useful or necessary, typo and consistency fixes. Thank you **very +much** for your extensive efforts in helping improve the IOCCC presentation of +past IOCCC winners and making many work with modern systems! [Yusuke Endoh](/winners.html#Yusuke_Endoh) supplied a number of -important bug fixes to a number of past IOCCC winners. Some of -those fixes were very technically challenging. Thank you **very +important bug fixes to a number of past IOCCC winners. Some of +those fixes were very technically challenging. Thank you **very much** for your help! A good number of the [past winners of the IOCCC](winners.html) tested, identified and helped correct and/or improve the write-ups -of follow IOCCC winners for the year that they won. The list of +of follow IOCCC winners for the year that they won. The list of those past winners is too long to mention: nevertheless the [IOCCC judges](judges.html) **very much appreciate** those who -helped improve the presentation of their follow IOCCC winners. +helped improve the presentation of their fellow IOCCC winners. ## Thank you list since 2021 Jan 01 @@ -41,6 +41,24 @@ We are pleased to note the many contributions, **made since 2021 Jan 01**, on a winner by winner basis. +## [1984/anonymous](1984/anonymous/anonymous.c) ([README.md](1984/anonymous/README.md) + +Cody fixed this to work for macOS. + +The problem was to do with the way that the `read(2)` function was redefined. +With macOS the second arg needs to be a `void *` and this also necessitated some +casts to `int` (on the second arg) in the call to `write(2)` (in `read()`). + +By request, the original code is provided as +[anonymous.alt.c](1984/anonymous/anonymous.alt.c) so that one can look at it and +the famous tattoo: + +![1984-anonymous-tattoo.jpg](1984/anonymous/1984-anonymous-tattoo.jpg) + +which was done in 2005 by [Thomas +Scovell](https://web.archive.org/web/20070120220721/https://thomasscovell.com/tattoo.php). + + ## [1984/decot](1984/decot/decot.c) ([README.md](1984/decot/README.md])) Cody fixed this to not require `-traditional-cpp` which not all compilers @@ -56,29 +74,28 @@ but not clang - or at least some versions. ## [1984/mullender](1984/mullender/mullender.c) ([README.md](1984/mullender/README.md])) Cody provided an alternate version which was an improved version from the judges -so that everyone can enjoy it in systems that are not VAX/PDP. We also refer you -to the [faq](faq.md) as there are some winning entries that also let one enjoy +so that everyone can enjoy it with systems that are not VAX/PDP. We also refer you +to the [FAQ](faq.md) as there are some winning entries that also let one enjoy it - with more to them of course! ## [1985/applin](1985/applin/applin.c) ([README.md](1985/applin/README.md])) -Yusuke provided a patch to get this to not issue crash and Cody fixed this to -work with macOS (it printed the string `H????` in a seemingly infinite loop of -printing more and more `?`s). +Yusuke provided a patch to get this to not crash and Cody fixed this to +work with macOS (it printed the string `H????` in a seemingly infinite loop, +each time printing another `?`). The problem with the crash is that it destructively rewrites string literals but with `strdup()` it's safe. For macOS it's because there was no prototype for `execlp()` and macOS has problems with missing prototypes for some functions (this was also seen when -Cody fixed [1984/anonymous](/1984/anonymous/anonymous.c) for macOS as well -though that fix was more complicated). Ironically this fix was discovered -through linux! +Cody fixed [1984/anonymous](/1984/anonymous/anonymous.c) for macOS as well). +Ironically this fix was discovered through linux! NOTE: originally this entry did not print a newline prior to returning to the -shell, after the output (despite having `\n` in the string - why?) but to make -it more friendly to users Cody made it print a `\n` prior to returning to the -shell. +shell, after the output (despite having `\n` in the string - can you figure out +why?) but to make it more friendly to users Cody made it print a `\n` prior to +returning to the shell. The original version does not have this change. ## [1985/lycklama](1985/lycklama/lycklama.c) ([README.md](1985/lycklama/README.md])) @@ -92,7 +109,10 @@ code as it provides some fun input for the entry. Yusuke provided some useful information that amounts to an alternate version but which does not actually modify the code except by a provided macro for a -`usleep()` call which Cody added. See the README.md file details. +`usleep()` call which Cody added. This was not put in an alt file because the +original code is in the alt file but the default to the `usleep()` call is 0, +making it functionally equivalent not calling it. See the README.md file +details. ## [1985/sicherman](1985/sicherman/sicherman.c) ([README.md](1985/sicherman/README.md])) @@ -138,7 +158,8 @@ file for details. Cody made this safer by using `fgets()` instead of `gets()`. This prevents an annoying and potentially alarming warning at compiling, linking or runtime. Though this could be partly remedied through redirecting `stderr` to `/dev/null` -this would not truly resolve the problem either. +this would not truly resolve the problem either and in order to avoid the +warning one would have to always redirect `stderr` to `/dev/null`. ## [1987/westley](1987/westley/westley.c) ([README.md](1987/westley/README.md])) @@ -150,10 +171,10 @@ README.md file. ## [1988/dale](1988/dale/dale.c) ([README.md](1988/dale/README.md])) -Cody fixed this for modern compilers. There were two problems to address. One -was that the entry required `-traditional-cpp` (which not all compilers -support `clang` does not support) which Cody fixed. It needed that -option because of two things it did: +Cody fixed this twisted entry (as we called it :-) ) for modern compilers. There +were two problems to address. One was that the entry required `-traditional-cpp` +(which not all compilers support `clang` does not support) +which Cody fixed. It needed that option because of two things it did: ```c #define a(x)get/***/x/***/id()) @@ -173,8 +194,25 @@ no longer works to create `getuid()` and `getgid()`. The second is that for/*/(;;);/*/k()){O/*/*/c); ``` -cannot form `fork())` in modern C compilers. What is quite fun is that the cpp -can! +cannot form `fork())` in modern C compilers. One can put those in directly but +using the C paste token operator `##` also solves the problem of the `#define +a` like this diff shows: + +```diff +--- i/1988/dale/dale.c ++++ w/1988/dale/dale.c +@@ -9,18 +9,18 @@ + #define L if + #define I goto + #define l 1 + #define f write + #define J else +-#define a(x)get/***/x/***/id()) ++#define a(x)get##x##id()) +``` + +What is quite fun is that at least some C pre-processors can form these +constructs! The other problem was that modern compilers do not allow directives like: @@ -192,43 +230,55 @@ so Cody changed the lines to be in the form of: #define foo bar ``` +See the README.md file for details on the original code. + ## [1988/isaak](1988/isaak/isaak.c) ([README.md](1988/isaak/README.md])) 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(). See below -notes for the original, alternative version. - -The original version is in [1988/isaak/isaak.alt.c](1988/isaak/isaak.alt.c). +function, a redefinition of `exit()`, was not being called in main(). The +original version is in [1988/isaak/isaak.alt.c](1988/isaak/isaak.alt.c). See the +README.md file for more details. ## [1988/phillipps](1988/phillipps/phillipps.c) ([README.md](1988/phillipps/README.md])) Cody fixed this for modern systems. It did not compile with clang because it -requires the second and third args to main() to be `char **` but even before +requires the second and third args to `main()` to be `char **` but even before that with gcc it printed random characters. After fixing it for clang by -changing main() to call the new function pain() (chosen because it's a pain that -clang requires these args to be `char **` :-) ) with the correct args it now -works. +changing `main()` to call the new function `pain()` (chosen because it's a pain +that clang requires these args to be `char **` :-) ) with the correct args it +now works. ## [1988/spinellis](1988/spinellis/spinellis.c) ([README.md](1988/spinellis/README.md])) An [alternate version](1988/spinellis/spinellis.alt.c) was provided by Cody for -this so that it works for compilers like clang. See the README.md files for -details. +this so that it works for compilers like clang. An alternate version had to be +provided because not doing so would be tampering with the file too much. It +would work but it would not show the same creativity. The original file exploits +a fun mis-feature that works with gcc but not clang. This resulted in a change +of rules which is another reason to not modify the original. See the README.md +file for details on the alternate code. + +Meanwhile Cody was twisted enough to point out (though to be fair he felt sick +doing this) that with a slight modification this entry can be C++ instead. We don't +thank him for this ghastly point! :-) + ## [1988/westley](1988/westley/westley.c) ([README.md](1988/westley/README.md])) -The [original version](1988/westley/westley.c), provided as an alternate code, +The [original version](1988/westley/westley.alt.c), provided as alternate code, was fixed by Misha Dynin, based on the judges' remarks so that this would work -with modern C compilers. +with modern C compilers. We encourage you to try the alternate version to see +what happens with current compilers! See the README.md files for details. + ## [1989/fubar](1989/fubar/fubar.c) ([README.md](1989/fubar/README.md])) Cody got this to work with modern systems. The `main()` issues were an -`#include` had to be added and fixing the path to files referred to in the code -was also needed. +`#include` had to be added along with fixing the path (due to `.` not being in +`$PATH`) to files referred to in the code. ## [1989/jar.2](1989/jar.2/jar.2.c) ([README.md](1989/jar.2/README.md])) @@ -247,6 +297,7 @@ code like: He notes that there _is_ a way to get it (or something close to it) to work. Do you know how? + ## [1989/ovdluhe](1989/ovdluhe/ovdluhe.c) ([README.md](1989/ovdluhe/README.md])) Cody provided an [alternate version](1989/ovdluhe/ovdluhe.alt.c) based on the @@ -257,34 +308,45 @@ author's remarks. See the README.md for details. Cody fixed a segfault under macOS. The problem was that the int (from `#define f`) should be a long. This became apparent when he was using lldb and saw that -the type of a pointer was long. +the type of a pointer was too `long` :-) ## [1989/robison](1989/robison/robison.c) ([README.md](1989/robison/README.md])) -Yusuke Endoh fixed this to compile under modern systems. +Yusuke Endoh fixed this to compile under modern systems. To see the changes +made, try: + + +```sh +git diff d2a42f42e8f477f29e9d5ed09ce2bb349eaf7397..9d63c37f490da333fbb1ed7db9571902570d4bad 1989/robison/robison.c +``` + +(It adds the C token pasting operator `##` instead of `/**/`.) ## [1989/tromp](1989/tromp/tromp.c) ([README.md](1989/tromp/README.md])) We used a patch from Yusuke to get this to compile under gcc. -Cody got this to work with clang by further changing the variable `a` to be not -the third argument to `main()` and instead be a variable declared in `main()`. +Cody fixed this to work with clang by further changing the variable `a` to be +not the third argument to `main()` but instead be a variable declared in +`main()`. Cody also bug fixed it so that the high score file would work (it was not even being created) and after this making sure the terminal stayed sane (the letter -`u` could not be typed and echo was disabled outright after the segfault fix / -high score file was reinstated). We thank you for your assistance Cody (he -cynically notes that he did it because tetris just has to work)! +'`u`' could not be typed and echo was disabled outright after the segfault fix / +high score file was reinstated). Although we appreciate the help here, he +cynically noted that he had to have an IOCCC +[Tetris](https://en.wikipedia.org/wiki/Tetris) working (this of course was not +his only reason :-) ) ## [1989/westley](1989/westley/westley.c) ([README.md](1989/westley/README.md])) -Cody got this to partly work with clang. As there are some important notes on -this in the README.md file we have left the details in that file, at least for -now. Perhaps the [bugs.md](bugs.md) file is a better place but this can be -decided later. +Cody got some of the versions (the original and `ver0`) to work with clang. As +there are some important notes on this in the README.md file we have left the +details in that file, at least for now. Perhaps the [bugs.md](bugs.md) file is a +better place but this can be decided later. ## [1990/baruch](1990/baruch/baruch.c) ([README.md](1990/baruch/README.md])) @@ -303,14 +365,23 @@ redirect `stderr` to `/dev/null` but he did not think of that at the time. For the original code see the [1992 archive](/archive/archive-1990.tar.bz2). +BTW: Cody asks the following question: if the compiler compiles, the linker +links and the user executes does that make the compiler the jury, the linker the +judge and user the executioner? :-) + ## [1990/dds](1990/dds/dds.c) ([README.md](1990/dds/README.md])) -Yusuke fixed this for modern systems. +Yusuke and Cody in conjunction fixed this for modern systems. -Cody removed the erroneous prototype to `fopen()` and made this use `fgets()` -instead of `gets()` to make it safer and to prevent an annoying and potentially -alarming warning at compiling and/or linking and/or runtime. +Yusuke added the comma operator for a binary expression with `free(3)` which is +an error because `free()` returns void. + +Cody removed the erroneous prototype to `fopen()` which caused a compiler error +and he also made this use `fgets()` instead of `gets()` to make it safer and to +prevent an annoying and potentially alarming warning at compiling and/or linking +and/or runtime. He also changed a file to be a proper `FILE *` and fixed a typo +in [LANDER.BAS](1990/dds/LANDER.BAS). ## [1990/jaw](1990/jaw/jaw.c) ([README.md](1990/jaw/README.md])) @@ -331,7 +402,7 @@ function was used in a binary expression so this wouldn't even compile. Cody also changed the code to use `fgets()` instead of `gets()` so one would not get a warning about the use of `gets()` at linking time or execution, the latter case causing confusing output due to the warning being interspersed with the -program's output. +program's (which is interactive) output. ## [1990/theorem](1990/theorem/theorem.c) ([README.md](1990/theorem/README.md])) @@ -347,7 +418,9 @@ again (since it did not work anyway a segfault prevention was added here). He also fixed some array addressing (some of which might not be strictly necessary but as he was testing the `fibonacci.c` bug he ended up changing it anyway). Finally he changed this program to use `fgets()` not `gets()` to make it safer -and to prevent a warning about `gets()` at linking or runtime. +and to prevent a warning about `gets()` at linking or runtime. Since this +program is so incredible the extra fixes were deemed worth having and this is why +it was done. Yusuke pointed out that `atof` nowadays needs `#include ` which was used in order to get this to work initially (prior to this output was there but @@ -435,6 +508,9 @@ defaulting at 15000. You can reconfigure it like: make clobber Z=1000 all ``` +This was not made an alternate version because it moves so fast that it's nigh +impossible to use otherwise. + 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. @@ -445,15 +521,18 @@ Yusuke supplied a patch which makes this work with gcc. Due to how it works (see Judges' remarks in the README.md file) this will not work with clang. Cody made it use `fgets()` instead of `gets()` to prevent annoying warnings -getting in the way and also added the `runme.sh` script to demonstrate it (using -make was problematic). Cody notes that unfortunately this does not work with -clang due to different compiler messages. +getting in the way (in linux linking in a binary with `gets()` produces a +warning that might get in the way with this entry and in macOS at runtime it +prints a warning which often is interspersed with the output of the program +which can be confusing) and also added the `runme.sh` script to demonstrate it +(using make was problematic). Cody notes that unfortunately this does not work +with clang due to different compiler messages. ## [1992/westley](1992/westley/westley.c) ([README.md](1992/westley/README.md])) Cody fixed this to work for clang by changing the third and fourth arg of -`main()` to be ints inside `main()`; clang requires args 2 - 4 to be `char **`. +`main()` to be `char **` inside `main()`; clang requires args 2 - 4 to be `char **`. He also added the alternate version that the author gave in the remarks that is specifically for the USA rather than the world. @@ -477,13 +556,15 @@ prepended to them. ## [1993/leo](1993/leo/leo.c) ([README.md](1993/leo/README.md])) -Cody fixed this to work with modern compilers. +Cody fixed this to work with modern compilers. This involved different header +files for functions. ## [1993/lmfjyh](1993/lmfjyh/lmfjyh.c) ([README.md](1993/lmfjyh/README.md])) Cody added an [alternate version](1993/lmfjyh/lmfjyh.alt.c) which does what the -program did with gcc < 2.3.3. See the README.md file for details. +program did with gcc < 2.3.3. See the README.md file for details and for why +this was made the alternate version, not the actual entry. ## [1993/plummer](1993/plummer/plummer.c) ([README.md](1993/plummer/README.md])) @@ -502,7 +583,7 @@ Yusuke supplied a patch to get this to work in modern systems. Cody made this use `fgets()` not `gets()` to make it safer and to prevent an annoying warning with compiling and/or linking and/or runtime, the latter of -which is interspersed with the output of the program itself. +which is unfortunately interspersed with the output of the program itself. ## [1993/vanb](1993/vanb/vanb.c) ([README.md](1993/vanb/README.md])) @@ -520,12 +601,14 @@ comma operator was needed. Cody also changed the entry to use `fgets()` instead of `gets()` to make it safe for lines greater than 231 in length and to prevent a warning at linking or at runtime, the latter of which can be interspersed with output of the program. Note that this now prints a newline after the output but -this seems like a worthy compromise for making it safer (fixing it is more -problematic than it is worth). In macOS another line of output would be shown -anyway namely the warning that it uses gets(). A subtlety about this fix: if a -line is greater 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. +this seems like a worthy compromise for making the output incorrect in macOS and +at the same time it's safer (fixing it to not have the extra newline is more +problematic than it's worth and in macOS another line of output would be shown +anyway). + +A subtlety about this fix: if a line is greater 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. ## [1994/shapiro](1994/shapiro/shapiro.c) ([README.md](1994/shapiro/README.md])) @@ -534,16 +617,9 @@ 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`. However `EOF` is not required to be `-1` but merely an int < 0 and this program assumed that `getc()` will return `-1` on EOF or error, not `EOF`. On systems -where `EOF != -1` it could result in an infinite loop (for the same reason one -should not use `EOF` for the `getopt()` functions as they return `-1` when all -options are parsed (for details on the definition of `EOF` see `7.21 -Input/output` subsection 1 of the standard)). An interesting problem -occurred where changing the `-1` to `EOF` caused both `warning: illegal -character encoding in string literal` and `error: source file is not valid -UTF-8`. But since `EOF` is simply an int < 0 and making the loop condition check -that the return value is >= 0 does not cause a compilation error and it -functions correctly it will address the systems where `EOF != -1` just as if it -checked for `!= EOF`. +where `EOF != -1` it could result in an infinite loop. + +For an interesting problem that occurred here check the [bugs.md](bugs.md) file. ## [1994/westley](1994/westley/westley.c) ([README.md](1994/westley/README.md])) @@ -557,15 +633,17 @@ automate the spoiler commands to make it easier to see the game in action. Cody fixed this so that it would work with macOS. Once it could compile it additionally segfaulted under macOS which he also fixed. Cody also provided the -[Alternate code](1995/cdua/cdua.alt.c) for fun :-) ). +[Alternate code](1995/cdua/cdua.alt.c) for fun :-) ) (in particular to make it +easier to see the program do what it does in systems that are too fast ... if +there is such a thing anyway :-) ). ## [1995/garry](1995/garry/garry.c) ([README.md](1995/garry/README.md])) -Cody fixed it so that it will compile with modern compilers. The problem was a +Cody fixed this so that it will compile with modern compilers. The problem was a missing `int` for the `f` variable. He felt it was important that it works -because the layout does indeed look to him like a rat is dropping core, which -the judges suggested. +because the layout does indeed look to him like a rat is dropping core, +something that the judges suggested. ## [1996/august](1996/august/august.c) ([README.md](1996/august/README.md])) @@ -591,13 +669,15 @@ found but he missed that Yusuke added a '...' after the result which made him think the fix was wrong. Cody also made the recommended change of the author to make it so that each number is printed on a line by itself rather than having a long -string of numbers on the same line. +string of numbers on the same line. This was not put in an alternate version but +perhaps it should be. ## [1996/eldby](1996/eldby/eldby.c) ([README.md](1996/eldby/README.md])) Cody provided an [alternate version](1996/eldby/eldby.alt.c) which uses -`usleep()` in between writing the output for those who are sensitive to text +`usleep()` in between writing the output to make it easier to see what is going +on with faster systems and importantly also for those who are sensitive to text flashing by rapidly (it affects him too but he also thinks it moves too fast nowadays anyway). @@ -634,19 +714,14 @@ exiting the program. 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 linux and further changes for macOS. He also fixed a segfault (after printing -garbage) when the arg specified evaluated to 0. - -Cody made an [alternate version](1998/schnitzi/schnitzi.alt.c) that works with -macOS but there are some important notes as well as a description of how it -works (spoilers for the original version as well), found in the README.md file. - +garbage) when the arg specified evaluated to 0. It was decided that these +segfault fixes should be made because the program is so beautiful. ## [1998/schweikh1](1998/schweikh1/schweikh1.c) ([README.md](1998/schweikh1/README.md])) -Cody fixed this for modern -systems (it did not work at all). He also made it so that if a file fails to -open it does not return but rather skips the reading of the file. Doing this -lets the entry work right. +Cody fixed this for modern systems (it did not work at all). He also made it so +that if a file fails to open it does not return but rather skips the reading of +the file. Without this fix the entry did not work. What was wrong? The call to `freopen()` was incorrect with the second arg (the mode) being instead `5+__FILE__`. It now is `"r"`. There was also a call to @@ -655,64 +730,61 @@ enough though this did not seem to be an issue though I cannot explain why. He notes that it works fine with `clang` as well as `gcc` (which is what is used but in macOS - see below for alternate code - `gcc` is clang). -Additionally Cody provided an alternate version for macOS. See below for the -alternate version. +Additionally Cody provided an alternate version for macOS. See the README.md +file for details on the alternate version. ## [2000/anderson](2000/anderson/anderson.c) ([README.md](2000/anderson/README.md])) -Cody changed this entry to -use `fgets()` instead of `gets()` to make it safer and to prevent annoying -warnings from showing up at linking or runtime. +Cody changed this entry to use `fgets()` instead of `gets()` to make it safer +and to prevent annoying warnings from showing up at compiling, linking and/or +runtime, the latter interspersed with the output of the program. ## [2000/briddlebane](2000/briddlebane/briddlebane.c) ([README.md](2000/briddlebane/README.md])) -Cody fixed this to compile -in systems that require one to explicitly link in `libm`. +Cody fixed this to compile in systems that require one to explicitly link in +`libm`. ## [2000/dlowe](2000/dlowe/dlowe.c) ([README.md](2000/dlowe/README.md])) -Cody fixed this to compile -with more recent perl versions; the symbol now `PL_na` was once `na`. He notes -that this entry crashes under macOS but it works under linux after this change. +Cody fixed this to compile with more recent perl versions; the symbol that's now +`PL_na` was once `na`. He notes that this entry crashes under macOS but it works +under linux after this change. ## [2000/jarijyrki](2000/jarijyrki/jarijyrki.c) ([README.md](2000/jarijyrki/README.md])) -Cody made it easier to -compile this by adding `X11/` to the includes of `Xlib.h` and `keysym.h`. Thank -you Cody! +Cody made it easier to compile this in some cases by adding `X11/` to the +includes of `Xlib.h` and `keysym.h`. ## [2000/natori](2000/natori/natori.c) ([README.md](2000/natori/README.md])) -Cody fixed this for modern -compilers. Depending on the compiler it would either segfault when run or not -compile at all (gcc and clang respectively). Cody provided alternate code that -supports the southern hemisphere. +Cody fixed this for modern compilers. Depending on the compiler it would either +segfault when run or not compile at all (gcc and clang respectively). + +Cody also provided alternate code that supports the southern hemisphere. ## [2000/thadgavin](2000/thadgavin/thadgavin.c) ([README.md](2000/thadgavin/README.md])) -Cody fixed the code and -added an appropriate make rule so that the SDL version works independent from -the curses version (using the same code). +Cody fixed the code and added an appropriate make rule so that the SDL version +works independent from the curses version (using the same code). -To see the craziness of the SDL fix (because of a design choice of the SDL1 -developers) see the log for commit dd0b26b5d6325e8b6fdef1232156c8bb8c66613f. Be -prepared for a surprise. +To see the craziness of the SDL fix (because of a terrible design choice of the +SDL1 developers) see the log for commit +dd0b26b5d6325e8b6fdef1232156c8bb8c66613f. Be prepared for a surprise! ## [2001/anonymous](2001/anonymous/anonymous.c) ([README.md](2001/anonymous/README.md])) -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 but according to the -author's remarks it should be executed). He managed to do this with linux -but it will not work with macOS (see [bugs.md](/bugs.md) for why this is); _this -is not a bug, it's a feature_ inherent in what it does! +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 +but according to the author's remarks it should be executed). He managed to do +this with linux but it will not work with macOS (see [bugs.md](/bugs.md) for why +this is); _this is not a bug, it's a feature_ inherent in what it does! The following had to be done in order to get this to work: @@ -767,13 +839,12 @@ sings [Ten in the Bed](https://allnurseryrhymes.com/ten-in-the-bed/). ## [2001/bellard](2001/bellard/bellard.c) ([README.md](2001/bellard/README.md])) -Cody partially fixed this -but he notes that this will not work without (according to the author) i386 -linux or else some skill in resolving the portability issues. As it is it -segfaults in 64-bit linux (and as expected macOS). He fixed an earlier segfault -so that at least the file can be opened (but perhaps that will be wrong in i386 -linux?) and he also changed some of the macro used to what they evaluate to but -mostly he kept it the same. +Cody partially fixed this but he notes that this will not work without +(according to the author) i386 linux or else some skill in resolving the +portability issues. As it is it segfaults in 64-bit linux (and as expected +macOS). He fixed an earlier segfault so that at least the file can be opened +(but perhaps that will be wrong in i386 linux?) and he also changed some of the +macro used to what they evaluate to but mostly he kept it the same. Cody also fixed [bellard.otccex.c](bellard.otccex.c) so it does not segfault and seemingly works okay (it did not work at all). The main problem was that some @@ -804,14 +875,13 @@ Cody fixed this to work with clang by adding another function that is allowed to have a third arg as an int, not a `char **`. He chose pain() because it's a four letter word that would match the format and because it's pain that clang forces this. :-) This fix -makes a point of the author's notes on portability no longer valid, btw. Thank -you Cody for your assistance! +makes a point of the author's notes on portability no longer valid, btw. ## [2001/coupard](2001/coupard/coupard.c) ([README.md](2001/coupard/README.md])) -Thanks go to Yusuke for providing a proper -command line (see [/2013/endoh3/README.md](2013/endoh3/README.md). +Thanks go to Yusuke for providing a proper command line (see +[/2013/endoh3/README.md](2013/endoh3/README.md). ## [2001/ctk](2001/ctk/ctk.c) ([README.md](2001/ctk/README.md])) @@ -823,9 +893,14 @@ codes. This works with macOS as well. ## [2001/dgbeards](2001/dgbeards/dgbeards.c) ([README.md](2001/dgbeards/README.md])) -Cody made this alternate version with -the former change (the idea of crashing when losing is too good to fix in his -opinion). +The author provided two changes: one to speed it up and one to make it not crash +on losing. Cody provided an alternate version which does the former but he felt +that the idea of crashing on losing (see the README.md for details on why that +might be) he kept that in. + +He also points out that there is a way to get the computer to automatically lose +very quickly and he also points out that there is a flaw in the alternate +version that the author did not note. Do you know what these are? ## [2001/herrmann2](2001/herrmann2/herrmann2.c) ([README.md](2001/herrmann2/README.md])) @@ -837,19 +912,16 @@ of main to be `int` and `char **` respectively and changing specific references to the `argv` arg, casting to `long` (was `int` but the 64-bit fix requires `long`) which was its old type. The original file, used for demonstration purposes, as well as if you want to see if your system works with the original -code (in which case see below Alternate code section), is in -[herrmann2.alt.c](herrmann2.alt.c). +code, is the alternate version. See the README.md for details. ## [2001/kev](2001/kev/kev.c) ([README.md](2001/kev/README.md])) -Cody slowed down the ball -just a tad as it went too fast for the speed at which the paddles move even when -holding down the movement keys. +Cody slowed down the ball just a tad as it went too fast for the speed at which +the paddles move even when holding down the movement keys. -Cody provided an alternate -version which lets you use the arrow keys on your keyboard instead of the more -awkward '`,`' and '`.`'. +Cody also provided an alternate version which lets you use the arrow keys on +your keyboard instead of the more awkward '`,`' and '`.`'. ## [2001/westley](2001/westley/westley.c) ([README.md](2001/westley/README.md])) @@ -857,32 +929,30 @@ awkward '`,`' and '`.`'. Cody added the script [westley.sh](westley.sh) to automate a heap of commands that we, the IOCCC judges, suggested, as well as some additional ones that he thought would be fun. -These include the below sort and punch card versions that he added, described -below, based on the author's remarks. - +He also provided the sort and punch card versions that he added, described in +the README.md, based on the author's remarks. ## [2004/arachnid](2004/arachnid/arachnid.c) ([README.md](2004/arachnid/README.md])) -Cody added an alternate -version which allows those like himself used to `h`, `j`, `k` and `l` movement -keys to not get lost. Non rogue players, vi users and Dvorak typists are invited -to get lost (or use the original version)! +Cody added an alternate version which allows those like himself used to `h`, +`j`, `k` and `l` movement keys to not get lost. Non rogue players, vi users and +Dvorak typists are invited to get lost (or use the original version)! :-) ## [2004/burley](2004/burley/burley.c) ([README.md](2004/burley/README.md])) -Cody fixed this to compile with -clang which requires that the first arg of main() be an int and the remaining -args to be a `char **`. He notes that he could not get the entry to work with -gcc before the fix and it does not work with clang either; see -[/bugs.md](/bugs.md) for information here. +Cody fixed this to compile with clang which requires that the first arg of +main() be an int and the remaining args to be a `char **`. Compile but not work. +It did not work before the fix when compiled with gcc and it does not work with +clang either. See [/bugs.md](/bugs.md) for information. ## [2004/gavin](2004/gavin/gavin.c) ([README.md](2004/gavin/README.md])) Yusuke provided the `kernel` and `fs.tar` files which can be used if you cannot normally use this entry. Instead of -generating the files just use the files provided, found under the [img/](img/) +generating the files just use the files provided, found under the +[img/](2004/gavin/img/) directory. Note that the `img/fs.tar` extracts into `fs/` so you will have to fix the tarball; this is done this way to prevent extraction from the entry directory overwriting the files and causing `make clobber` to wipe some of them @@ -891,34 +961,33 @@ out. ## [2004/kopczynski](2004/kopczynski/kopczynski.c) ([README.md](2004/kopczynski/README.md])) -Cody reported that this -entry cannot be optimised by the compiler if it's to work. He also added the -file [kopczynski-a](kopczynski-a) to demonstrate what happens when art more like -a letter is fed to the program. +Cody reported that this entry cannot be optimised by the compiler if it's to +work. He also added the file [kopczynski-a](kopczynski-a) to demonstrate what +happens when art more like a letter is fed to the program. ## [2004/newbern](2004/newbern/newbern.c) ([README.md](2004/newbern/README.md])) -Cody and Landon individually -fixed this to work with clang. Cody then turned the second arg to main, which -clang requires to be a `char **`, to be not the same name as a function defined -earlier in the code and to use that variable which `main()` used. +Cody and Landon individually fixed this to work with clang. Cody then turned the +second arg to main, which clang requires to be a `char **`, to be not the same +name as a function defined earlier in the code and to use that variable which +`main()` used. ## [2005/aidan](2005/aidan/aidan.c) ([README.md](2005/aidan/README.md])) -Cody fixed the test script, -described by the author in their remarks, to refer to the proper compiled -program (it's hardcoded) which was never done which broke the script. +Cody fixed the test script, described by the author in their remarks, to refer +to the proper compiled program (it's hardcoded). This had never been done and it +broke the script. ## [2005/anon](2005/anon/anon.c) ([README.md](2005/anon/README.md])) The author stated that if `stty` does not work right on your system you can -compile it differently so that the program does not use `stty`. -Cody set this up so that one -need not update the [Makefile](Makefile). There's a fun thing here that will be -mentioned below as well. +compile it differently so that the program does not use `stty`. Cody set this +up so that one need not update the [Makefile](Makefile). There's a fun command +that Cody provided, to try, to see a feature that the author implemented. See +the README.md for details. ## [2005/giljade](2005/giljade/giljade.c) ([README.md](2005/giljade/README.md])) @@ -940,8 +1009,10 @@ completely works with the original version ([giljade.alt.c](giljade.alt.c)), not the one that will compile with clang ([giljade.c](giljade.c)). The alternate version, which will not compile with clang, is the only one that passes the self-tests. If your compiler does not have the defect that clang has about arg -types to `main()` see the Alternate code section below at least for the -self-test feature. +types to `main()` see the Alternate code section in the README.md file at least +for the self-test feature. + +For much more details on the problem see [bugs.md](/bugs.md). ## [2005/mynx](2005/mynx/mynx.c) ([README.md](2005/mynx/README.md])) @@ -950,125 +1021,110 @@ Cody fixed this so that the [configure](source/configure) script (which is not needed but part of the entry) would work with compilers that have by default `-Werror` like clang in macOS. -Cody also added the alt code which does scan for https. Futile, maybe, -in which case just enjoy it for what it was. +Cody also added the alt code which does scan for https. Futile, maybe, based on +how https is set up, in which case just enjoy it for what it was. But there +might be some command line that will let it work that way. ## [2006/birken](2006/birken/birken.c) ([README.md](2006/birken/README.md])) -Cody fixed a segfault in -macOS with this entry. The problem was a missing `+1` for strlen() with -malloc(). This prevented it from working. +Cody fixed a segfault in macOS with this entry. The problem was a missing `+1` +for strlen() with malloc(). This prevented it from working. ## [2006/borsanyi](2006/borsanyi/borsanyi.c) ([README.md](2006/borsanyi/README.md])) -Cody fixed (the Makefile) -under some systems where the `lpthread` was not implicitly linked in. +Cody fixed (the Makefile) under some systems where the `lpthread` was not +implicitly linked in. ## [2006/monge](2006/monge/monge.c) ([README.md](2006/monge/README.md])) -Cody pointed out that -without SDL1 (**not** SDL2) this will not link because two functions that are -used were removed from SDL2. Since SDL1 is still available and since changing -the code to use SDL2 would be more complicated he decided to change the Makefile -to use `sdl-config` not `sdl2-config`. Nevertheless he points out that the entry -requires x86/x86_64 CPUs. Without it it might very well segfault (for instance -it segfaulted on his MacBook Pro with the M1 chip). +Cody pointed out that without SDL1 (**not** SDL2) this will not link because two +functions that are used were removed from SDL2. Since SDL1 is still available +and since changing the code to use SDL2 would be more complicated he decided to +change the Makefile to use `sdl-config` not `sdl2-config`. Nevertheless he +points out that the entry requires x86/x86_64 CPUs. Without it it might very +well segfault (for instance it segfaulted on his MacBook Pro with the M1 chip). ## [2006/night](2006/night/night.c) ([README.md](2006/night/README.md])) -As Cody is a lost :-) `vim` -user he took the author's remarks to add support back for arrow keys. +As Cody is a lost :-) `vim` user he took the author's remarks to add support +back for arrow keys. ## [2006/sloane](2006/sloane/sloane.c) ([README.md](2006/sloane/README.md])) -Cody fixed this entry to -work with clang which is stricter on the type of args to main(). Curiously -although clang requires the types of args to be strictly correct it allows for -only one arg which he made it as the second arg was not used and this allows for -a closer match to the original format of the entry. He also made sure that the -Makefile links in `libm` as not all systems do this by default. Since the author -suggested that the lack of certain `#include`s might break the program in some -systems he added `-include ...` to the Makefile as well. +Cody fixed this entry to work with clang which is stricter on the type of args +to main(). Curiously although clang requires the types of args to be strictly +correct it allows for only one arg which he made it as the second arg was not +used and this allows for a closer match to the original format of the entry. He +also made sure that the Makefile links in `libm` as not all systems do this by +default. Since the author suggested that the lack of certain `#include`s might +break the program in some systems he added `-include ...` to the Makefile as +well. -The [alternate version](2006/sloane/sloane.alt.c) was provided by Cody. +The [alternate version](2006/sloane/sloane.alt.c), which allows one to see what +is going on in modern systems, was provided by Cody. ## [2006/toledo2](2006/toledo2/toledo2.c) ([README.md](2006/toledo2/README.md])) -Cody fixed a segfault in -this program which was making it fail to work under macOS - it did not seem to -be a problem under linux, at least not fedora. The problem was wrong variable -types - implicit `int`s instead of `FILE *`s. It now works with both macOS and -linux. +Cody fixed a segfault in this program which was making it fail to work under +macOS - it did not seem to be a problem under linux, at least not fedora. The +problem was wrong variable types - implicit `int`s instead of `FILE *`s. It now +works with both macOS and linux. ## [2006/toledo3](2006/toledo3/toledo3.c) ([README.md](2006/toledo3/README.md])) -Cody fixed a crash and a -display problem in this entry so that it now works in modern (64-bit) systems. -The problem was that it relied on 32-bits so some `int`s were changed to -`long`s. At this time we don't have an easy way to test this theory but it might -be that using `-m32` would let this work in 32-bit systems. - - -## [2011/eastman](2011/eastman/eastman.c) ([README.md](2011/eastman/README.md])) - -Cody tested this with -[macOS Ventura](https://www.apple.com/macos/ventura/) with the M1 chip for -the author (who tested [OS X 10.7 -(Lion)](https://en.wikipedia.org/wiki/OS_X_Lion) and [fedora -10](https://fedoraproject.org/wiki/Releases/10/FeatureList)) and reported that -it works fine. +Cody fixed a crash and a display problem in this entry so that it now works in +modern (64-bit) systems. The crash appears to only occur in macOS but the fix +lets it work in both linux and macOS. The problem was that it relied on 32-bits +so some `int`s were changed to `long`s. The display problem might or might not +have been a problem in linux with the old `int`s but this is no longer known. ## [2011/goren](2011/goren/goren.c) ([README.md](2011/goren/README.md])) -Cody fixed this for macOS. -Before the fix it segfaulted. It worked fine under linux. After fixing it it was -noticed that the author stated it does not work for 64-bit so it was then tested -as a 32-bit binary (linux) and 64-bit binary (linux, macOS) and both work. It -was fixed by changing some `int`s to `long`s. +Cody fixed this for macOS. Before the fix it segfaulted. It worked fine under +linux. After fixing it it was noticed that the author stated it does not work +for 64-bit so it was then tested as a 32-bit binary (linux) and 64-bit binary +(linux, macOS) and both work. It was fixed by changing some `int`s to `long`s +and now it does work with 64-bit systems as well as 32-bit systems. + +Cody added the following words of wisdom: 'this is not a pipe'. ## [2011/richards](2011/richards/richards.c) ([README.md](2011/richards/README.md])) -Cody fixed a minor problem -that showed up in both linux and macOS. He notes however that as of this time -this entry does not work with macOS. See [bugs.md](/bugs.md) for more details. +Cody fixed a minor problem that showed up in both linux and macOS. He notes +however that as of this time this entry does not work properly with macOS. See +[bugs.md](/bugs.md) for more details. ## [2011/vik](2011/vik/vik.c) ([README.md](2011/vik/README.md])) -Cody, though he feels -slightly sick :-), added a version for Windows based on the author's comments -(along with looking up the function for the right header file). To build try the -alt rule of the Makefile. +Cody, though he feels slightly sick :-), added a version for Windows based on +the author's comments (along with looking up the function for the right header +file). To build try the alt rule of the Makefile. ## [2012/kang](2012/kang/kang.c) ([README.md](2012/kang/README.md])) -Cody changed the code to -accept the proper German for four 'vier' where before it was spelt with the -sound of V (fier not vier). But was this a bug or a feature? He's on the fence -here but he went ahead and did it anyway as it seems useful. - - -## [2012/tromp](2012/tromp/tromp.c) ([README.md](2012/tromp/README.md])) - -XXX - no thank you text was found - XXX +Cody changed the code to accept the proper German for four 'vier' where before +it was spelt with the sound of V (fier not vier). But was this a bug or a +feature? He's on the fence here but he went ahead and did it anyway as it seems +useful and not having it fixed somewhat lessens the usability, especially for +those who know German and expect it to be 'vier' :-) ## [2012/vik](2012/vik/vik.c) ([README.md](2012/vik/README.md])) Based on the author's description it should be able to get this entry to work -for Windows. With his instructions [Cody Boone -Ferguson](/winners.html#Cody_Boone_Ferguson) added the alternate version that -does this for the few who might use Windows. +for Windows. With his instructions Cody added the alternate version that does +this for the few who might use Windows. We're not sure whether we want to thank Cody or not for this :-) and he's not sure if he wants to be thanked either :-) but we appreciate it nonetheless. @@ -1076,43 +1132,33 @@ sure if he wants to be thanked either :-) but we appreciate it nonetheless. ## [2013/birken](2013/birken/birken.c) ([README.md](2013/birken/README.md])) -Along with the [demo.sh](demo.sh), based on the author's recommendations, -Cody added an alternate -version for this entry which allows one to control how fast the painting is -done. +Along with the [demo.sh](2013/birken/demo.sh), based on the author's +recommendations, Cody added an alternate version for this entry which allows one +to control how fast the painting is done. ## [2013/cable3](2013/cable3/cable3.c) ([README.md](2013/cable3/README.md])) -Cody fixed this to compile -with modern systems. The problems were that `localtime()` is used differently -and `time.h` being included (with SDL2 in macOS - but see below) there was a -conflicting function type. This appeared to be a problem with macOS and only -when SDL2 was included (but which as noted next it cannot be). The other problem -is that this entry uses SDL functions that were removed from SDL2 so the -Makefile has to use `sdl-config` and not `sdl2-config`. Thus the removal of -localtime probably does not have to be done after all. He left it there in case -some implementation of SDL1 also has this problem. +Cody fixed this to compile with modern systems. The problems were that +`localtime()` is used differently and `time.h` being included (with SDL2 in +macOS - but see below) there was a conflicting function type. This appeared to +be a problem with macOS and only when SDL2 was included (but which as noted next +it cannot be). The other problem is that this entry uses SDL functions that were +removed from SDL2 so the Makefile has to use `sdl-config` and not `sdl2-config`. +This means that to be strictly technical, the removal of `localtime()` is not +necessary but this change was left in place anyway. ## [2014/maffiodo1](2014/maffiodo1/maffiodo1.c) ([README.md](2014/maffiodo1/README.md])) -Cody fixed the build for -this entry: it does not require SDL2 but SDL1 so there were linking errors. - - -## [2014/vik](2014/vik/vik.c) ([README.md](2014/vik/README.md])) - -NOTE: In 2020 Cody found a -minor bug when working on his [Enigma machine entry](../../2020/ferguson2); see -his [README.md](../../2020/ferguson2/README.md) for details (search for `vik`). +Cody fixed the build for this entry: it does not require SDL2 but SDL1 so there +were linking errors. ## [2015/endoh3](2015/endoh3/prog.c) ([README.md](2015/endoh3/README.md])) -The author, Yusuke, supplied the additional -source files, which Cody -added to the repo for us. He wrote on his [analysis of the +The author, Yusuke, supplied the additional source files, which Cody added to +the repo for us. He wrote on his [analysis of the entry](https://mame-github-io.translate.goog/ioccc-ja-spoilers/2015/endoh3.html?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp) that there are others as well but we don't seem to have them and he didn't provide them on his page. We've not yet contacted him for a copy but we will in @@ -1121,51 +1167,39 @@ time. ## [2015/yang](2015/yang/prog.c) ([README.md](2015/yang/README.md])) -Cody fixed an unfortunate -typo in the Makefile that was preventing some of the files from compiling -properly, trying instead to compile already compiled code. +Cody fixed an unfortunate typo in the Makefile that was preventing some of the +files from compiling properly, trying instead to compile already compiled code. -## [2018/poikola](2018/poikola/prog.c) ([README.md](2018/poikola/README.md])) - -NOTE: some have reported that Terminal.app in macOS does not work and one might -need a different terminal emulator like that from -[XQuartz](https://www.xquartz.org) but [Cody Boone -Ferguson](/winners.html#Cody_Boone_Ferguson) reported that this works fine in -macOS Ventura with Terminal.app. YMMV of course. - ## [2019/ciura](2019/ciura/prog.c) ([README.md](2019/ciura/README.md])) -Cody fixed invalid bytes -error in `tr` in the scripts. He notes that at least on his systems (macOS and -fedora linux) the alternative languages do not work. Perhaps that is the wrong -locale or it's unable to come up with perfect pangrams but one will not get -errors now (it did not work before the fixes either). +Cody fixed invalid bytes error in `tr` in the scripts. He notes that at least on +his systems (macOS and fedora linux) the alternative languages do not work. +Perhaps that is the wrong locale or it's unable to come up with perfect pangrams +but one will not get errors now (it did not work before the fixes either). ## [2019/diels-grabsch1](2019/diels-grabsch1/prog.c) ([README.md](2019/diels-grabsch1/README.md])) -Cody made the author's -statement that the entry compiles cleanly true by fixing `warning: a function -declaration without a prototype is deprecated in all versions of C ` (in -main()). Not strictly necessary but if he's making fixes he might as well. Thank -you Cody! +Cody made the author's statement that the entry compiles cleanly true by fixing +`warning: a function declaration without a prototype is deprecated in all +versions of C ` (in main()). Not strictly necessary but if he's making fixes he +might as well. ## [2019/diels-grabsch2](2019/diels-grabsch2/prog.c) ([README.md](2019/diels-grabsch2/README.md])) -Cody made the author's -statement that the entry compiles cleanly true by fixing `warning: a function -declaration without a prototype is deprecated in all versions of C` (in -main()). Not strictly necessary but if he's making fixes he might as well. Thank -you Cody! +Cody made the author's statement that the entry compiles cleanly true by fixing +`warning: a function declaration without a prototype is deprecated in all +versions of C` (in main()). Not strictly necessary but if he's making fixes he +might as well. ## [2019/karns](2019/karns/prog.c) ([README.md](2019/karns/README.md])) -Cody reported that with `-O` -level > 0 this program segfaults (sometimes?). He's not sure why as it worked -fine before on the same systems tested but `-O0` appears to fix the problem in -both macOS and linux. Perhaps this is the problem that the author reported where -it sometimes segfaults but Cody did not try debugging it. +Cody reported that with `-O` level > 0 this program segfaults (sometimes?). He's +not sure why as it worked fine before on the same systems tested but `-O0` +appears to fix the problem in both macOS and linux. Perhaps this is the problem +that the author reported where it sometimes segfaults but Cody did not try +debugging it yet.