Instead of hiding the source code in an opaque compressed
tarball, we copy a src tree into a build tree.
Improved Makefile, .gitignore and README.md as well.
Some systems need it to link in libm. Fedora comes to mind as an
example; macOS has no problem with it though running this entry under
macOS is another matter entirely.
In years < 2001 (with the exception of ferguson2/) that still have
reference to *.hint files they have been changed to README.md with the
following exception: in 1998/dorssel there was a dorssel.hint2. This was
changed to dorssel.hint since the dorssel.hint was changed to README.md
a while back. The references to dorssel.hint2 were changed to without
the 2.
There was an out of date reference in faq.html file to a .hint file as
well that was updated to README.md; the dorssel2.hint in years.html was
changed to the new name.
With that the only files that have to be updated are those that are >=
2001. I still have to check for hint.* however.
The example commands in the judges' comments had some problems that gave
an error message when running them.
I have also figured out the apparent problem with macOS in the command
under the try section being:
echo "Quartz glyph jocks vend, fix, BMW." | compress | ./btoa | ./jaw
But it's not actually a problem. It uses perror() and under macOS with
errno == 0 it shows:
Undefined error: 0
whereas linux shows 'Success'. So it's not actually a problem with the
entry at all. In fact the condition that triggers that call is the same
in both linux and macOS.
I've updated bugs.md to note this and I also updated the README.md to
note it (and to refer to the bugs.md file for more details).
The thank you to me is because I missed it earlier on when I fixed the
scripts, simple though the fixes were.
In the README.md I explained the difference in case someone wishes to
change the fgets() version back to gets(). I decided to not make it an
alt version as it was discussed that usually there should not be an alt
version.
The segfault has been fixed when EOF is sent to the program (causing
fgets() to return NULL).
Since fgets() is far safer than gets() and since the gets() version will
intersperse the warning and the first line of output I have changed the
alt version to be the original (fixed to compile with modern compilers)
and the tbr is the one with fgets().
This is so that the warning about gets() is not interspersed with the
initial output of the program (see below). I do want to note that if one
sends EOF it will segfault so to exit one should do ctrl-c (for
instance) (exit never worked). I will look at fixing that fault later on
to match the original code but this is good for now. When fixed (low
priority though) I will consider making the gets() version the alt but
probably not (I guess time will tell).
As for the interspersed output it looks like:
$ warning: this program uses gets(), which is unsafe.
# cursor is here
At the cursor I can either hit enter to get another prompt or I can
input a command but this is not immediately obvious.
Updated .gitignore to have tbr.alt.