When changing the macro use to the literal /= I added a space or two. I
did not do this with the other places this macro was used but it feels
like it should be as close to the original formatting as possible.
This was a fun one to fix. There were two invalid operands to binary
expression errors to fix which was resolved with the comma operator.
More fun was dealing with a C pre-processor change. The macro C was used
like e/C to do e/=G but this is no longer allowed. The solution was to
not use the C macro and instead just do the /= etc.
As I love the theme and layout I kept the code that can no longer
compile in just commented out.
Fun fact: did you know that the original name of Gandalf was Bladorthin?
He was not the only character who originally had different names in The
Hobbit. In fact the original name of Thorin was Gandalf! (... I know the
former is true and I'm almost certain the latter is true but it's been a
long time since I've read it in The History of the Hobbit).
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.
It did not iterate over all globs because the condition of the loop was
while [[ "$i" -le "$#" ]]; do
but in the loop i was incremented but the num args left was decremented
thus they went in opposite orders. Instead record how many globs are
there first and check i against that.
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.
Don't assume '.' is in the path.
I note that at least under macOS this game does not work. I'll be
looking at the entries of this year at another time. I just need this
commit in to make some other changes unrelated.
The README.md was also updated - formatting fixes to turn it into a
markdown file proper.
Some important notes here should be made. First of all with clang the
recommended commands in the README.md (which was also formatted and typo
fixed) will seemingly generate the correct files but still only
westley.c and ver0.c will compile with clang. With gcc they do compile
and seem to work as expected.
However I found a bug in the original code too where ver2 will sometimes
segfault. This also goes for the fix (again when compiled with gcc).
I did get ver[123].c to also compile but this seemed to cause invalid
output in some of the commands. That being said it might (though I don't
think so at this time) have been not knowing exactly what should be
displayed. Maybe I will look at it in the future but at least it now
works with clang even if not all of the generated files will compile
that way. Still macOS users can now take a look at the different output
of the program which seems good to me (it does not even have to be
source code that is output).
These things have been noted in the README.md as well.
Mostly this involves README.md files in some entries but the
1989/robinson/Makefile was updated. Force -include option in CINCLUDE
variable not CDEFINE.
The README.md referred to Obfuscated C Code Contest but at this point it
was the International Obfuscated C Code Contest.
Add ALT_{OBJ,TARGET} to 1985/shapiro/Makefile as the alt source code
file was there.
Add thank you note to Cody in some README.md files, remove the warning
that 1990/westley/westley.c might not compile with modern compilers
(since I fixed it) and reworded a statement slightly. Yes I'm thanking
myself but it's actually from the judges.
Now compiles without any warnings triggered (though it has some -Wno- at
the compiler). Some of the -Wno- options were removed from the Makefile
as they are no longer needed. I did not check all the ones that are
remaining but some are certainly needed (including some I tested).
Also force use of -include stdio.h -include unistd.h -include stdlib.h
by minor change to Makefile. The last one, -include stdlib.h, was newly
added.