2 files changed
+6
-2
No files matched your search
@@ -132,7 +132,6 @@ all: data ${TARGET}
|
|||||||
supernova deep_magic magic charon pluto
|
supernova deep_magic magic charon pluto
|
||||||
|
|
||||||
${PROG}: ${PROG}.c
|
${PROG}: ${PROG}.c
|
||||||
@echo "NOTE: this entry uses gets() so you might get a warning compiling and/or running this."
|
|
||||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
# alternative executable
|
# alternative executable
|
||||||
|
|||||||
+6
-1
@@ -14,7 +14,12 @@ USA
|
|||||||
compile and work with modern compilers. The problem was that `srand()` returns
|
compile and work with modern compilers. The problem was that `srand()` returns
|
||||||
void but it was used in a `||` expression. Thus the comma operator was needed.
|
void but it was used in a `||` expression. Thus the comma operator was needed.
|
||||||
Cody also changed the entry to use `fgets()` instead of `gets()` to make it
|
Cody also changed the entry to use `fgets()` instead of `gets()` to make it
|
||||||
safe for lines greater than 231 in length. Thank you Cody for your assistance!
|
safe for lines greater than 231 in length. Note that this now prints a newline
|
||||||
|
after the output but this seems like a worthy compromise for making it safer
|
||||||
|
(fixing it is more problematic than it is worth). A subtlety about this fix: if
|
||||||
|
a line is greater than 231 in length if the program chooses that line it might
|
||||||
|
print the first 231 characters or it might print (up to) the next 231 characters
|
||||||
|
and so on. Thank you Cody for your assistance!
|
||||||
|
|
||||||
|
|
||||||
## To run:
|
## To run:
|
||||||
|
|||||||
Reference in new issue
Block a user