Bug fix and add alt code to 2005/anon

Previously the alt rule in the Makefile defined NO_STTY which stops the
code from using stty(1) at the beginning and at the end. The stty sane
resulted in a bus error in macOS and since the sole purpose was to set
echo back on I changed it to stty echo (which works). (The NO_STTY macro
is still checked, see below.)

Added alt code with vi(m) like movements.

The way to get it to not use stty is to use either make alt-no_stty or
no_stty. The former will compile into anon.alt and the latter will
compile into anon.

Format and typo fix README.md file.
This commit is contained in:
Cody Boone Ferguson committed 2023-11-20 10:45:10 -08:00
1 parent 86b6b2e41e
commit d1a462593f
5 files changed
+306 -128

No files matched your search

+8 -3
View File
@@ -131,15 +131,20 @@ all: data ${TARGET}
${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
${PROG}.alt: ${PROG}.c
${CC} ${CFLAGS} -DNO_STTY $< -o $@ ${LDFLAGS}
no_stty: ${PROG}.c
${CC} ${CFLAGS} -DNO_STTY $< -o ${PROG} ${LDFLAGS}
# alternative executable
#
alt: data ${ALT_TARGET}
@${TRUE}
${PROG}.alt: ${PROG}.alt.c
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
alt-no_stty: ${PROG}.alt.c
${CC} ${CFLAGS} -DNO_STTY $< -o ${PROG}.alt ${LDFLAGS}
# data files
#
data: ${DATA}