From c6f12a2a2379e6962eb62fe494994187b24a106d Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 6 Feb 2024 02:37:52 -0800 Subject: [PATCH 01/16] Add 2001/coupard/try.sh --- 2001/coupard/README.md | 13 +------------ 2001/coupard/try.sh | 36 ++++++++++++++++++++++++++++++++++++ thanks-for-help.md | 13 +++++++++---- 3 files changed, 46 insertions(+), 16 deletions(-) create mode 100755 2001/coupard/try.sh diff --git a/2001/coupard/README.md b/2001/coupard/README.md index 9b189172a..2de6e454b 100644 --- a/2001/coupard/README.md +++ b/2001/coupard/README.md @@ -14,19 +14,8 @@ make ## Try: -If you have access to `/dev/audio` or `/dev/sound/dsp`: - ```sh -./coupard > /dev/audio -./coupard > /dev/sound/dsp -``` - -If you do not, first install [sox](https://en.wikipedia.org/wiki/SoX). If you -use macOS you might install it from [MacPorts](https://www.macports.org) or -[Homebrew](https://brew.sh). Then you can try: - -```sh -./coupard | sox -q -traw -r8000 -b8 -e unsigned-integer - -tcoreaudio +./try.sh ``` diff --git a/2001/coupard/try.sh b/2001/coupard/try.sh new file mode 100755 index 000000000..315af9412 --- /dev/null +++ b/2001/coupard/try.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# +# try.sh - demonstrate IOCCC winner 2001/coupard +# + +# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it +# this way allows us to have the user specify a different compiler in an easy +# way. +[[ -z "$CC" ]] && CC="cc" + +# in this case we won't fail if we can't compile the code because we can still +# run the supplementary program. +make CC="$CC" everything >/dev/null + +# clear screen after compilation so that only the entry is shown +clear + +# hopefully sox(1) is installed but we check for it just in case that it's not +SOX="$(type -P sox)" +AUDIO="/dev/audio" +DSP="/dev/sound/dsp" + +if [[ -n "$SOX" ]]; then + echo "$ ./coupard | $SOX -q -traw -r8000 -b8 -e unsigned-integer - -tcoreaudio" 1>&2 + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 + ./coupard | "$SOX" -q -traw -r8000 -b8 -e unsigned-integer - -tcoreaudio + echo 1>&2 +elif [[ -S "$AUDIO" ]]; then + ./coupard > "$AUDIO" +elif [[ -S "$DSP" ]]; then + ./coupard > "$DSP" +else + echo "SoX not installed. Please install it and try again." 1>&2 + echo "Tip: see https://github.com/ioccc-src/temp-test-ioccc/blob/master/faq.md#sox." 1>&2 +fi diff --git a/thanks-for-help.md b/thanks-for-help.md index f4f8ef7f9..8e34cc346 100644 --- a/thanks-for-help.md +++ b/thanks-for-help.md @@ -2808,14 +2808,19 @@ void e(n,h){ ``` -This was not really worth a thanks per se but it was originally done by adding -`int`. The better solution is to disable the warning which is what was done -later on to make it more like the original. +and for some reason it was being reported as an error. This was not really worth +a thanks per se but it was originally done by adding `int`. The better solution +is to disable the warning which is what was done later on to make it more like +the original. -Yusuke provided a proper command line for macOS (to do with sound; see his +[Yusuke](#yusuke) provided a proper command line for those without `/dev/audio` +or `/dev/sound/dsp` (which is most everyone nowadays, it seems, and especially +those with macOS) (to do with sound; see his [/2013/endoh3/README.md](/2013/endoh3/README.md) entry where he also refers to sound devices in macOS). +Cody added the [try.sh](/2001/coupard/try.sh). + ## [2001/ctk](/2001/ctk/ctk.c) ([README.md](/2001/ctk/README.md])) From d5197a517063bf45f04f577e73ada61b93ce54d5 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 6 Feb 2024 02:42:41 -0800 Subject: [PATCH 02/16] Update less options in 2001/ollinger/try.sh The question is if I updated the less options by adding an option to less(1) is it really less options? Perhaps it is more (or if you prefer: more(1)) options for less? But since less is more, as they say, is it really more options for more(1) or less options for more(1)? This leaves more questions unanswered than answered questions (or questions answered), more or less! :-) --- 2001/ollinger/try.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/2001/ollinger/try.sh b/2001/ollinger/try.sh index 80998d955..711a7c6c3 100755 --- a/2001/ollinger/try.sh +++ b/2001/ollinger/try.sh @@ -19,25 +19,25 @@ clear read -r -n 1 -p "Press any key to run: ./ollinger 1000 | cut -c -200 (space = next page, q = quit): " echo 1>&2 -./ollinger 1000 | cut -c -200 | less -rEXF +./ollinger 1000 | cut -c -200 | less -rEXFK echo 1>&2 read -r -n 1 -p "Press any key to run: ./ollinger 1000 | cut -c -100 (space = next page, q = quit): " echo 1>&2 -./ollinger 1000 | cut -c -100 | less -rEXF +./ollinger 1000 | cut -c -100 | less -rEXFK echo 1>&2 read -r -n 1 -p "Press any key to run: ./ollinger 42 (space = next page, q = quit): " echo 1>&2 -./ollinger 42 | less -rEXF +./ollinger 42 | less -rEXFK echo 1>&2 read -r -n 1 -p "Press any key to run: ./ollinger 42 | cut -c -100 (space = next page, q = quit): " echo 1>&2 -./ollinger 42 | cut -c -100 | less -rEXF +./ollinger 42 | cut -c -100 | less -rEXFK echo 1>&2 read -r -n 1 -p "Press any key to run: ./ollinger 42 | cut -c -200 (space = next page, q = quit): " echo 1>&2 -./ollinger 42 | cut -c -200 | less -rEXF +./ollinger 42 | cut -c -200 | less -rEXFK echo 1>&2 From 6d32012023c8035c54c120a76519cdb6f7df3dd9 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 6 Feb 2024 03:19:48 -0800 Subject: [PATCH 03/16] Fix 1992/westley/whereami scripts if tput fails There was a typo: awkf instead of awk. ShellCheck fix as well. --- 1992/westley/whereami.alt.sh | 18 ++++++++++-------- 1992/westley/whereami.sh | 17 ++++++++++------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/1992/westley/whereami.alt.sh b/1992/westley/whereami.alt.sh index 4356e6790..61bac9c86 100755 --- a/1992/westley/whereami.alt.sh +++ b/1992/westley/whereami.alt.sh @@ -23,16 +23,18 @@ fi # make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it # this way allows us to have the user specify a different compiler in an easy # way. -if [[ -z "$CC" ]]; then - CC="cc" -fi +[[ -z "$CC" ]] && CC="cc" # try getting the columns the simple way first: tput cols -COLUMNS="$(tput cols)" - -if [[ "$?" -ne 0 ]]; then - # if tput failed for any reason try stty(1) with awk(1): - COLUMNS="$(stty size|awkf '{print $NF}')" +if ! COLUMNS="$(tput cols)"; then + # if tput failed for any reason try stty(1) with awk(1). + # + # Disable this warning of shellcheck as it's wrong: awk needs single quotes. + # + # SC2016 (info): Expressions don't expand in single quotes, use double quotes for that. + # https://www.shellcheck.net/wiki/SC2016 + # shellcheck disable=SC2016 + COLUMNS="$(stty size|awk '{print $NF}')" fi if [[ "$COLUMNS" -lt 80 ]]; then diff --git a/1992/westley/whereami.sh b/1992/westley/whereami.sh index 811ca6474..cf36ebb1a 100755 --- a/1992/westley/whereami.sh +++ b/1992/westley/whereami.sh @@ -23,15 +23,18 @@ fi # make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it # this way allows us to have the user specify a different compiler in an easy # way. -if [[ -z "$CC" ]]; then - CC="cc" -fi +[[ -z "$CC" ]] && CC="cc" # try getting the columns the simple way first: tput cols -COLUMNS="$(tput cols)" -if [[ "$?" -ne 0 ]]; then - # if tput failed for any reason try stty(1) with awk(1): - COLUMNS="$(stty size|awkf '{print $NF}')" +if ! COLUMNS="$(tput cols)"; then + # if tput failed for any reason try stty(1) with awk(1). + # + # Disable this warning of shellcheck as it's wrong: awk needs single quotes. + # + # SC2016 (info): Expressions don't expand in single quotes, use double quotes for that. + # https://www.shellcheck.net/wiki/SC2016 + # shellcheck disable=SC2016 + COLUMNS="$(stty size|awk '{print $NF}')" fi if [[ "$COLUMNS" -lt 80 ]]; then From ff2bb17212b05d23f1651db89735e23dcc70c76d Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 6 Feb 2024 03:24:57 -0800 Subject: [PATCH 04/16] Change awk(1) to cut(1) in 1992/westley/whereami* Use of awk(1) is actually overkill and there is already enough overkill if no location is specified: it might nuke the world or the US, depending on submitted entry or alt code (provided in remarks of the author)! :-) --- 1992/westley/whereami.alt.sh | 10 ++-------- 1992/westley/whereami.sh | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/1992/westley/whereami.alt.sh b/1992/westley/whereami.alt.sh index 61bac9c86..04195524b 100755 --- a/1992/westley/whereami.alt.sh +++ b/1992/westley/whereami.alt.sh @@ -27,14 +27,8 @@ fi # try getting the columns the simple way first: tput cols if ! COLUMNS="$(tput cols)"; then - # if tput failed for any reason try stty(1) with awk(1). - # - # Disable this warning of shellcheck as it's wrong: awk needs single quotes. - # - # SC2016 (info): Expressions don't expand in single quotes, use double quotes for that. - # https://www.shellcheck.net/wiki/SC2016 - # shellcheck disable=SC2016 - COLUMNS="$(stty size|awk '{print $NF}')" + # if tput failed for any reason try stty(1) with cut(1). + COLUMNS="$(stty size|cut -f2 -d' ')" fi if [[ "$COLUMNS" -lt 80 ]]; then diff --git a/1992/westley/whereami.sh b/1992/westley/whereami.sh index cf36ebb1a..f15af4952 100755 --- a/1992/westley/whereami.sh +++ b/1992/westley/whereami.sh @@ -27,14 +27,8 @@ fi # try getting the columns the simple way first: tput cols if ! COLUMNS="$(tput cols)"; then - # if tput failed for any reason try stty(1) with awk(1). - # - # Disable this warning of shellcheck as it's wrong: awk needs single quotes. - # - # SC2016 (info): Expressions don't expand in single quotes, use double quotes for that. - # https://www.shellcheck.net/wiki/SC2016 - # shellcheck disable=SC2016 - COLUMNS="$(stty size|awk '{print $NF}')" + # if tput failed for any reason try stty(1) with cut(1). + COLUMNS="$(stty size|cut -f2 -d' ')" fi if [[ "$COLUMNS" -lt 80 ]]; then From 16473d3633907a2a659d2664dc69a06baed9b841 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 6 Feb 2024 03:28:43 -0800 Subject: [PATCH 05/16] Change awk to cut in 2000/bmeyer/try.sh --- 2000/bmeyer/try.sh | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/2000/bmeyer/try.sh b/2000/bmeyer/try.sh index ee56ad4fe..ea560b89f 100755 --- a/2000/bmeyer/try.sh +++ b/2000/bmeyer/try.sh @@ -19,17 +19,12 @@ clear # be determined: we just use a default value. # # try getting the columns the simple way first: tput cols -if ! COLUMNS="$(tput cols)"; then - # if tput failed for any reason try stty(1) with awk(1). - # - # Disable this warning of shellcheck as it's wrong: awk needs single quotes. - # - # SC2016 (info): Expressions don't expand in single quotes, use double quotes for that. - # https://www.shellcheck.net/wiki/SC2016 - # shellcheck disable=SC2016 - COLUMNS="$(stty size|awk '{print $NF}')" - - if [[ "$?" -ne 0 ]]; then +if COLUMNS="$(tput cols)"; then + # if tput failed for any reason try stty(1) with cut(1). + COLUMNS="$(stty size|cut -f2 -d' ')" + + # if however either stty size or cut fails, set to 150. + if [[ "${PIPESTATUS[0]}" -ne 0 || "${PIPESTATUS[1]}" -ne 0 ]]; then COLUMNS=150 fi fi From 5e6744b43f4b95866118e9be93123416bc421d79 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:08:26 -0800 Subject: [PATCH 06/16] Minor improvements to tmp/update-manifest.sh --- tmp/update-manifest.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/tmp/update-manifest.sh b/tmp/update-manifest.sh index face10c26..5110b2b46 100755 --- a/tmp/update-manifest.sh +++ b/tmp/update-manifest.sh @@ -81,7 +81,7 @@ fi # first determine if git is executable if [[ -z "$GIT" || ! -f "$GIT" || ! -x "$GIT" ]]; then - echo "$0: ERROR: git not an executable file: $GIT" 1>&2 + echo "$0: ERROR: git not a regular executable file: $GIT" 1>&2 exit 3 fi @@ -106,22 +106,33 @@ if ! cd "$TOPDIR"; then fi # I have found problems using git rev-parse to verify that we're in a git repo -# so use git status instead. Plus we need the user to see git status anyway. -"$GIT" status 1>&2 -status="$?" -if [[ "$status" -ne 0 ]]; then +# plus we need the user to see git status anyway so use git status instead. +if ! "$GIT" status 1>&2; then echo "$USAGE" 1>&2 echo 1>&2 echo "$(basename "$0"): ERROR: ${PWD} is not a git repository" 1>&2 exit 3 fi +echo 1>&2 +echo "NOTE: manifest.numbers and manifest.csv may be modified here but nothing else" 1>&2 +echo "may be and no new files may be staged for commit either:" 1>&2 read -r -p "Do you have a clean state from git status (Y/N)? " if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then echo "$0: exiting 4 due to user telling us there's a problem." 1>&2 exit 4 fi +# ask user if they're on the correct branch +# +echo "Showing branches: " 1>&2 +"$GIT" branch 1>&2 +read -r -p "Are you on the right branch (Y/N)? " +if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then + echo "$0: exiting 4 due to user telling us there's a problem." 1>&2 + exit 4 +fi + # now cd to the tmp directory # if ! cd tmp; then From a71cf005a20aaf61c52b940e1c8563689fec241a Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:09:11 -0800 Subject: [PATCH 07/16] Add link to sound FAQ to 2013/endoh3/try.sh --- 2013/endoh3/try.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/2013/endoh3/try.sh b/2013/endoh3/try.sh index 39586e6b2..7fe5cb64a 100755 --- a/2013/endoh3/try.sh +++ b/2013/endoh3/try.sh @@ -76,6 +76,7 @@ endoh3() echo 1>&2 else echo "Please install either SoX, ruby or padsp (from PulseAudio)." 1>&2 + echo "Tip: see https://github.com/ioccc-src/temp-test-ioccc/blob/master/faq.md#sox." 1>&2 exit 1 fi fi From 7efbf6f87ab7eb8f0e096b5ff4c3be2f6312179b Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:10:26 -0800 Subject: [PATCH 08/16] Minor update to 2001/dgbeards/README.md Remove reference to the jargon file. The bugs.md file already notes that the entry is supposed to crash if it loses. --- 2001/dgbeards/README.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/2001/dgbeards/README.md b/2001/dgbeards/README.md index 759f75bca..986d101ea 100644 --- a/2001/dgbeards/README.md +++ b/2001/dgbeards/README.md @@ -55,13 +55,6 @@ It's a very simple thing to do. Read the author's remarks for clues. This game crashes if it loses. -This is supposed to happen. As is written in the -[The Jargon File](http://catb.org/jargon/html/F/feature.html): - -``` -That's not a bug, that's a feature. -``` - ## Judges' remarks: From 11c1c7ee33a23fa893aa472f480f66186f863a58 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:18:23 -0800 Subject: [PATCH 09/16] Add missing less calls to 2004/hoyle/try.sh --- 2004/hoyle/try.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/2004/hoyle/try.sh b/2004/hoyle/try.sh index a2b138cd7..ed453a82c 100755 --- a/2004/hoyle/try.sh +++ b/2004/hoyle/try.sh @@ -18,43 +18,43 @@ clear read -r -n 1 -p "Press any key to run: ./hoyle 10 0.5 (space = next page, q = quit): " echo 1>&2 -./hoyle 10 0.5 +./hoyle 10 0.5 | less -rEXFK echo 1>&2 read -r -n 1 -p "Press any key to run: ./hoyle 1 1 1 1 (space = next page, q = quit): " echo 1>&2 -./hoyle 1 1 1 1 +./hoyle 1 1 1 1 | less -rEXFK echo 1>&2 read -r -n 1 -p "Press any key to run: ./hoyle 2 0 1 0 -0.001 (space = next page, q = quit): " echo 1>&2 -./hoyle 2 0 1 0 -0.001 +./hoyle 2 0 1 0 -0.001 | less -rEXFK echo 1>&2 read -r -n 1 -p "Press any key to run: ./hoyle 1 2 3 42 -0.42 (space = next page, q = quit): " echo 1>&2 -./hoyle 1 2 3 42 -0.42 +./hoyle 1 2 3 42 -0.42 | less -rEXFK echo 1>&2 read -r -n 1 -p "Press any key to run: ./hoyle 42 42 42 42 42 42 (space = next page, q = quit): " echo 1>&2 -./hoyle 42 42 42 42 42 42 +./hoyle 42 42 42 42 42 42 | less -rEXFK echo 1>&2 read -r -n 1 -p "Press any key to run: ./hoyle 42 42 42 42 42 (space = next page, q = quit): " echo 1>&2 -./hoyle 42 42 42 42 42 +./hoyle 42 42 42 42 42 | less -rEXFK echo 1>&2 read -r -n 1 -p "Press any key to run: ./hoyle 0 0 1 | tee hoyle1.txt (space = next page, q = quit): " echo 1>&2 -./hoyle 0 0 1 | tee hoyle1.txt | less -rEXF +./hoyle 0 0 1 | tee hoyle1.txt | less -rEXFK echo 1>&2 read -r -n 1 -p "Press any key to run: ./hoyle 0 0 2 | tee hoyle2.txt (space = next page, q = quit): " echo 1>&2 -./hoyle 0 0 2 | tee hoyle2.txt | less -rEXF +./hoyle 0 0 2 | tee hoyle2.txt | less -rEXFK echo 1>&2 read -r -n 1 -p "Press any key to run: diff -s hoyle1.txt hoyle2.txt: " From 2b65db6e95239ebbf11e85e85e3340f9a4356186 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:21:17 -0800 Subject: [PATCH 10/16] Update less options in 2004/newbern/try.sh --- 2004/newbern/try.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2004/newbern/try.sh b/2004/newbern/try.sh index fa2265691..7e18aa363 100755 --- a/2004/newbern/try.sh +++ b/2004/newbern/try.sh @@ -17,7 +17,7 @@ clear read -r -n 1 -p "Press any key to run: ./newbern newbern.dat \"IOCCC 2004\" (space = next page, q = quit): " echo 1>&2 -./newbern newbern.dat "IOCCC 2004" | less -rEXF +./newbern newbern.dat "IOCCC 2004" | less -rEXFK echo 1>&2 read -r -n 1 -p "Press any key to run: echo SOS | ./newbern: " @@ -27,5 +27,5 @@ echo 1>&2 read -r -n 1 -p "Press any key to run: ./newbern newbern.dat IOCCC x (space = next page, q = quit): " echo 1>&2 -./newbern newbern.dat IOCCC x | less -rEXF +./newbern newbern.dat IOCCC x | less -rEXFK echo 1>&2 From 14b17997e7a30205df30b1e07d99cad859c67cef Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:22:50 -0800 Subject: [PATCH 11/16] Fix 2004/omoikane/try.sh - make all missing --- 2004/omoikane/try.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/2004/omoikane/try.sh b/2004/omoikane/try.sh index 791cbebae..a026aff27 100755 --- a/2004/omoikane/try.sh +++ b/2004/omoikane/try.sh @@ -1,5 +1,19 @@ #!/usr/bin/env bash +# +# try.sh - demonstrate IOCCC winner 2004/omoikane +# +# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it +# this way allows us to have the user specify a different compiler in an easy +# way. +if [[ -z "$CC" ]]; then + CC="cc" +fi + +make CC="$CC" all >/dev/null || exit 1 + +# clear screen after compilation so that only the entry is shown +clear read -r -n 1 -p "Press any key to run: ./omoikane omoikane.info omoikane.info omoikane.output: " echo 1>&2 From 9e503d1d7e25671004bc2dd38ce240c0e1329d22 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:27:00 -0800 Subject: [PATCH 12/16] Minor improvements to 2004/sds/try.sh --- 2004/sds/try.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/2004/sds/try.sh b/2004/sds/try.sh index 80fde7233..30cdb4c86 100755 --- a/2004/sds/try.sh +++ b/2004/sds/try.sh @@ -17,12 +17,12 @@ clear read -r -n 1 -p "Press any key to show sds.c (space = next page, q = quit): " echo 1>&2 -less -rEXF sds.c +less -rEXFK sds.c echo 1>&2 read -r -n 1 -p "Press any key to run: ./sds < sds.c | tee encoder.c (space = next page, q = quit): " echo 1>&2 -./sds < sds.c | tee encoder.c | less -rEXF +./sds < sds.c | tee encoder.c | less -rEXFK echo 1>&2 read -r -n 1 -p "Press any key to run: make encoder 2>/dev/null: " @@ -33,7 +33,7 @@ echo 1>&2 echo "$ ./encoder README.md &2 read -r -n 1 -p "Press any key to continue (space = next page, q = quit): " echo 1>&2 -./encoder README.md /dev/null: " echo 1>&2 @@ -43,7 +43,7 @@ echo 1>&2 echo "$ ./sds_msg < sds.c | tee sds2_msg.c | less -rEXF" 1>&2 read -r -n 1 -p "Press any key to continue (space = next page, q = quit): " echo 1>&2 -./sds_msg < sds.c | tee sds2_msg.c | less -rEXF +./sds_msg < sds.c | tee sds2_msg.c | less -rEXFK read -r -n 1 -p "Press any key to run: diff -s sds2_msg.c encoder.c: " echo 1>&2 @@ -58,12 +58,12 @@ echo 1>&2 echo "$ ./encoder message < README.md | tee remarks.md" 1>&2 read -r -n 1 -p "Press any key to continue (space = next page, q = quit): " echo 1>&2 -./encoder message < README.md | tee remarks.md | less -rEXF +./encoder message < README.md | tee remarks.md | less -rEXFK echo 1>&2 -read -r -n 1 -p "Press any key to run: diff remarks.md README.md: " +read -r -n 1 -p "Press any key to run: diff remarks.md README.md (space = next page, q = quit): " echo 1>&2 -diff remarks.md README.md # notice how similar they are +diff remarks.md README.md | less -rEXFK echo "Did you notice how similar they are?" 1>&2 echo 1>&2 From 00290f5f9d480eba45d49d446556a2b692773fb0 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:29:34 -0800 Subject: [PATCH 13/16] Fix make test in 2005/aidan Make sure program is compiled first. --- 2005/aidan/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/2005/aidan/Makefile b/2005/aidan/Makefile index a8316a53c..17a9bf762 100644 --- a/2005/aidan/Makefile +++ b/2005/aidan/Makefile @@ -132,11 +132,11 @@ all: data ${TARGET} ${PROG}: ${PROG}.c ${CC} ${CFLAGS} $< -o $@ ${LDFLAGS} -test: test-su.perl - ${PERL} $< +test: ${PROG} test-su.perl + ${PERL} test-su.perl -test-n0: test-su.perl - ${PERL} $< -n 0 +test-n0: ${PROG} test-su.perl + ${PERL} test-su.perl -n 0 # alternative executable # From 9a3ec1e894a342ce46d8c8bc78dbc132eb1a81a4 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:30:45 -0800 Subject: [PATCH 14/16] Add ctk.alt to 2001/ctk/.gitignore --- 2001/ctk/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/2001/ctk/.gitignore b/2001/ctk/.gitignore index ca41c8f61..c050af53d 100644 --- a/2001/ctk/.gitignore +++ b/2001/ctk/.gitignore @@ -2,6 +2,7 @@ # sort with: ../../bin/sgi *.dSYM ctk +ctk.alt ctk.orig indent indent.c From 4faef1b5ba25367bd244565286095ebcc63e50cc Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:32:09 -0800 Subject: [PATCH 15/16] Format update in 2005/boutines/try.sh --- 2005/boutines/try.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/2005/boutines/try.sh b/2005/boutines/try.sh index aae39ffbf..831b9a79f 100755 --- a/2005/boutines/try.sh +++ b/2005/boutines/try.sh @@ -43,7 +43,6 @@ if [[ ! -f result.svg && ! -f test.svg ]]; then fi if [[ -n "$CONVERT" ]]; then - read -r -n 1 -p "Press any key to run: convert test.svg test.png: " echo 1>&2 if ! convert test.svg test.png; then From 07939ce6f303ad2b4ae9f43eeec3ca7935d9c477 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:35:17 -0800 Subject: [PATCH 16/16] Further improve 2005/boutines/try.sh Add link to FAQ about ImageMagick. The README.md also links to this. --- 2005/boutines/README.md | 2 ++ 2005/boutines/try.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/2005/boutines/README.md b/2005/boutines/README.md index d013543a6..81a1746cc 100644 --- a/2005/boutines/README.md +++ b/2005/boutines/README.md @@ -9,6 +9,8 @@ make You will need an [SVG](https://www.w3.org/TR/SVG11/expanded-toc.html) viewer or a converter like [ImageMagick](https://imagemagick.org/index.php)'s `convert`. +See [FAQ 3.17 - How do I compile and install ImageMagick for entries that +require it?](/faq.md#imagemagick). Look here to find some [SVG Viewer Implementations](https://www.w3.org/Graphics/SVG/WG/wiki/Implementations). diff --git a/2005/boutines/try.sh b/2005/boutines/try.sh index 831b9a79f..d09f2a484 100755 --- a/2005/boutines/try.sh +++ b/2005/boutines/try.sh @@ -65,4 +65,5 @@ else echo 1>&2 echo "convert not found (ImageMagick not installed?)" 1>&2 echo "Try viewing *.svg with a graphics viewer that can view SVG files." 1>&2 + echo "Tip: see https://github.com/ioccc-src/temp-test-ioccc/blob/master/faq.md#imagemagick." 1>&2 fi