Unfortunately this fix required heavy modification to the original file
and inclusion of a file that was once generated by the Makefile but now
it works for both macOS and Linux. It unfortunately will generate a lot
of warnings in Linux (or at least some - in Rocky Linux and Fedora Linux
it generates a lot of warnings about GCC extensions and with clang it
also generates warning(s?) about reserved keywords for a total of 45131
(!!) warnings) but still it now works with Linux and macOS (clean
compilation).
See the thanks-for-fixes.md file for example warnings and what this fix
entailed.
There were two things that had to change with my previous fix (getting
it to compile), one in code and one in the Makefile.
Instead of doing ',1' after the calls to longjmp() do ',0'. The way it
originally was is in binary expressions but since the function returns
void I made the result be 0 rather than 1 and along with the other
change it works (though maybe it would work with 1 anyway but it seems
not to be necessary and I don't feel like testing it now).
The Makefile change is that it won't work right with the optimiser
enabled so that was disabled.
I removed this entry from bugs.md (which was listed twice by accident -
and some other things were too) and updated it in the
thanks-for-fixes.md file as well.
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.
The is a file excluded from this commit that has had the change because
there are other changes but the file is incomplete. That file will be
committed when the fixes are complete which will happen at a later date.
The tarball, whilst in a subdirectory, did not extract into a
subdirectory so that if one did tar xvf img/fs.tar it would still
overwrite the files. As well make clobber would wipe the files out. This
does mean one will have to update the tarball if they are to use it but
one presumes that they would know how to do this.
Note that kernel is still under img/ but it's not part of the tarball
and it's supposed to be outside a tarball too.
Landon pointed out some issues that I missed (thank you Landon .. I was
very tired and I hope that I got everything this time) in commit
4b0a2cb64a:
0. The make clobber rule removes the git files 2004/gavin/kernel and
2004/gavin/fs.tar.
1. The 2004/gavin/fs.tar file contains the file "README.md" which, when
untarred, will overwrite the git file 2004/gavin/README.md.
2. The 2004/gavin/fs.tar file contains the file "gavin.c" which, when
untarred, will overwrite the git file 2004/gavin/gavin.c.
3. The 2004/gavin/fs.tar file is a tar file that could be related with
just checking in the 3 files "prim", "sh" and "vi".
and I discovered another issue too namely that the tarball had the wrong
version of gavin.c in it as well (prior to the fix for clang).
Now the tarball is in the img/ subdirectory and the tarball contents (is
that tar ? :-) ) looks like:
$ tar ft img/fs.tar
fs/
fs/gavin.c
fs/vi
fs/README.md
fs/sh
fs/prim
I added to the todo.md file that this file should be verified to match
the contents of 2004/gavin and I gave a command to do to test this - at
the end of working on this entry or maybe better yet right before this
repo is to be folded back into the winner repo.
Updated .gitignore so that the files that are in img/fs.tar are not
added to the repo. The tarball is not meant to be extracted anyway but
rather copied to a disk for usage of the entry. It will be extracted to
verify that the contents match that of the entry itself (2004/gavin
directory).
Forgetfully I forgot :-) to add the source file so it only worked with
my local copy. The README.md file was modified and the Makefile was
updated but the source code was not added so using make alt would only
result in an error. This fixes that blunder.
Now vi users can more easily enjoy this entry without getting
frustrated! Obviously that includes myself. Use j/k/l/h keys instead.
There's some circular fun in the README.md about this based on what the
judges' originally wrote (that made me laugh out loud because it's
true - I did get lost quite easily though I did solve it ...
eventually).
This was done quite easily with a bit of thought. I generated a script
that could be modified in vim if necessary (as it turned out to be
though some of it could have been generated too but I did not think of
everything at once and it is a hack).
This is how I generated it:
echo '#!/bin/bash' > bin/check_awards.sh ; ( while read -r g ; do echo grep "$g"; done < <(sed -e 's,_,/,g' -e 's/"/\\"/g' tmp/year-auth-prize.csv | awk -F, '{print grep "\x22" $2 "\x22" " " $1 "/" "README.md"}' ); ) >> bin/check_awards.sh
Then I I modified the file (again this was a hack to make it easier and
quicker and better for being tired too) in vim to make the grep use -Hc
so I could pipe it to 'grep :0'. This found the files without the right
award. So the final command was:
sh bin/check_awards.sh |grep :0
though I did have to edit some files several times.
For reference the script has been added to the repo too but with +x
permissions.
This change also required updating the CSV file in tmp/.
At the request of Landon all Makefiles have had trailing spaces removed.
The request also included README.md files but this is more complicated
as some lines have to end in spaces in order to force line breaks. For
Makefiles it's fine though. Tested the Makefiles by doing 'make clobber
all everything' from the root directory and all appears to be fine. This
testing is important because depending on how this process (removal of
trailing spaces) was done it could break the Makefiles; for instance
trying something like:
sgit -e 's/\s.*$//g' '*Makefile'
would rather break the Makefiles. This makes sense to anyone who knows
my script (and obviously sed :-) ) as long as they're not also tired but
I AM tired and so it was the first thing I tried (without thinking of
course ... though I had first thought of the correct way :-) ).
But what happens to the universes (yes I at least want to believe in the
multiverse theory and I hope it's true :-) ) when trailing spaces are
removed? :-)
As it turns out the only Makefiles touched were:
modified: 1987/wall/Makefile
modified: 1992/adrian/Makefile
modified: 1994/ldb/Makefile
modified: 2000/anderson/Makefile
modified: 2001/anonymous/Makefile
modified: 2001/bellard/Makefile
modified: 2004/kopczynski/Makefile
modified: 2015/howe/spoiler/Makefile
modified: 2019/karns/Makefile
and most of them were my fault.
That is link to years.html#2004. This seems like a worthy thing to do
and I will do it for the rest of the years too as I edit the year
README.md files. I probably (:-) ) won't bother repeating this comment
to save time and length of git log.
I discovered a way to what must be considered cheating though it's
probably just a feature. I referred to this in the try section,
challenging people to find out how. Of course 'cheat' is subjective
here.
The reason the top level .gitignore is updated is because this entry
will create vi swap files and it seems that the glob belongs with the
others.
For instance after running this entry numerous times over numerous days:
$ ls -1 .s*|wc -l
52
I was not aware of them until it started getting to .su like .sux and
others.
I've noted this fact in the README.md file as well, explaining to those
who don't know how they're named, how to find them (or what they're
called).
When renaming the gavin_install.txt to gavin.md I forgot to update the
Makefile.
In bugs.md there was a stray item for 2004/gavin in the wrong year (yank
paste error almost certainly).
The fix is that we cannot pass -ON to the compiler. With -ON it enters
an infinite loop as the variable l goes up, not down.
Format fix README.md.
Add kopczynski-a to show what happens when it's not a number.
In order for connecting to the webserver one needs to start it from the
build subdirectory.
Format fix README.md.
Added links(1) :-) to the README.md.
Fix country in winners.csv.
On the author's web page for the entry
(https://gavare.se/ioccc/ioccc_gavare.c.html) they provided an
unobfuscated version of the code. The code has been added to the repo
and Makefile as well.
To compile use:
make alt
and use gavare.r3 as you would use gavare.
Also renamed gavin_install.txt to gavin.md and updated formatting.
chmod +x prim (even though it won't work in some modern platforms - at
least if it wasn't corrupted at some point it might in some; it's a
32-bit ELF LSB).
Format fix README.md.
Add humour heading (as 'humor' as the author spelt it wrong :-) :-) )
instead of what was a '<humor>..</humor>'. This due this is not valid
html (guess why! :-) ) and so would not show up right in GitHub (or in
any other html document). Using a '### ...' seemed better than escaping
the <>s.
Dead link. Found new one via the Internet Wayback Machine.
Fix format of README.md file. I wanted to say that the author is a
sociopath :-) for using 'w', 'a', 's' and 'd' but that's not right in
the README.md (the judges put something amusing there about it anyway)
so I'm doing it here instead. :-) Okay he's not really but the
navigation is difficult to vi users as the judges point out. Still a
very fun game and I didn't get lost!
Fix dead link via Internet Wayback Machine.
Renamed arachnid.info to arachnid.txt. I hope this helps with rendering
later on so that browsers can also view it. There are other entries
where it might have been good to consider this but I did not think of it
at the time.
Format fixes are obvious but I also added links to the wonderful Tolkien
related things like tehta (no that's not a typo), tengwa(r)? and
everything else in the file.
Also added link to the author of the font it's based on as well as their
page on the font. Fixed name of author as well.
Fixed some typos.
Moved the 'BTW' in judges' remarks to below the 'p.s.'.
Fixed URL. I'm not sure on this one because the author wished to be
anonymous (a real shame!) but left a URL anyway. Had to use the Internet
Wayback Machine. Also fixed in winners.{html,csv}.
This to make the country code consistent with mkiocccentry (and I guess
international standard country codes).
This affects many README.md files and (for one line) winners.csv.