From 9fdeaf1098e9728e169a657f8700c2b58e33dda7 Mon Sep 17 00:00:00 2001
From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com>
Date: Wed, 24 Jul 2024 12:03:57 -0700
Subject: [PATCH] Fixes in entries of 1994
The manifest was updated for 1994/tvr. Rebuilt .entry.json and
index.html.
Bug status changed in 1994/tvr as well. The judges noted that it has an
incorrect result in some cases but the author actually noted this as a
feature so it should not be fixed. Other fixes/updates were made in the
bugs file as well.
A number of other entries of 1994 had minor fixes (formatting, links and
similar things).
---
1994/imc/README.md | 10 +-
1994/imc/index.html | 10 +-
1994/schnitzi/README.md | 19 ++--
1994/schnitzi/index.html | 18 +--
1994/shapiro/README.md | 26 +++--
1994/shapiro/index.html | 21 ++--
1994/tvr/.entry.json | 2 +-
1994/tvr/README.md | 8 +-
1994/tvr/index.html | 8 +-
1994/weisberg/README.md | 15 +--
1994/weisberg/index.html | 15 +--
bugs.html | 231 ++++++++++++++++++++-------------------
bugs.md | 92 ++++++++--------
13 files changed, 252 insertions(+), 223 deletions(-)
diff --git a/1994/imc/README.md b/1994/imc/README.md
index 094d4ef8b..e7c574445 100644
--- a/1994/imc/README.md
+++ b/1994/imc/README.md
@@ -8,10 +8,10 @@
## To use:
```
- ./imc [NUMBER]
+ ./imc number
```
-where `[NUMBER]` is an optional number. Default is 5.
+where `number` is an optional number. Default is 5.
## Try:
@@ -69,9 +69,9 @@ useful the exclusive-or operator was while writing function `s()`.
Here are the descriptions of the functions in the library:
-> o(n,a,q,d): makes a magic square of order n when n is odd and at least 3. where where
-> s(n,a,q,d): makes a magic square of order n when n equals 4.
-> e(n,a,q,d): makes a magic square of order n when n is even and at least 6.
+> `o(n,a,q,d)`: makes a magic square of order `n` when `n` is odd and at least 3.
+> `s(n,a,q,d)`: makes a magic square of order `n` when `n` equals 4.
+> `e(n,a,q,d)`: makes a magic square of order `n` when `n` is even and at least 6.
In the above, `a` (of type `int *`) points to an area of memory in which
the magic square will be stored and `q` (also of type `int *`) points to
diff --git a/1994/imc/index.html b/1994/imc/index.html
index 1bee28a90..f7230a372 100644
--- a/1994/imc/index.html
+++ b/1994/imc/index.html
@@ -410,8 +410,8 @@ Location: GB - United Kingdom of Great
To build:
make allTo use:
-
- ./imc [NUMBER][NUMBER] is an optional number. Default is 5.
+ ./imc numbernumber is an optional number. Default is 5.Try:
./try.shJudges’ remarks:
@@ -447,9 +447,9 @@ in obfuscated code! :-) Incidentally, I was surprised to find out how
useful the exclusive-or operator was while writing function s().
Here are the descriptions of the functions in the library:
-o(n,a,q,d): makes a magic square of order n when n is odd and at least 3.
+
-s(n,a,q,d): makes a magic square of order n when n equals 4.
-e(n,a,q,d): makes a magic square of order n when n is even and at least 6.
o(n,a,q,d): makes a magic square of ordernwhennis odd and at least 3.
+s(n,a,q,d): makes a magic square of ordernwhennequals 4.
+e(n,a,q,d): makes a magic square of ordernwhennis even and at least 6.
In the above, There are two alternate versions, one that has an increased buffer size and one
-that uses The current status of this entry is:a (of type int *) points to an area of memory in which
the magic square will be stored and q (also of type int *) points to
diff --git a/1994/schnitzi/README.md b/1994/schnitzi/README.md
index 691adee0e..6538862e1 100644
--- a/1994/schnitzi/README.md
+++ b/1994/schnitzi/README.md
@@ -5,8 +5,8 @@
```
There are two alternate versions, one that has an increased buffer size and one
-that uses `fgets()`; neither are completely functional.
-See below section bugs and (mis)features for details and the [alternate
+that uses `fgets()`; neither are completely functional. See below section [Bugs
+and (mis)features](#bugs-and-misfeatures) for details and the [Alternate
code](#alternate-code) section for how to use.
@@ -35,14 +35,19 @@ For more detailed information see [1994/schnitzi in bugs.html](../../bugs.html#1
## Alternate code:
+These alternate versions are for those who wish to help with getting the entry
+to use `fgets(3)`. See the
+FAQ on "[gets and fgets](../../faq.html#gets)"
+for why this is desired.
+
The first version, `schnitzi.alt.c`, uses `fgets(3)` but when fed its own code
-it will generate code that still uses `gets(3)`. What's more is it will not
-compile. Other functionality works fine.
+it will generate code that still uses `gets(3)`. What's more that code will not
+compile. Other functionality of the alt version works fine.
The second version, `schnitzi.alt2.c`, has an increased buffer size but when fed
-its own source code it will generate code that can compile but with the original
-buffer size. This is due to a comment which is explained in more detail in
-[1994/schnitzi in bugs.html](../../bugs.html#1994_schnitzi).
+its own source code it will generate code that, although it can compile but, it
+has the original buffer size. This is due to a comment which is explained in
+more detail in [1994/schnitzi in bugs.html](../../bugs.html#1994_schnitzi).
### Alternate build:
diff --git a/1994/schnitzi/index.html b/1994/schnitzi/index.html
index 5ac27fe1a..62cfba799 100644
--- a/1994/schnitzi/index.html
+++ b/1994/schnitzi/index.html
@@ -410,8 +410,8 @@ Location: US - United States of America
To build:
make allfgets(); neither are completely functional.
-See below section bugs and (mis)features for details and the alternate
+that uses fgets(); neither are completely functional. See below section Bugs
+and (mis)features for details and the Alternate
code section for how to use.Bugs and (Mis)features:
./try.sh
These alternate versions are for those who wish to help with getting the entry
+to use fgets(3). See the
+FAQ on “gets and fgets”
+for why this is desired.
The first version, schnitzi.alt.c, uses fgets(3) but when fed its own code
-it will generate code that still uses gets(3). What’s more is it will not
-compile. Other functionality works fine.
gets(3). What’s more that code will not
+compile. Other functionality of the alt version works fine.
The second version, schnitzi.alt2.c, has an increased buffer size but when fed
-its own source code it will generate code that can compile but with the original
-buffer size. This is due to a comment which is explained in more detail in
-1994/schnitzi in bugs.html.
make alt
The current status of this entry is:
-STATUS: missing file - please provide it
+
-STATUS: INABIAF - please DO NOT fixSTATUS: INABIAF - please DO NOT fix
+STATUS: missing file - please provide it
For more detailed information see 1994/shapiro in bugs.html.
This entry has many different levels of obfuscation, and yet the source file is self documenting. :-)
From time to time, run ps(1) and look at the new processes.
See shapiro.html for more information in the internals of this program.
-The file shapiro.alt.c contains a non-obfuscated version of
-this program. Note that this alt file is currently missing. See
-1994/shapiro in bugs.html for details.
If you want more information on the internals of this program, see +shapiro.html.
+The missing file shapiro.alt.c is an unobfuscated version of this program. See
+1994/shapiro in bugs.html.
The basic theme (pun) of this program is:
- "This time (everything) is not where it should be."
- ~~~~
+++“This time (everything) is not where it should be.”
+
If you want a greater challenge, don’t read any further: +just try to understand the program via the source.
+If you get stuck, come back and read below for additional hints and information.
My entry, shapiro.c, is mostly comments, formatted in the shape of a clock. If you strip out the comments and look at the code you will quickly realize that the comments were the important part and that diff --git a/1994/tvr/.entry.json b/1994/tvr/.entry.json index 9158ea542..14a2448ad 100644 --- a/1994/tvr/.entry.json +++ b/1994/tvr/.entry.json @@ -31,7 +31,7 @@ "OK_to_edit" : true, "display_as" : "c", "display_via_github" : true, - "entry_text" : "alternate source code" + "entry_text" : "less obfuscated source code" }, { "file_path" : "tvr.orig.c", diff --git a/1994/tvr/README.md b/1994/tvr/README.md index 66907ed87..d71969dd1 100644 --- a/1994/tvr/README.md +++ b/1994/tvr/README.md @@ -16,7 +16,7 @@ code](#alternate-code) below. The current status of this entry is: -> **STATUS: known bug - please help us fix** +> **STATUS: INABIAF - please DO NOT fix** For more detailed information see [1994/tvr in bugs.html](../../bugs.html#1994_tvr). @@ -47,11 +47,11 @@ just try to understand the program without looking at the Alternate code. If you get stuck, come back and look at the Alternate code. +The author provided us a less obfuscated version that might be of interest to some. + ### Alternate build: -The author provided us a less obfuscated version that might be of interest to some. - ``` make alt ``` @@ -152,7 +152,7 @@ and may confuse paging algorithms easily). This means that for 512x512 windows you will need 4M of memory. -### `colormapfile` +#### colormapfile This is the file from which program reads colors for screen `colormap`. The first line of the file must be a number between `3..254`. This informs the diff --git a/1994/tvr/index.html b/1994/tvr/index.html index 02af42f37..92e8bf649 100644 --- a/1994/tvr/index.html +++ b/1994/tvr/index.html @@ -417,7 +417,7 @@ code below.
The current status of this entry is:
-STATUS: known bug - please help us fix
+STATUS: INABIAF - please DO NOT fix
For more detailed information see 1994/tvr in bugs.html.
If you want a greater challenge, don’t read any further: just try to understand the program without looking at the Alternate code.
If you get stuck, come back and look at the Alternate code.
-The author provided us a less obfuscated version that might be of interest to some.
+ make alt
./tvr.alt altmode screensize/2 < colormapfile
@@ -497,7 +497,7 @@ parameter as shown above.
main memory or the machine will swap heavily (memory references are quite random
and may confuse paging algorithms easily). This means that for 512x512 windows
you will need 4M of memory.
-colormapfileThis is the file from which program reads colors for screen colormap. The
first line of the file must be a number between 3..254. This informs the
program how many colors there are to be expected. This is also the maximum
@@ -600,7 +600,7 @@ mono).
make all
-There is an alternate version that uses more memory. See alternate -code below for more details.
+There is an alternate build (same code, alternate build) that uses more memory. +See Alternate code below for more details.
./weisberg
./try.sh
If you have primes(1) installed you might also wish to try:
./primes.sh number
-where number is a positive number, defaulting to 15. The try.sh
-script will also do this.
where number is a positive number, defaulting to 15. The
+try.sh script will also try :-) and do
+this.
If you liked what you saw from the above program, and happen to -have some 512 Megabytes of virtual memory lying around with to do -something with you might try this version.
+have some 512 megabytes of virtual memory lying around with to do +something with you might try this build. make alt
The alternative version (weisberg.c +
The alternative build (weisberg.c
compiled to weisberg.alt) has never actually run
to completion. After running for close to a week it had reached somewhere around
250e6, when it became necessary to test the reboot feature (which worked
diff --git a/bugs.html b/bugs.html
index 01b211f41..2c78dc2fd 100644
--- a/bugs.html
+++ b/bugs.html
@@ -1362,15 +1362,19 @@ there.
Cody Boone Ferguson fixed this to compile
-with modern systems but the entry also used gets() which in some systems would
+with modern systems but the entry also used gets(3) which in some systems would
print out a warning along with the output of the program. Naturally it could
-also overflow long lines. Cody changed it to fgets() to prevent the display
-problem but this introduces another problem namely that newlines can be printed
-if the line length < 231.
Cody changed it to fgets(3) to prevent the display problem but this introduces
+another problem namely that newlines can be printed if the line length < 231.
This seems like a worthy compromise to not have messed up output and although it -would be ideal for it to never print a newline unless that’s the line itself it -might be tampering too much with the entry as it’s not a real problem and as a -one liner it’s already quite long.
+would be ideal for it to never print a newline (unless that’s the line itself) +it might be tampering too much with the entry to fix this problem, as it’s not a +real problem and as a one liner it’s already quite long. +See the
+FAQ on “gets and fgets”
+for more information on the change to fgets(3).
fgets(3).
writing this on 02 November 2023, only just noticed the author’s remarks and
will later on look at this if nobody takes up the challenge. More important work
like getting to a place that the next contest can run must be done first.
-Cody Boone Ferguson explains the magic of -how this entry works, which will be necessary if this entry is to be fixed, -below.
+Cody explains the magic of how this entry works, which will be necessary if this +entry is to be fixed, below.
You might wish to run the command:
make diff_orig_prog
to see what had to change for the buffer size, when looking at the below. Furthermore you will want to look at:
diff schnitzi.alt.c schnitzi.alt2.c
-as the fgets() version can compile it just can’t generate compilable code (let
-alone using fgets()) when fed itself (to reiterate, just changing the call to
+
as the fgets(3) version can compile it just can’t generate compilable code (let
+alone using fgets(3)) when fed itself (to reiterate, just changing the call to
fgets(3) does not mean it can compile and there’s a further problem in that
fgets(3) retains the newline whereas gets(3) does not). Nevertheless looking
at these commands will be of help to understand how it works.
fgets() failed to compile and it also used
and these are the bugs here.
The buffer size, when using gets() is still the same but as noted above the
original code has had a buffer size increase.
The real problem is with formatting the code. Take a look at the interesting
-comment as well as the int r=0,x,y=0 at the top of the file. If you look at
-each column go down that column you can see how it spells out the code! For
-instance the first column looks like:
i
+The real problem is with formatting the code. Take a look at the #include <stdio.h>, int r=0,x,y=0 and the interesting comment below it, at the top of
+the file.
+If you look at each column and go down that column you can see how it spells out
+the code! For instance the first column looks like:
+ #
+ i
n
c
l
@@ -1436,7 +1440,6 @@ instance the first column looks like:
>
If you join the lines you end up with:
#include <stdio.h>
-(well, you get include <stdio.h> but it ends up as #include <stdio.h>.)
If you look at column 25 which is the end of the word ‘mh111’ and you go down to
the next row you’ll see a 0 and if you go one row down another 0. This is the
buffer size, 100, for u! The column to the left is the same for the t
@@ -1446,10 +1449,10 @@ provide the correct input in comments or possibly by rearranging some of the
code (this was actually required to make the generated code compile at all when
changing the buffer size, see below).
Important points:
-Getting this entry to use fgets() is easy but the problem is you’re supposed
+
Getting this entry to use fgets(3) is easy but the problem is you’re supposed
to be able to feed the source to the program and the output of that will be
compilable. It however will create compiler errors. So it’s not just changing
-the code to get it to use fgets()! I (Cody) already did this before I noticed
+the code to get it to use fgets(3)! I (Cody) already did this before I noticed
the other part which is why I rolled that part back. I did increase the buffer
size but that only works on the original source.
To say just how sensitive this entry is: even a space, lack of space or a
@@ -1466,32 +1469,31 @@ compiled!
Information: 1994/shapiro/index.html
This program will likely crash if the source code file (by the name of the file
that’s compiled) cannot be opened in the directory it is run from.
-STATUS: missing file - please provide it
-Cody Boone Ferguson noted that the
-index.html file refers to an alternative version of the code that is not
-obfuscated but it is missing from the entry directory and the archive. Do you
-have this file?
-We would be grateful if you could provide it to us. If you can provide this
-file you might consider removing this entry from this file as well but if not
-we’ll take care of it.
Important reminder and a note about the -1 value check for getc():
-Cody Boone Ferguson fixed the code to not
-use -1 for the return value of getc(); this is important because EOF is
-NOT guaranteed to be -1 but rather any negative value. On systems where
-EOF != -1 the program would enter an infinite loop until the program crashed,
-by chance reads a -1 or was killed (it is for this same reason that 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<stdio.h> subsection 1 of the standard)).
+Cody fixed the code to not use -1 for the return value of getc(); this is
+important because EOF is NOT guaranteed to be -1 but rather any negative
+value. On systems where EOF != -1 the program would enter an infinite loop
+until the program crashed, by chance reads a -1 or was killed (it is for this
+same reason that 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<stdio.h> 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.
Since it works there is no need to fix this except for a challenge to yourself.
+STATUS: missing file - please provide it
+The index.html file refers to an alternate version of the code that is not
+obfuscated but it is missing from the entry directory and the archive. Do you
+have this file?
+We would be grateful if you could provide it to us. If you can provide this
+file you might consider removing this status from this file as well but if not
+we’ll take care of it.
1994/tvr
-STATUS: known bug - please help us fix
+STATUS: INABIAF - please DO NOT fix
Source code: 1994/tvr/tvr.c
Information: 1994/tvr/index.html
The judges said the following in their remarks:
@@ -1500,8 +1502,9 @@ if it checked for != EOF.
Mandelbrot/Julian sets correctly. Can you find the bug? Better still, can you
fix it without breaking something else?
-You are welcome to try and fix it and open a pull request, providing that it
-doesn’t break something else.
+However, the author stated that this is a feature so this should not be fixed.
+See also the other bugs the author mentioned that,
+as documented, are considered features.
1995
@@ -1510,7 +1513,7 @@ doesn’t break something else.
1995/cdua
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 1995/cdua/cdua.c
Information: 1995/cdua/index.html
This did not originally compile under macOS and after it did compile under
@@ -1524,7 +1527,7 @@ it calls getchar() via the pointer m. So this is a fea
1995/leo
-STATUS: known bug - please help us fix
+STATUS: known bug - please help us fix
Source code: 1995/leo/leo.c
Information: 1995/leo/index.html
The judges suggested that the following commands should result in output:
@@ -1542,7 +1545,7 @@ it would be good if it was fixed.
1995/savastio
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 1995/savastio/savastio.c
Information: 1995/savastio/index.html
This program expects a POSITIVE number. If you specify a negative number it will
@@ -1607,7 +1610,7 @@ almost be done except that some of the output of the
1996/jonth
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 1996/jonth/jonth.c
Information: 1996/jonth/index.html
If X is not running this program will very likely crash or do something funny.
@@ -1650,7 +1653,7 @@ to the page as well! You’ll have IOCCC fame for reviving a pootifier! :-)
1998/schnitzi
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 1998/schnitzi/schnitzi.c
Information: 1998/schnitzi/index.html
A point worth considering is that as the number passed into the program gets
@@ -1677,7 +1680,7 @@ is in the index.html file as something to try and ponder.
2000/dlowe
-STATUS: known bug - please help us fix
+STATUS: known bug - please help us fix
Source code: 2000/dlowe/dlowe.c
Information: 2000/dlowe/index.html
The author gives an example command:
@@ -1807,7 +1810,7 @@ on the stack at that point:
5
which might (?) suggest that the + operator is unimplemented. Unfortunately it
has been many years since I have used perl and I was never a guru either.
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
The author states that in perl < 5.6.0 there is a bug with a core dump in what
they said is in Perl_sv_upgrade. As this is documented it is not considered a
bug to be fixed. For the curious this will crash in macOS. Cody notes that the
@@ -1849,7 +1852,7 @@ of 92 warnings! Nonetheless neither works okay and both crash.
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2000/primenum/primenum.c
Information: 2000/primenum/index.html
This program does not do what you might think it does! Running it like:
@@ -1867,7 +1870,7 @@ make a pull request.
2000/rince
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2000/rince/rince.c
Information: 2000/rince/index.html
If DISPLAY is not set the program will very likely crash, do something strange
@@ -1881,7 +1884,7 @@ fire! :-) ).
2001/anonymous
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2001/anonymous/anonymous.c
Information: 2001/anonymous/index.html
Cody Boone Ferguson fixed this so that it
@@ -1900,7 +1903,7 @@ elves of Imladris :-(
2001/bellard
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
STATUS: doesn’t work with some platforms - please help us fix it
Source code: 2001/bellard/bellard.c
Information: 2001/bellard/index.html
@@ -1949,14 +1952,14 @@ before the fixes there.
2001/cheong
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2001/cheong/cheong.c
Information: 2001/cheong/index.html
This program will crash without an arg.
2001/dgbeards
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2001/dgbeards/dgbeards.c
Information: 2001/dgbeards/index.html
This program deliberately crashes if it loses (which is what it aims to do).
@@ -1968,7 +1971,7 @@ before the fixes there.
Information: 2001/herrmann1/index.html
The author referred to the file herrmann1.turing but it does not exist not even
in the archive. Do you have a copy? Please provide it!
-STATUS: known bug - please help us fix
+STATUS: known bug - please help us fix
There is also a bug in part. During compilation you’re supposed to see some
animation but this does not seem to work with modern gcc versions. It appears
that version 2.95 works but maybe others do as well. Do you have a fix? We would
@@ -1977,7 +1980,7 @@ appreciate your help!
2001/kev
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2001/kev/kev.c
Information: 2001/kev/index.html
Sometimes when one player presses q it will result in broken pipe on the other
@@ -1995,7 +1998,7 @@ set. In other words both have to be ASCII or EBCDIC - not one of each.
2001/ollinger
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2001/ollinger/ollinger.c
Information: 2001/ollinger/index.html
This program will very likely crash or do something unexpected if you do not
@@ -2011,7 +2014,7 @@ wanted to install it as a tool but this is missing.
2001/schweikh
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2001/schweikh/schweikh.c
Information: 2001/schweikh/index.html
The glob pattern must match the whole string. See the author’s comments for
@@ -2044,7 +2047,7 @@ it? Please provide it!
2001/williams
-STATUS: known bug - please help us fix
+STATUS: known bug - please help us fix
Source code: 2001/williams/williams.c
Information: 2001/williams/index.html
There seem to be a couple bugs at least in this entry. The first one is that
@@ -2179,13 +2182,13 @@ compile under clang. The following patch was applied:
gavin_files: boot.b lilo.conf prim gavin_install.txt
The current (Makefile was modified to try and
fit into the current IOCCC build environment.
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
See known features in the index.html for
things that are not bugs but documented (mis)features.
2004/jdalbec
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2004/jdalbec/jdalbec.c
Information: 2004/jdalbec/index.html
The author stated that:
@@ -2210,7 +2213,7 @@ things that are not bugs but documented (mis)features.
2004/sds
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2004/sds/sds.c
Information: 2004/sds/index.html
The generated code will very likely segfault or do something not intended if not
@@ -2223,7 +2226,7 @@ given the right args. See the index.html file for the correct syntax.
2005/anon
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2005/anon/anon.c
Information: 2005/anon/index.html
This program sometimes will create unsolvable puzzles :-) just to hook you.
@@ -2237,7 +2240,7 @@ dimensions. Try 100 100 100 for instance and see what happens!
2005/giljade
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2005/giljade/giljade.c
Information: 2005/giljade/index.html
This entry will very likely segfault or do something strange if the source code
@@ -2246,7 +2249,7 @@ does not exist.
2005/mikeash
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2005/mikeash/mikeash.c
Information: 2005/mikeash/index.html
The author states:
@@ -2280,7 +2283,7 @@ for running itself.
2005/mynx
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2005/mynx/mynx.c
Information: 2005/mynx/index.html
Cody Boone Ferguson notes that, though
@@ -2294,7 +2297,7 @@ website itself.
2005/sykes
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2005/sykes/sykes.c
Information: 2005/sykes/index.html
The author stated the below points of interest.
@@ -2335,7 +2338,7 @@ with at least computer.tofu input file:
2006/borsanyi
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2006/borsanyi/borsanyi.c
Information: 2006/borsanyi/index.html
The string specified must be <= 42 characters and may only consist of the
@@ -2344,7 +2347,7 @@ with possibly corrupt GIF files.
2006/hamre
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2006/hamre/hamre.c
Information: 2006/hamre/index.html
This program will likely crash or do something funny without an arg.
@@ -2363,12 +2366,12 @@ but you are welcome to try and fix it.
provide it as an additional alt version. Fixing this is very likely to be very
challenging and in some systems it will not be possible to fix but you are
welcome to try and fix it if you wish to!
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Incorrect formulas will ungracefully crash the program.
2006/stewart
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2006/stewart/stewart.c
Information: 2006/stewart/index.html
This program will likely crash or do something funny if the file cannot be
@@ -2376,7 +2379,7 @@ opened. The number of args is however checked.
2006/sykes1
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2006/sykes1/sykes1.c
Information: 2006/sykes1/index.html
The author stated:
@@ -2393,7 +2396,7 @@ opened. The number of args is however checked.
2006/toledo2
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2006/toledo2/toledo2.c
Information: 2006/toledo2/index.html
Cody Boone Ferguson fixed this program to
@@ -2440,7 +2443,7 @@ case-sensitive.
2011/borsanyi
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2011/borsanyi/borsanyi.c
Information: 2011/borsanyi/index.html
For a great amount of data points the program will crash, depending on your
@@ -2463,7 +2466,7 @@ bins at the edges.
instead being something else entirely. The Internet Wayback Machine, although it
archived it, did not load scripts. Do you know if the domain was moved? Do you
have an archive or mirror? Please provide us it! Thank you.
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
The author states the following:
Bad input (e.g. nonexistent files, non-numeric number of iterations, etc.)
@@ -2475,7 +2478,7 @@ tends to result in empty output.
2011/fredriksson
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2011/fredriksson/fredriksson.c
Information: 2011/fredriksson/index.html
The author stated that there are a number of features and limitations. As the
@@ -2485,7 +2488,7 @@ remarks instead.
2011/konno
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2011/konno/konno.c
Information: 2011/konno/index.html
This program will very likely crash or do something funny without an arg.
@@ -2654,7 +2657,7 @@ defined.
2011/vik
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2011/vik/vik.c
Information: 2011/vik/index.html
The author stated that the program will crash if no argument is passed to the
@@ -2668,7 +2671,7 @@ fire :-)
2012/blakely
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2012/blakely/blakely.c
Information: 2012/blakely/index.html
The author stated:
@@ -2677,7 +2680,7 @@ fire :-)
2012/deckmyn
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2012/deckmyn/deckmyn.c
Information: 2012/deckmyn/index.html
The author stated:
@@ -2710,7 +2713,7 @@ fire :-)
2012/dlowe
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2012/dlowe/dlowe.c
Information: 2012/dlowe/index.html
The author stated:
@@ -2724,7 +2727,7 @@ doesn’t make it possible to lock drawing to the display refresh rate.)
2012/tromp
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2012/tromp/tromp.c
Information: 2012/tromp/index.html
The author stated:
@@ -2745,7 +2748,7 @@ doesn’t make it possible to lock drawing to the display refresh rate.)
2012/vik
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2012/vik/vik.c
Information: 2012/vik/index.html
The author stated that the program will crash if no argument is passed to the
@@ -2761,7 +2764,7 @@ fire :-)
2013/cable2
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2013/cable2/cable2.c
Information: 2013/cable2/index.html
The author stated:
@@ -2781,7 +2784,7 @@ and endianness conversion would make the source too large for IOCCC rule 2).
2013/dlowe
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2013/dlowe/dlowe.c
Information: 2013/dlowe/index.html
This program will possibly crash or draw something strange with 0 args. Then
@@ -2800,7 +2803,7 @@ used.
2013/endoh1
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2013/endoh1/endoh1.c
Information: 2013/endoh1/index.html
From the author:
@@ -2816,7 +2819,7 @@ used.
2013/endoh3
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2013/endoh3/endoh3.c
Information: 2013/endoh3/index.html
From the author:
@@ -2829,14 +2832,14 @@ such as C2E2.
2013/endoh4
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2013/endoh4/endoh4.c
Information: 2013/endoh4/index.html
Invalid input files will very likely crash the program.
2013/hou
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2013/hou/hou.c
Information: 2013/hou/index.html
This program will not terminate on its own; you must kill hou (but not Qiming
@@ -2844,7 +2847,7 @@ Hou :-) ) yourself. This should not be fixed.
2013/mills
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2013/mills/mills.c
Information: 2013/mills/index.html
The author reminds us that if you kill the program you will have to wait a short
@@ -2861,7 +2864,7 @@ it out as a known limitation it is not a bug but a feature.
2014/maffiodo1
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2014/maffiodo1/prog.c
Information: 2014/maffiodo1/index.html
The author noted that in macOS the colours might be wrong. They gave a solution.
@@ -2885,14 +2888,14 @@ player become bigger, stay away from blocks!
2014/maffiodo2
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2014/maffiodo2/prog.c
Information: 2014/maffiodo2/index.html
This program will very likely crash if no arg is given.
2014/vik
-STATUS: known bug - please help us fix
+STATUS: known bug - please help us fix
Source code: 2014/vik/prog.c
Information: 2014/vik/index.html
Cody Boone Ferguson discovered a bug to do
@@ -2926,7 +2929,7 @@ rely on the entry as the below shows. One should be able to do:
2015/hou
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2015/hou/prog.c
Information: 2015/hou/index.html
The author stated:
@@ -2951,7 +2954,7 @@ result. Error messages become garbled, though.
2015/howe
-STATUS: known bug - please help us fix
+STATUS: known bug - please help us fix
The test scripts do not seem to work properly with bash but this would be ideal
as not all systems have a compatible shell (they assume a POSIX compliant
shell). One, with bash, might see:
@@ -2970,7 +2973,7 @@ because it is the same thing as the other, just updated to use prog.alt
2015/mills2
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2015/mills2/prog.c
Information: 2015/mills2/index.html
The program doesn’t look at the header of files so if it’s passed something hat
@@ -2979,7 +2982,7 @@ is not compressed data it’s likely to crash.
2015/schweikhardt
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2015/schweikhardt/prog.c
Information: 2015/schweikhardt/index.html
The program assumes that EOF is -1. This can be fixed but at this time it is
@@ -3012,7 +3015,7 @@ use 8 * sizeof(typ) bits per place. It does not work when CHA
2018/algmyr
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2018/algmyr/prog.c
Information: 2018/algmyr/index.html
The author wrote:
@@ -3031,7 +3034,7 @@ loop printing whitespace.
2018/hou
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2018/hou/prog.c
Information: 2018/hou/index.html
When you run it on a JSON file you will see something like:
@@ -3046,7 +3049,7 @@ fixing the syntax error in the generated ioccc.json file.
2018/mills
-STATUS: known bug - please help us fix
+STATUS: known bug - please help us fix
Source code: 2018/mills/prog.c
Information: 2018/mills/index.html
After exiting the program (with ctrl-e) if you try running it again you will
@@ -3056,7 +3059,7 @@ likely see:
where [] is the cursor. When this happens if you hit enter (this is necessary
or else it’ll happen again) and then exit again (ctrl-e) and run prog again
it’ll be okay.
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
The author stated that if you make a typo it can happen that the boot loader can
crash and halt. If this is the case type ctrl-e to quit the emulator and try
again.
@@ -3071,7 +3074,7 @@ in the case of compiled code it won’t be executable).
2018/vokes
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2018/vokes/prog.c
Information: 2018/vokes/index.html
The author wrote the following:
@@ -3121,7 +3124,7 @@ this program has nothing to do with a hand.
2019/adamovsky
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2019/adamovsky/prog.c
Information: 2019/adamovsky/index.html
Certain input can crash this program. The file
@@ -3129,7 +3132,7 @@ this program has nothing to do with a hand.
2019/burton
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2019/burton/prog.c
Information: 2019/burton/index.html
The author pointed out that some implementations of wc(1) show different
@@ -3137,7 +3140,7 @@ values but his implementation matches that of macOS and FreeBSD.
2019/ciura
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2019/ciura/prog.c
Information: 2019/ciura/index.html
Cody Boone Ferguson fixed the scripts so
@@ -3169,7 +3172,7 @@ ideal if this was not the case.
2019/duble
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2019/duble/prog.c
Information: 2019/duble/index.html
There are two things to be aware of with this entry.
@@ -3198,7 +3201,7 @@ in the directory:
2019/endoh
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2019/endoh/prog.c
Information: 2019/endoh/index.html
As a backtrace quine this entry is SUPPOSED to segfault so this should not be
@@ -3206,7 +3209,7 @@ touched either.
2019/karns
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2019/karns/prog.c
Information: 2019/karns/index.html
The author stated the following:
@@ -3236,7 +3239,7 @@ touched either.
2019/lynn
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2019/lynn/prog.c
Information: 2019/lynn/index.html
The author wrote that there are a number of differences from what one might
@@ -3246,7 +3249,7 @@ remarks in the sections Syntax and
2019/mills
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2019/mills/prog.c
Information: 2019/mills/index.html
The author wrote that if you decide to change networks or use a different input
@@ -3266,7 +3269,7 @@ a crash.
2019/poikola
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2019/poikola/prog.c
Information: 2019/poikola/index.html
This program will not validate input so it might fail or get stuck if invoked
@@ -3275,7 +3278,7 @@ erroneously.
2019/yang
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2019/yang/prog.c
Information: 2019/yang/index.html
The author noted that if the program runs out of memory it is likely to crash.
@@ -3290,7 +3293,7 @@ ignored except line feeds (preserved) and tabs (expanded to 8 spaces).’
2020/burton
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2020/burton/prog.c
Information: 2020/burton/index.html
This entry is known to crash if no arg is specified. Although easy to fix it is
@@ -3301,7 +3304,7 @@ either. But can you figure out why this happens?
2020/carlini
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2020/carlini/prog.c
Information: 2020/carlini/index.html
The author stated that bad things happen if the entered move is outside of the
@@ -3315,7 +3318,7 @@ move.
2020/ferguson1
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2020/ferguson1/prog.c
Information: 2020/ferguson1/index.html
There are some things that might appear to be bugs but are actually features or
@@ -3325,7 +3328,7 @@ things that are misinterpreted as bugs. See the
2020/giles
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2020/giles/prog.c
Information: 2020/giles/index.html
The author noted that the program only supports WAV files that have
@@ -3334,7 +3337,7 @@ audio channels.
2020/otterness
-STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2020/otterness/prog.c
Information: 2020/otterness/index.html
The author listed the following limitations:
diff --git a/bugs.md b/bugs.md
index f3f6d7360..42d1a6c10 100644
--- a/bugs.md
+++ b/bugs.md
@@ -1395,16 +1395,22 @@ there.
### Information: [1994/ldb/index.html](1994/ldb/index.html)
[Cody Boone Ferguson](authors.html#Cody_Boone_Ferguson) fixed this to compile
-with modern systems but the entry also used `gets()` which in some systems would
+with modern systems but the entry also used `gets(3)` which in some systems would
print out a warning along with the output of the program. Naturally it could
-also overflow long lines. Cody changed it to `fgets()` to prevent the display
-problem but this introduces another problem namely that newlines can be printed
-if the line length < 231.
+also overflow long lines, of which there are many, though that is more
+considered a feature, not a bug, as it was documented by the author.
+
+Cody changed it to `fgets(3)` to prevent the display problem but this introduces
+another problem namely that newlines can be printed if the line length < 231.
This seems like a worthy compromise to not have messed up output and although it
-would be ideal for it to never print a newline unless that's the line itself it
-might be tampering too much with the entry as it's not a real problem and as a
-one liner it's already quite long.
+would be ideal for it to never print a newline (unless that's the line itself)
+it might be tampering too much with the entry to fix this problem, as it's not a
+real problem and as a one liner it's already quite long.
+
+See the
+FAQ on "[gets and fgets](faq.html#gets)"
+for more information on the change to `fgets(3)`.
@@ -1433,9 +1439,8 @@ writing this on 02 November 2023, only just noticed the author's remarks and
will later on look at this if nobody takes up the challenge. More important work
like getting to a place that the next contest can run must be done first.
-[Cody Boone Ferguson](authors.html#Cody_Boone_Ferguson) explains the magic of
-how this entry works, which will be necessary if this entry is to be fixed,
-below.
+Cody explains the magic of how this entry works, which will be necessary if this
+entry is to be fixed, below.
You might wish to run the command:
@@ -1451,8 +1456,8 @@ Furthermore you will want to look at:
diff schnitzi.alt.c schnitzi.alt2.c
```
-as the `fgets()` version can compile it just can't generate compilable code (let
-alone using `fgets()`) when fed itself (to reiterate, just changing the call to
+as the `fgets(3)` version can compile it just can't generate compilable code (let
+alone using `fgets(3)`) when fed itself (to reiterate, just changing the call to
`fgets(3)` does not mean it can compile and there's a further problem in that
`fgets(3)` retains the newline whereas `gets(3)` does not). Nevertheless looking
at these commands will be of help to understand how it works.
@@ -1470,13 +1475,16 @@ and these are the bugs here.
The buffer size, when using `gets()` is still the same but as noted above the
original code has had a buffer size increase.
-The real problem is with formatting the code. Take a look at the interesting
-comment as well as the `int r=0,x,y=0` at the top of the file. If you look at
-each column go down that column you can see how it spells out the code! For
-instance the first column looks like:
+The real problem is with formatting the code. Take a look at the `#include
+`, `int r=0,x,y=0` and the interesting comment below it, at the top of
+the file.
+
+If you look at each column and go down that column you can see how it spells out
+the code! For instance the first column looks like:
```
+ #
i
n
c
@@ -1503,8 +1511,6 @@ If you join the lines you end up with:
#include
```
-(well, you get `include ` but it ends up as `#include `.)
-
If you look at column 25 which is the end of the word 'mh111' and you go down to
the next row you'll see a 0 and if you go one row down another 0. This is the
buffer size, 100, for `u`! The column to the left is the same for the `t`
@@ -1517,10 +1523,10 @@ changing the buffer size, see below).
### Important points:
-Getting this entry to use `fgets()` is easy but the problem is you're supposed
+Getting this entry to use `fgets(3)` is easy but the problem is you're supposed
to be able to feed the source to the program and the output of that will be
compilable. It however will create compiler errors. So it's not just changing
-the code to get it to use fgets()! I (Cody) already did this before I noticed
+the code to get it to use `fgets(3)`! I (Cody) already did this before I noticed
the other part which is why I rolled that part back. I did increase the buffer
size but that only works on the original source.
@@ -1547,29 +1553,15 @@ compiled!
This program will likely crash if the source code file (by the name of the file
that's compiled) cannot be opened in the directory it is run from.
-
-### STATUS: missing file - please provide it
-
-[Cody Boone Ferguson](authors.html#Cody_Boone_Ferguson) noted that the
-index.html file refers to an alternative version of the code that is not
-obfuscated but it is missing from the entry directory and the archive. Do you
-have this file?
-
-We would be grateful if you could provide it to us. If you can provide this
-file you might consider removing this entry from this file as well but if not
-we'll take care of it.
-
### Important reminder and a note about the `-1` value check for `getc()`:
-[Cody Boone Ferguson](authors.html#Cody_Boone_Ferguson) fixed the code to not
-use `-1` for the return value of `getc()`; this is important because `EOF` is
-**NOT** guaranteed to be `-1` but rather any negative value. On systems where
-`EOF != -1` the program would enter an infinite loop until the program crashed,
-by chance reads a `-1` or was killed (it is for this same reason that 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)).
-
+Cody fixed the code to not use `-1` for the return value of `getc()`; this is
+important because `EOF` is **NOT** guaranteed to be `-1` but rather any negative
+value. On systems where `EOF != -1` the program would enter an infinite loop
+until the program crashed, by chance reads a `-1` or was killed (it is for this
+same reason that 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
@@ -1581,11 +1573,22 @@ if it checked for `!= EOF`.
Since it works there is no need to fix this except for a challenge to yourself.
+### STATUS: missing file - please provide it
+
+The index.html file refers to an alternate version of the code that is not
+obfuscated but it is missing from the entry directory and the archive. Do you
+have this file?
+
+We would be grateful if you could provide it to us. If you can provide this
+file you might consider removing this status from this file as well but if not
+we'll take care of it.
+
+
## 1994/tvr
-### STATUS: known bug - please help us fix
+### STATUS: INABIAF - please **DO NOT** fix
### Source code: [1994/tvr/tvr.c](%%REPO_URL%%/1994/tvr/tvr.c)
### Information: [1994/tvr/index.html](1994/tvr/index.html)
@@ -1597,8 +1600,9 @@ The judges said the following in their remarks:
Mandelbrot/Julian sets correctly. Can you find the bug? Better still, can you
fix it without breaking something else?
-You are welcome to try and fix it and open a pull request, providing that it
-doesn't break something else.
+However, the author stated that this is a feature so this should not be fixed.
+See also the other [bugs](1994/tvr/index.html#bugs) the author mentioned that,
+as documented, are considered features.