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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
The entry does not do what one might expect so add a note about this.
Fixed commands to try.
Format fixes.
Make main() void again as part of redefinition of INABIAF.
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.
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.
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.
Formatting and other notes. Many more need to be checked for this but I
wanted these changes out of the way of git status to try and clean my
working changes.