Files
ioccc/1992/westley/westley.c
T
Cody Boone Ferguson 6ac32f659e Remove 80 column limitation in 1992/westley
Because most people have much wider terminals nowadays and since not all
can be resized I have changed the code a bit so that every 80 iterations
(in the final loop) a newline is printed. This way as long as the
terminal is at least 80 columns the program will show the map correctly.
The alt version has been updated for this as well.

The Makefile now does not require one to run 'make whereami' to get the
link: one simply needs to run 'make' or 'make all' or 'make everything'.
For the alt program (the author provided one that I put into alt code
that is strictly for the US) running make alt or make everything will do
the same only it's whereami.alt.

The bugs.md has been updated noting that the terminal must be AT LEAST
80 columns. The README.md file has not been updated which means
referring to the bugs.md has not been done yet either. The Makefile note
about it requiring a terminal that wraps at 80 columns has been changed
to note that it needs a terminal that is at least 80 columns. The note
has been moved to after making the link (actually not a symlink but
perhaps it should be).
2023-11-07 06:13:46 -08:00

13 lines
338 B
C
Executable File

main(l
,a)char**a;{int n;int d,e;
if (l>2)for(e=0,d=atoi(a[1])/10
*80-atoi(a[2])/5-596;n="@NKA\
CLCCGZAAQBEAADAFaISADJABBA^\
SNLGAQABDAXIMBAACTBATAHDBAN\
ZcEMMCCCCAAhEIJFAEAAABAfHJE\
TBdFLDAANEfDNBPHdBcBBBEA_AL\
H E L L O, W O R L D! "
[l++-3];)for(;n-->64;){
putchar(!d+++33^l&1);if(!
(++e%80))putchar('\n');}}