6 Commits
Author SHA1 Message Date
Cody Boone Ferguson e8d868e0ed Additional fix for 1989/fubar
My original fix no longer worked, at least with clang in some systems,
because of more strictness in the compiler wrt implicit ints. As the
code does not use the Makefile but rather 'cc' (and in an unusual way)
'main()' now has an explicit int.

Also, what was previously documented as a bug to be fixed has been
changed to INABIAF as it was documented already. Thus it should not be
fixed. In fact the judges originally noted that if one specifies the
triggering input they should expect an infinite loop and compilation
failure.
2024-06-21 08:41:32 -07:00
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 51790b6a94 Make 1989/fubar more like original
There's no need to have the 'cc' macro have 'int ' before main. Instead
have CSILENCE include '-Wno-implicit-int'.
2024-01-11 09:03:02 -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 d2a42f42e8 Move 1988-2004 entries into subdirs
We we move 1988-2004 entries from all of a year's winning entries
in a single directory to each winner being in their own sub-directory
under the given year directory.
2022-09-18 23:37:49 -07:00