Improve 1994/westley alt + to use etc.

The to build/original build, to use/original use and try/original try
sections have been changed in the README.md to be much more consistent
and clearer (and detailed in some ways).

The to run section (not the original run section as that one is not
supposed to be compilable and is not compilable either) has
'./westley.alt' now as that will give you a message even right after
running 'make clobber alt'.

The alt code was changed in that blank lines were removed and (as a
cosmetic change) the 'return 0;'s were changed to 'exit(0);'s.
Originally the idea was to have 'int main()' be 'main()' (like the
original in the #if 0..#else..#endif block) but this will
trigger -Wimplicit-int and since one would not want to run a more
complicated 'make' invocation (instead of a simple 'cc' invocation or at
least a simpler one) it means the output is messed up with a warning.
But using exit(0); is fine albeit with an additional #include.

The try.alt.sh script now has an -o westley.alt and instead of running
./a.out it runs ./westley.alt. This makes it more like normal 'make alt'
targets.

The Makefile all target now has information about the alt build as it
does not have the restrictions of column width, character tab length and
wraparound.

The .gitignore no longer has a.out in it.
This commit is contained in:
Cody Boone Ferguson committed 2024-01-24 04:51:00 -08:00
1 parent f1346e8b60
commit 305361c003
5 files changed
+93 -61

No files matched your search

+7
View File
@@ -131,7 +131,14 @@ ${PROG}: ${PROG}.c
@echo "=-=-=-=-="
@echo "NOTE: this entry has different compiler errors based on compilation line."
@echo "The purpose is to find the right error message to win the game!"
@echo
@echo "NOTE: your terminal should be set to 80 columns, 8 character tabs, and wraparound."
@echo "If you wish to avoid these restrictions try the alternate code with:"
@echo
@echo " make alt"
@echo
@echo "for the default messages and the specific cc -D options for the rest of the game."
@echo "See the README.md for details or the try.sh and try.alt.sh scripts."
@echo "=-=-=-=-="
-${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}