Extended the note about clang - use the alt version (make alt) that I
made a while back if you have clang and not gcc. It previously only
reported that it doesn't work for clang but no note about a version that
works.
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.
The reason is it seems instructional and entertaining to see what
happens if the problem that the judges described in their remarks
occurs. Now one can do make clobber all alt; ./westley.alt; ./westley
and see if they are the same output.
The .gitignore file was updated - added westley.alt.
Updated README.md not only referring to the alt code but also format
fixes (the original fix of this commit).
One needs to make clobber for this entry to work right! It cannot easily
be added to the Makefile as the rule depends on the source code. This
probably should be fixed.
There were a couple problems to resolve. First
#define a(x)get/***/x/***/id())
p Z=chroot("/");L(!a(u)execv((q(v="/ipu6ljov"),v),C);Z-=kill(l);
...
case_2:L(!--V){O/*/*/c*c+c);wait(A+c*c-c);L(!Z)f(A,"\n",c);return(A*getgid());};C++;
does not work to create getuid() and getgid(). The second is that
for/*/(;;);/*/k()){O/*/*/c);
cannot form 'fork())' in modern C compilers. What is quite fun is that
the cpp can!
Removed this entry from bugs.md.
The problem was the exit() (redefined) was not being called in main().
This used to work but no longer does.
This fix was based on the file on the IOCCC website isaak.ansi.c. One of
the fixes in that one was the fact that in the older days one could
define define to something else and use that new macro as a define. But
since this was already done I didn't see the point in doing it again (it
was already in the repo as the diff shows - isaak.alt.c is the
original).
Removed this entry from bugs.md.
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.
Previously the call in main() returned a recursive call to main() (with
!) but the function that this became was called by main() but main() did
not return it. Now it does.
As well I changed the formatting ever so slightly of main(), making it
one line instead of three (counting the { and }).
This was fun to do even though it's also a very simple one liner plus
special handling in the Makefile (the latter part is so you can use it
the exact same way as the original). The original code just #included
/dev/tty. This does something just as magical! It can be used like:
make alt
# some C code
^D
./spinellis
For instance:
make alt
#include <stdio.h>
int main() { puts("hello world"); }
^D
./spinellis
Now those with clang can enjoy the entry without any functional
difference.
I have a very twisted point to make about the original version and this
version too: with a very slight change one can actually make a C++
version. Ick! :-)
The type of the second and third arg of main() were not char ** which
caused clang to have a fit. In gcc this is not a problem but it printed
gibberish nonetheless.
Changing the type of the second and third arg to compile with clang and
it printed the same (or similar?) gibberish as it did with gcc.
Adding a new function (pain() as it's annoying that clang requires
second, third and fourth args to main() to be 'char **'s even though in
this case it didn't work anyway) and calling it from main with the
appropriate args fixes the problem.
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.
The main link was dead but looking at the Internet Wayback Machine I
found that he changed domains and it's still valid. One entry had a
different URL but with a quick check I could not determine that it had
anything to do with him so I changed it to his own domain (which I
verified is his).
The 2001/westley/.gitignore was also updated as it has other source
files that are generated by the commands in the try section.
This is a subtle thing that I brought up on GitHub. Landon made the
change in many files but missed some in 1986 through 1989. I am aware of
a mass typo in the Makefiles but since some Makefiles are pending
changes I'm not doing that yet.
For 1988/dale it will not compile under macOS. I was able to get it to
almost compile under macOS but there was one problem. As well this 'fix'
will make it not compile under linux. One change was required which was
changing the #define _ define followed by #_ foo to be just '#define
foo' etc.
Added to 1988/isaak/.gitignore isaak.output.
1988/spinellis won't compile with clang.
1988/phillipps will compile but it is likely to segfault at least in
some systems (maybe not all).
Updated many README.md files for the changes above (and probably other
changes I've neglected to write in this log). Most changes in the readme
files are probably just formatting and probably typos as well as how to
compile and run entries nowadays. There might have been other changes.
Move copyright notice to the end.
Add a standard comment about the newly added `README.md` files.
Clean up trailing whitespace.
Fixed a few minor typos.