In some cases if one were to modify the C code (possibly the same with
the script) in certain ways the program would fail to work even after
changing the code back. Trying to figure out what to put in bugs.md and
on a hunch, changing the fubar.sh script (in particular the ex(1) part)
remedies the problem (or so it seems from the various tests I have
performed including some that caused a problem). In particular:
--- i/1989/fubar/fubar.sh
+++ w/1989/fubar/fubar.sh
@@ -7,13 +7,12 @@ if [[ $# -ne 1 ]]; then
exit 1
fi
# run/compile it
rm -f ouroboros.c x1 x
-ex - <<EOF
-r fubar.c
+ex fubar.c <<EOF
8,9j
w ouroboros.c
EOF
chmod +x ouroboros.c
The C code was also changed to make it even more like the original code.
There were some which cannot be compiled under clang. One entry we used
a patch from Yusuke Endoh to get the entry to compile; thank you Yusuke
for your assistance! Another one we used a patch from Yusuke (thank
you!) but I further fixed it so that it would work with clang. It had to
be done: IOCCC Tetris has to work! This was done by changing the
environment arg to main() to be a char * in main() itself rather than a
char **. Using a char ** in main() third arg got it to compile but only
one key worked with clang so I changed it to be not the third argument
but a regular char * in main(). **a (third arg) evaluated correctly but
*a[1] and onward was actually part of the environment. Again IOCCC
Tetris has to work!
I also fixed fubar to work which took a few tweaks.
README.md files were also updated.