Rather than check if $(CC) IS gcc or IS clang check for $(CC) containing
gcc or clang. This is because in some systems or conditions the compiler
might not be called JUST gcc or JUST clang. For instance gcc in MacPorts
is called gcc-mp-13 (for example) but without this change one would have
to symlink gcc to gcc-mp-13 or copy it to gcc.
The FAQ has been updated to address this.
This is for the rare case that the author described where the size needs
to be increased: it can now be done when compiling without having to
update the code. The original code is the recommended one try first; if
any of '-D' macros are not defined it will use the default, including
the size one. This so to make it easier to redefine just one, rather
than having to specify all the -D options.
The Makefile now has -Wno-implicit-int.
Running 'make all' will copy 'bas1' to 'bemazing' (what the author calls
the program).
The README.md file has been format/typo checked.
The try.sh allows one to pass in args: if a readable regular file it
will be fed to the program and otherwise it'll act as if it's a string.
It also has some additional commands that I thought might be fun to show
the entry.
Format/typo check README.md file.
The program (both main and alt versions) had main()'s return type as
void. To make it more portable, like another entry (that I was asked to
make this same change), I changed it to int.
A pointer to int was being used for fopen(3) and this has been changed
to a FILE * as using the wrong type has been observed in some cases to
cause programs to fail.
Make the code more like the original by using the old style main() arg
so that it could read 'int main(i,love_unix)' and also changing the
typedef for 'int' from 'lint' to be '_int' (see the code for why it no
longer can be 'int' and ask yourself why it can be 'int' in other cases).
Format/typo check README.md file.
The following scripts were added:
- try.sh: a fun use of the program.
- pootify.sh: a local pootifier that downloads a web page (or use a
local file) and either changes it to text or writes html which can be
viewed in a local browser.
- pootify.cgi.sh: a CGI version that the judges added but made to use
bash(1) and pass shellcheck(1). There is an issue that is known with
this and the 'Historical remarks' discusses this in more detail as well
as how to use the pootify.sh and pootify.cgi.sh scripts.
The README.md file has been formatted as well.
An annoying problem with markdown is that in single backtick code blocks
if the line is wrapped and the line begins with '-' (even in a code
block) the line becomes a list item and breaks the code.
The alt code should feel more at home for vi(m) users with movements.
With the exception of the drop key (d in the original) you can use the
original keys as well. Keys to drop the letter in alt version j or
space, whichever you prefer. Also you can quit the game gracefully (q).
That was something the author(s)? noted as something they wish they
could have done but due to contest size restrictions they could not.
The README.md file has been format and typo checked and this should
complete the review of this entry.
Added try.sh script with some additions beyond what the judges
suggested, making it a bit more fun.
Format and typo checked README.md file as well as the dorssel.md file.
The try.sh script has been added to run the various inputs the judges
recommended one try.
The Makefile now can do the intermediate steps. This is possible with
the way I fixed the entry to compile. If you look at the original code
it's different than the fixed version which is post processing (if I
recall correctly).
Updated .gitignore.
Unless there's a mistake in markdown formatting this should complete
1998/fanf's review.
The perl script that the author said they use to count chars in the code
(according to the IOCCC rules at the time) was added as charcount.pl.
Moved the macOS details/spoiler (though it has information about the
main entry as well) to macos.md.
README.md file format and typo checked.
This should complete this entry's review.
The constant that was in the code was changed to a macro in the Makefile
called SZ. Though it's highly unlikely that this will ever be needed the
author noted that increasing the value has some merit in a rare case so
it's now easier to do this (though one might have to type more,
admittedly, as all the -D options have to be specified but it no longer
is required to modify the code).
The README.md file has been format and typo checked. I did change the
way the man page was displayed (in the README.md) so this has to be
verified to look good but everything else should be good anyway.
The try.sh script I added was updated to have another command that was
in the judges' remarks. Instead it's now all in the try section and the
judges' remarks just have the comments, not the command to try.
When I updated the thanks file I noticed a couple things that could be
clarified in another entry so those minor fixes were made too but have
no relation to this commit.
The author stated that the program assumes EOF is -1 but for systems
that do not have this it will fail. This is indeed a valid concern as
the standard mandates that it's a value < 0 but it doesn't require it to
be -1.
The author also stated that the program could fail if 1 is not a return
value that indicates error so this was changed to EXIT_FAILURE as the
suggested was made. It is possible of course that I missed a place where
this should have been updated but I don't believe so. I am unaware of
any system where this would be a problem and I don't know why it matters
anyway but I made the change as the author stated it could be a problem
with portability.
The README.md file has been formatted and typo checked.
Added try.sh script.
This should complete this entry's review.
The alt build uses the same code but sets a default for those who don't
have page up and page down keys (like Macs). The file keysym.h that I
added has some of the keys (macro name and comment indicating what
character it corresponds to) from X11 (same lines in fact).
The alt code/build/use sections explain the defaults and how to
reconfigure it. The author provided more information on these details
and one can certainly do it with the main build too. The use of this alt
build is it sets a default for those without the page up and page down
but still allowing one to configure it differently. The keys were
somewhat arbitrarily selected to be on the left side of a QWERTY
keyboard as using the arrow keys and the right side of the keyboard at
the same time might be harder :-).
The README.md file has been typo/format checked and fixed and this
should complete 1998/banks I do believe.
Due to GitHub not serving nor rendering HTML files whose filename
starts with "." (dot), we renamed `.inventory.html` to `inventory.html`.
Renamed: `tmp/gen_dot_winner.sh` -> `tmp/gen_winner_json.sh`
Fixed URL generation for GitHub links in `inventory.html`.
The manifest was updated accordingly.
The `tmp/README.md` file was updated accordingly.
Fixed an incorrect author win for "1989_jar.2" in `author_wins.numbers`
and `author_wins.csv`.
Changed winner_JSON_format_version to "0.5 2023-11-04".
Added `gen_dot_winner.sh` tool to generate .winner.json and .inventory.html
for a winner. This tool uses [pandoc](https://pandoc.org) to convert
markdown to HTML.
Used this command to generate `.winner.json` and `.inventory.html` for
all winners:
```sh
./run_all.sh -v 1 -D 1 ./gen_dot_winner.sh
```
Updated `tmp/README.md` to reflect the above.
Retired "fake.gen_inventory.sh" to `tmp/OLD_manifest/fake.gen_inventory.sh`.
Added `-D level` flag to `run_all.sh` to specify the `-v level` for
the tool that is being run.
As requested on GitHub: a tool that will be written, readme2index, will,
as explained:
'... will take the converted HTML from the README.md markdown and
inject it into an HTML template. Things such title, award one and
author information will be injected into the HTML page ahead of the
HTML that was converted from the README.md markdown. Without going
into details of HOW at this time, the result will be a coherent HTML
index.html page with the winner title / award, winning author
information, and important file links come from other sources and
NOT from the README.md file.
The text from the 1st award line, thru the authorship information,
and up to but not including the "## To build:" line in the README.md
file will just get in the way. Moreover authors might be tempted to
try and maintain that top of README.md text instead of working with
the author/_author_handle_.json and winner .winner.json files.
This was done with my[0] sgit(1) (https://github.com/xexyl/sgit) tool like:
sgit -o -n -e '/^## To build:/,$p' '[12][0-9][0-9][0-9]/*/README.md'
[0] Is that shameless self-promotion? I don't know but I don't care: it
is generally a very useful tool and has been used in other repos too.
Besides, I've done it many times before and it's a great example that I
will be adding to the README.md file of the tool, one I hadn't thought
of doing.
The description said to run 'make dlowe.alt' and this is incorrect: it
should be 'make alt'.
Also since it has been requested that the award and author information
be removed from the README.md files this has been done since this fix
was already made but not yet committed.
In the previous commit it was stated that there were five more README.md
files counting this one, but that's incorrect as that one only was
removing the home(?) address of one of the authors (two I believe) so
that can happen with the mass edit of removing award and author
information. Thus not counting this one there are another three
README.md files I believe it is before that mass edit can happen.
Fixed cases where there was a bad trailing backslash.
Improved a few cases where a code block was needed
to highlight some text.
Changed a few cases where a code block needed to
declared as, say, a sh code block.
Fixed a few cases where the winner information was not properly formatted.
Plus a few nits and clarifying text was added.
The try.sh script runs the commands in the try section of the README.md.
The README.md had SOME format fixes.
The Makefile symlinks the program to samefile.
The author stated on their website that:
the Internet Systems Consortium (ISC) has added my samefile utility
to its treasure of software gems.
and this has been added to the README.md in the judges' remarks, along
with the web page for the program!
The author stated that there was no 'if's and I have made it that way
now.
The author stated that the number should be > 0 && < 27 so I added the
range check (was previously != 0). Too high value could segfault and < 0
was problematic too. 27 itself was code that could not compile. Since
the program is so beautiful it had been decided to fix the problems
which is why these changes were added too.
The above was done like:
((V[1]&&((atoi(V[1])>0&&atoi(V[1])<27)||(exit(1),1))));
The try.sh script has been added to the entry to try out a lot of
commands instead of copy pasting it from the judges' remarks.
Removed duplicate INABIAF information from README.md (which is why the
other updates).
Updated bugs.md with more information to the features like how output
can end up being gigabytes in length depending on the number specified
to the program. Removed from the bugs.md details about warnings to
ignore as the compiler -Wno- options take care of that now. Extra
parentheses were added to the above to prevent another warning (I was
not sure if all compilers and versions had the -Wno- so I decided to fix
it in the code itself).
The try section has a question to ponder as well. The detail is also in
the bugs.md file.
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.
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.
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.