358 Commits
Author SHA1 Message Date
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
Cody Boone Ferguson 47c92bf277 Further improve alt code of 2006/sloane
Formatting looks more like the original.

Also silence unused parameter that came about the fix for some versions
of clang.
2023-10-22 15:54:02 -07:00
Cody Boone Ferguson 59de574ffb Fix 2006/sloane for some versions of clang
Unfortunately later versions of clang have an additional defect where
not only are the args of main() required to be specific types but there
can only be 0, 2 or 3 args. This program did not use the second arg so I
removed it originally but this will obviously not work for all systems
so I have brought the second arg back.

The unfortunate problem here is that the author used the letter Z for
the second arg and that's exactly what I have been using for the macro
for usleep() in alt code (Z for sleep of course). So here in order to
make it so that the entry looks as close to the original as possible I
have kept it as Z (changing the type to 'char **') and instead renamed
the Z macro to just S. S was selected as it can also stand for sleep but
also it's kind of (not quite but kind of) a backwards Z. Whether the
other entries should also be changed to be '-DS=...' is something to
consider for consistency but that can be decided another time. It
probably doesn't matter except that it does bother me as I don't like
inconsistent consistencies any more than I like consistent
inconsistencies or inconsistent consistencies.
2023-10-22 13:23:55 -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 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 ba99529c52 Further improvements to 2006/sloane/README.md
...wrt the original/alt code in the to build/to run/try sections.
2023-10-08 04:27:13 -07:00
Cody Boone Ferguson 4293bd9231 Minor fixes in 2006/sloane/README.md
Make the alternate / original code details a bit clearer.
2023-10-08 04:21:46 -07:00
Cody Boone Ferguson 5e715f429e Fixes in 2006/sloane/README.md wrt alt/original
Instead of having the 'Alternate code' section be the original, rename
it to 'Original code'.

Changed note about alternate code at top to refer to original code.
2023-10-08 04:10:30 -07:00
Cody Boone Ferguson 6dfb09ee06 Swap 2006/sloane alt/main code in build/try
As the original entry is too fast for modern systems I have (after
discussion with Landon) made the build and try sections refer to
'sloane.alt' instead of the original entry. The 'alternate section' now
refers to 'sloane' instead. This is a rare case where the reversal of
alt (in this case provided by me) and the original is valuable.

There are other entries where I will end up doing this as well for the
same reason of the entry going too fast in modern systems and these will
be updated in time, now that a method to do it has been established.
2023-10-08 02:57:36 -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
Landon Curt Noll eefbf59f5b rename 2006/toledo2 file
SOURCE/-CPMWORK.009 -> SOURCE/CPMWORK.009
2023-07-31 16:26:13 -07:00
Landon Curt Noll 33229ff3f7 rename file in 2006/toledo2
Renamed # -> B
2023-07-31 16:16:00 -07:00
Landon Curt Noll 5111f6e1b7 rename very problematic files in 2006/toledo2
We do not want files that start with '-', nor
do we want files that end in '#'.
2023-07-31 15:52:01 -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 eda444182a Add C to 2006/toledo2/.gitignore 2023-07-09 12:02:20 -07:00
Cody Boone Ferguson f06f3d677b Remove C from 2006/toledo2
Well the file C anyway :-)

This file is copied from another file and make clobber will remove it.
Since the other file is there and make will copy it to C there's no need
to have it in the repo.
2023-07-09 11:59:12 -07:00
Cody Boone Ferguson 9f260b93a7 Change bug status in 2006/toledo2 + download files
On another look I believe it to be a typo of the author that the prompt
should be 'A>'. I believe it should be what it is which is '>'. Still
there appears there might be a problem but because I am not sure of this
I changed it to possible bug. The problem or possible problem is that
the use of DDT.COM seems to not work but this might be not enough
information from the author or it might be a misunderstanding or
something else entirely.

I also downloaded the files that were referred to in the author's
remarks and added them to the repo. The ones from the SOURCE/ directory
are in the entry directory too as those might be required (though the
use might also be the possible or actual bug described above). This was
done to make it easier to use but also as part of one of the issues on
GitHub.
2023-07-09 07:05:17 -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 54c6ea6b08 Fix judges' remarks in 2006/toledo1 per GitHub 2023-07-07 06:06:31 -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 e97c910cfd improve 2006/night/Makefile CSILENCE 2023-07-06 15:09:02 -07:00
Landon Curt Noll 886fbca757 improve how 2006/night is compiled
Added note about a "compile may take a while to complete".
Update CSILENCE to cut down on warning messages on Linux.
2023-07-06 14:48:29 -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 42c67315fa Update 2006/toledo2/.gitignore
Added '*.COM' and other globs matching files from the zip file
referenced by the author in the README.md file.
2023-05-13 03:13:38 -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 33a798c8cd Clarify bug fix in 2006/toledo3/README.md 2023-05-07 12:17:12 -07:00
Cody Boone Ferguson 005d8c0f93 Fix fix on 2006/toledo - isolate FILE *, no longs
It turns out I had the right idea all along - some variables need to be
FILE *; the others can remain int. Since they're used as files I think
it seems better to have them be FILE * rather than longs even if that
technically works.
2023-05-01 10:08:29 -07:00
Cody Boone Ferguson d9da608300 Update 2006/sloane/.gitignore 2023-05-01 09:43:44 -07:00
Cody Boone Ferguson 184287352b Update 2006/stewart/.gitignore
With files recommended in the try section (that I added yesterday I
guess it was).
2023-05-01 09:31:54 -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 54d9461d77 Fix 2006/toledo3 + format fix README.md
The problem with the crash is that it relied on 32-bit sized ints. Some
of these were changed to longs instead.
2023-05-01 05:44:08 -07:00
Cody Boone Ferguson 15af4f67e8 Fix author format in 2006/toledo2/README.md 2023-05-01 05:35:13 -07:00
Cody Boone Ferguson 46d9504d1f Proper fix 2006/toledo2 and format README.md
I've coined a new abbreviation: IABINAF - it's a bug it's not a feature! :-)
Specifically the use of the CP/M emulator does not appear to work right.
Updated bugs.md.

As for the proper fix: it appears that not all the variables that I
changed to a FILE * can be a FILE * or else the wrong combination was
used. It turns out that using longs (like Yusuke Endoh did) will work
but in some cases FILE * is still used as technically the variables are
used as FILE *. I will very possibly look at finding the right
combination (or confirming that this is correct as is - though it seems
not to be at least not technically) another time.

Format fix README.md.
2023-05-01 05:09:16 -07:00
Cody Boone Ferguson 385570c5b7 Fix crash in 2006/toledo2 + partial format README
The problem is that 'int's were being used instead of 'FILE *'s. It did
not seem to crash in linux (at least fedora) but it did in macOS which
prevented it from working. Now it works in both. I got the feeling that
it did crash in some linux distros as well as apparently Yusuke Endoh
fixed it as well though he did it by changing the ints to longs. I'm not
sure if that would work for macOS; I fixed it prior to seeing this fix.
Some -includes were added to the Makefile too that might or might not be
relevant to the fix in macOS. It very well could be relevant though.

I did a partial format fix in README.md but I will have to finish this
tomorrow as I have to leave for the rest of the day.
2023-04-30 12:55:58 -07:00
Cody Boone Ferguson d2c3ded4f9 Format fix 2006/toledo1/README.md
This does not include possible typos as I'm unsure about something in
particular. This will be addressed later.
2023-04-30 12:16:18 -07:00
Cody Boone Ferguson 1ebb19e76d Format fix + add try script to 2006/sykes2
The script runs the 'try' section but makes sure to redirect both stderr
and stdout to /dev/null as without it it ruins the show.

Format fixed README.md.

The author suggested to having a table of operator precedence open when
looking at the code so I pointed out operator(7).
2023-04-30 12:08:47 -07:00
Cody Boone Ferguson cc868ba67d Format and URL fix 2006/sykes1 + add missing pdf
The pdf file is available on the Internet Wayback Machine. It felt like
it might be nice to have it stored in the repo instead since the link is
technically dead.

Some links (besides the pdf one) were dead. One I removed as I'm not
sure it has any purpose to have the Internet Wayback Machine archive.
Others were fixed (for example a YouTube video was no longer there so I
found an alternative).

Format fix README.md.
2023-04-30 11:56:52 -07:00