Merge pull request #336 from xexyl/2000-natori

This commit is contained in:
Landon Curt Noll authored and GitHub committed 2023-04-08 00:20:07 -07:00
commit 3a6b331f2b
5 files changed
+20 -20

No files matched your search

+7 -7
View File
@@ -13,13 +13,13 @@
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault in
this entry as well as it displaying environmental variables if argc == 1.
Although the scripts showed correct output these also segfaulted but with the
fix they no longer do. Now if argc < 5 (argv[4] is referenced) it will not do
anything and it will not segfault either (this was caused by the body of the
for() loop which is now empty (it doesn't appear to be needed at all). Note that
this does make some of the author's explanations / portability notes no longer
valid but we have kept them there for the interested. Thank you Cody for your assistance!
this entry as well as it displaying environmental variables. Although the
scripts showed correct output these also segfaulted but with the fix they no
longer do. Now if argc < 5 (argv[4] is referenced) it will not do anything and
it will not segfault either (this was caused by the body of the for() loop which
is now empty (it doesn't appear to be needed at all). Note that this does make
some of the author's explanations / portability notes no longer valid but we
have kept them there for the interested. Thank you Cody for your assistance!
## To run:
+6 -7
View File
@@ -1,11 +1,10 @@
# Best Object Orientation:
Alan De Smet
8531 Greenway Blvd. #206
Middleton, WI 53562
USA
http://www.upl.cs.wisc.edu/~chaos/
Alan De Smet
8531 Greenway Blvd. #206
Middleton, WI 53562
USA
<http://www.highprogrammer.com/alan/>
## To build:
@@ -13,7 +12,7 @@
make chaos
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:
make chaos_nohalf
+2 -1
View File
@@ -14,7 +14,8 @@
[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
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
mode) being instead `5+__FILE__`. It now is `"r"`. There was also a call to
+2 -1
View File
@@ -13,7 +13,8 @@ make
```
[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.
+3 -4
View File
@@ -12,10 +12,9 @@ Japan
make
```
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this so that it
works with modern compilers. Depending on the compiler it would either segfault
when run or not compile at all (gcc and clang respectively). Thank you Cody for
your assistance!
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for modern
compilers. Depending on the compiler it would either segfault when run or not
compile at all (gcc and clang respectively). Thank you Cody for your assistance!
## To run: