This was accidentally committed. Before looking more closely at the code
I was hoping to find via the debugger where m was set up with a specific
size. This turned out to not be necessary after looking at the code but
nevertheless I enabled debug symbols and disabled the optimiser but this
was supposed to be temporary.
In the case of 1992/gson it was not as simple to change it to use
fgets() due to how the char * is set up. First it's set to argv (see
README.md for the more correct details) and then it's set to h which
was of size 256. Since the program requires the input be from the
command line I simply changed the buffer size to ARG_MAX+1 (which might
already be more than enough).
Fixed formatting in README.md.
Changed in Makefile the og to ag to match the description (and in the
places where og was used in the README.md I changed it to ag).
.gitignore also now has ag not og.
Possibly typos were fixed but I'm not sure now.
I used a patch from Yusuke Endoh to get it to work with gcc. Due to the
different messages with different compilers it's expected that this
won't work with every compiler.
I provided a 'runme.sh' script to run the command in the correct way.
I made the entry use fgets() not gets().
I updated bugs.md pointing out that it does not work with clang and
alternative code is welcome.
There was only one call to gets() and one call to fgets(). gets() reads
from stdin so the fgets() call has to as well. But why was it using
gets() and not fgets()? My guess is because fgets() stores the final
newline which means that the output had extra lines. The entry was
relying on this string NOT having a newline printed after the line
matched! Having a newline in turn broke the generation of some output
like that of adhead.c. Thus if fgets() != NULL we trim off the trailing
newline first. This allows the entry and all generated code to compile
successfully (adhead.c ended up having a multi-line macro messed up
because of an empty line after the \ at the end of the line). Since
gets() does not store the final newline and since we trim that off the
code is functionally equivalent but now safer.
For Makefiles that have alt related rules, moved
the related rules under the alt rule section.
In some cases where there is no alt code,
removed alt rules and/or targets.
Simply the Makefile header.
Refer to the //www.ioccc.org/bugs.md URL (that will eventually exist).
Now using CC BY-SA 4.0 License to how you may share and adapt the
Makefile.
The main link was dead but looking at the Internet Wayback Machine I
found that he changed domains and it's still valid. One entry had a
different URL but with a quick check I could not determine that it had
anything to do with him so I changed it to his own domain (which I
verified is his).
The 2001/westley/.gitignore was also updated as it has other source
files that are generated by the commands in the try section.
In some files changed the formatting was fixed to be a proper markdown
file.
There were some typos including that some README.md files that linked to
/winners.html#Cody_Boone_Ferguson actually linked to the non-existent
file /years which obviously would not work.
I also added links to the rest of the places I have fixed entries (but
see below) and I did the same for Yusuke Endoh's fixes.
As well apparently one entry I thought he fixed to compile under modern
systems does not seem to so that entry will have to be revisited another
time. That entry was 1993/jonth.
Those are the main changes here if not all of them.
Since the third and fourth args of main() were being used as ints I have
made them ints inside main() as clang does not allow the second, third
or fourth args to main() to be anything but char **. An important note
(which the author noted but which I put in the Makefile as well as under
the 'To run:' section) is that the terminal must wrap at 80 columns in
order for this to work right. I had to shrink down the terminal size to
get to show that this change worked okay - it was the simplest way I
could think of to do it.
As was discussed with Landon this was a mistake even if it helped with
consistency. There was even a brilliant pun that was destroyed with that
commit which I think is worth pointing out:
cp README.md hill
./ant hill
in 1991/ant ... even if it's technically 'anthill'.
I hope that I got all links fixed in years.html and winners.html. As
well I tried to make sure I got all handles fixed in all/summary.txt.
Nevertheless these should be checked. For some handles they were never
updated (at least in the html files - though maybe summary.txt too, not
sure) in the first place so there was nothing to do.
Typo fixes like references to *.hint when it should be README.md. There
probably are others that need to be fixed but haven't been located yet.
Mostly formatting fixes but some typos were fixed as well. This commit
is being made now so I can roll back
ad04d21fda as it seems to have been a
mistake to do. Another way to more easily identify same authors will
have to be figured out, perhaps in future files that are yet to be
generated. This upcoming commit will hopefully not cause any problems
but if there are any they will be worked out.
Landon and I both came to the same conclusion that although the renaming
directories seemed to have been warranted in theory they shouldn't have
been renamed after all. This was briefly discussed in issue #3. Anyway
this is why different years are in this commit: to get them out of the
way and since they're only README.md files this seems okay to do.
There were many files renamed in this commit and I hope I got all the
references to the old names changed to the new names. To explain this
commit there were some older entries that had the wrong directory name:
not the surname but something else.
Very possibly there are other directories that need to be renamed and I
am actually aware of one right now but since it's in 2005 (which is
close to being worked on) I am not changing that now but just noting it:
2005/anon should be changed to 2005/anonymous (unless there's a very
good reason I am unaware of). But like I said since 2005 will be worked
on soon I have not touched it.
The Makefiles, .gitignore, the all/summary.txt, years.html and
winners.html files as well as the directories and the files under the
renamed directories have all been updated.
This is a rather big update and it might be that there are conflicts. If
so I will fix them. I will have to update 2005/anon later on to try and
prevent this from happening but very possibly there will be conflicts
here. It's also possible I missed some changes in years.html and/or
winners.html and/or summary/all.txt but I think I got them all. These
should be verified later on.
It appears that the archive contained the code
that was there before Leo's fix.
Moved Leo's note into the README.md file.
The alt code is now the pre-fixed code.
Restore absent-minded change of make all to make nathan.
Fix typos.
Fix formatting (the text in the sections is indented which makes it all
code blocks). This problem is probably because originally the file was
not README.md (though it was still considered markdown). Many other
README.md files have this problem which I will fix in time.
It has been deemed that this should be okay now so we decided to add the
code.
This required a minor change in 2020/ferguson2 which I have made here as
well in this commit.
In nathan.c there was also a typo fix but since it's not the original
entry (or any thing like it) it's okay to do this. This is actually the
subject of a discussion to be had on GitHub which I'll be addressing in
a bit.
In README.md there was also a typo fixed.