Get 1987/westley to compile

Unfortunately this ruins the symmetry but I did make it so that the
problematic code is still shown just commented out. The problem was one
can no longer assign to a cast.

The original version was preserved in westley.alt.c, a worthy thing I
think to do as symmetry is magical and it should be shown how it once
worked without having to look at the archive.
This commit is contained in:
Cody Boone Ferguson committed 2023-03-14 07:24:06 -07:00
1 parent 4581f98ca2
commit bc454ddb18
4 files changed
+68 -6

No files matched your search

+2 -3
View File
@@ -167,8 +167,8 @@ OBJ= ${PROG}.o
DATA=
TARGET= ${PROG}
#
ALT_OBJ=
ALT_TARGET=
ALT_OBJ= ${PROG}.alt.o
ALT_TARGET= ${PROG}.alt
#################
@@ -183,7 +183,6 @@ all: ${DATA} ${TARGET}
supernova deep_magic magic charon pluto
${PROG}: ${PROG}.c
@echo "NOTE: This entry requires a non-standard K&R C compiler to compile."
${CC} ${CFLAGS} $< -o $@ ${LIBS}
# alternative executable
+16 -1
View File
@@ -11,7 +11,22 @@ USA
make all
NOTE: This entry requires a non-standard K&R C compiler to compile.
NOTE: Cody Boone Ferguson fixed this so it could compile on modern systems. For
the original file see below.
## Alternate code:
If you have an older compiler you can try compiling the original source code
which is true symmetry:
make alt
## To run:
./westley
## Judges' comments:
+48
View File
@@ -0,0 +1,48 @@
char rahc
[ ]
=
"\n/"
,
redivider
[ ]
=
"Able was I ere I saw elbA"
,
*
deliver,reviled
=
1+1
,
niam ; main
( )
{/*\}
\*/
int tni
=
0x0
,
rahctup,putchar
( )
,LACEDx0 = 0xDECAL,
rof ; for
(;(int) (tni);)
(int) (tni)
= reviled ; deliver =
redivider
;
for ((int)(tni)++,++reviled;reviled* *deliver;deliver++,++(int)(tni)) rof
=
(int) -1- (tni)
;reviled--;--deliver;
(tni) = (int)
- 0xDECAL + LACEDx0 -
rof ; for
(reviled--,(int)--(tni);(int) (tni);(int)--(tni),--deliver)
rahctup = putchar
(reviled* *deliver)
;
rahctup * putchar
((char) * (rahc))
;
/*\
{\*/}
+2 -2
View File
@@ -26,11 +26,11 @@
,LACEDx0 = 0xDECAL,
rof ; for
(;(int) (tni);)
(int) (tni)
/* (int)*/(tni)
= reviled ; deliver =
redivider
;
for ((int)(tni)++,++reviled;reviled* *deliver;deliver++,++(int)(tni)) rof
for ((int)(tni)++,++reviled;reviled* *deliver;deliver++,++/*(int)*/(tni)) rof
=
(int) -1- (tni)
;reviled--;--deliver;