Files
ioccc/1992/westley/westley.alt.orig.c
Cody Boone Ferguson 8adc677fd1 Greatly improve 1992/westley presentation
Added whereami.c and whereami.alt.c which, using curses, gets the number
of columns of the terminal. If < 80 it is an error. Otherwise it will
try compiling the westley.c or westley.alt.c and if successful it will
run the program with the args specified.

The try.sh script will use whereami or whereami.alt if it's possible to
compile and link (it might not if curses is not installed) and otherwise
westley and westley.alt.

Running make all will compile westley.c and also whereami.c; running
make alt will compile westley.alt.c and whereami.alt.c. The try.sh
script does NOT use that but instead uses make westley alt: this is
because we need to be sure that westley.c and westley.alt.c can compile
but it is NOT an error if whereami.c or whereami.alt.c cannot compile.
So the Makefile was done in a special way for this to not be a problem.

The original code of westley.alt.c has been added in westley.alt.orig.c.

The README.md has been updated for these improvements and this should
complete 1992/westley.
2023-11-08 04:12:39 -08:00

4 lines
163 B
C

main(l,a,n,d)char**a;{for(d=atoi(a[1])/2*80-atoi(a[2])-2043;
n="bnaBCOCXdBBHGYdAP[A M E R I C A].AqandkmavX|ELC}BOCd"
[l++-3];)for(;n-->64;)putchar(!d+++33^l&1);}