From 3f78913efea967ff271b078430201c93839cb4f8 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Mon, 4 Dec 2023 11:45:40 -0800 Subject: [PATCH 1/3] Add missing 2000/rince/try.sh --- 2000/rince/try.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 2000/rince/try.sh diff --git a/2000/rince/try.sh b/2000/rince/try.sh new file mode 100755 index 000000000..2537b9246 --- /dev/null +++ b/2000/rince/try.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# try.sh - demonstrate IOCCC winner 2000/rince +# + +# 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" everything >/dev/null || exit 1 + +# clear screen after compilation so that only the entry is shown +clear + +echo "$ ./rince" 1>&2 +./rince + +echo "$ ./rince 0.001 $(./dmy2jd 7.8 1 1610)" 1>&2 +./rince 0.001 $(./dmy2jd 7.8 1 1610) + +echo "$ ./rince 0.01" 1>&2 +./rince 0.01 + +echo "$ ./rince 0 2441193.6" 1>&2 +./rince 0 2441193.6 + +echo "$ ./rince 0.01 2441193.6" 1>&2 +./rince 0.01 2441193.6 + +echo "$ ./rince 0 $(./dmy2jd 7.8 1 1610)" 1>&2 +./rince 0 $(./dmy2jd 7.8 1 1610) + +echo "$ ./rince 0 $(./dmy2jd 8.8 1 1610)" 1>&2 +./rince 0 $(./dmy2jd 8.8 1 1610) + +echo "$ ./rince 0 $(./dmy2jd 10.8 1 1610)" 1>&2 +./rince 0 $(./dmy2jd 10.8 1 1610) From 8f26d33d1556ee6fed62fab1cb90e3df7a27c8e7 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Mon, 4 Dec 2023 11:52:58 -0800 Subject: [PATCH 2/3] Improve 2000/primenum/try.sh + update .gitignore --- 2000/primenum/.gitignore | 1 + 2000/primenum/try.sh | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/2000/primenum/.gitignore b/2000/primenum/.gitignore index 858c9db1a..8efa69eac 100644 --- a/2000/primenum/.gitignore +++ b/2000/primenum/.gitignore @@ -1,3 +1,4 @@ primenum primenum.orig prog.orig +try.sh.txt diff --git a/2000/primenum/try.sh b/2000/primenum/try.sh index 46772a117..0020aaee6 100755 --- a/2000/primenum/try.sh +++ b/2000/primenum/try.sh @@ -28,7 +28,7 @@ rm -f try.sh.txt echo "$ ./primenum 101 < try.sh | ./primenum n > try.sh.txt" 1>&2 ./primenum 101 < try.sh | ./primenum n > try.sh.txt echo "$ diff try.sh try.sh.txt" -read -r -n 1 -p "Press any key to see diff (through less): " 1>&2 -diff try.sh try.sh.txt|less - +read -r -n 1 -p "Press any key to see diff (space = next page, q = quit): " 1>&2 +diff try.sh try.sh.txt|less -EXF +rm -f try.sh.txt From 0eeb501060c3c891cdf4ad54f2f6f24cacb332a3 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Mon, 4 Dec 2023 11:56:27 -0800 Subject: [PATCH 3/3] Fix synopsis in 2013/dlowe/README.md file Although it appears to accept non digits I did not have time to test it more and I see now it has no real purpose, showing the same thing, so I have removed that and noted that it expects numbers. --- 2013/dlowe/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2013/dlowe/README.md b/2013/dlowe/README.md index 2ec748179..e70eeebeb 100644 --- a/2013/dlowe/README.md +++ b/2013/dlowe/README.md @@ -19,10 +19,10 @@ For more detailed information see [2013 dlowe in bugs.md](/bugs.md#2013-dlowe). ## To use: ```sh -./dlowe [word...] +./dlowe [number...] ``` -where `[word...]` is one or more words including numbers or otherwise. +where `[number...]` is one or more number, space separated. ### Try: