Commit Graph
115 Commits
Author SHA1 Message Date
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 12d045f32a Remove address from 2000/thadgavin 2023-10-07 07:13:18 -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 fa5c93b21e Add another question to 2000/natori to ponder 2023-09-29 03:32:26 -07:00
Cody Boone Ferguson ebf4adbebf Minor fixes and adjustments to 2000/natori
Typo fix and added note about the alternate code earlier in the file to
note what it's for (southern hemisphere). Also added questions to ponder
for the users of the alternate code in the northern hemisphere.
2023-09-29 03:29:49 -07:00
Cody Boone Ferguson 88eef478aa Improve my fix to 2000/anderson - redefine gets() 2023-09-11 06:19:44 -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
Cody Boone Ferguson 3f19712230 Add alt code for 2000/thadgavin
This version allows for delaying between the writing of characters (for
curses) or pixels (for SDL). I explained how to reconfigure it in the
README.md file.

This is useful for more modern systems as well as if you're sensitive to
rapid swirling.

Typo fixes in README.md.
2023-07-04 09:26:32 -07:00
Cody Boone Ferguson 2d2970dc2b Remove 2000/anderson alt code
It doesn't seem like it is worth having it due to the difference being
gets() versus fgets(). One can look at the archive instead. The change,
again, is due to annoying warnings in linkers and at runtime display
issues (though redirecting stderr to /dev/null would also work well
enough if one remembers to do it).
2023-07-01 08:08:54 -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 c64d9c86a2 Add -lm to 2000/briddlebane/Makefile
The entry would not compile in the systems that require the explicit use
of -lm for libm. Two example systems are fedora and Rocky linux.

I also fixed a couple typos in README.md.
2023-06-05 05:45:03 -07:00
Cody Boone Ferguson b5599f5556 Add sdl binary to 2000/thadgavin/.gitignore 2023-05-18 11:01:22 -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 0e3acd6739 sgit -e 's/[[:space:]]$//g' '*Makefile'
At the request of Landon all Makefiles have had trailing spaces removed.
The request also included README.md files but this is more complicated
as some lines have to end in spaces in order to force line breaks. For
Makefiles it's fine though. Tested the Makefiles by doing 'make clobber
all everything' from the root directory and all appears to be fine. This
testing is important because depending on how this process (removal of
trailing spaces) was done it could break the Makefiles; for instance
trying something like:

    sgit -e 's/\s.*$//g' '*Makefile'

would rather break the Makefiles. This makes sense to anyone who knows
my script (and obviously sed :-) ) as long as they're not also tired but
I AM tired and so it was the first thing I tried (without thinking of
course ... though I had first thought of the correct way :-) ).

But what happens to the universes (yes I at least want to believe in the
multiverse theory and I hope it's true :-) ) when trailing spaces are
removed? :-)

As it turns out the only Makefiles touched were:

	modified:   1987/wall/Makefile
	modified:   1992/adrian/Makefile
	modified:   1994/ldb/Makefile
	modified:   2000/anderson/Makefile
	modified:   2001/anonymous/Makefile
	modified:   2001/bellard/Makefile
	modified:   2004/kopczynski/Makefile
	modified:   2015/howe/spoiler/Makefile
	modified:   2019/karns/Makefile

and most of them were my fault.
2023-05-11 02:28:26 -07: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 43287b6a4a Update 2000/jarijyrki/.gitignore 2023-05-01 09:56:28 -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 bee1d82370 Fixes and updates to 2000/tomx
Format fixes in README.md.

Link fix via the Internet Wayback Machine. This was also fixed in
winners.csv and winners.html.

Copy ../mkentry.c to this directory because the author made an example
of where one can modify the program to compile it instead - it felt
better than to change it to ../mkentry.c as that assumes the directory
structure is the same.

Added mkentry to .gitignore.
2023-04-20 13:18:29 -07:00
Cody Boone Ferguson 93e97ec356 Add reference to dd0b2 in 2000/thadgavin/README.md
This is because it's so bizarre, amusing and bemusing that some might
like to see it (of course many won't :-) ).
2023-04-20 13:07:26 -07:00
Cody Boone Ferguson dd0b26b5d6 Fix 2000/thadgavin for SDL + format README.md
The SDL version did not work for a number of reasons. First of all the
code requires that SDL is defined. Second the path wrong header file was
included. Third the SDL1 developers thought it would be a great idea
(but obviously it's a terrible idea) to redefine main() (!!) so that any
program that uses SDL1 has to have the same args as their definition.
This program had 'main()' so the error message was:

    thadgavin.c:60:1: error: conflicting types for 'SDL_main'
    main()
    ^
    /opt/local/include/SDL/SDL_main.h:34:14: note: expanded from macro 'main'
    #define main SDL_main
		 ^
    /opt/local/include/SDL/SDL_main.h:35:12: note: previous declaration is here
    extern int SDL_main(int argc, char *argv[]);
	       ^
    1 warning and 1 error generated.
    make: *** [thadgavin_sdl] Error 1

Thus main() was changed to 'int main(int argc, char **argv)'. I am not
sure if I want to know their thinking. I kind of do but I also don't.

Format fix README.md.
2023-04-20 12:59:06 -07:00
Cody Boone Ferguson 43d4057682 Format fix 2000/schneiderwent/README.md 2023-04-20 12:35:23 -07:00
Cody Boone Ferguson e6dfaf0d52 Format fix 2000/robison/README.md 2023-04-20 10:22:21 -07:00
Cody Boone Ferguson 4d19b7a11c Fix 2000/rince/README.md + update bugs.md
There is a known crash in the program if DISPLAY is unset.

Typo fixed and format fixed.
2023-04-20 09:24:39 -07:00
Cody Boone Ferguson 132518a399 Typo check 2000/primenum/README.md
Added INABIAF section as well. This has been added to bugs.md as well
(some were already there but one was not - the known crash that's a
feature).
2023-04-20 08:50:52 -07:00
Cody Boone Ferguson 62aea3c81c Format fixes in 2000/jarijyrki/README.md
I've now looked at the entire README.md file and fixed formatting.

I also renamed the sheet1.info file to finance.sheet as it seems a more
appropriate name for usability.
2023-04-20 08:38:26 -07:00
Cody Boone Ferguson feedb3cf50 Author format fix in 2000/schneiderwent
This will be the 97th open pull request by me so I have to say the
following insightful (or it will be to Landon .. and me) number:
2305567963945518424753102147331756070 since it's so magical.
2023-04-19 14:34:08 -07:00
Cody Boone Ferguson dcad5e6c78 Format fix author info in 2000/robison 2023-04-19 14:33:09 -07:00
Cody Boone Ferguson d573b1df82 Fix (some?) links in 2000/rince/README.md
Fix some of the formatting as well.

More has to be done with this file.
2023-04-19 14:31:51 -07:00
Cody Boone Ferguson 5f48d50fb6 Format fix 2000/primenum/README.md
I didn't check for typos. That will come later.
2023-04-19 14:24:15 -07:00
Cody Boone Ferguson ce9bfca9c7 Fix 2000/natori and add alt code
The author suggested alternate code for those in the southern hemisphere
which the natori.alt.c now has.
2023-04-19 13:55:41 -07:00
Cody Boone Ferguson a71e0f4c99 Partially fix 2000/jarijyrki
The URL for one of the authors was no longer valid so I had to use the
Internet Wayback Machine. The winners.html and winners.csv files have
been updated for this change.

Format the authors' information.

That's all there is this time as I have to think on how to do the
formatting in a way that matches their set up (sections and numbers).
This will have to come another time.
2023-04-19 13:49:52 -07:00
Cody Boone Ferguson 64f0c5c84f Format and typo fix 2000/dlowe/README.md 2023-04-19 13:18:54 -07:00
Cody Boone Ferguson 73d0c06440 Format and typo fix 2000/dhyang/README.md 2023-04-19 13:00:58 -07:00
Cody Boone Ferguson 77cb6b6030 Format fix + add try in 2000/briddlebane
Suggest that one runs this from .bashrc or equivalent files for some
good fun on log in. :-)
2023-04-19 12:48:51 -07:00
Cody Boone Ferguson acdb26d5c4 Format and link fix 2000/bmeyer, update .gitignore 2023-04-19 12:43:05 -07:00
Cody Boone Ferguson ea79092508 Fix 2000/bellard/README.md
In a previous commit I had accidentally changed 'Author's remarks' to
'Alternate code' (I have no idea how this happened).

Another typo was fixed.

Added a note how this no longer (of course) prints the largest prime
known.

Fix URL.

Fix formatting.
2023-04-19 12:08:29 -07:00
Cody Boone Ferguson 305c8ce3e9 Format fixes in 2000/anderson/README.md
I observed something strange though: the author noted the output of the
input 'Hello, world!' and it doesn't appear to match the program before
or after the fgets() change. I'm not sure if this is a bug or if it is
(as I guess) a formatting problem.
2023-04-19 12:00:17 -07:00
Cody Boone Ferguson bb5fb53949 Remove 2000/anderson alt code - has no purpose 2023-04-17 10:21:53 -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 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