This is to match the rest of the repo as this truly is an alt version,
not a supplementary program.
Updated README.md to have an 'Alternate code' section as well.
A number of files had to be changed as numerous files referred to
prog-simple.c.
For some reason this was missing from the repository. I was certain that
there was one so I looked at my archive and found in the winner preview
repo for 2018 that there was indeed a README file (README.markdown).
This has been added as 2018/README.md. It felt important that this was
added back.
I did NOT update the 2018 archive tarball as I'm not sure what to even
call it - perhaps just README.markdown - but also because I'm not sure
what the status is of my archive/2018 is.
I fixed the formatting to match the style that is being used in this
repo.
Make it a bit more portable (assuming env is under /usr/bin):
#!/usr/bin/env bash
instead of
#!/bin/bash
And although Landon suggested that I will never be done with changes in
my entries (which is probably true I confess ... :-) ) I suggest that in
this case this is rather useful (in fact I should do this for
2020/ferguson1 as there are several scripts there .. maybe
2020/ferguson2 but I don't know for sure).
Now it just exits 1 if a file cannot be opened. I do have a concern with
this type of fix which I will bring up on GitHub but it seems better
anyway to not crash with invalid input unless the entry should crash.
The fact the author noted that invalid paths as a limitation suggests in
this case that it is reasonable to fix. There are other limitations /
bugs the author mentions but perhaps those should not be fixed. That
remains to be seen I guess.
I can also now confirm that this entry does indeed work as expected; I
could not test it with commit ced8177ef9
but I had to test it here to make sure the changes did not affect the
functionality.
The original source, which has a really nice layout, can be found in
prog.alt.c and is referenced in the README.md. It can be built by make
alt.
Typo / formatting fixes.
I did not run the command to see if it works because I had a cat
sleeping between my legs. He just got up but I need to do other things
now, having finished for the first pass the year 2018.
The author noted a segfault on invalid files and I might look at
addressing this but this will come later if I do (likely but probably
will move the original source to prog.alt.c as I love the format so
much).
Move author information to first column.
Format fixes / adjustments.
Add link to prog.c and prog.alt.c when referred to in normal text.
Typo fix (well not really a typo: c99 etc. becomes C99 and so on).
Fix command in README.md for macOS:
-preview lena.ppm # On MacOS
+open -a Preview lena.ppm # On macOS
Move warning that the program does not protect against invalid input to
the top of the author's comments (seems the best place).
Format fixes.
Add to .gitignore files that are generated by suggested commands.
Add links to script in entry when referred to in README.md.
Fix scripthd to refer to not prog but ./prog.
Fix dead link in README.html.
Formatting and possible typo fixes.
Formatting fixes in README.md.
Add links where reasonable instead of just backticks.
Rename discrepancies to discrepancies.md and make markdown format. Fix a
typo there.
Rename manpage to manpage.sh.
Rename tokenfix tokenfix.sh.
Make sure scripts were +x permissions.
Fixed path in README.md for manpage invocation.
Possibly typo fixes in README.md.
Formatting fixes and possibly typos (but mostly formatting).
On bold code blocks: I removed the bold because it appeared that some of
the formatting was messed up. I think this is okay though rather than
trying to fix the formatting of bold code blocks.
Set alt related target variables in Makefile so that make alt actually
works.
These were found on Yusuke Endoh's analysis of all the IOCCC winning
entries. I kept the ASCII art he had for the comments but his comments
for the entry seem like a good idea to include especially as he wrote
them himself and they add to the entry itself.
The try section actually triggers a long (or infinite? .. didn't check)
loop so I note this and also say how to break out of it (though most
would probably know how).
Mostly this update is about SDL and SDL2 and how to compile and run
entries that make use of it. But I first saw reference to this idea in
2018/giles/README.md.
I added to macOS section MacPorts which is another very popular package
manager for macOS (I personally don't like Homebrew and I use MacPorts
instead).
Minor fixes in 2018/giles/README.md (formatting plus make a URL an
actual link).
Formatting fixes in README.md.
Add entry to bugs.md as it will abort due to assertion failure. But this
is expected and the entry works fine (open the html file and you'll see
that). So INABIAF.
I had put in the README.md that the entry needs XQuartz for macOS
because it uses X11 but this is not true (I should have known as this
was my favourite entry that year in the preview and it still is). The
point was that Terminal.app of macOS might not work. This has been
corrected.
As it happens it appears to work fine for me which I noted in the
README.md.
Formatting fixes, slight improvements and possibly typo fixes.
Add missing make rule docs that was referred to in the README.md but was
missing from the Makefile. It was found in the
archive/2020/poikola/Makefile.
Update .gitignore with files created by the commands in the README.md
(and some that can be with the right combinations that are not noted).
Typo and formatting fixes in README.md.
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.
Just some formatting fixes and in some cases add links to XQuartz for
macOS Mountain Lion and beyond. More entries (probably many more) have
to have that link added but those will be found and fixed in time.
For Makefiles that have alt related rules, moved
the related rules under the alt rule section.
In some cases where there is no alt code,
removed alt rules and/or targets.
Add instructions on how to install SDL or SDL2 for macOS, Linux and
Debian for:
2005/jetro
2014/maffiodo1
2018/giles
Put variables and instructions into the top level `var.mk` file.
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.
Fix test.sh for shellcheck.
Minor fixes to README.md including moving the author information (that
is my information :-) ) to the first column of the file as not having it
prevents links from being generated right. This is a problem for the
other README.md files too and I'll be noting it on GitHub.
Some humour with html <del>..</del>.
Modified portability section to make it a bit simpler and suggest that I
won't be updating the list. I only include the original systems tested
for historical purposes. I won't be updating the list over time as that
would be annoying to do and would just make the already very long
document needlessly longer. It's already been almost 5 years since it
was updated.
Add a string to test-strings.txt.
Warning: these are most likely not the final fixes or updates for my
entries as Landon has pointed out :-) but there shouldn't be many more
for now or hopefully for a long time. Unless I see something I won't
feel the need to fix anything.
Update 2018/burton2/README.md to have my middle name.