6 Commits
Author SHA1 Message Date
Cody Boone Ferguson aaad5330a0 Improve fixes to 1990/dds
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.
2023-09-09 06:17:06 -07:00
Cody Boone Ferguson 6d64e78dc5 Undo NULL file protection in 1990/dds
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()).
2023-04-07 10:30:00 -07:00
Cody Boone Ferguson ce6af463e3 Fix segfault in 1990/dds
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.
2023-03-26 08:44:29 -07:00
Cody Boone Ferguson 5873c7cedc Fix fix on 1990/dds + make it use fgets()
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.
2023-03-26 08:40:32 -07:00
Cody Boone Ferguson 37fb84c37c All 1990 entries now compile!
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.
2023-02-14 03:08:25 -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