From e4104152ebcfd863bd72c2af33505115b598bcdc Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Sun, 17 Dec 2023 12:11:40 -0800 Subject: [PATCH] Add missing alt subsections to 1988/westley The README.md file only had 'Alternate code' and no subsections for how to build or use the alt code. This is because I had already gone through this year before we changed the way to present alt code. --- 1988/westley/README.md | 38 ++++++++++++++++++++++++++------------ thanks-for-help.md | 9 +++++---- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/1988/westley/README.md b/1988/westley/README.md index d2ade21cb..387d79281 100644 --- a/1988/westley/README.md +++ b/1988/westley/README.md @@ -5,7 +5,8 @@ make all ``` NOTE: this version is a fixed version for modern C compilers. See the [Alternate -code](#alternate-code) section below for how to use the original. +code](#alternate-code) section below for how to use the original and why one +might wish to do so. ### Try: @@ -23,6 +24,30 @@ Also try: to show the code with followed by the result so you can truly see the magic. +## Alternate code: + +This version is the original which might not work as you expect nowadays. + + +### Alternate build: + +```sh +make alt +``` + + +### Alternate use: + +To see if your compiler has the problem described in the Judges' remarks below, +try: + +```sh +./westley.alt +``` + +Does it show the same output as `westley`? + + ## Judges' remarks: Your compiler must parse @@ -51,17 +76,6 @@ cc -E westley.alt.c ``` -## Alternate code: - -To see if your compiler has the problem described above try: - -```sh -make alt -./westley.alt -``` - -Does it show the same output as `westley`? - ## Author's remarks: diff --git a/thanks-for-help.md b/thanks-for-help.md index 032ae1525..ff246651a 100644 --- a/thanks-for-help.md +++ b/thanks-for-help.md @@ -676,12 +676,13 @@ was fixed by Misha Dynin, based on the judges' remarks, so that this would work with modern C compilers. We encourage you to try the alternate version to see what happens with current compilers! See the README.md files for details. -[Cody](#cody) changed the `int`s to be `float` as that's what they are printed as: not -strictly necessary but nonetheless more correct, even if not warned against. - -Cody added the [try.sh](/1988/westley/try.sh) script to show the magic of the +[Cody](#cody) added the [try.sh](/1988/westley/try.sh) script to show the magic of the entry as seeing the code with the result at once is far more beautiful. +Cody also changed the `int`s to be `float` as that's what they are printed as: +not strictly necessary but nonetheless more correct, even if not warned against. + + # 1989