Merge pull request #336 from xexyl/2000-natori
This commit is contained in:
5 files changed
+20
-20
No files matched your search
@@ -13,13 +13,13 @@
|
|||||||
|
|
||||||
|
|
||||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault in
|
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault in
|
||||||
this entry as well as it displaying environmental variables if argc == 1.
|
this entry as well as it displaying environmental variables. Although the
|
||||||
Although the scripts showed correct output these also segfaulted but with the
|
scripts showed correct output these also segfaulted but with the fix they no
|
||||||
fix they no longer do. Now if argc < 5 (argv[4] is referenced) it will not do
|
longer do. Now if argc < 5 (argv[4] is referenced) it will not do anything and
|
||||||
anything and it will not segfault either (this was caused by the body of the
|
it will not segfault either (this was caused by the body of the for() loop which
|
||||||
for() loop which is now empty (it doesn't appear to be needed at all). Note that
|
is now empty (it doesn't appear to be needed at all). Note that this does make
|
||||||
this does make some of the author's explanations / portability notes no longer
|
some of the author's explanations / portability notes no longer valid but we
|
||||||
valid but we have kept them there for the interested. Thank you Cody for your assistance!
|
have kept them there for the interested. Thank you Cody for your assistance!
|
||||||
|
|
||||||
|
|
||||||
## To run:
|
## To run:
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
# Best Object Orientation:
|
# Best Object Orientation:
|
||||||
|
|
||||||
Alan De Smet
|
Alan De Smet
|
||||||
8531 Greenway Blvd. #206
|
8531 Greenway Blvd. #206
|
||||||
Middleton, WI 53562
|
Middleton, WI 53562
|
||||||
USA
|
USA
|
||||||
|
<http://www.highprogrammer.com/alan/>
|
||||||
http://www.upl.cs.wisc.edu/~chaos/
|
|
||||||
|
|
||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
@@ -13,7 +12,7 @@
|
|||||||
make chaos
|
make chaos
|
||||||
|
|
||||||
NOTE: Some systems do not implement `halfdelay()` in their `libcurses`.
|
NOTE: Some systems do not implement `halfdelay()` in their `libcurses`.
|
||||||
You might try compiling with -lncurses of you have that library.
|
You might try compiling with -lncurses if you have that library.
|
||||||
Or you can build this entry without the `halfdelay()` call by:
|
Or you can build this entry without the `halfdelay()` call by:
|
||||||
|
|
||||||
make chaos_nohalf
|
make chaos_nohalf
|
||||||
|
|||||||
@@ -14,7 +14,8 @@
|
|||||||
|
|
||||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern
|
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern
|
||||||
systems (it did not work at all). He also made it so that if a file fails to
|
systems (it did not work at all). He also made it so that if a file fails to
|
||||||
open it does not return but rather skips the reading of the file.
|
open it does not return but rather skips the reading of the file. Doing this
|
||||||
|
lets the entry work right.
|
||||||
|
|
||||||
What was wrong? The call to `freopen()` was incorrect with the second arg (the
|
What was wrong? The call to `freopen()` was incorrect with the second arg (the
|
||||||
mode) being instead `5+__FILE__`. It now is `"r"`. There was also a call to
|
mode) being instead `5+__FILE__`. It now is `"r"`. There was also a call to
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ make
|
|||||||
```
|
```
|
||||||
|
|
||||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) changed this entry to
|
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) changed this entry to
|
||||||
use `fgets()` instead of `gets()` to make it safer. Thank you Cody!
|
use `fgets()` instead of `gets()` to make it safer and to prevent warnings from
|
||||||
|
showing up at linking or runtime. Thank you Cody!
|
||||||
|
|
||||||
For the original source [anderson.alt.c](anderson.alt.c) see below.
|
For the original source [anderson.alt.c](anderson.alt.c) see below.
|
||||||
|
|
||||||
|
|||||||
@@ -12,10 +12,9 @@ Japan
|
|||||||
make
|
make
|
||||||
```
|
```
|
||||||
|
|
||||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this so that it
|
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern
|
||||||
works with modern compilers. Depending on the compiler it would either segfault
|
compilers. Depending on the compiler it would either segfault when run or not
|
||||||
when run or not compile at all (gcc and clang respectively). Thank you Cody for
|
compile at all (gcc and clang respectively). Thank you Cody for your assistance!
|
||||||
your assistance!
|
|
||||||
|
|
||||||
|
|
||||||
## To run:
|
## To run:
|
||||||
|
|||||||
Reference in new issue
Block a user