349 Commits
Author SHA1 Message Date
Cody Boone Ferguson 8e18a44c88 Improve 1990/jaw/try.sh 2023-11-01 05:09:48 -07:00
Cody Boone Ferguson 8741610110 Fix script in 1990/jaw
Now the files added to the archive will be extracted. It is unfortunate
but a temporary tarball has to be formed rather than writing to stdout.
There is a possible fix to this but it hasn't been looked into yet. The
tarball is temporary, however, and is deleted after it is extracted. The
script MUST be run from a subdirectory of the entry but as the script
had hardcoded the paths before this shouldn't be that big of a deal.

Another problem was more to do with paths and also the script relying on
the exit code allowing for &&. Now it's ';' between most commands.

There still remains, Landon and I believe, a bug in the entry and this
has been added to the bugs.md file; the script not working has been
removed from the bugs.md.
2023-11-01 04:48:25 -07:00
Cody Boone Ferguson 5041a0d592 Typo fix in all entry Makefiles
Change the comment

    # Special flags for this entry

to

    # Special Makefile variables for this entry

because these are actually variables and not flags.
2023-11-01 03:36:29 -07:00
Landon Curt Noll 7cb3c44a3b removed .id files from winning dirs
The `.id` files are no longer needed and so they were removed.

The `winner_id` (the contents of the `.id` files) are simply
a concatenation of "year" and "_" and "dir".

Adjusted `.inventory.html`, `tmp/README.md`,
`tmp/fake.gen_inventory.sh`, and the manifest according
to the above.
2023-11-01 01:19:36 -07:00
Landon Curt Noll a17fe36163 add tmp/fake.gen_inventory.sh tool
The new tool, tmp/fake.gen_inventory.sh, now adds
a fake .inventory.html file to each winner entry.

Once the winner2nventory tool is written, the .inventory.html
will contain links to all winner files listed in the inventory.
For now, the tmp/fake.gen_inventory.sh tool just creates
a placeholder file.
2023-11-01 00:47:43 -07:00
Landon Curt Noll 2e5f868896 improve Nu Html Checker code in index.html 2023-11-01 00:17:07 -07:00
Landon Curt Noll 1883e441c7 remove use of FONT from stb index.html files
We are still seeing if we can get the validator to work.
2023-10-31 22:44:17 -07:00
Landon Curt Noll d6f3d20bac improve winner index.html for a validator attempt 2023-10-31 22:40:25 -07:00
Landon Curt Noll a42aeeca8f add stub index files for each winner 2023-10-31 22:26:09 -07:00
Cody Boone Ferguson 1d6ef234d0 Fixes in 1990/jaw
The program (and the generated program made by shark.sh) no longer use
perror(3) and instead use fprintf(3) (writing to stderr). This is mostly
because in macOS errno == 0 looks like an error.

Some updates to the shark.sh script were also made.

The bug status has been updated as there is apparently another bug
though I was sure it was solved when I last looked at it. It happens
with and without the above updates. I'm unsure about other things too
but these are not in the bugs.md yet as I'm not even sure what to say
just yet.

Added try.sh script which does some of the commands. However as there is
that bug it doesn't do any comparisons - for now.
2023-10-30 09:56:23 -07:00
Cody Boone Ferguson 1df3b50b23 Fix bugs in 1990/westley
If no arg is specified it crashed. If arg was not a number > 0 it
entered an infinite loop. Both have been fixed, exiting 1.

These checks were NOT done in the alt code as that's a copy of the
original code.
2023-10-30 06:59:39 -07:00
Landon Curt Noll 8b71dd0d4f add or improve Bugs and (Mis)features text in README.md
The entries referenced in `bugs.md` now have, below the
"To build:" section, a "Bugs and (Mis)features section text"
that matches the `bugs.md` status.

Several entries had their "STATUS" changed from:
"STATUS: INABIAF - please **DO NOT** fix" to:
"STATUS: known bug - please help us fix":

This was done because, while some of the bugs were minor,
inviting someone to try and fix the issue does nil harm.
In a few cases a more difficult bug was also changed to
the "please help us fix".

While we do NOT want to waste time fixing such entries NOW,
letting others become involved and to try to fix the entry
is a good thing as to encourages people to study the entry
and try to fix the entry.  We don't need to accept a fix
that is offered, and of the fix transforms the source in
a less than desirable way, such a fix (if accepted) could
be become a alt source code.
2023-10-30 00:19:21 -07:00
Cody Boone Ferguson 11564b64ae Remove erroneous EOL \ in 1990/westley/README.md 2023-10-27 12:52:09 -07:00
Cody Boone Ferguson 024fe66d20 Typo fixes in 199[01]/dds
In the README.md file of 1990/dds there was a typo fixed.

In the thanks file for 1990/dds I clarified something and in the case of
1991/dds there was a typo that was confusing: '-Wno-error' should have
been '-Werror'; the fix enabled in the encrypted string the former but
the problem was some compilers in some platforms (clang, macOS) default
to -Werror which prevented the entry from compiling code as the code
generated had warnings.
2023-10-27 10:16:41 -07:00
Cody Boone Ferguson ff72c76ff1 Change alt/orig to build/to use heading levels
As the 'Alternate code' and 'Original code' heading level is now 2 the
'To build' and 'To use' subsections should be level 3, not 4, and also
reworded, this was done:

    sgit -e 's/^#### To build/### Alternate build/g' -e 's/^#### To use/### Alternate use/g' '*README.md'

Many more have to be updated and this will be done manually at another
time.
2023-10-26 04:53:08 -07:00
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
Cody Boone Ferguson ea2cad4fb8 Slight format fixes in 1990/baruch/README.md
This file is NOT finished. It should have been committed when making the
code look slightly more like the original code.
2023-10-25 05:56:25 -07:00
Cody Boone Ferguson 15524262a2 Make 1990/baruch look slightly more like original
That is to say I removed the 'int' from the variables and added to the
Makefile -Wno-implicit-int instead. The newline added by the judges is
still there, however.
2023-10-24 12:00:11 -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
Cody Boone Ferguson 86d9cd69f7 Update thanks for 1990/dg + format README.md
I had never put my name in the README.md file so this was not in the
thanks file either. This has been corrected.

Format fixed the README.md file.

Plus add -Wno-implicit-int to the CSILENCE in the Makefile.
2023-10-21 11:05:34 -07:00
Cody Boone Ferguson 60dea012fd Correct thanks in 1990/scjones
.. i.e. remove it from the README.md file, this time of Yusuke Endoh
(not his fault at all but rather a problem that occurred before the
superior idea of a single file was thought up).

I had already format fixed this file and the only other thing I did was
remove the address (but this is not strictly necessary as the author
information will eventually be generated from the JSON files).
2023-10-21 08:00:33 -07:00
Cody Boone Ferguson 50a02ffc8b Format/typo check 1990/cmills
I included a link in the judges' remarks written by Dennis Ritchie about
C history in order to explain something the author noted, that I felt
some might find interesting. It was stated:

    ... as well as the irritating compiler I was using which assumes
    x=*p++ means x*=p++ !

but the explanation is quite simple. In early C and also B the compound
assignments had the = first so that:

    x += 5

used to be written as:

    x =+ 5

This is also shown in Lions' Commentary on the Sixth Edition UNIX
Operating System but not linked, only referenced. Both the document and
the book are quite fascinating.
2023-10-21 07:57:23 -07:00
Cody Boone Ferguson 62644737e5 Remove me from 1990/baruch/README.md thanks
This was the last remaining missed case of me being in another README.md
which happened before the (I am a broken record, perhaps, but it's true)
vastly superior thanks-for-fixes.md file was thought of.

There are other entries not mine that refer to me but these come from
the authors themselves, not fixes, so they should stay the same.

I still have to check if there are any README.md files that have
references to Yusuke Endoh (for fixes) as well but that will be done in
another commit another time.

I updated the alternate code section and subsections here (the
formatting and text) as well as added at the top that there is an alt
version.
2023-10-19 06:03:53 -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 ddb78f6f33 fix trailing tabs before emtpy line in README.md 2023-10-18 15:47:00 -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 44728e695b Fix fix on fix of 1990/tbr
When I added the 'gets()' and 'exit()' macros to make the code look more
like the original I accidentally left out a space between 'gets(x)' and
'fgets(...' so that it looked like:

    #define gets(x)fgets((x),512,stdin)

which I believe is incorrect. It now looks instead like:

    #define gets(x) fgets((x),512,stdin)

The compact version that the authors provided was compile fixed quite
some time back but I never added the exit macro to match the original
more closely.

Also since the compact version was meant to be identical in function of
the entry and since that entry was changed to use fgets() (by the macro
gets()) I decided it would be better to make it use fgets() also, also
through redefining gets(). To make the line length closer in match to
the original compact version I changed the code to be two lines. This
wasn't necessary to do, as I recall, in the entry itself though it's
possible it was and I just managed to get the ASCII art the same or
almost the same.

The thanks-for-fixes.md file was updated for this change but
unfortunately I had made some changes yesterday that I forgot about
(just rewording) in another entry so that will also be in this commit.
2023-10-11 03:09:57 -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 5ae02fd2c9 Actually add 1990/tbr/tbr.alt.c to repo 2023-09-26 11:27:13 -07:00
Cody Boone Ferguson 398c2b0ed0 Add tbr.alt to 1990/tbr/.gitignore 2023-09-26 11:26:44 -07:00
Cody Boone Ferguson b86f6dc73e Improve fix of 1990/tbr
In particular the fix to make it more like the original. There was no
need to have the function prototypes at the top of the file.

I also added a couple -Wno- options to the CSILENCE variable in the
Makefile.

I also added to the Makefile so that make alt will build the alt version
(only functional difference is that there is gets() instead of fgets()).
2023-09-26 11:23:31 -07:00
Cody Boone Ferguson 8d05c31ba3 Clarify case-sensitivity in 1990/dds
There was a note that I added that it is case sensitive but it did not
state that it's all caps which is required (the author noted this but
that's further down in the file). This might be one of the only times
caps lock is useful (though still not useful enough to enable :-) )
2023-09-26 04:16:55 -07:00
Cody Boone Ferguson e68f6678e2 Improve my fix to 1990/cmills
Redefined gets to use fgets() with the appropriate args so that the code
can refer to gets() in the way it originally did.
2023-09-11 05:58:09 -07:00
Cody Boone Ferguson aaad5330a0 Improve fixes to 1990/dds
Two things had to be done here to make the code look much more like the
original (though it is hardly discernible at first glance).

First thing was I redefined free() to be free() + the comma operator as
it was a binary expression error in modern systems (this fix was
provided by Yusuke Endoh).

The second one was an improvement to one of my earlier several fixes and
in particular the prevention of warnings that cannot be disabled at
compilation/linking/runtime (the latter of which can be interspersed
with the output of the program): gets() to fgets(). The way this was
done is redefining gets() to use fgets(). The second and third arg are
the same so it was possible to just redefine gets() to use fgets() but
gets() having one arg like the original function. It should be noticed
that the original code used fgets() in one case because it has to read
from a different FILE * than stdin so there still is a reference to
fgets() that is not part of the macros.
2023-09-09 06:17:06 -07:00
Cody Boone Ferguson 32d992f945 Improve my earlier fixes to 1990/tbr
The code now looks much more like the original. This was done through
the use of macros to redefine exit() and gets() so that the exit() call
uses the comma operator (,0) (because it is used in a binary expression)
and gets() now uses fgets() (details below).

The usual problem with fgets() versus gets() (and it was changed
primarily because with macOS the warning about gets() also occurs at
runtime and it is interspersed with the interactive output of this
program and this caused confusing output though a nice side effect is
it's safer too) is that fgets() retains the newline whereas gets() does
not (supposedly for backwards compatibility).

In some cases one can get away with not removing it (at the expense of a
newline possibly being printed) but that was not possible here. This
normally means one has to check for fgets() returning NULL which
required another binary expression (... != NULL || exit(0),0 ...) which
made the line much longer and not snakey. It appears that in this case
(possibly because it's used in a for loop but I did not examine this in
more detail) one can get away with not checking for NULL first and just
remove the newline so that the line looks much more like the original.
2023-09-08 08:55:29 -07:00
Landon Curt Noll 7077378e9b improve make clobber for 1990/theorem 2023-08-04 20:00:11 -07:00
Cody Boone Ferguson 7546720ef5 Minor fixes in 1990/tbr
Remove note in Makefile that this entry does not compile with modern
compilers. I fixed that quite a while ago but neglected to remove the
message.

The README.md I changed 'i/o' to 'I/O' and I removed the reference to
the original version with gets() from the archive as it's now in the
tbr.orig.c file.
2023-08-01 07:35:04 -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 7a96697c4c Fix 1990/theorem/Makefile for clang in linux
Disabled a warning that defaulted to an error. In this case it was
easier to do it this way due to the way the entry works.
2023-07-07 10:47:11 -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