349 Commits
Author SHA1 Message Date
Cody Boone Ferguson 90c6b16cfb Minor typo fix in 1993/rince/design.md 2023-10-02 10:02:04 -07:00
Cody Boone Ferguson 5c0b571623 Add alt code to 1993/rince
This is based on the suggestion of the judges that some people might
want to slow the game down a bit.

It is easy to configure at compile time like:

    make CDEFINE=-DZ=18 clobber alt

More details are in the README.md file.

Updated .gitignore and thanks file (not just for this but also
making something else clearer in another entry).
2023-10-02 09:58:49 -07:00
Cody Boone Ferguson 8aad81aaeb Improve my fix to 1993/schnitzi
Redefined gets() so that the code can refer to gets() not fgets(). That
change was useful (as noted before) for preventing an annoying warning
being interspersed with the output and warnings at compiler and/or
linking.
2023-09-11 06:11:11 -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
Cody Boone Ferguson cfdbd0fef7 Add alt code for 1993/lmfjyh
Why? Because! :-)

Updated .gitignore.

Added the entry to bugs.md.

Slightly modified the note in the Makefile so that the make all rule
refers to make alt.

The README.md file was updated including succinctly giving the gist
(that might or might not be redundant :-) ) of the entry i.e. how it
worked (though the author also stated this).
2023-05-21 04:06:33 -07:00
Cody Boone Ferguson e8c536e647 Add try section to alt code of 1993/plummer 2023-05-18 10:12:53 -07:00
Cody Boone Ferguson 8dee3da6ba Format check 1993/plummer/README.md + add alt code
Alt code is so that one can see with modern systems what is actually
happening. The time to sleep is configurable.
2023-05-18 10:08:01 -07:00
Cody Boone Ferguson 7b2a2e0663 Always remove bogus file in 1993/lmfjyh
Even if it successfully compiles (which will only happen with gcc <
2.3.3 I think it was) the file shouldn't stay in the file system once
the entry has been compiled.
2023-05-18 09:18:36 -07:00
Cody Boone Ferguson 6c07cc538d Clean up 1993/lmfjyh on compilation error
Now if the compilation fails (it relies on a bug in gcc version < 2.3.3)
the bogus file is removed. It is not possible to check the gcc version
in the source code because the file is copied from lmfjyh.c in the
Makefile prior to the compilation. Well it's possible to check the gcc
version but it's too late at that point - the file would have already
been made :-)

This prevents the user form having to do quoting of the file (risking
making a mistake) or using -find . -inum ... -delete after obtaining the
inode (ls -li).
2023-05-16 03:36:20 -07:00
Cody Boone Ferguson 6c53a08b7d Fix 1993/Makefile to compile 1993/ant
When the idea of having the winning entry directory names match the name
of the authors was decided to be a bad idea after all I forgot to update
the 1993 Makefile with Anthony Howe's entry so that it tried to cd to
1993/howe and not 1993/ant. This caused a compilation error and
prevented 1993/ant from being compiled.

Very few entries do not compile now though that does not mean that all
that compile work - yet at least. Some that don't compile never will:

- 1988/spinellis will never compile with clang. I added alt code for
clang.

- 1993/lmfjyh will not compile except for gcc == (or < ?) 2.3.3 as it
relies on a bug in gcc that was fixed in version 2.3.3. This entry
unfortunately creates a bogus file called:
	'";main(){puts("Hello World!");}char*C=".c' though at least it's
	excluded in .gitignore ('"*'). The fact this file is generated
	is still an issue though and perhaps the entry should be made
	alt code and the original could be an #error if gcc >= 2.3.3?

- 1994/westley is not supposed to compile as depending on the
compiler flags it plays a game!

- 2001/anonymous/anonymous.ten.c has to be compiled with -m32 and not
all platforms are able to do this (glaring at macOS here).

- Similarly to 2001/anonymous/anonymous.ten.c this too has to be
compiled with -m32 and not all platforms permit code to be compiled as
32-bit.

- 2004/gavin cannot be linked in some architectures / platforms like
macOS. I actually have a fix I came up with the other day that lets it
compile with macOS but it doesn't do anything either (I have one theory
why that is). I might add this to the repo just so it can at least
compile (via make alt). Even so this entry has some problems for modern
systems including architecture.

- One file in 2015/yang does not compile but I believe this to be the
Makefile. I'll fix this in a near future commit if that is indeed the
case.

All other entries compile (many did not but I fixed many - including
removing the need for -traditional-cpp; Landon also fixed a few and so
did Yusuke Endoh)! Not all of those work however (in all platforms or at
all). I have not tested all either. I am still in the process of this
but these are of lower priority for the moment (though I might address
some before the higher priority tasks if I don't feel up to said tasks
but do feel up to these). This means we've made tremendous progress in
issue #1!
2023-05-16 03:12:44 -07:00
Cody Boone Ferguson 5933d58773 Fix 1993/jonth/Makefile about compilers
I got the entry to compile quite a while back (Yusuke Endoh fixed the X
code) but I never removed the comment saying that the entry might have
problems with modern compilers.
2023-05-15 09:37:47 -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 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 20d45fff10 Format fix 1993/schnitzi/README.md 2023-04-17 12:00:34 -07:00
Cody Boone Ferguson ee4ee3497d Update 1993 winning entries' README.md files
Format and typo fixes. Starting with this year I actually did more
thorough typo fixes. It might be that I did some of this in earlier
years too but I am sure I did it for this year and beyond (at least up
through 1995 .. not sure about years beyond that that I have also
edited). Even so I'll probably want to do another pass through all files
before I can say that the typo issue is resolved. That includes possibly
other files and the worst of all files in my entries.
2023-04-14 06:25:34 -07:00
Cody Boone Ferguson 155a1edae2 Update 1993/rince
Rename rince.design design.md.

Format fixes in README.md.
2023-04-14 05:55:23 -07:00
Cody Boone Ferguson 9e323d8392 Remove colon at end of award in README.md files
As in

    sgit -e '1s/:$//g' '*README.md'
2023-04-11 08:43:41 -07:00
Cody Boone Ferguson 3ab6974230 Add note about likely crash in 1993/plummer 2023-04-10 12:18:40 -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
Cody Boone Ferguson 274e91aacd Fix Mark Schnitzius's URL in README.md files
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.
2023-04-10 06:40:59 -07:00
Landon Curt Noll 49e5119e89 improve make clobber for 1993/dgibson 2023-04-09 15:14:49 -07:00
Cody Boone Ferguson b9a345576d Format fixes in 1993/dgibson/README.md 2023-04-09 12:12:37 -07:00
Cody Boone Ferguson c080dde06a Format fixes in 1993/cmills/README.md 2023-04-09 12:05:03 -07:00
Cody Boone Ferguson dc9b1993ee Format fix 1993/ant/README.md 2023-04-09 12:00:56 -07:00
Cody Boone Ferguson 79602d9ce7 Move author info to first column in 1993/jonth 2023-04-07 11:09:49 -07:00
Cody Boone Ferguson 4e6630575c Undo NULL file check in 1993/schnitzi
As part of the redefinition of INABIAF the NULL file check has been
removed. Instead it's noted in the README.md and Makefile.
2023-04-07 10:44:11 -07:00
Cody Boone Ferguson 28624ca43f Undo arg check in 1993/plummer
As part of redefining INABIAF the check for args was removed. Instead
it's warned about in the Makefile and README.md file.
2023-04-07 10:41:06 -07:00
Cody Boone Ferguson 06a5665f5d Make alt code for gets() / fgets() changes
As both Landon and I have been wondering if changing entries to use
fgets() is bordering on tampering with entries I decided to make the
original (sometimes bug fixed) versions (using gets()) alt code. I had
originally started to make the fgets() version of each entry the alt but
since the fgets() versions can handle input better and since some also
fixed bugs (see below) I decided to make the original version the alt
code (this also is how it is for other entries).

There were some exceptions here. If the change also fixed some crashes
or other bugs outside of the gets() to fgets() conversion I did not
bother to make an alt version. An example is 1992/dds. In some cases the
alt code does have bug fixes in which case they were added.

Updated the Makefiles and .gitignore files as well for the alt target
and the new files (compiled and in the case of 1992/adrian additional
source files in the Makefile alt rule).

This should solve the problem observed by Landon and me. It wouldn't be
a problem to change it so the alt version is the one that uses fgets()
but I think that might be the wrong choice.

In some entries I altogether avoided changing to fgets() say if the
author notes it uses gets() (in one case even providing a version that
uses fgets()). In some cases using fgets() introduces a bug so those are
also not changed.

As for 1990/tbr there's a strong reason for not having the fgets()
version being the alt. In macOS in particular (in linux - or maybe gcc,
not sure - it shows a warning at linker time) it will mess up the first
line of output in a potentially confusing way. For instance:

    $ ./tbr.alt
    $ warning: this program uses gets(), which is unsafe.
    # nothing here, what to do?

And that touches on another issue of making the alt version the one that
uses gets(): the warnings that can be alarming during compilation,
linking and (in the case of macOS) runtime.

Not all entries should be or can be changed to fgets() but some can and
it's warranted for these reasons. More will possibly happen in the
future.
2023-04-05 05:22:35 -07:00
Cody Boone Ferguson e09f677b37 Mass typo fix (all README.md and Makefiles)
As in

    sgit -e 's/the terms this license/the terms of this license/g' '*/Makefile' '*/README.md'
2023-04-02 09:27:13 -07:00
Cody Boone Ferguson e805f41d34 Mass fixes to headers in README.md files
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.
2023-03-31 06:43:59 -07:00
Cody Boone Ferguson 1b276f4416 Fix 1993/vanb/README.md 2023-03-30 12:11:08 -07:00
Cody Boone Ferguson a411e62815 Fix segfault in 1993/schnitzi + update README.md
If no file was specified or could not be opened the program segfaulted.
This has been fixed.

Format fixes in README.md.
2023-03-30 12:05:15 -07:00
Cody Boone Ferguson 9e07c1ae91 Fix 1993/rince/README.md 2023-03-30 11:43:21 -07:00
Cody Boone Ferguson 6398985c5f Fix 1993/plummer/README.md 2023-03-30 11:24:10 -07:00
Cody Boone Ferguson c5c7f4fb75 Fix 1993/lmfjyh/README.md
Formatting fixes.

Give more of a warning against this entry with gcc < 2.3.3 about it not
working and creating a bogus file, referring to the author's comments as
to the file name.
2023-03-30 11:21:33 -07:00
Cody Boone Ferguson 656a934815 Fix 1993/leo/README.md 2023-03-30 11:04:03 -07:00
Cody Boone Ferguson beacf049ba Fix 1993/jonth/README.md 2023-03-30 10:59:20 -07:00
Cody Boone Ferguson 2155ec8bfa Fixes to 1993/ejb
Rename ejb.explain[12] files to their respective markdown files with the
name of the puzzle they explain.

Fix formatting of README.md.
2023-03-30 10:54:54 -07:00
Cody Boone Ferguson 639c3db2bf Fix 1993/dgibson/README.md
This includes removing a statement that this could not compile under
macOS. I'm not sure what happened but I suspect it was the wrong data
file perhaps one of the files left by the script. Either way it does
work with macOS.

Fixed formatting as well.
2023-03-30 10:42:22 -07:00
Cody Boone Ferguson 1a0109df88 Fix 1993/cmills/README.md 2023-03-30 08:31:14 -07:00
Cody Boone Ferguson 99e7de07dc Fix 1993/ant/README.md 2023-03-30 08:24:47 -07:00
Cody Boone Ferguson c79aa3081c Fix segfault in 1993/plummer
Now it just does nothing if two args are not given to the program. It
seems better to me that it shouldn't crash because of invalid input
unless that's a feature. This is why I've been doing this for other
entries as well. It would be problematic to the program to add a usage
string but I can at least make a check first. Another thought I had was
adding to the Makefile a warning for entries like this but perhaps both
would be the best way to go about it so that users would know that they
had to give certain input for it to work. I don't known but this is a
start anyway.

I also fixed the formatting of the README.md file.
2023-03-28 09:04:54 -07:00