5 Commits
Author SHA1 Message Date
Cody Boone Ferguson d91bced2b8 Fix funny problem in 1989/fubar
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.
2024-01-14 05:28:07 -08:00
Cody Boone Ferguson 92a6682216 Make 1989/fubar/fubar.sh use bash
Fixed for ShellCheck as well.

The if [ .. ] was changed to if [[ .. ]] and this was done in the C code
as well.
2024-01-11 09:10:10 -08:00
Cody Boone Ferguson 9d63c37f49 Get 1989 entries to compile
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.
2023-03-06 09:04:46 -08:00
Landon Curt Noll 7c47ed381b fix 1989/fubar/fubar.sh, remove fubar.orig.c 2023-02-21 17:57:32 -08:00
Landon Curt Noll 880172e2f4 restore missing 1989/fubar/fubar.sh 2023-02-21 17:54:47 -08:00