Updates and improvements to 2001/westley

There are a number of improvements in this commit but first: added
missing file status to bugs.md and also note on gets() being used (but
see below).

Format fixes in README.md.

As for improvements the following things were done.

Move the 'try' commands to new script westley.sh. It includes
additional commands and shows what each one is before executing it.

Added westley.sort.c which is based on the author's suggestion of sort
-b which always sorts the input. This was actually westley3.c in the try
section but this has been removed or replaced.

Added westley.punch.c which is also based on the author's comments - it
shows the punch card always. This was also added to westley.sh. Why did
I name it westley.punch.c ? Besides the fact it shows punch cards
there's a silly remark/joke in the README.md about it that answers it. :-)

These updates seem worthy of Brian Westley's final entry and a most
wondrous entry at that!
This commit is contained in:
Cody Boone Ferguson committed 2023-04-24 06:44:49 -07:00
1 parent b894b0abc9
commit 56e7dc3e88
7 files changed
+213 -57

No files matched your search

+16
View File
@@ -1449,6 +1449,22 @@ The author said that they compiled it with [gcc version
a certain gcc version is necessary but it might be helpful to download and
compile that version to test it.
## [2001/westley](2001/westley/westley.c) ([README.md](2001/westley/README.md))
## STATUS: missing files - please provide them
The author referred to the file `card.gif` but this appears to be missing. Do
you have it? If you do please provide it and thank you!
## STATUS: uses gets() - change to fgets() if possible (in some cases getline() works)
The code also uses `gets()` which, without redirecting stderr to `/dev/null`,
can show an obnoxious warning every time it's run. In the script
[2001/westley/westley.sh](2001/westley/westley.sh) that [Cody Boone
Ferguson](/winners.html#Cody_Boone_Ferguson) added stderr is in fact redirected
to `/dev/null` to prevent this warning but it would probably be better if it was
changed to use `fgets()` (which he might end up doing).
# 2002
There was no IOCCC in 2002.