Two things had to be done here to make the code look much more like the
original (though it is hardly discernible at first glance).
First thing was I redefined free() to be free() + the comma operator as
it was a binary expression error in modern systems (this fix was
provided by Yusuke Endoh).
The second one was an improvement to one of my earlier several fixes and
in particular the prevention of warnings that cannot be disabled at
compilation/linking/runtime (the latter of which can be interspersed
with the output of the program): gets() to fgets(). The way this was
done is redefining gets() to use fgets(). The second and third arg are
the same so it was possible to just redefine gets() to use fgets() but
gets() having one arg like the original function. It should be noticed
that the original code used fgets() in one case because it has to read
from a different FILE * than stdin so there still is a reference to
fgets() that is not part of the macros.
As part of the redefinition of INABIAF the NULL file protection was
removed. The bus error fix, the erroneous prototype to fopen() and the
fgets() fix are still applied as these allow the entry to work properly
(and without an obnoxious warning at compile, linking or runtime about
gets()).
In all versions the program would segfault if the file could not be
opened as it would write/close the NULL FILE *. Now it doesn't act on
the file unless f != NULL. If it is it just does the usual of writing
'Ok' to stdout.
The Makefile had -include stdio.h which made it fail to compile under
macOS (mismatch type of fopen()). I removed the prototype in the code.
I also made it use fgets() instead of gets() to make it safer.
My first 41st, 51st and 29th (all depending on the base) birthday
updates (possibly more will follow but this is not a certainty). All the
1990 entries now compile!
In one we used a patch from Yusuke Endoh (thank you Yusuke!) which we
credited him in the README and in another we used a tip from him (use
-ansi at the compiler line) to get the other to compile (again, thank
you Yusuke!). We fixed the others. In the case of 1990/tbr/tbr.c the
author had supplied a shorter version and we fixed that one too.
Added 1990/.gitignore which has the built files of 1990 so that after
doing `cd 1990 ; make all' running `git status .' will not show any
untracked files.
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.