Add alt code to 2020/ferguson2

This alt code prints out the text one character at a time to make it
easier to read and more generally so it's not dumped out at once. This
also makes it a bit more like the original thing (at least as I recall
it :-) ).

The default sleep time is 400000 microseconds but one can change it
like:

    make clobber SLEEP=0 alt

which would disable the delay, making it like the original.

If it's < 0 then it's set to the default.

I did not yet add a try.sh script. That'll likely come later when
working on 2020. I only did this now as I thought of this idea and
didn't want to forget it.
This commit is contained in:
Cody Boone Ferguson committed 2023-12-09 10:53:00 -08:00
1 parent 0f3a4b8a68
commit 4d0b3a25fc
4 files changed
+117 -2

No files matched your search

+7 -2
View File
@@ -115,8 +115,8 @@ DATA= chocolate-cake.md enigma.1 input.txt obfuscation.key \
try.this.txt
TARGET= ${PROG} recode
#
ALT_OBJ=
ALT_TARGET=
ALT_OBJ= ${PROG}.alt.o
ALT_TARGET= ${PROG}.alt
#################
@@ -142,6 +142,11 @@ recode: recode.c
alt: data ${ALT_TARGET}
@${TRUE}
# Variable to control how long to sleep for alt code
#
SLEEP= 400000
${PROG}.alt: ${PROG}.alt.c
${CC} ${CFLAGS} -Dh=${SLEEP} $< -o $@ ${LDFLAGS}
# data files
#
data: ${DATA}