366 Commits
Author SHA1 Message Date
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 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 1b65c59cd4 Improve my fixes to 1998/schweikh1
To make this slightly more portable still I have removed the hard-coding
of gcc to make it just be cc. In modern systems this should be fine.
This involved updating the magic numbers by subtracting one from each,
making them (in the primary version 43 and 45 and 94 and 96 in the
alternate code for macOS) but since one of the purposes of the fixes of
code include making them work in more systems I have made it use cc as
it should work (gcc is most likely in all systems anyway but it seemed
like a better idea for 2023).

I previously noted in the thanks-for-fixes.md that the mode in fopen()
could remain 44+__FILE__ (though as noted above it's now 43) but that I
had changed it to "r". This was a mistake and it is now restored though
again it is now 43 not 44.

The FILE * which was renamed to G has been changed back to H. Observe
how there is a macro with the same name. There was actually no need to
change it.

I have restored some of the control codes in the C preprocessor
directives. Unfortunately that is only prior to the #define because some
systems will give an annoying warning otherwise. For instance fedora
linux shows:

    schweikh1.c:6:8: warning: form feed in preprocessing directive
	6 | #define
		   x
		    )
		     ==
		       0
			?__LINE__:0){O
				      =__LINE__;break;}
						       }
	  |

and possibly vertical tab too.

So although it would be ideal to have them closer to the original I deem
that preventing warnings that cannot be, for whatever reason, disabled.

The thanks-for-fixes.md was updated for these changes and now includes
more details on the fixes to match the rest of the other entries (though
some might also be lacking in details).
2023-10-15 05:39:49 -07:00
Cody Boone Ferguson e1f617bb15 Fixes in 1998/schweikh2
There were a number of problems in the README.md that were fixed. A big
one was in usage where it said you could run the program and then input
a number. Although one could certainly go through that action it would
have no effect. Not entering a number at the command line does something
different (in a way different) from specifying a number.

Also the historical notes were updated to be more consistent and
hopefully clearer than before.

Since the author called the program yarng (see README.md for why this
is) the Makefile now creates a symlink to it, rather than forcing users
to go back and forth as the author gives example uses as well. The to
use and try sections now also use yarng. Running make clobber (from make
clean) will remove the symlink.

The .gitignore file was updated: added yarng.

The thanks-for-fixes.md file was updated slightly for the above changes,
particularly the historical remarks, linking indeed to the historical
remarks in the README.md file.
2023-10-14 02:22:33 -07:00
Cody Boone Ferguson 44a8d76cc0 Make my 1998/schweikh2 fix more like original 2023-10-13 09:33:56 -07:00
Cody Boone Ferguson 0f07f99929 Restore 1998/schweikh2 original code
By some chance the original code that was restored as schweikh2.orig.c
was not the original. This has been fixed by copying it from the
archive. The file that is being updated is almost like my fix (which
solves a gcc internal compiler error).
2023-10-13 09:27:48 -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 add7268842 Format fix 1980s and 1990s README.md files
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).
2023-10-10 06:24:13 -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 bc579cd72e Fixes in 1998/schweikh1/README.md
There was 'I' in the README.md that was an artefact left over from
before the thanks file was introduced so that sentence was removed.

The thanks file was slightly updated too wrt this entry both as a new
category of fixes (the alternate code I made so that it works with macOS
but also referring to the README.md file).
2023-09-25 12:28: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 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
Cody Boone Ferguson ccbbacb31b Fix 1998/dorssel reference to a .hint file
Originally dorssel.hint was the hint file but then that was renamed to README.md
and the file the provided additional hint file was renamed to dorssel.md
but the README.md did not refer to dorssel.md but rather dorssel.hint.
2023-07-07 03:17:51 -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 2028d9c0b3 Fix internal gcc error in 1998/schweikh2
(Note that it used to be that some compilers had a problem with the
original source but now some compilers have a problem with the C
pre-processed code and in particular with the #line macro and this
commit addresses this problem.)

A funny problem occurred when compiling with gcc: an internal compiler
error:

    :10:16: warning: type defaults to 'int' in declaration of 'zero' [-Wimplicit-int]
    : In function 'main':
    :12:1: warning: missing terminating " character
    :12:19: internal compiler error: invalid built-in macro "__FILE__"

It now works with clang and gcc just as well. The alt source file was
removed as there is no need for it now. The fix was quite simple. The
string '"01\015"' had to be replaced with 'ONE(O(1,1,2,6,0,6))' and this
was actually what was in the original code in the archive and in the alt
code (which was removed as there is no need for it now though it
differed slightly from what is in the archive).

The trigraph was restored as the Makefile already had the -trigraphs
option forced in CFLAGS.

Note that the README.md file has had the judges' remarks changed in such
a way that there is a historical note as at the time of judging it was
the original code that had a problem with some compilers whereas now
some compilers have a problem with the modified code (or C pre-processed
code). These details are put in a new subsection 'Historical remarks'.
2023-07-06 07:38:40 -07:00
Cody Boone Ferguson 5daa925803 Fix 1998/fanf for Linux
The C pre-processing stages of the build failed in Linux so instead of
having those steps fanf.c became what was the code that was compiled.
Now it works with both macOS and Linux. This fix required changes to
fanf.c and also the Makefile.

I also removed the address from the README.md file as well.
2023-07-06 06:14:06 -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
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 66231b2150 Remove 'America' (A) from 'USA' :-)
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.
2023-04-22 04:21:38 -07:00
Cody Boone Ferguson 467ff85753 Add link to source file in 1998/schweikh2 2023-04-22 04:19:31 -07:00
Cody Boone Ferguson 5a89282e00 Add question to ponder in 1998/dlowe
Also USA -> US. This to make country codes more consistent with
mkiocccentry. This will be done on a wider scale (all README.md files
and the winners.csv file) soon.
2023-04-22 04:16:56 -07:00
Cody Boone Ferguson 96bed5b6cf Alternative code -> Alternate .. in 1998/schweikh1 2023-04-22 04:15:21 -07:00
Cody Boone Ferguson 4b235c9c3b Fixes in 1998/tomtorfs
Format fixes.

Use Internet Wayback Machine as the link was dead. This was done in
winners.html and winners.csv as well.

Add crc.txt - a file the author referred to. Found it at
https://opensource.apple.com/source/tcl/tcl-20/tcl_ext/trf/trf/doc/painless-guide-to-crc.txt.

This should complete format fixes in 1998.
2023-04-19 11:51:06 -07:00
Cody Boone Ferguson 2ea5a8af0e Format fixes in 1998/schnitzi/README.md 2023-04-19 11:12:05 -07:00
Cody Boone Ferguson e9196fc245 Format fixes and URL fix in 1998/fanf/README.md 2023-04-19 11:07:10 -07:00
Cody Boone Ferguson c0e237528b Fixes and updates in 1998/dorssel
Format fixes in README.md.

Rename dorssel.hint -> dorssel.md and update formatting.

Updated Makefile DATA variable for rename of dorssel.hint.
2023-04-19 10:40:29 -07:00
Cody Boone Ferguson 400d71925a Format fix 1998/dloweneil + typo fix bugs.md
The bugs.md file has been updated in this pull request because the
previous one is also about 'poot' and one of the authors of this entry
is the same. The typo has to do with the path to the C file.

I also added this entry (missing URL) to bugs.md - but referring to the
1998/dlowe entry as it's the same information.
2023-04-19 10:15:44 -07:00
Cody Boone Ferguson c434c69c39 Format and typo fix 1998/dlowe/README.md
Unfortunately the domain no longer exists as it once did (if it exists
it no longer has the script set up). Added this to bugs.md and noted
that there is a script (not checked for any security problems modernly)
if they have the bandwidth and wish to set it up.

Updated .gitignore as I added a try section.

Moved the dlowe.alt related text to new 'Alternate code' section.
2023-04-19 09:59:54 -07:00
Cody Boone Ferguson 66ca220ca4 Format and typo fix 1998/df/README.md 2023-04-19 09:43:20 -07:00
Cody Boone Ferguson e154a35d3d Format and typo fix 1998/chaos/README.md 2023-04-19 09:28:07 -07:00
Cody Boone Ferguson 9beb4f7ed6 Format and typo fix 1998/bas2/README.md 2023-04-19 09:23:50 -07:00
Cody Boone Ferguson ba5c485956 Format fix 1998/bas1/README.md 2023-04-19 09:19:41 -07:00
Cody Boone Ferguson 422c10dd01 Format + link fix 1998/banks/
His website is of course no longer at the university he went to.

I also linked (via the Internet Wayback Machine which was found in the
archive of his old website) an article about the flight simulator that
he linked. It seemed appropriate especially as this won 'Best of Show'.

The URL was fixed in winners.csv and winners.html; his email was updated
in winners.csv as well (didn't see it in winners.html).
2023-04-19 08:53:53 -07:00
Cody Boone Ferguson b863d5ecc5 Remove obsoleted note in 1998/schnitzi/Makefile
As Landon had me reapply the fixes I had originally made the note about
invalid input very likely causing a crash (though I incorrectly put it
as it will crash absolutely) in the Makefile is no longer valid.
2023-04-19 04:44:34 -07:00
Cody Boone Ferguson 591d8774ef Fixes and updates to 1998/schweikh3
Fixed a command to try.

Fixed formatting.

Updated .gitignore.

Fixed URL.
2023-04-18 09:18:35 -07:00
Cody Boone Ferguson e45c0d1755 Fix formatting and link in 1998/schweikh2 2023-04-18 08:54:22 -07:00