6 Commits
Author SHA1 Message Date
Cody Boone Ferguson aec0f0ca64 Add int before register in 1998/schweikh2
That is in main(). It works now and it might be implicit but just in
case clang ever has a problem with this it should now be satisfied.
2023-11-25 10:39:16 -08:00
Cody Boone Ferguson e1f617bb15 Fixes in 1998/schweikh2
There were a number of problems in the README.md that were fixed. A big
one was in usage where it said you could run the program and then input
a number. Although one could certainly go through that action it would
have no effect. Not entering a number at the command line does something
different (in a way different) from specifying a number.

Also the historical notes were updated to be more consistent and
hopefully clearer than before.

Since the author called the program yarng (see README.md for why this
is) the Makefile now creates a symlink to it, rather than forcing users
to go back and forth as the author gives example uses as well. The to
use and try sections now also use yarng. Running make clobber (from make
clean) will remove the symlink.

The .gitignore file was updated: added yarng.

The thanks-for-fixes.md file was updated slightly for the above changes,
particularly the historical remarks, linking indeed to the historical
remarks in the README.md file.
2023-10-14 02:22:33 -07:00
Cody Boone Ferguson 44a8d76cc0 Make my 1998/schweikh2 fix more like original 2023-10-13 09:33:56 -07:00
Cody Boone Ferguson 2028d9c0b3 Fix internal gcc error in 1998/schweikh2
(Note that it used to be that some compilers had a problem with the
original source but now some compilers have a problem with the C
pre-processed code and in particular with the #line macro and this
commit addresses this problem.)

A funny problem occurred when compiling with gcc: an internal compiler
error:

    :10:16: warning: type defaults to 'int' in declaration of 'zero' [-Wimplicit-int]
    : In function 'main':
    :12:1: warning: missing terminating " character
    :12:19: internal compiler error: invalid built-in macro "__FILE__"

It now works with clang and gcc just as well. The alt source file was
removed as there is no need for it now. The fix was quite simple. The
string '"01\015"' had to be replaced with 'ONE(O(1,1,2,6,0,6))' and this
was actually what was in the original code in the archive and in the alt
code (which was removed as there is no need for it now though it
differed slightly from what is in the archive).

The trigraph was restored as the Makefile already had the -trigraphs
option forced in CFLAGS.

Note that the README.md file has had the judges' remarks changed in such
a way that there is a historical note as at the time of judging it was
the original code that had a problem with some compilers whereas now
some compilers have a problem with the modified code (or C pre-processed
code). These details are put in a new subsection 'Historical remarks'.
2023-07-06 07:38:40 -07:00
Landon Curt Noll 37b80374df fix 1998 Makefiles 2023-02-27 15:11:50 -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