From 0df21af4c4cf98844d1cb323c78db7f6cf0b3e83 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 10 Nov 2023 08:57:08 -0800 Subject: [PATCH] Fix 1994/horton/Makefile and README.md The alt code was being compiled with 'all' rather than 'alt'. The README.md file also has had format updates including referring to the alt code as well as the gtface.c. This should complete 1994/horton. --- 1994/horton/Makefile | 6 +++--- 1994/horton/README.md | 24 ++++++++++++++++++++++-- thanks-for-fixes.md | 7 ++++++- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/1994/horton/Makefile b/1994/horton/Makefile index e1f279403..1de5abd6e 100644 --- a/1994/horton/Makefile +++ b/1994/horton/Makefile @@ -114,10 +114,10 @@ PROG= ${ENTRY} # OBJ= ${PROG}.o DATA= gtface.data -TARGET= ${PROG} gtface ${PROG}.alt +TARGET= ${PROG} gtface # -ALT_OBJ= ${PROG}.alt.o -ALT_TARGET= ${PROG}.alt +ALT_OBJ= ${PROG}.alt.o gtface.o +ALT_TARGET= ${PROG}.alt gtface ################# diff --git a/1994/horton/README.md b/1994/horton/README.md index c84e30767..6b1688156 100644 --- a/1994/horton/README.md +++ b/1994/horton/README.md @@ -14,22 +14,42 @@ make all `A`, `B`, `C` and `D` are numeric arguments. + +### Try: + + ```sh ./horton 3 2 1 0 ``` +Also try: + +```sh +./gtface < gtface.data +``` ## Alternate code: This confuses cb greatly. See [horton.alt.c](horton.alt.c) for an unobfuscated/enhanced -version. To run this alternate version: +version. + + +### Alternate build: + ```sh make alt +``` + + +### Alternate use: + + +```sh ./horton.alt A B C D ``` -Use `horton.alt` as you would `horton` above. +Where A, B, C and D are like with `horton`. ## Judges' remarks: diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index 606792f14..e92a0ca2c 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -1760,7 +1760,12 @@ bugs.md](/bugs.md#1994-dodsond2) for more details. Cody fixed this to check that four args were specified. With the use of the C pre-processor macro and inclusion of stdlib.h in the Makefile the layout of the -source is exactly the same column width and no additional lines were added. +source is exactly the same column width and no additional lines were added. This +was done during one of the times where this was changed to bug status, for +better or worse. + +Cody also fixed the Makefile which was causing alt code to be compiled when it +shouldn't be. ## [1994/ldb](1994/ldb/ldb.c) ([README.md](1994/ldb/README.md]))