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).
This commit is contained in:
1 parent
31aecba7cc
commit
6ac32f659e
6 files changed
+46
-18
No files matched your search
@@ -1,5 +1,6 @@
|
||||
westley
|
||||
whereami
|
||||
whereami.alt
|
||||
westley.alt
|
||||
westley.orig
|
||||
prog.orig
|
||||
+12
-7
@@ -39,7 +39,8 @@ include ../../var.mk
|
||||
# Common C compiler warnings to silence
|
||||
#
|
||||
CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \
|
||||
-Wno-parentheses -Wno-pedantic -Wno-deprecated-non-prototype -Wno-int-conversion
|
||||
-Wno-parentheses -Wno-pedantic -Wno-deprecated-non-prototype -Wno-int-conversion \
|
||||
-Wno-implicit-int
|
||||
|
||||
# Common C compiler warning flags
|
||||
#
|
||||
@@ -129,18 +130,22 @@ all: data ${TARGET}
|
||||
sandwich supernova deep_magic magic charon pluto
|
||||
|
||||
${PROG}: ${PROG}.c
|
||||
@echo "NOTE: your terminal must wrap at 80 columns for this to work right!"
|
||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||
|
||||
whereami: ${PROG}
|
||||
${RM} -f $@
|
||||
${LN} $< $@
|
||||
${RM} -f whereami
|
||||
${LN} $@ whereami
|
||||
@echo "NOTE: your terminal must be at least 80 columns wide for this to work right"
|
||||
|
||||
# alternative executable
|
||||
#
|
||||
alt: data ${ALT_TARGET}
|
||||
@${TRUE}
|
||||
|
||||
${PROG}.alt: ${PROG}.alt.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||
${RM} -f whereami.alt
|
||||
${LN} $@ whereami.alt
|
||||
@echo "NOTE: your terminal must be at least 80 columns wide for this to work right"
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
@@ -206,7 +211,7 @@ clean:
|
||||
|
||||
clobber: clean
|
||||
${RM} -f ${TARGET} ${ALT_TARGET}
|
||||
${RM} -f whereami
|
||||
${RM} -f whereami whereami.alt
|
||||
@-if [ -e sandwich ]; then \
|
||||
${RM} -f sandwich; \
|
||||
echo 'ate sandwich'; \
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
pain(l,a,n,d)char**a,**n,**d;{int N=n,D=d;for(D=atoi(a[1])/2*80-atoi(a[2])-2043;
|
||||
pain(l,a,n,d)char**a,**n,**d;{int N=n,D=d,e;for(e=0,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);}
|
||||
[l++-3];)for(;N-->64;){putchar(!D+++33^l&1);if(!(++e%80))putchar('\n');}return 0;}
|
||||
main(l,a)char**a;{pain(l,a,0,0);}
|
||||
|
||||
Regular → Executable
+5
-5
@@ -1,12 +1,12 @@
|
||||
main(l
|
||||
,a)char**a;{int n;int d;
|
||||
if (l>2)for(d=atoi(a[1])/10
|
||||
,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);}
|
||||
[l++-3];)for(;n-->64;){
|
||||
putchar(!d+++33^l&1);if(!
|
||||
(++e%80))putchar('\n');}}
|
||||
Reference in new issue
Block a user