Commit Graph
73 Commits
Author SHA1 Message Date
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 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 7183971943 Resolve bug/not a bug status in 1995/cdua
What was once thought to be a bug or possible bug is actually a feature.
With a more lucid head I see that in a certain condition (which I noted
in bugs.md) it very clearly is intentional that one should have to hit a
key (it says return as '<RET>' but it uses getchar() via the pointer
'm'). The condition is !(g-a). I do not know the purpose of it but
INABIAF and so should not be changed.

Thus it's not a possible bug or bug but a feature. This is noted also in
the README.md file.
2023-09-25 12:06:59 -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 b405293f72 Fix 1995/makarios for some versions of clang
Some versions of clang, for instance in fedora linux, have a defect
where main() is only allowed to have 0, 2 or 3 args. This commit fixes
this problem so that the entry can compile with those versions of clang.
2023-07-07 10:20:02 -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 7490f5f1d0 Format 1995/dodsond2/README.md 2023-05-18 11:08:44 -07:00
Cody Boone Ferguson b28c34c93a Typo and format fix 1995/README.md
Funny and ironic fact: due to cold hands (unfortunately fan is on but I
can't turn it off due to a cat between my legs)  when I created a new branch
for this (which has typo fixes) I initially left off a 9 in 1995. So
there was almost a tpyo for a tpyo fix cmoimt.
2023-05-17 05:09:26 -07:00
Landon Curt Noll 5927927e51 Add .id to all winning entries 2023-05-13 11:45:33 +10:00
Landon Curt Noll 9d0f9326aa Merge pull request #722 from xexyl/spinellis
Add mastodon link for Diomidis Spinellis
2023-05-13 11:41:09 +10:00
Cody Boone Ferguson 104a8496e7 Add mastodon link for Diomidis Spinellis 2023-05-12 11:05:22 -07: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 8efe343e63 Fixes in 1995 winning entries' README.md files
...minus the ones that were fixed in earlier commits for specific
reasons.

Besides formatting and typo fixes I think the only thing noteworthy is
that 1995/spinellis was missing the URL which has been added now.
2023-04-14 06:10:37 -07:00
Cody Boone Ferguson c83c2674e1 Format fixes in 1995/heathbar/README.md 2023-04-14 06:06:08 -07:00
Cody Boone Ferguson 1a523b12f6 Update 1995/vanschnitz
Added spoiler.c from their uuencoded text. Noted in README.md that they
encourage readers to try and figure it out first but the idea (told to
me by Landon) is that the README.md should no longer (generally
speaking) hide details.

Format fixes in README.md.

Note that this is one of the entries noted in bugs.md in commit
704f7224c0 but I don't believe spoiler.c
is the same as the missing file. That might be me reading it wrong in
which case that can be removed from bugs.md but it appears to not be:
one is a spoiler and another is different functionality.
2023-04-14 05:47:07 -07:00
Cody Boone Ferguson 42b4d27ff2 Move usleep() version of 1995/cdua to cdua.alt.c
This is to both preserve the original code (notwithstanding the bug
fixes I made) and also to allow you to compare the two versions. I now
have played with even slower values and I recommended trying it to see
different results in the README.md (which of course describes the alt
code, how to use it and reconfigure it etc.).

It's encouraged to use this version but it's also recommended to try the
original version as well.

Updated Makefile to do this. This reinstates the -include stdio.h
-include unistd.h in CINCLUDE but the -DZ=3000 is still in the CDEFINE
variable.  Why? It doesn't hurt having it in the cdua.c compilation and
it makes it easier to find. The cdua.alt.c still uses #include
directives so that redefining CFLAGS at compilation does not cause any
problems.

Thank you Landon for recommending that it's moved to an alt version; I
had thought of it but did not do it and this is much, much better!
2023-04-12 02:27:55 -07:00
Cody Boone Ferguson 0de3145084 Rename garry.cpp to garry.alt.c and fix it
The reason I fixed it is indeed exactly as I said: I felt it has to work
because of the layout; it does indeed look like what the judges noted -
a rat dropping core.

Now one can use make alt and use garry.alt for the same results.

But why not garry.cpp? Because compilers will think it's C++ and besides
that these types of files are meant to be called .alt.c. The formatted
version provided by the author is still there of course.
2023-04-11 14:00:16 -07:00
Cody Boone Ferguson dad330d671 Fix 1995/garry
Formatting fixes.

Remove address as there was a formatting issue. Besides it's probably
inaccurate by now. Kept the country.

There was a stray partial sentence in the judges' remarks that strayed
in (or to be more correct it was never moved properly) when I added the
try section. It's now been removed.

URL is dead so used the Internet Wayback Machine. Updated the URL in the
winners.csv file too. That might need to be done with others that I've
recently fixed but that will have to be checked on another time.
2023-04-11 13:37:48 -07:00
Cody Boone Ferguson 4f022b6963 Make 1995/cdua easier to see with modern systems
As modern systems are so much faster it's hard to see the maze being
solved in real time so I added a call to usleep() with a macro defined
in the Makefile (a macro in case someone finds it too slow or too fast
or wants to do some strange experiment like setting it to 40000 which I
actually tried). Called Z it defaults to 3000. To change it do something
like:

    make CFLAGS+="-DZ=1500" clobber all

To do this I had to remove the -include ... from the Makefile and
instead add the proper #includes to the source code as the += was not
concatenating to the CFLAGS.

This makes the entry a bit more enjoyable with current systems. There
still is a known issue that I'll look at again another time.
2023-04-11 12:04:49 -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
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
Cody Boone Ferguson e5d3a11110 Refer to bugs.md in 1995/cdua/README.md
About a problem that I discovered a while back but have not had time to
look at yet.
2023-04-07 11:13:44 -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
Landon Curt Noll 350da723cc improve architecture and Optimization comments in Makefiles 2023-03-26 22:13:13 -07:00
Landon Curt Noll 1c35dc3b47 make everything true :-)
Add @${TRUE} as an action for the everything rule in Makefiles.
2023-03-26 20:47:04 -07:00
Landon Curt Noll e42d7484cd trim comments and update 133t hacker rulz in Makefiles 2023-03-26 20:24:16 -07:00
Landon Curt Noll 1b1dd2f2e4 put all README.md files under CC BY-SA 4.0 License
This will make is easier for others to share README.md
files while requiring them to attribute the file
when using it.
2023-03-26 02:58:27 -07:00
Landon Curt Noll ea1806abdb change Makefiles to look under X11_INCDIR and X11_INCDIR/X11 2023-03-26 02:22:49 -07:00
Landon Curt Noll 5fc2d72dd1 change use of ${HOMEBREW_PREFIX} with ${SDL2_CONFIG} 2023-03-26 02:19:18 -07:00
Landon Curt Noll 8cd2aa85c1 clean up and improve end of Makefile rules 2023-03-26 02:02:31 -07:00
Landon Curt Noll d04e6d8f03 remove X11_LIBDIR and X11_INCDIR setting from Makefiles
The X11_LIBDIR and X11_INCDIR values are now set in the
top level `var.mk` file.
2023-03-26 00:50:47 -07:00
Landon Curt Noll bbd18a20df improve Makefile headers
Simply the Makefile header.

Refer to the //www.ioccc.org/bugs.md URL (that will eventually exist).

Now using CC BY-SA 4.0 License to how you may share and adapt the
Makefile.
2023-03-25 23:51:14 -07:00
Landon Curt Noll 9e1b0ac82f fix common tool locations header lines in some Makefiles 2023-03-25 22:31:02 -07:00
Cody Boone Ferguson fd9b44ef76 Update bugs.md and 1995/cdua/README.md
I noted in bugs.md that there is a bug that remains and I noted the bug
in the README.md too (under the to run section) as it seems like it
should be noted (sometimes the program needs you to press return to
continue solving the maze).
2023-03-19 09:03:25 -07:00
Cody Boone Ferguson fa2a763f6c 1995 entries checked
Fixed formatting of README.md files.

Some typo fixes.

All entries work well.

Added some try commands.
2023-03-18 10:03:51 -07:00