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:
Cody Boone Ferguson committed 2023-11-07 06:13:46 -08:00
1 parent 31aecba7cc
commit 6ac32f659e
6 files changed
+46 -18

No files matched your search

+12 -7
View File
@@ -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'; \