429 Commits
Author SHA1 Message Date
Cody Boone Ferguson aedc966d6d Improve fgets() fix to 1992/lush
gets() is now defined as the right fgets() call.

This required the use of #line 1 as the entry uses compiler messages to
work right. That's also why clang will not work with this entry.
2023-09-10 06:43:49 -07:00
Cody Boone Ferguson 2173be58f2 Slight improvement to my fix of 1992/adrian
Originally there was one call to gets() and one call to fgets(). The
gets() was changed to the fgets() to prevent warnings including (in
macOS) warnings interspersed with output of the program.

But to make it more like the original gets() has been redefined to use
fgets(). However this does not mean that we can make the macro do a &&
... to strip off the newline as doing this will make a different file
fail to generate properly (I might look at that later as it would be
nicer if it looked exactly like before). Thus the 'Y[strlen(Y)-1]='\0';'
is still there in the body of the while loop at least for now.

The README.md was updated to remove the address - just have name and
country.

Updated thanks-for-fixes.md for the above change as well as some typo
fixes elsewhere.
2023-09-10 06:25:44 -07:00
Cody Boone Ferguson ce0d387ccd Add a INABIAF to 1992/kivinen/README.md
This should already be in bugs.md but it's worth putting it in the
README.md file too as most people will probably not look at it when
looking at entries.
2023-09-07 08:55:57 -07:00
Cody Boone Ferguson 1d86daf19a Change LIBS to LDFLAGS in Makefiles
This is to make it more standard which further allows one to run make on
some other source code, say because they want to try and fix an entry
but forget to update the Makefile. Or if they're the author they can not
worry about it in some cases. But since LDFLAGS is the standard way it
seems better to have the LIBS variable in the Makefile be LDFLAGS.

Maybe there is a reason to not have this and I'm happy to close this in
that case but it does seem better this way so I'm doing this commit.
2023-07-10 03:33:53 -07:00
Cody Boone Ferguson b6330673cc Restore silencing warnings in macOS
As besides the entries that are not supposed to compile/cannot compile
due to architectural limitations all the entries can compile in macOS
(though some do not work - yet(? I have plans to work on more later)) it
was not necessary to not silence the warnings after all as the entries
that don't work will be easy to identify ('they don't work' :-) ) so I
can just do make CSILENCE= all in the directory of those entries which
solves the problem I had originally thought of.

Some of the Makefiles have retained other changes I had to make
yesterday to get the entries to work with clang in linux but most of
them were either not changed or were made better with the rollback of
the commit that originally silenced warnings.

Now work on silencing warnings for linux can be done.
2023-07-08 05:05:50 -07:00
Cody Boone Ferguson d89305ef3b Mass .gitignore update for .orig.c files
Due to the fact we now have .orig.c files and thus the possibility of
winner.orig or prog.orig being built I have updated all the .gitignore
files so that these files ignored. This was done with the following
shell commands, for reference:

    for i in $(find 19* 200* 201[0123] -mindepth 2 -maxdepth 2 -name .gitignore) ; do echo $(dirname "$i"|sed -e 's,[0-9]\{4\}/,,g').orig >> "$i"; done
    for i in $(find 201[4-9] 2020 -mindepth 2 -maxdepth 2 -name .gitignore) ; do echo prog.orig >> "$i"; done

and the two commands is because it was only in 2014 that the winning
entries were renamed to prog so prog.orig is the correct glob.
2023-07-08 04:39:42 -07:00
Landon Curt Noll 2aa99f0644 revert commit d8425bb767 2023-07-07 05:36:08 -07:00
Landon Curt Noll d8425bb767 silence warnings under macOS for cc, clang and gcc
Used the following script to check for warnings
not silenced via ${CSILENCE}:

```sh
find ???? -mindepth 1 -maxdepth 1 -type d | while read dir; do
(cd "$dir"; echo =-=-= "$dir" =-=-= ; csilence -v 1 clobber all ; echo ; csilence -v 1 clobber alt)
done 2>&1 | less
```
2023-07-07 01:11:22 -07:00
Landon Curt Noll 2ba12ecc3c restore *.orig.c to each entry
Under each yyyy/dir there is a file of the form '*.orig.c'
containing the original source code, or as close as we can
get to the original source code.
2023-07-06 21:49:38 -07:00
Cody Boone Ferguson 990e5a00f5 Add workaround ARG_MAX undefined in 1992/gson 2023-07-06 07:49:55 -07:00
Cody Boone Ferguson aa1dc7d7bb Alternative code -> Alternate code in 1992/westley 2023-06-10 10:40:22 -07:00
Cody Boone Ferguson f01e41735c Minor adjustment to b4b4ff8bc9 2023-06-10 10:32:35 -07:00
Cody Boone Ferguson b4b4ff8bc9 Minor adjustment to 1992/westley INABIAF status 2023-06-10 10:24:20 -07:00
Cody Boone Ferguson dfabb616f2 Change INABIAF status in 1992/westley
It was an error to fix the segfault without enough args in 1992/westley
as it does not in fact affect the usability of the program and that's
the only time a segfault should be fixed except by anyone but the author
themselves.

This commit required also changing the alt code (that I added based on
the author's remarks) as well as the README.md, bugs.md and
thanks-for-fixes.md.
2023-06-10 07:24:02 -07:00
Landon Curt Noll ac41f07a83 move fix thanks a file, update top level html links, rename CONTRIBUTING.md
The fix thank you's have been moved from `README.md` to
`thanks-for-fixes.md`.

**WARNING**: Some mistakes may have been made in doing this.
We presume later changes by others will correct any issues.

The `CONTRIBUTING.md` was renamed `how-to-enter.md`.

A 3rd line of links was added to top level html such as
`contact.html`, `index.html`, `judges.html`, `winners.html`,
and `years.html`.

Improved blank line use in a number (but not all) `README.md` files.
2023-06-06 16:59:53 -07:00
Cody Boone Ferguson 7dbb9fc2fe Change 'tri-graphs' to 'trigraphs' - it's one word
The is a file excluded from this commit that has had the change because
there are other changes but the file is incomplete. That file will be
committed when the fixes are complete which will happen at a later date.
2023-06-05 05:52:57 -07:00
Landon Curt Noll 5927927e51 Add .id to all winning entries 2023-05-13 11:45:33 +10:00
Landon Curt Noll c69445d067 Add .top and .year files
This will be used by tools that will build the web site
and tools that form JSON files (such as `.winner.json').
2023-05-12 20:10:38 +10:00
Cody Boone Ferguson 0e3acd6739 sgit -e 's/[[:space:]]$//g' '*Makefile'
At the request of Landon all Makefiles have had trailing spaces removed.
The request also included README.md files but this is more complicated
as some lines have to end in spaces in order to force line breaks. For
Makefiles it's fine though. Tested the Makefiles by doing 'make clobber
all everything' from the root directory and all appears to be fine. This
testing is important because depending on how this process (removal of
trailing spaces) was done it could break the Makefiles; for instance
trying something like:

    sgit -e 's/\s.*$//g' '*Makefile'

would rather break the Makefiles. This makes sense to anyone who knows
my script (and obviously sed :-) ) as long as they're not also tired but
I AM tired and so it was the first thing I tried (without thinking of
course ... though I had first thought of the correct way :-) ).

But what happens to the universes (yes I at least want to believe in the
multiverse theory and I hope it's true :-) ) when trailing spaces are
removed? :-)

As it turns out the only Makefiles touched were:

	modified:   1987/wall/Makefile
	modified:   1992/adrian/Makefile
	modified:   1994/ldb/Makefile
	modified:   2000/anderson/Makefile
	modified:   2001/anonymous/Makefile
	modified:   2001/bellard/Makefile
	modified:   2004/kopczynski/Makefile
	modified:   2015/howe/spoiler/Makefile
	modified:   2019/karns/Makefile

and most of them were my fault.
2023-05-11 02:28:26 -07:00
Cody Boone Ferguson 66231b2150 Remove 'America' (A) from 'USA' :-)
This to make the country code consistent with mkiocccentry (and I guess
international standard country codes).

This affects many README.md files and (for one line) winners.csv.
2023-04-22 04:21:38 -07:00
Cody Boone Ferguson 9be23f34e1 Update 1992/imc/.gitignore 2023-04-17 10:19:17 -07:00
Cody Boone Ferguson cf4437c508 Update 1992 winning entries' README.md files
Format and typo fixes.
2023-04-14 06:24:32 -07:00
Cody Boone Ferguson 9e323d8392 Remove colon at end of award in README.md files
As in

    sgit -e '1s/:$//g' '*README.md'
2023-04-11 08:43:41 -07:00
Cody Boone Ferguson 4bf3f302cb 'comments' -> 'remarks' in all README.md files
As in

    sgit -e 's/\([Aa]uthor.*\)comments/\1remarks/g' -e 's/\([Jj]udge.*\)comments/\1remarks/g' '*README.md'
2023-04-10 11:01:39 -07:00
Landon Curt Noll 5ee254e24c improve make clobber for 1992/adrian 2023-04-09 15:16:25 -07:00
Landon Curt Noll ec393de8dc fix .gitignore for 1992/adrian 2023-04-09 14:57:58 -07:00
Cody Boone Ferguson e55337e6f0 Format fixes in 1992/nathan/README.md 2023-04-09 11:58:27 -07:00
Cody Boone Ferguson ce3e179933 Format fixes in 1992/marangon/README.md 2023-04-09 11:53:13 -07:00
Cody Boone Ferguson f26d853bab Format fixes in 1992/lush/README.md 2023-04-09 11:49:52 -07:00
Cody Boone Ferguson e41586bcdd Update 1992/kivinen
When I started the program I noticed that it ends very quickly. Yusuke
Endoh provided a patch that calls usleep(). I felt that this was too
slow so I added a macro at the Makefile, Z, default 15000, so one can
reconfigure it. Thank you Yusuke!

I also noticed that when starting the game it moves towards the right
and then exits. Yusuke pointed out that if you click the mouse it moves
back towards the centre. I added this to the bugs.md file. Thank you
Yusuke!

Fixed formatting of README.md file.
2023-04-09 11:44:43 -07:00
Cody Boone Ferguson ec1862c2e2 Format fixes in 1992/imc/README.md 2023-04-09 11:20:58 -07:00
Cody Boone Ferguson 111910480e Updates to 1992/gson (new script, README.md fixes)
Add the obfuscated script that the author provided to make a dictionary
file (with example use) as mkdict.sh.

Moved some of the judges' comments to new try section.

Format fixes.

Updated .gitignore with file name (from example command of mkdict.sh).
2023-04-09 11:07:03 -07:00
Cody Boone Ferguson ddf8c5be37 Updates to 1992/buzzard.2
Rename buzzard.2.README buzzard.2.README.md (perhaps buzzard.2.md would
be better?).

Format fixes in README.md.
2023-04-09 10:55:03 -07:00
Cody Boone Ferguson 6cb76a5b78 Format fixes in 1992/vern/README.md 2023-04-09 10:37:16 -07:00
Cody Boone Ferguson 80f357bb22 Format fixes in 1992/westley/README.md 2023-04-09 09:46:50 -07:00
Cody Boone Ferguson 48559c1f16 Update 1992/buzzard.1
Format fixes in README.md.

Note that it'll crash without two args both in bugs.md and README.md.
2023-04-09 09:32:03 -07:00
Cody Boone Ferguson 460443fa48 Format fix 1992/ant/README.md 2023-04-09 09:18:36 -07:00
Cody Boone Ferguson e5aeea8c9c Formatting and typo fixes in 1992/albert/README.md 2023-04-09 09:15:57 -07:00
Cody Boone Ferguson 5fcc5c34ac Remove 1992/adrian alt code + format README.md
The alt code is not needed as all it does is use gets() instead of
fgets() and it was decided it's best to not have this.
2023-04-09 09:09:15 -07:00
Cody Boone Ferguson af1028c4c7 Remove 1992/lush alt code
Instead refer to the 1992 archive (tarball).
2023-04-08 03:23:45 -07:00
Cody Boone Ferguson 4fbc411535 Add note about alt code of 1992/lush (gets())
This code should probably be deleted but that can happen another time.
This can be considered a reminder to do this when I have the time.
2023-04-07 11:08:02 -07:00
Cody Boone Ferguson b9e3cc4357 Reword note about gets() in 1992/gson 2023-04-07 11:07:06 -07:00
Cody Boone Ferguson 6186baa8eb Reword note about fgets() in 1992/adrian 2023-04-07 11:06:00 -07:00
Cody Boone Ferguson 8a4ad6ca3c Minor fix in wording in 1992/imc/README.md 2023-04-07 04:18:43 -07:00
Cody Boone Ferguson 70f08cc681 Add lush.alt to 1992/lush/.gitignore 2023-04-06 06:10:08 -07:00
Cody Boone Ferguson 06a5665f5d Make alt code for gets() / fgets() changes
As both Landon and I have been wondering if changing entries to use
fgets() is bordering on tampering with entries I decided to make the
original (sometimes bug fixed) versions (using gets()) alt code. I had
originally started to make the fgets() version of each entry the alt but
since the fgets() versions can handle input better and since some also
fixed bugs (see below) I decided to make the original version the alt
code (this also is how it is for other entries).

There were some exceptions here. If the change also fixed some crashes
or other bugs outside of the gets() to fgets() conversion I did not
bother to make an alt version. An example is 1992/dds. In some cases the
alt code does have bug fixes in which case they were added.

Updated the Makefiles and .gitignore files as well for the alt target
and the new files (compiled and in the case of 1992/adrian additional
source files in the Makefile alt rule).

This should solve the problem observed by Landon and me. It wouldn't be
a problem to change it so the alt version is the one that uses fgets()
but I think that might be the wrong choice.

In some entries I altogether avoided changing to fgets() say if the
author notes it uses gets() (in one case even providing a version that
uses fgets()). In some cases using fgets() introduces a bug so those are
also not changed.

As for 1990/tbr there's a strong reason for not having the fgets()
version being the alt. In macOS in particular (in linux - or maybe gcc,
not sure - it shows a warning at linker time) it will mess up the first
line of output in a potentially confusing way. For instance:

    $ ./tbr.alt
    $ warning: this program uses gets(), which is unsafe.
    # nothing here, what to do?

And that touches on another issue of making the alt version the one that
uses gets(): the warnings that can be alarming during compilation,
linking and (in the case of macOS) runtime.

Not all entries should be or can be changed to fgets() but some can and
it's warranted for these reasons. More will possibly happen in the
future.
2023-04-05 05:22:35 -07:00
Cody Boone Ferguson 89860e7b71 Clarify gets()/fgets()/ARG_MAX in 1992/gson
By accident I stated that I changed this entry to not use gets() but
instead fgets(). This is unfortunately not true because of the way
gets() is used. I have now made it (I hope) a bit clearer. I also
pointed out that it's theoretically safe. Since it uses gets() which
comes from stdin ARG_MAX should be relevant. Thus I made the buffer size
ARG_MAX+1. But something I am not so clear on is whether or not ARG_MAX
is the entire command line or a single argument. Looking did not help
here as some say one thing and others say the other. Doing xargs
--show-limits and also checking the value of ARG_MAX suggests that it's
for the entire command but I don't know for sure of that. Nevertheless
it is safer than it was if not completely safe.
2023-04-03 12:29:51 -07:00
Cody Boone Ferguson e09f677b37 Mass typo fix (all README.md and Makefiles)
As in

    sgit -e 's/the terms this license/the terms of this license/g' '*/Makefile' '*/README.md'
2023-04-02 09:27:13 -07:00
Cody Boone Ferguson e805f41d34 Mass fixes to headers in README.md files
There were many many README.md files with the wrong heading level for
different sections. These have been changed.

To help go through the changes it should be noted I used sgit and also
here is what is changed:

The 'Try', 'To build' and 'To run' lines have two '#'s. Some had one and
others had three.

An exception is that in 1984/anonymous/README.md for the alternative
code that had three '#'s. This is not consistent yet and it might be
that only two are desired. But for now that one at least has three.
2023-03-31 06:43:59 -07:00
Cody Boone Ferguson db90bf6a86 Minor updates to several README.md files
Just some formatting fixes and in some cases add links to XQuartz for
macOS Mountain Lion and beyond. More entries (probably many more) have
to have that link added but those will be found and fixed in time.
2023-03-31 06:37:18 -07:00