4 Commits
Author SHA1 Message Date
Cody Boone Ferguson 19fdd5f944 Make my fix to 1993/vanb more like original
Now it's just a single line difference: main() itself that calls O5()
(which used to be main() via -DO5=main).

This was accomplished by using the -include stdio.h in the Makefile and
then removing (at the top of the file) the int O3. Instead main() (which
used to be O5() as noted and which had three args) has it as a char **.
Now since O3 was at file scope before it was 0 so rather than casting O3
in main() to an int the call to O5() just uses 0 in that place. The
moving the arg to main() is done simply because O5() (which again was
main()) also has 3 args.

Some versions of clang object to four args to main() but they allow 0,
2 or 3 so that's fine.
2023-10-22 13:02:57 -07:00
Cody Boone Ferguson 8d9955f6b3 Fix 1993/vanb for clang
The problem was the usual suspect where any arg other than the first was
not a char **. Instead O5 is no longer defined to be main() and it is
its own function now which main() calls. The third arg starts out as a
global variable that is passed into the function (which is recursive).

Now the output is correct.
2023-03-23 16:04:38 -07:00
Cody Boone Ferguson 9875ef3e61 Get most 1993 entries to compile
With the exception of lmfjyh which relies on a bug in gcc (that was
fixed in gcc 2.3.3) we have got all 1993 entries to compile under linux.
A couple will not compile under macOS and this is because gcc under
macOS is actually clang despite what many might have you believe (see
below) which is more strict about the second and third arguments of
main().

In a couple entries we used patches from Yusuke Endoh. Thank you Yusuke!
In others we (that is I aka Cody / @xexyl) fixed them (myself). There
was a question to be answered about whether to add #include lines to the
files themselves or add -includes to the Makefile. Since there are
pending changes to the Makefiles which will affect the CFLAGS (and
there's no CINCLUDE variable in these Makefiles yet) we opted for
updating the source files themselves.

One more note about the Makefiles: the 1993/Makefile was modified but I
added an XXX note to it to indicate that it should be fixed once the
other Makefiles are fixed. Specifically it now allows from 1993 one
to run `make' and compile the entries. The comment has what it used to
read and should be but for now is not because of a problem in the other
Makefiles.

As far as gcc under macOS as you can see it is not actually gcc but
clang:

    $ /usr/bin/gcc -v 2>&1|head -n 1
    Apple clang version 14.0.0 (clang-1400.0.29.202)

If you were to use clang -v under linux you might see something like:

    $ clang -v 2>&1|head -n 1
    clang version 15.0.7 (Fedora 15.0.7-1.fc37)

and with gcc:

    $ gcc --version |head -n 1
    gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)

If you do by chance have gcc compiled and installed under macOS these
entries will probably work there.
2023-02-17 05:15:31 -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