3 Commits
Author SHA1 Message Date
Cody Boone Ferguson 47c92bf277 Further improve alt code of 2006/sloane
Formatting looks more like the original.

Also silence unused parameter that came about the fix for some versions
of clang.
2023-10-22 15:54:02 -07:00
Cody Boone Ferguson 59de574ffb Fix 2006/sloane for some versions of clang
Unfortunately later versions of clang have an additional defect where
not only are the args of main() required to be specific types but there
can only be 0, 2 or 3 args. This program did not use the second arg so I
removed it originally but this will obviously not work for all systems
so I have brought the second arg back.

The unfortunate problem here is that the author used the letter Z for
the second arg and that's exactly what I have been using for the macro
for usleep() in alt code (Z for sleep of course). So here in order to
make it so that the entry looks as close to the original as possible I
have kept it as Z (changing the type to 'char **') and instead renamed
the Z macro to just S. S was selected as it can also stand for sleep but
also it's kind of (not quite but kind of) a backwards Z. Whether the
other entries should also be changed to be '-DS=...' is something to
consider for consistency but that can be decided another time. It
probably doesn't matter except that it does bother me as I don't like
inconsistent consistencies any more than I like consistent
inconsistencies or inconsistent consistencies.
2023-10-22 13:23:55 -07:00
Cody Boone Ferguson afe7bc1a17 Fix and add alt code to 2006/sloane
Alt code uses usleep() with the macro Z (default 65000 but one can
override it - I explain in the README.md how to do this) to let one see
in modern systems what is going on. This also allows for those (like
myself) who don't like to see text (or other things) zooming by very
rapidly. The former is more important for most people I'd think. It
didn't even occur to me what was going on until I slowed it down and the
award title didn't mean anything to me until after it either though I
read about this entry a long time ago. But still the latter part is
useful as well.

Format fix README.md.

Fix compilation in some systems: compilation issue is that some
systems (looking at fedora and CentOS linux and probably others) don't
link in lm by default.

The other issue is what the author stated - that not using certain
includes might cause problems. To not ruin the format of the code I
added -include ... to the Makefile.
2023-04-30 09:59:04 -07:00