From 70fa8f5ee9d3314577482f547fcc1e0b9fdb751a Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Wed, 18 Oct 2023 09:33:40 -0700 Subject: [PATCH] Add 1988/westley/demo.sh + format/typo check The reason for the demo is because when one looks at the code and then sees the output at the same time it's far more beautiful and magical. The README.md has been typo and format checked. With this commit, the README.md files for the 1988 entries have been checked and besides some things brought up on GitHub they should be in good order (for now?). --- 1988/westley/README.md | 12 ++++++++++-- 1988/westley/demo.sh | 15 +++++++++++++++ thanks-for-fixes.md | 3 +++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100755 1988/westley/demo.sh diff --git a/1988/westley/README.md b/1988/westley/README.md index cea7c3418..9aa04f881 100644 --- a/1988/westley/README.md +++ b/1988/westley/README.md @@ -10,8 +10,8 @@ US make all ``` -NOTE: this version is a fixed version for modern C compilers. See the Alternate -code section below for how to use the original. +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. ## Try: @@ -20,6 +20,14 @@ code section below for how to use the original. ./westley ``` +Also try: + +```sh +./demo.sh +``` + +to show the code with followed by the result so you can truly see the magic. + ## Judges' remarks: Your compiler must parse diff --git a/1988/westley/demo.sh b/1988/westley/demo.sh new file mode 100755 index 000000000..050823120 --- /dev/null +++ b/1988/westley/demo.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +clear +echo "$ cat westley.c" +cat westley.c + +sleep 1 + +echo "$ cc westley.c -o westley" +cc -std=gnu89 -Wall -Wextra -pedantic -Wno-error -Wno-implicit-function-declaration -Wno-return-type -O3 westley.c -o westley 2>/dev/null + +echo "$ ./westley" +./westley + +echo diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index 73e267248..4cae316c7 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -460,6 +460,9 @@ 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 added the [demo.sh](1988/westley/demo.sh) script to show the magic of the +entry as seeing the code with the result at once is far more beautiful. + ## [1989/fubar](1989/fubar/fubar.c) ([README.md](1989/fubar/README.md]))