The use of the markdown trailing whitespace to indicate
line break should NOT be done when the following line is empty.
This removes such improper use of whitespace in README.md files.
There was a comment in the form of:
... the liked/allowed ...
which should instead be:
... liked/allowed ...
and this was fixed with my sgit tool like:
sgit -e 's,the \(liked/allowed or compile\),\1,g' '*Makefile'
With the make indent rule there was a typo for indent as 'intent'. This
was fixed with my sgit tool like:
sgit -e 's/no intent\( tool found\)/no indent\1/g' '*Makefile'
This is not only to help with formatting - especially important in
markdown files - but it's no longer really necessary to do it. One
might not feel the need to do it in non-markdown files but I did it
anyway to be consistent. Thus instead of showing Un*x/UN*X it shows
Unix/UNIX.
A question of whether or not it should all be the same case is another
thing entirely but if this is desired at some point it should be easy to
do anyway - with some care in case it's in formatted text.
A note about the glob: why '.' when there are C files and other file
types where it could be dangerous to modify? Because I did a git grep
first so I knew that it was safe.
I also updated the todo.md file as I left some things out that have to
be done. I only explicitly named one thing but when I go over them as a
final pass I will address the things in question (some will require
discussion).
This is a HUGE commit:
417 files changed, 874 insertions(+), 874 deletions(-)
As the IOCCC website now is https enabled I have updated the
'http://www.ioccc' to 'https://www.ioccc'.
There was also a typo in Makefiles where it said 'for VERY WELCOME' when
it should be 'are VERY WELCOME'.
Finally slashdot.org is also https enabled so references to
'http://slashdot' were changed to 'https://slashdot'.
This was done by my sgit tool (see https://github.com/xexyl/sgit)
like:
sgit -e 's,http://www.ioccc,https://www.ioccc,g' -e 's/for VERY WELCOME/are VERY WELCOME/g' -e .
but because I didn't have a list of files that should be modified I had
to be careful which files to commit as I had files that were changed but
not ready to be committed. Since I did it in steps, finding typos as I
went along, I actually ran sgit three times but to simplify the above
(and to show that it's possible to do more than one sed command) I made
it all as one. Since I did not have a list of files ahead of time I had
to determine what files to commit, first going through them like:
for j in $(for i in $(git status|grep modified|cut -d: -f2); do \
git grep 'https://www.ioccc' "$i"; done|cut -d: -f1|sort|uniq); \
do git diff "$j"; done|less -r
(I had to pipe through less because of a strange problem with the git
diff which appears to be because of a terminal problem maybe due to the
command above but it was all I could come up with in a very tired head.)
The above and
git status | grep modified:
showed that some C files had been modified which obviously should not be
done so I had to do:
git co '*c'
to undo those changes.
Finally to commit the correct files I did:
for i in $(git status|grep modified|cut -d: -f2); do \
git grep -E 'https://www.ioccc|https://slashdot|are VERY WELCOME' "$i"; \
done |cut -d: -f1|sort|uniq|xargs git commit -v
or so (with any formatting issues or typos here due to typos in the log
due to the terminal (in)sanity issue described).
What was once thought to be a bug or possible bug is actually a feature.
With a more lucid head I see that in a certain condition (which I noted
in bugs.md) it very clearly is intentional that one should have to hit a
key (it says return as '<RET>' but it uses getchar() via the pointer
'm'). The condition is !(g-a). I do not know the purpose of it but
INABIAF and so should not be changed.
Thus it's not a possible bug or bug but a feature. This is noted also in
the README.md file.
This is to make it more standard which further allows one to run make on
some other source code, say because they want to try and fix an entry
but forget to update the Makefile. Or if they're the author they can not
worry about it in some cases. But since LDFLAGS is the standard way it
seems better to have the LIBS variable in the Makefile be LDFLAGS.
Maybe there is a reason to not have this and I'm happy to close this in
that case but it does seem better this way so I'm doing this commit.
As besides the entries that are not supposed to compile/cannot compile
due to architectural limitations all the entries can compile in macOS
(though some do not work - yet(? I have plans to work on more later)) it
was not necessary to not silence the warnings after all as the entries
that don't work will be easy to identify ('they don't work' :-) ) so I
can just do make CSILENCE= all in the directory of those entries which
solves the problem I had originally thought of.
Some of the Makefiles have retained other changes I had to make
yesterday to get the entries to work with clang in linux but most of
them were either not changed or were made better with the rollback of
the commit that originally silenced warnings.
Now work on silencing warnings for linux can be done.
Due to the fact we now have .orig.c files and thus the possibility of
winner.orig or prog.orig being built I have updated all the .gitignore
files so that these files ignored. This was done with the following
shell commands, for reference:
for i in $(find 19* 200* 201[0123] -mindepth 2 -maxdepth 2 -name .gitignore) ; do echo $(dirname "$i"|sed -e 's,[0-9]\{4\}/,,g').orig >> "$i"; done
for i in $(find 201[4-9] 2020 -mindepth 2 -maxdepth 2 -name .gitignore) ; do echo prog.orig >> "$i"; done
and the two commands is because it was only in 2014 that the winning
entries were renamed to prog so prog.orig is the correct glob.
Some versions of clang, for instance in fedora linux, have a defect
where main() is only allowed to have 0, 2 or 3 args. This commit fixes
this problem so that the entry can compile with those versions of clang.
Used the following script to check for warnings
not silenced via ${CSILENCE}:
```sh
find ???? -mindepth 1 -maxdepth 1 -type d | while read dir; do
(cd "$dir"; echo =-=-= "$dir" =-=-= ; csilence -v 1 clobber all ; echo ; csilence -v 1 clobber alt)
done 2>&1 | less
```
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.
Funny and ironic fact: due to cold hands (unfortunately fan is on but I
can't turn it off due to a cat between my legs) when I created a new branch
for this (which has typo fixes) I initially left off a 9 in 1995. So
there was almost a tpyo for a tpyo fix cmoimt.
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.
...minus the ones that were fixed in earlier commits for specific
reasons.
Besides formatting and typo fixes I think the only thing noteworthy is
that 1995/spinellis was missing the URL which has been added now.
Added spoiler.c from their uuencoded text. Noted in README.md that they
encourage readers to try and figure it out first but the idea (told to
me by Landon) is that the README.md should no longer (generally
speaking) hide details.
Format fixes in README.md.
Note that this is one of the entries noted in bugs.md in commit
704f7224c0 but I don't believe spoiler.c
is the same as the missing file. That might be me reading it wrong in
which case that can be removed from bugs.md but it appears to not be:
one is a spoiler and another is different functionality.
This is to both preserve the original code (notwithstanding the bug
fixes I made) and also to allow you to compare the two versions. I now
have played with even slower values and I recommended trying it to see
different results in the README.md (which of course describes the alt
code, how to use it and reconfigure it etc.).
It's encouraged to use this version but it's also recommended to try the
original version as well.
Updated Makefile to do this. This reinstates the -include stdio.h
-include unistd.h in CINCLUDE but the -DZ=3000 is still in the CDEFINE
variable. Why? It doesn't hurt having it in the cdua.c compilation and
it makes it easier to find. The cdua.alt.c still uses #include
directives so that redefining CFLAGS at compilation does not cause any
problems.
Thank you Landon for recommending that it's moved to an alt version; I
had thought of it but did not do it and this is much, much better!
The reason I fixed it is indeed exactly as I said: I felt it has to work
because of the layout; it does indeed look like what the judges noted -
a rat dropping core.
Now one can use make alt and use garry.alt for the same results.
But why not garry.cpp? Because compilers will think it's C++ and besides
that these types of files are meant to be called .alt.c. The formatted
version provided by the author is still there of course.
Formatting fixes.
Remove address as there was a formatting issue. Besides it's probably
inaccurate by now. Kept the country.
There was a stray partial sentence in the judges' remarks that strayed
in (or to be more correct it was never moved properly) when I added the
try section. It's now been removed.
URL is dead so used the Internet Wayback Machine. Updated the URL in the
winners.csv file too. That might need to be done with others that I've
recently fixed but that will have to be checked on another time.
As modern systems are so much faster it's hard to see the maze being
solved in real time so I added a call to usleep() with a macro defined
in the Makefile (a macro in case someone finds it too slow or too fast
or wants to do some strange experiment like setting it to 40000 which I
actually tried). Called Z it defaults to 3000. To change it do something
like:
make CFLAGS+="-DZ=1500" clobber all
To do this I had to remove the -include ... from the Makefile and
instead add the proper #includes to the source code as the += was not
concatenating to the CFLAGS.
This makes the entry a bit more enjoyable with current systems. There
still is a known issue that I'll look at again another time.
As noted in commit 3958bbdb04:
Updated URL for author as it has changed. It's very little on his
page and the only page that suggests it is his is the ioccc.html
page. I couldn't find anything else.
There were many many README.md files with the wrong heading level for
different sections. These have been changed.
To help go through the changes it should be noted I used sgit and also
here is what is changed:
The 'Try', 'To build' and 'To run' lines have two '#'s. Some had one and
others had three.
An exception is that in 1984/anonymous/README.md for the alternative
code that had three '#'s. This is not consistent yet and it might be
that only two are desired. But for now that one at least has three.
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.
I noted in bugs.md that there is a bug that remains and I noted the bug
in the README.md too (under the to run section) as it seems like it
should be noted (sometimes the program needs you to press return to
continue solving the maze).