Commit Graph
101 Commits
Author SHA1 Message Date
Landon Curt Noll 8471e805ed add orig_prog_diff and alt_prog_diff rules to Makefiles 2023-10-18 17:00:02 -07:00
Landon Curt Noll 6625034139 replace trailing whitespace with blackslash in README.md
As an alternative to the markdown trailing whitespace as a line
break, we use a trailing blackslash as a markdown line break.
2023-10-18 15:49:51 -07:00
Landon Curt Noll f9750f114a fix improper use of whitespace in README.md files
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.
2023-10-18 15:33:10 -07:00
Cody Boone Ferguson 0942f4e6b2 Mass typo fix in Makefiles
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'
2023-10-16 10:35:34 -07:00
Cody Boone Ferguson ffdf581218 Mass typo fix in Makefiles
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'
2023-10-15 12:18:34 -07:00
Cody Boone Ferguson ff350f424e Fix make and makefile in README.md files
That is

    sgit -e 's/Use make\( to compile\)/Use `make`\1/g' -e \
     's/makefile/Makefile/g'  '20[0-9][0-9]/README.md'

This way 'make' is formatted with a code block (or whatever the term is
in markdown terminology) and 'makefile' is changed to Makefile.

BTW: fun fact: Landon was part of the recommendation of naming Makefiles
Makefile instead of makefile which is shown in the man page make(1):

    Normally you should call your makefile either makefile or Makefile.
    (We recommend Makefile because it appears prominently near the
    beginning of a directory listing, right near other important files
    such as README.) The first name checked, GNUmakefile, is not
    recommended for most makefiles.  You should use this name if you
    have a makefile that is specific to GNU Make, and will not be
    understood by other versions of make.  If makefile is '-', the
    standard input is read.
2023-10-11 05:45:25 -07:00
Cody Boone Ferguson e74f1c4837 Fix some missed edge cases of Un\*x to Unix
.. and there very well could be more.
2023-10-11 05:41:39 -07:00
Cody Boone Ferguson 73fc551f70 sgit -e 's/Un\*x/Unix/g' -e 's/UN\*X/UNIX/g' .
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.
2023-10-11 05:16:15 -07:00
Cody Boone Ferguson 5d02b1f325 Minor rewording in some YYYY/README.md files
This change was already applied in the README.md files of the years <
2000, yesterday, but I got tired of doing it manually as I do each year
so I used my sgit tool (https://github.com/xexyl/sgit) like:

    sgit -e 's/\(Look at the README.md file for the given\) winner/\1 winning entry/g' -e \
    's/\(on how to compile\) the winner/\1 it/g' .

which changed the text:

    ... for the given winner

and

    on how to compile the winner

to

    ... for the winning entry

and

    ... on how to compile it

This felt useful because the winner is not the entry itself but the
author (and in some cases authors). This should be clearer now. When I
do a final pass I will check for any consistency issues in the ones
changed manually.

In this commit the year 2013/README.md was format fixed as the change
was done in this file, manually, yesterday, when I did format fixes but
which was not committed as I wanted to do it with the years 2000+.
2023-10-11 03:38:38 -07:00
Cody Boone Ferguson 80844970c6 Typo fix in 2011/fredriksson/README.md
This was found quite by accident: another pass of the file will be done
once all the README.md files have been formatted (it seems like I will
be able to resume somewhere in year 2013).
2023-10-07 07:14:24 -07:00
Cody Boone Ferguson ef456bfb1e Mass typo fixes
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).
2023-10-07 04:35:47 -07:00
Cody Boone Ferguson b2f85a8656 Minor format fixes + add links to 2011/akari 2023-09-16 06:16:54 -07:00
Cody Boone Ferguson 1d86daf19a Change LIBS to LDFLAGS in Makefiles
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.
2023-07-10 03:33:53 -07:00
Cody Boone Ferguson b6330673cc Restore silencing warnings in macOS
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.
2023-07-08 05:05:50 -07:00
Cody Boone Ferguson d89305ef3b Mass .gitignore update for .orig.c files
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.
2023-07-08 04:39:42 -07:00
Landon Curt Noll 2aa99f0644 revert commit d8425bb767 2023-07-07 05:36:08 -07:00
Landon Curt Noll d8425bb767 silence warnings under macOS for cc, clang and gcc
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
```
2023-07-07 01:11:22 -07:00
Landon Curt Noll 2ba12ecc3c restore *.orig.c to each entry
Under each yyyy/dir there is a file of the form '*.orig.c'
containing the original source code, or as close as we can
get to the original source code.
2023-07-06 21:49:38 -07:00
Landon Curt Noll ac41f07a83 move fix thanks a file, update top level html links, rename CONTRIBUTING.md
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.
2023-06-06 16:59:53 -07:00
Cody Boone Ferguson 7dbb9fc2fe Change 'tri-graphs' to 'trigraphs' - it's one word
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.
2023-06-05 05:52:57 -07:00
Landon Curt Noll 5927927e51 Add .id to all winning entries 2023-05-13 11:45:33 +10:00
Landon Curt Noll c69445d067 Add .top and .year files
This will be used by tools that will build the web site
and tools that form JSON files (such as `.winner.json').
2023-05-12 20:10:38 +10:00
Cody Boone Ferguson 847ccdc232 Update David Lowe URL
I know that in bugs.md there is a missing URL for him or at least about
one of the entries but I'll have to look at that later. It might be that
it should stay there as it was a website for the entry itself and it
would be nice to have it back but for now this is unaddressed.
2023-05-10 09:49:30 -07:00
Cody Boone Ferguson a3287845c6 Minor additional formatting fixes in 2011/richards
This really should be the last fix with 2011/richards for a good while.
I have a lot of 2013/birken worked on and am actually in the process of
working on it so that should be the next commit.
2023-05-09 03:53:28 -07:00
Cody Boone Ferguson be793cc328 More about 2011/richards and macOS
This includes a minor code change. I believe at this point that it's an
inherent issue of macOS but I might be wrong. I'll certainly look at
this more in the future but I'm going to try and work on the remaining
README.md files first. Time will tell how much I succeed.
2023-05-08 04:36:28 -07:00
Cody Boone Ferguson ba108e1f65 Format fix README.md + add alt code to 2011/vik
The alternate code is based on the author's statements on how to get it
to work for Windows. I then looked at MS docs to find out what header
files are needed. The only reason I did this is because the purpose of
the issue #1 is to get the entries to compile under as many systems as
possible and since the author gave instructions ... Obviously I didn't
test this as I have no way to do so. It's 'as is'. In the famous words
of Douglas Adams: 'Don't share and don't enjoy! :-)'

Updated bugs.md with INABIAF noted by the author.

Format fix README.md.
2023-05-03 09:26:23 -07:00
Cody Boone Ferguson 2f6c0589d6 Format and typo fix 2011/toledo/README.md 2023-05-03 07:56:37 -07:00
Cody Boone Ferguson 0497f58748 Format and link fix 2011/hamaji/README.md 2023-05-03 06:08:25 -07:00
Cody Boone Ferguson b2602712a6 Format fix 2011/fredriksson/README.md 2023-05-03 05:31:07 -07:00
Cody Boone Ferguson b6eeed4a95 Minor fixes in 2011/hou/README.md
In particular the 'to use' section had something that should be in the
try section instead.

Line length 'fixes' were made as well.
2023-05-03 01:24:34 -07:00
Cody Boone Ferguson 0eba062a5a Format fix 2011/konno/README.md 2023-05-02 11:45:54 -07:00
Cody Boone Ferguson 28450d486c Format fix 2011/hou/README.md 2023-05-02 11:35:59 -07:00
Cody Boone Ferguson 49ef53fc4a Format fix 2011/goren/README.md 2023-05-02 11:24:40 -07:00
Cody Boone Ferguson ca05d2cdb2 Format fix 2011/dlowe/README.md + update bugs.md 2023-05-02 11:09:54 -07:00
Cody Boone Ferguson c6474701b8 Format fix 2011/borsanyi/README.md 2023-05-02 10:25:43 -07:00
Cody Boone Ferguson d9d3c2af20 More progress with 2011/richards in macOS
I have found a problem that shows itself in both linux and macOS. In
linux it happens with both 32-bit and 64-bit but the sizes are naturally
different. It does not crash in linux however where it does in macOS.

I changed some variable types a bit as well but this still does not fix
it with macOS though they types changed are more consistent with what
they are used as.

The bugs.md has more information on what I discovered (noted above) - an
overflow.

More will have to be done on this another time in order to get it to
work with macOS.
2023-05-02 09:45:30 -07:00
Cody Boone Ferguson ffc50a98a5 Fix and format 2011/zucker/README.md
There was a mistake in the try command where it would inject into the
image the previous command specifically because of !! - must escape
these even inside double quotes (there were three).

Typo fixes here and there.

Format fixes.

Unlike the others I did not add any additional links as I am almost out
of time for the day. I will look at this again another time as there
were a number of things that I think would be improved with links.

Fix author URL in README.md and winners.{csv,html}.
2023-05-01 10:31:29 -07:00
Cody Boone Ferguson b148e942d4 Fix Toledo author information
He has a different website (which was already in winners.html and
winners.csv but was not in the README.md files) so I've updated them
all. I also removed the email as there is no guarantee that it's even
valid any more; the last time he won (he noted he did not participate
again as he won five times and wanted to give other their chances) was
2011 and his website does not include an email.
2023-05-01 09:24:45 -07:00
Cody Boone Ferguson d0ac8c8213 Try fixing 2011/richards + update README.md
This does not work with macOS but I'm not sure if this has to do with
macOS or the fact it's the Apple silicon chip. The fact it works in
linux makes it harder to figure out what the problem is. Still I tried
to change the protection of the mmap() call. Different values can
actually make it crash in linux as well but this does work. Of course
the fact it works with linux doesn't mean much since it already did work
with linux. This is a work in progress. Doing

    make CC=clang CSILENCE= CWARN="-Wall -Wextra -Weverything" clobber all

can give a lot of interesting warnings that might or might not be
relevant including one about alignment. In bugs.md I cited where it
appears to crash.

Format fixed the README.md.
2023-05-01 09:10:07 -07:00
Cody Boone Ferguson 7af99c8c9e Further fixes in 2011/blakely/README.md 2023-05-01 06:09:20 -07:00
Cody Boone Ferguson f4023e6f09 Remove address from 2011/borsanyi/README.md
The country of course is still there.
2023-05-01 05:47:59 -07:00
Cody Boone Ferguson e394b3c607 Partially fix 2011/fredriksson/README.md
I did not look at the file in full but some typos were fixed. It needs
to be checked more thoroughly but I had started the file some days ago.
I want the changes out of the way so I'm committing them and will return
to it another time.
2023-04-19 13:29:13 -07:00
Cody Boone Ferguson 2b3a16f3b9 Format fix 2011/eastman/README.md
I also noted to use reset to restore the terminal after use.

Also - since the author noted they tested Mac OS X 10.7 - I tested it
with macOS Ventura (with M1 chip). Seemed useful to note that
information since a lot has changed since those days.
2023-04-19 13:22:49 -07:00
Cody Boone Ferguson e4d427a194 Format fix 2011/blakely/README.md
Also updated .gitignore.
2023-04-19 13:20:17 -07:00
Cody Boone Ferguson afff0496aa Update 2011/dlowe + including colectomy on README
Remove extraneous colons.

Format fixes in README.md.

Add links to README.md.

Fix file paths in README.md.

Add try.me.sh as there are a number of commands to run in the try
section.

Add to README.md note that the URL is dead and the Internet Wayback
Machine archived it but it did not archive the scripts. This was also
added to the bugs.md file.
2023-04-15 05:20:47 -07:00
Cody Boone Ferguson 39fbcd536f Perform colectomy on 2011/borsanyi :-)
Remove colons :-) that were not needed as per discussion on GitHub.

Other formatting fixes and maybe typo fixes.
2023-04-15 04:40:49 -07:00
Cody Boone Ferguson 0bef6cfba9 Update 2011/akari
Format and typo fixes in README.md.

Add try.me.sh as the try section is kind of long. Removed extraneous
make commands in the script and the try section. Added make clobber
first.
2023-04-15 04:11:59 -07:00
Cody Boone Ferguson 036ddbd4f4 Fix 2011/goren for macOS (64-bit)
On a hunch I wondered if the ints in function S() needed to be long and
it did indeed solve the problem. Tested it under linux and then I
noticed the author stated that it does not work for 64-bits (except that
it does work in 64-bit linux). Therefore I test compiled it with linux
as 32-bit too and both work.

I also noticed in git diff that it had CRLF line endings so I removed
those as well.
2023-04-14 11:46:00 -07:00
Cody Boone Ferguson 4bf3f302cb 'comments' -> 'remarks' in all README.md files
As in

    sgit -e 's/\([Aa]uthor.*\)comments/\1remarks/g' -e 's/\([Jj]udge.*\)comments/\1remarks/g' '*README.md'
2023-04-10 11:01:39 -07:00
Landon Curt Noll 47d73a4a04 improve make clobber for 2011/akari 2023-04-09 15:13:10 -07:00