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.
This commit is contained in:
1 parent
19fdd5f944
commit
59de574ffb
5 files changed
+24
-16
No files matched your search
@@ -25,11 +25,11 @@ see the [original code](#original-code) section.
|
||||
This alternate version, which we recommend that you use in order to see what is
|
||||
happening with modern systems, and to not flash too quickly, which can be
|
||||
problematic for some people, can be configured to different speeds by way of the
|
||||
value used in `usleep()`. The default is `-DZ=65000` but you can easily change
|
||||
value used in `usleep()`. The default is `-DS=65000` but you can easily change
|
||||
it. To do so try:
|
||||
|
||||
```sh
|
||||
make CDEFINE="-DZ=70000" clobber alt
|
||||
make CDEFINE="-DS=70000" clobber alt
|
||||
./sloane.alt
|
||||
```
|
||||
|
||||
@@ -37,7 +37,7 @@ If you wish to make it like the original, as if the below [Original
|
||||
code](#original-code) was being used, you can do:
|
||||
|
||||
```sh
|
||||
make CDEFINE="-DZ=0" clobber alt
|
||||
make CDEFINE="-DS=0" clobber alt
|
||||
./sloane.alt
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user