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.
Well 'first target' :-) but git commit likes to have no more than 50
columns for the summary.
The problem: if one did for instance
make CC=clang clobber all
they would get something like:
Makefile:89: *** recipe commences before first target. Stop.
because of a missing \ at the end of a line in the middle of setting (or
appending to) CSILENCE.
The clang issue does have an alternate version which I made a while back
but I added a note earlier in the file that most likely it'll be needed
for clang - depends on the default CFLAGS possibly but for macOS at
least it does not work. I never tested linux but I probably should.
This is to prevent annoying warnings about gets() - as changing this one
to use fgets() would be very complicated. This can be done for other
entries that use gets() that are either complicated to change or it's
decided to not change them. It won't prevent linker warnings (like with
gcc) but it'll prevent runtime warnings that often get interspersed with
the output of the program sometimes in confusing ways.
The question to ponder is what happens with files that are not BASIC
programs.
I also fixed some typos and made things (I hope) a bit clearer in the
alternate code section.
I noticed that I unfortunately fixed two segfaults that should not have
been fixed: if the input file cannot be opened for reading or the output
file cannot be opened for writing this program will crash. Changed both
dds.c and dds.alt.c (which I added to work with clang). The original fix
that allows this entry to work at all (segfaulted always) remains in
both versions.
Updated README.md and bugs.md. In bugs.md I also added a note that the
compiled code uses gets() not fgets() - whatever it might be worth.
The dds.c now does return system(q-6); and the dds.alt.c does the return
system("make a");. This way those who have gcc (more people than not
most likely) they can use it like originally designed. Those with clang
can use the alt target in almost the same way only instead of a.out use
just a.
Updated the README>md to explain everything.
Updated the .gitignore with some globs that should have been there all
along ('a' and 'dds.alt' being the ones that are new).
This was a fun one! There were up to three segfaults fixed and with
clang the generated file could not be compiled. The latter part was
fixed with (unfortunately) something of a hack. I explain below and in
the README.md how to change that part to use just cc if you have gcc
(macOS gcc is actually clang).
The first segfault which was always triggered was due to the code
*q>' '&&(*q)--;
This seems odd at first glance but it's pointing to 's' which was
read-only memory as a char *s. It's now a char s[]. The second and
third segfaults were caused if a file was not specified (or it the one
specified did not exist or couldn't be opened for some reason) and if
the output file could not be opened for writing. The allowing the
generated code to compile with clang is something of a hack
unfortunately. The code return system(q-6); ended up doing return
system("cc a.c"); but depending on the compiler this would trigger
errors due to no function prototype specified and also a case where
main() had a return; without any return value. Because the string s
is complicated and because I did not want to inadvertently mess
something up I changed that code to system("make a"); and then added
the right rule to the Makefile. Thus you now need both make and cc.
If you use gcc you may change the system() call to what was given in
this description to get a more authentic feel. If you do this you must
then run ./a.out not ./a!
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.
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 is one exception:
$ find . -name '*.hint' -execdir git mv '{}' README.md \;
git statufatal: destination exists, source=1992/albert/albert.hint, destination=1992/albert/README.md
Looking at the two files they differ quite a bit so I've not changed it.
I'll bring this up on GitHub.
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.