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

+19 -19
View File
@@ -9,55 +9,55 @@ if [[ -z "$CC" ]]; then
CC="cc"
fi
rm -f a.out
"${CC}" -Describe -Door westley.alt.c && ./a.out
rm -f westley.alt
"${CC}" -Describe -Door westley.alt.c -o westley.alt && ./westley.alt
sleep 1
echo 1>&2
"${CC}" -Describe -Drain westley.alt.c && ./a.out
"${CC}" -Describe -Drain westley.alt.c -o westley.alt && ./westley.alt
sleep 1
echo 1>&2
"${CC}" -Describe -Dwarf westley.alt.c && ./a.out
"${CC}" -Describe -Dwarf westley.alt.c -o westley.alt && ./westley.alt
sleep 1
echo 1>&2
"${CC}" -Describe -Debris westley.alt.c && ./a.out # or -Dungeon
"${CC}" -Describe -Debris westley.alt.c -o westley.alt && ./westley.alt # or -Dungeon
sleep 1
echo 1>&2
"${CC}" -Describe -Desk westley.alt.c && ./a.out
"${CC}" -Describe -Desk westley.alt.c -o westley.alt && ./westley.alt
sleep 1
echo 1>&2
"${CC}" -Describe -Dime westley.alt.c && ./a.out
"${CC}" -Describe -Dime westley.alt.c -o westley.alt && ./westley.alt
sleep 1
echo 1>&2
"${CC}" -Describe -Directory westley.alt.c && ./a.out
"${CC}" -Describe -Directory westley.alt.c -o westley.alt && ./westley.alt
sleep 1
echo 1>&2
"${CC}" -Dial -DUNgeon0614 westley.alt.c && ./a.out
"${CC}" -Dial -DUNgeon0614 westley.alt.c -o westley.alt && ./westley.alt
sleep 1
echo 1>&2
"${CC}" -Drink -Daiquiri westley.alt.c && ./a.out
"${CC}" -Drink -Daiquiri westley.alt.c -o westley.alt && ./westley.alt
sleep 1
echo 1>&2
"${CC}" -Drop -Daiquiri westley.alt.c && ./a.out
"${CC}" -Drop -Daiquiri westley.alt.c -o westley.alt && ./westley.alt
sleep 1
echo 1>&2
"${CC}" -Drop -Dwarf -Daiquiri westley.alt.c && ./a.out # or -Drop -Down -Daiquiri
"${CC}" -Drop -Dwarf -Daiquiri westley.alt.c -o westley.alt && ./westley.alt # or -Drop -Down -Daiquiri
sleep 1
echo 1>&2
"${CC}" -Describe -Document westley.alt.c && ./a.out
"${CC}" -Describe -Document westley.alt.c -o westley.alt && ./westley.alt
sleep 1
echo 1>&2
"${CC}" -Depress -Dotted -Dog westley.alt.c && ./a.out
"${CC}" -Depress -Dotted -Dog westley.alt.c -o westley.alt && ./westley.alt
sleep 1
echo 1>&2
"${CC}" -Depress -Dalmatian westley.alt.c && ./a.out # also accepts "Dalmation" [sic]
"${CC}" -Depress -Dalmatian westley.alt.c -o westley.alt && ./westley.alt # also accepts "Dalmation" [sic]
sleep 1
echo 1>&2
"${CC}" -Deposit -Dime westley.alt.c && ./a.out
"${CC}" -Deposit -Dime westley.alt.c -o westley.alt && ./westley.alt
sleep 1
echo 1>&2
"${CC}" -Drop -Donut westley.alt.c && ./a.out
"${CC}" -Drop -Donut westley.alt.c -o westley.alt && ./westley.alt
sleep 1
echo 1>&2
"${CC}" -Drop -Donut -Down -Drain westley.alt.c && ./a.out # or -Drop -Dwarf -Donut
"${CC}" -Drop -Donut -Down -Drain westley.alt.c -o westley.alt && ./westley.alt # or -Drop -Dwarf -Donut
echo 1>&2
rm -f a.out
rm -f westley.alt