424 Commits
Author SHA1 Message Date
Cody Boone Ferguson 51d1e9e4c4 Additional fix 2001/cheong - check args 2023-10-30 05:10:20 -07:00
Cody Boone Ferguson 70cc096f6e Fix 2001/ollinger - check args 2023-10-30 05:06:03 -07:00
Cody Boone Ferguson 8946cff4fa Fix 2001/schweikh - check args
This was not documented. The limitations have not been addressed as they
were documented. The bugs.md and README.md have been updated for this.
2023-10-30 05:02:51 -07:00
Landon Curt Noll 8b71dd0d4f add or improve Bugs and (Mis)features text in README.md
The entries referenced in `bugs.md` now have, below the
"To build:" section, a "Bugs and (Mis)features section text"
that matches the `bugs.md` status.

Several entries had their "STATUS" changed from:
"STATUS: INABIAF - please **DO NOT** fix" to:
"STATUS: known bug - please help us fix":

This was done because, while some of the bugs were minor,
inviting someone to try and fix the issue does nil harm.
In a few cases a more difficult bug was also changed to
the "please help us fix".

While we do NOT want to waste time fixing such entries NOW,
letting others become involved and to try to fix the entry
is a good thing as to encourages people to study the entry
and try to fix the entry.  We don't need to accept a fix
that is offered, and of the fix transforms the source in
a less than desirable way, such a fix (if accepted) could
be become a alt source code.
2023-10-30 00:19:21 -07:00
Cody Boone Ferguson e2266e1aa4 Rename try.me.sh scripts to try.sh
This is to make them consistent with the others called try.sh which
seems better named as it's under the try section.

The manifest files in tmp/ have been updated as well, including the
macOS Numbers file.
2023-10-29 01:57:46 -07:00
Cody Boone Ferguson 8e12c52456 Restore diff rules in 2001/coupard/Makefile
I ended up not doing a git pull in the system with the problem (of
implicit ints being an error) and so the Makefile used was the old one
prior to the change in diff rules. This commit restores them and the
silencing of implicit int warnings.
2023-10-27 08:30:53 -07:00
Cody Boone Ferguson d8b2ed49c1 Make my fix to 2001/coupard more like original
In linux clang does not support implicit int and it's an error. I ended
up adding 'int' but to make it more like the original I added to the
CSILENCE -Wno-implicit-int instead. Thus the code is the original and
only the Makefile is different.

The thanks file was updated for this but also other entries (nothing
changed in the entries themselves, just changes in the description in
the thanks file).
2023-10-27 08:22:32 -07:00
Cody Boone Ferguson 684ed89d7e Changing heading level of 'Alternate code'
Change level 3 (###) to level 2 (##):

    sgit -e 's/^### \(Alternate code\)/## \1/g' '*README.md'

which is the same as:

    sgit -e 's/^### Alternate code/## Alternate code/g' '*README.md'

This is per discussion in GitHub.
2023-10-26 04:36:57 -07:00
Cody Boone Ferguson b77347cc35 Change 'To run' to 'To use' in all README.md files
As in:

    sgit -e 's/# To run/# To use/g' '*README.md'

This makes consistent the message for how to use the program. 'How to
use' was chosen because one can run a program just by doing './foo' but
that doesn't imply that's how to use it but the purpose of the section
is how to use it.
2023-10-26 04:05:50 -07:00
Landon Curt Noll 00c9d60266 improve diff files
We now have 6 diff rules:

    diff_orig_prog
    diff_prog_orig
    diff_alt_prog
    diff_prog_alt
    diff_orig_alt
    diff_alt_orig

The FAQ for these diffs needs to be updated
as we have 6 types of diffs now.
2023-10-23 10:18:20 -07:00
Landon Curt Noll 71f1463547 Rename diff Makefile commands
Renamed these Makefile rules:

    orig_prog_diff ==> diff_orig_prog
    alt_prog_diff ==> diff_alt_prog

Updated thanks-for-fixes.md and faq.md accordingly.
2023-10-22 17:26:22 -07:00
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 e1cd30eff0 change use of <br> with blackslash for markdown line breaks 2023-10-18 16:21:43 -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 d1134b23d9 Format and typo fix 2001/README.md 2023-10-15 08:23:50 -07:00
Cody Boone Ferguson c064d888f2 Restore where possible macros in 2001/bellard
When trying to get this entry to work for modern systems I ended up
replacing some macros with what they translated to. This meant that it
did not look as close to what the original entry looked like.

There was another change as well in this commit. The variable that is
the file to open was changed to a FILE * instead of an int. Although it
did not crash after the change I made when trying to open the file (see
below for why this was done) it's not strictly correct either in modern
systems (and maybe not in older systems either though it clearly
worked).

Now as for why the fix to being able to open the file: it's because at
the time I was trying to get it to work with modern systems even though
the author stated that it was designed for i386 linux. Doing this proved
possible with a number of other entries but in order for it to even get to
that point this change was necessary. According to Yusuke Endoh, it did
work with an emulator so that was not strictly necessary but I did not
know this at the time and it seems better that at least it can open the
file even if it won't completely work due to the way it is designed. It
seems better too as it might help provide a way to get a version for
64-bit systems.

The thanks-for-fixes.md and bugs.md files were updated on account of
these changes. The bugs.md file also includes why it was changed when
the entry is designed for i386 linux: besides the fact that I fixed the
supplementary program that did not work at all. It seems that, according
to Yusuke, that both works in an emulator but this way at least one can
enjoy the supplementary program in modern systems too and the entry
itself is a bit more correct.

The bug status of this entry changed as well. It now has both INABIAF
but also asking for alternate code. Why this is is explained in the
file: it does indeed seem to not make sense but the rationale is
explained there.
2023-10-13 06:48:29 -07:00
Cody Boone Ferguson bbb3d42bc2 Fixes and updates to 2001/anonymous
The alt target list now includes the supplementary program I added.

There were some problems fixed in the README.md file that occurred when
the (far superior) thanks-for-fixes.md file was introduced.

The thanks file was updated as well.
2023-10-12 08:48:47 -07:00
Cody Boone Ferguson ef70e3753d Merge branch 'master' into readme-make-makefile-format-case 2023-10-12 08:46:09 -07:00
Cody Boone Ferguson db3a612922 Merge branch 'master' into unix 2023-10-12 08:43:01 -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 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 f17eb9a665 Typo fix file name in 2001/westley/westley.sh 2023-09-11 08:59:27 -07:00
Cody Boone Ferguson 702ba38194 More fixes in 2001/bellard
Fixed supplementary program to add a newline after printing the first
line: else the output of both lines were merged and hard to read.

Updated Makefile to always compile the supplementary program.

Modified thanks-for-fixes.md wrt this entry including fixing the link to
the supplementary program (it did not specify the directory: it just had
the file name itself).
2023-07-17 04:27:50 -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
Cody Boone Ferguson f2fe137618 Fix 2001/coupard for clang with linux
C99 does not support implicit int. There are three ways I can think of
that would solve this problem but I chose to add the 'int' to the
parameters to prevent any problems in the future.
2023-07-07 09:44:51 -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
Cody Boone Ferguson e0d4b98655 Fixes to 2001/herrmann1
The script herrmann1.sh invoked the program itself which is not needed
and would in fact invoke it during compilation as the script is what
compiles the program. The program is to be invoked via the script
itself but the script also compiles the program as well.

Fixed the script for shellcheck.

Note that there still is a problem in that with older gcc versions it's
supposed to animate on compilation but this no longer works. See the
bugs.md for details.
2023-07-06 05:54:42 -07:00
Cody Boone Ferguson 76cef25333 Fixes to thanks for fixes file
At least one entry was missing (1984/anonymous).

Some entries were removed. One such entry was not ever broken but
instead when I had renamed a file (to markdown) I forgot to update the
DATA variable in the Makefile which then broke compilation. This was
seen in the log and mistakenly believed that there was something wrong
with the entry when there wasn't. Other entries removed were not fixes
but notes.

Various README.md files have been updated for this sometimes just
formatting merely because I opened the file because for instance there
is an alternate version (many by me) that is referred to. I'd not be
surprised if more README.md files have to be updated for this much
better system but these will be found in time when I do another pass
(and some years I have not checked at all yet).
2023-07-01 09:49:26 -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
Cody Boone Ferguson f757f66b99 Add alt code for 2001/kev - arrow key support
Since arrow keys can be more natural than other keys like the program's
',' and '.' for movement I added a version which lets you use arrow keys
instead. One player could use the ',' and the other '.' or both can play
with the same, whichever they pick.

I also slowed down the speed of the ball as it moved very fast
considering the slow speed the paddle moves. The README.md shows how to
reset it or change the value via make.

Updated .gitignore.
2023-05-27 06:36:32 -07:00
Cody Boone Ferguson e268529397 Minor fixes to 2001/anonymous/README.md 2023-05-25 11:14:38 -07:00
Cody Boone Ferguson 3fb5945632 Updates to 2001/herrmann2
Added herrmann2.alt.c. This is for a new try command to show a feature
of the entry. It can generate the original code so the try command does
this, redirecting stdout to a file (herrmann2.orig.c) and then does a
diff on the two files, to show how they're the same.

The make alt rule was fixed so it doesn't compile with herrmann2.c but
rather herrmann2.alt.c though I'm not even sure why that was defined at
all except to say that it must have been something I forgot to change
after fixing it properly.

Updated .gitignore to add herrmann2.orig.c.

Further format fixes in README.md.
2023-05-23 04:32:26 -07:00
Cody Boone Ferguson 93684cfc19 Add another program for 2001/anonymous
This sings a different counting song, Ten in the Bed. It uses another C
feature (a char *[]) that the Ten Green Bottles does not use. This is
for fun as well as to show another program (with a different C feature)
that the program works on, again assuming -m32 is allowed.

Instead of using numbers it uses strings (as expected with a char *[])
in the singing.

This was for fun (and to see if the program would work on arrays) after
I remembered the song in a comment on GitHub - about the Ten Green
Bottles song.
2023-05-21 09:09:54 -07:00
Cody Boone Ferguson d47b9d50ef Add alt supplementary program to 2001/anonymous
Running make alt will compile the anonymous.ten.c without specifying
-m32: whether it'll end up being 64-bit or not would depend on the
system but it'll be saved as anonymous.ten.64 anyway.

The try.me.sh script will run this program directly, skipping the entry
itself, if the anonymous.ten.c cannot be compiled as a 32-bit binary.

Updated .gitignore.
2023-05-21 04:17:30 -07:00
Cody Boone Ferguson 8902d78575 Add missing '`' to 2001/anonymous/README.md 2023-05-20 10:01:12 -07:00
Cody Boone Ferguson ed49d1dbad Final :-) updates to 2001/anonymous/README.md
Added a couple git diff commands to try and moved the INABIAF and the
warning from the author to below the judges' comments as already most
people probably will want to skip past long before to the next section.
Perhaps the fix should be moved to under the judges' comments as well
but I don't know.
2023-05-20 05:54:06 -07:00
Cody Boone Ferguson 4bc03de321 Make 2001/anonymous.c use original macros
There is one exception that I'm aware of and that is the U macro (U is
referenced only in strings) and this is because it segfaulted and it was
a minor change so didn't seem worth investigating further, at least for
now (if not for ever).

This feels like a new pull request is appropriate here so although it's
technically the same idea of the previous pull request this is what
should be the final revision (again unless I figure out why U
segfaulted).
2023-05-20 05:49:27 -07:00
Cody Boone Ferguson 57c46d46df More original macro usage in 2001/anonymous 2023-05-20 05:15:13 -07:00
Cody Boone Ferguson 24c21c9d89 More usage of original macros in 2001/anonymous 2023-05-20 04:52:38 -07:00