Clarify segfault fix in 1996/westley/README.md
This commit is contained in:
1 parent
62aea3c81c
commit
496a0c4a00
1 file changed
+15
-15
+15
-15
@@ -16,12 +16,14 @@ make all
|
|||||||
[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. Although the
|
this entry as well as it displaying environmental variables. Although the
|
||||||
scripts showed correct output, it somewhat lessened the usability because they
|
scripts showed correct output, it somewhat lessened the usability because they
|
||||||
segfaulted. With the fix they no longer do. If argc < 5 (argv[4] is referenced)
|
segfaulted and showed (an) environmental variable, interspersed with the output
|
||||||
it will not do anything and it will not segfault either - this was caused by the
|
of the program. With the fix they no longer have this problem. If `argc < 5`
|
||||||
body of the for() loop which is now empty (it doesn't appear to be needed at
|
(`argv[4]` is referenced) it will not do anything and it will not segfault
|
||||||
all). Note that you should check the [westley.alt.c](westley.alt.c) file when
|
either - this was caused by the body of the for() loop which is now empty (it
|
||||||
reading the author's comments. To see how to use the original see below. Thank
|
doesn't appear to be needed at all at least modernly). Note that you should
|
||||||
you Cody for your assistance!
|
check the [westley.alt.c](westley.alt.c) file when reading the author's
|
||||||
|
comments. To see how to use the original see below. Thank you Cody for your
|
||||||
|
assistance!
|
||||||
|
|
||||||
|
|
||||||
## To run:
|
## To run:
|
||||||
@@ -48,8 +50,8 @@ sh ./clock3
|
|||||||
### Alternate code:
|
### Alternate code:
|
||||||
|
|
||||||
An alternate version of this entry, [westley.alt.c](westley.alt.c), is provided.
|
An alternate version of this entry, [westley.alt.c](westley.alt.c), is provided.
|
||||||
This version is the original code [westley.alt.c](westley.alt.c) and does not
|
This version is the original code and does not contain the above mentioned
|
||||||
contain the above mentioned fixes.
|
fixes.
|
||||||
|
|
||||||
To compile this alternate version:
|
To compile this alternate version:
|
||||||
|
|
||||||
@@ -75,13 +77,11 @@ understand it.
|
|||||||
|
|
||||||
## Author's remarks:
|
## Author's remarks:
|
||||||
|
|
||||||
This 1-line program allows various analog ASCII clocks
|
This 1-line program allows various analog ASCII clocks to print out the time;
|
||||||
to print out the time; the ASCII clock is built from
|
the ASCII clock is built from the command line arguments, so many different
|
||||||
the command line arguments, so many different types of
|
types of clocks can be generated. Three different scripts are supplied to print
|
||||||
clocks can be generated. Three different scripts are
|
out a grandfather clock, a mantle clock that runs backwards, and a linear-style
|
||||||
supplied to print out a grandfather clock, a mantle
|
clock. (they are `clock1`, `clock2`, and `clock3`)
|
||||||
clock that runs backwards, and a linear-style clock.
|
|
||||||
(they are `clock1`, `clock2`, and `clock3`)
|
|
||||||
|
|
||||||
The program makes the following (possibly non-portable) assumptions:
|
The program makes the following (possibly non-portable) assumptions:
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user