Since some versions of clang object to the number of args to main()
(requiring, supposedly, 0, 2 or 3[0] args) and in the case that it is
enforced to not allow 1 I have added a second alt code that will be
compiled IF sicherman.c fails to compile (and it'll compile into
sicherman, not sicherman.alt2 or something like that). This required
another change which also is in sicherman.c.
The macros in the code that were C (which only translated to '/**/') and
V were changed to lower case letters. Then the 'c' in 'subr()' was
changed back to upper case. This also feels better since the 'C' (now
'c') in main() is although used it is not necessary either since it just
is an empty comment. The primary reason for this change is that in the
new version we obviously want the first arg of main() to be 'C' but with
the macro 'C' this would not be possible. The change to 'v' from 'V' is
simply to match case as both were in the original main() args (as ints).
I am not sure I like having to change the macro names to lower case but
at the same time the 'C="..."' in 'subr()' makes more sense to be upper
case as it's about the language and it also allows in the new version
that main() can have upper case C. Of course I could have made that
change in just the new version but it felt better to match style as much
as possible.
[0] The version that objects to this still seems to allow 1 arg even
though it claims that it requires 0, 2 or 3 args.
... I think :-)
The thanks file gives much more details on how this works and as I am
very tired and want to get this in so I can do other things I will not
duplicate it here. It might become clear in that file why I believe it
cannot be made any more like the original without breaking it though I
left some questions for the reader to answer for themselves.
The Makefile also had a fix: the 'alt' rule was in error so that running
'make alt' in the directory would compile it to 'alt', not
'sicherman.alt'.
Yet again I was able to make it more like the original. This was done by
changing the 'C' macro to be 'c' and 'V' macro to 'v' so that I could
use 'C' and 'V' in main(). A minor downside is that the ')' at the end
of the line
* up.) (In the C Manual)*/
had to be commented out but since main() can now have both 'C' and 'V'
as parameters of the same type this seems well worth it.
Notice how the 'c' macro is now what the 'C' originally was, /b/! The
'V' to 'v' macro did not change its definition but now 'V' can be used.
Also the variable _ can be assigned to in main() it's just that the
subr() function cannot be called (previously both parts were commented
out).
Since C is now free we can have in subr() C be a char * which is what it
was originally.
Finally instead of having pairs of '"'s in subr() for the string
(assigned to C) we just escape the inner quotes.
The only difference from the original, besides the macro names and the
look it up in the C Manual part (I think in my tired head), is that some
of the macros have to be expanded and the subr() cannot be called. If I
can later on (that I am working on this is circumstantial, seeing an
untracked file when trying to clean up git status as it's too messy now)
figure out how to not have to expand the macros that would be great but
it's very possible that this is as close to the original as possible.
But since I said that before who knows.
The word 'manual' should have been Manual and this has been restored.
I added to the thanks file more details on how it was fixed to not
require -traditional-cpp.
By changing some macros to what they used to expand to more of the code
can be used / not commented out. For instance now subr() no longer is
commented out. It cannot be used but it now is uncommented to make it
more like the original, even using the C macro as the arg (albeit
without a type specified as it actually just translates to /**/). The
macro that C used to use, 'b' (which is '*'), is still used just not in
C as doing so will cause compilation problems.
The single arg of main() was commented out because some versions of
clang do not only allow one arg to main().
There might have been other things to make it more like the original as
well.
My original fix that made it not require -traditional-cpp translated
some macros that rather made the entry not look as good by which I mean
it did not look like it used to but now much less is commented out
because the macro is left as is (though in use it is commented out ..
does that mean it's not used or used? :-) ). But now the main() function
type and args looks like it originally did except for one difference. It originally looked like:
main(C,V)
char **V;
/* C program. (If you don't
* understand it look it
*/ up.) (In the C Manual)
and it was changed to:
main(/*/,('\b'*'\b'>=_|_>'\t'*'\n')
char **('\b'*'\b'>=_|_>'\t'*'\n')
* C program. (If you don't
* understand it look it
* up.) (In the /*/ /*C*/ manual)
but now it looks like:
main(/*C,V)
char **V;*/
/* C program. (If you don't
* understand it look it
* up.) (In the C */manual)
which is much better and much more like the original entry.
Although the no longer valid code is commented out the macros and the
extra function (subr()) now exist to make it look more like it used to
before the fix.
I have another version to make it even more like the original but a
question that has to be answered is which should be the sicherman.c.
This can be decided at another time but I see it both ways: the way it
is now provides more educational value but it seems less 'authentic'
too. But on the other hand having it closer to the original with
commented out code could also be an issue - maybe. Even so the working
version might have some code that can be replaced with the macros to
make it more like before (this has yet to be determined).
For some good old C-fashioned fun I recommend people to compare
sicherman.c to sicherman.alt.c!
To the best of my knowledge with this there are no more entries that
require -traditional-cpp! The configure scripts in 2004/hibachi and
2005/mynx don't seem to be required to compile the code.
It's possible that other entries do need it that I've not yet discovered
but as of now no known entries need it.
Removed entry from bugs.md.
The 2020 winners are hinted it, but the source code is not there,
nor are the hints. Someone could look into the HTML and
see what was commented out, but that is not a problem because
WHO won is known and the name of their AWARD is known already.
Moreover a number of the winners have talked about what their
entirs do, so the commented out spoiler text is not a bit problem.
One will find HTML commented out with:
<!-- XXX remove when 2020 is ready
2020 links here
XXX remove when 2020 is ready -->
The "XXX remove when 2020 is ready" string is found at the
start and end comment blocks. Again, soneone could read
what was commented out, but that is OK since most of that
information is known or can be known. The following files
have such HTML comment blocks in them.
./winners.html
./years-spoiler.html
./years.html
In addition, ./all/summary.txt was modified to not
include the 2020 entries for the momemt.
The 2020 winner code AND write-ups are NOT part of this set.
p.s. The all/all.tar.bz2 does not contain the 2020 source code (yet?).