Fix 1996/westley

It always segfaulted (though with the correct input it still showed the
right results) and when argc == 1 it showed an environmental variable.

The body of the for loop can now be empty (or so it appears). I put the
original in westley.alt.c because it has some interesting techniques in
which he wrote about (which I preserved in the README.md file). I also
put in the original code because I'm not entirely sure if the for loop
really can be empty in all cases. Certainly it can be in the scripts
provided but I don't know if there is a valid invocation that would need
it (but in any case it would always segfault with that loop body).

Updated 1996/westley/.gitignore (added westley.alt) and the Makefile so
that make alt will build westley.alt.

Formatting fixes in README.md.
This commit is contained in:
Cody Boone Ferguson committed 2023-03-20 08:42:46 -07:00
1 parent 674a05e15e
commit cf2ec74b17
5 files changed
+31 -8

No files matched your search

+2 -2
View File
@@ -167,8 +167,8 @@ OBJ= ${PROG}.o
DATA= clock1 clock2 clock3
TARGET= ${PROG}
#
ALT_OBJ=
ALT_TARGET=
ALT_OBJ= westley.alt.o
ALT_TARGET= westley.alt
#################