From 328cd5924c51ca39d4e44027c2cf72ea7b13e418 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Mon, 24 Nov 2025 13:35:56 -0800 Subject: [PATCH 1/2] Fix next/try.alt.sh, update try script versions The try.alt.sh used 'make all' and it also called './prog' and not './prog.alt'. The version for both try.sh and try.alt.sh were updated. Presumably before the contest is opened this will change again (or not due to this) but since I edited the try.alt.sh and updated the version it seems fitting to update the try.sh version too. --- next/try.alt.sh | 12 ++++++------ next/try.sh | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/next/try.alt.sh b/next/try.alt.sh index 1480c3fa4..d2add1b44 100755 --- a/next/try.alt.sh +++ b/next/try.alt.sh @@ -4,7 +4,7 @@ # XXX - NOTE: please remove all "XXX - ... - XXX" lines, including this one - XXX # XXX - - XXX -# XXX - try.alt.sh example version: 28.1.1 2024-07-06 - XXX +# XXX - try.alt.sh example version: 29.0.0 2025-11-24 - XXX # 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. @@ -25,7 +25,7 @@ # XXX - Later, if the submission wins, it can be changed to 'everything'. - XXX # XXX - - XXX MAKE=$(command -v gmake) -${MAKE:=make} CC="$CC" all >/dev/null || exit 1 +${MAKE:=make} CC="$CC" alt >/dev/null || exit 1 # clear the screen # @@ -56,10 +56,10 @@ clear # try the program # -read -r -n 1 -p "Press any key to run: ./prog: " +read -r -n 1 -p "Press any key to run: ./prog.alt: " echo 1>&2 echo 1>&2 -./prog +./prog.alt echo 1>&2 # try the program with args @@ -69,11 +69,11 @@ echo 1>&2 # XXX - - XXX echo 'Let us try another example. Observe the line count of output and the last line of data!' 1>&2 echo 1>&2 -read -r -n 1 -p "Press any key to run: date | ./prog some command line | LANG=C sort > data: " +read -r -n 1 -p "Press any key to run: date | ./prog.alt some command line | LANG=C sort > data: " echo 1>&2 echo 1>&2 rm -f data -date | ./prog some command line | LANG=C sort > data +date | ./prog.alt some command line | LANG=C sort > data wc -l < data tail -n 1 data echo 1>&2 diff --git a/next/try.sh b/next/try.sh index 16c2a0086..b0163e361 100755 --- a/next/try.sh +++ b/next/try.sh @@ -4,7 +4,7 @@ # XXX - NOTE: please remove all "XXX - ... - XXX" lines, including this one - XXX # XXX - - XXX -# XXX - try.sh example version: 28.1.1 2024-07-06 - XXX +# XXX - try.sh example version: 29.0.0 2025-11-24 - XXX # 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. From 6cb22b90d45a9a24df3542d514575e1ec6f63211 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 25 Nov 2025 02:57:36 -0800 Subject: [PATCH 2/2] Fix bin/pandoc-wrapper to use verge(1) - #237 The script needs to use verge(1) (see https://github.com/xexyl/jparse/blob/master/verge.c) from the jparse repo (see https://github.com/xexyl/jparse/). NOTE: it is NOT recommended you install verge(1) from the jparse repo for IOCCC related things. Instead run (the first line only if you don't already have the mkiocccentry repo cloned and updated; if you have it you might wish to pull the current release): git clone https://github.com/ioccc-src/mkiocccentry.git" cd mkiocccentry && make clobber all cd jparse && sudo make install clobber This is because on a rare occasion the jparse repo can be ahead of the mkiocccentry's jparse/ directory. Tested with 'make markdown' (this is enough because it uses the pandoc-wrapper.sh and it's also what triggered the bug for @SirWumpus in NetBSD - which does not support sort -V). In theory the script should work under NetBSD now. --- bin/pandoc-wrapper.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/bin/pandoc-wrapper.sh b/bin/pandoc-wrapper.sh index c67e3b2fe..e68284a6b 100755 --- a/bin/pandoc-wrapper.sh +++ b/bin/pandoc-wrapper.sh @@ -20,6 +20,8 @@ # # Copyright (c) 2023,2024 by Landon Curt Noll. All Rights Reserved. # +# .. with an important bug fix in November 2025 by Cody Boone Ferguson. +# # Permission to use, copy, modify, and distribute this software and # its documentation for any purpose and without fee is hereby granted, # provided that the above copyright, this permission notice and text @@ -143,6 +145,17 @@ if [[ $status -eq 0 ]]; then TOPDIR=$("$GIT_TOOL" rev-parse --show-toplevel) fi export TOPDIR +# +VERGE=$(type -P verge) +export VERGE +if [[ -z $VERGE ]]; then + echo "$0: FATAL: verge is not installed or not in \$PATH" 1>&2 + echo "$0: notice: to install verge:" 1>&2 + echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2 + echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2 + echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2 + exit 5 +fi PANDOC_TOOL=$(type -P pandoc) export PANDOC_TOOL if [[ -z $PANDOC_TOOL ]]; then @@ -428,9 +441,7 @@ fi # verify that the pandoc version is >= the minimum version # -FIRST_VERSION=$(printf "%s\n%s" "$PANDOC_TOOL_VERSION" "$PANDOC_MIN_VERSION" | LC_ALL=C sort -V | head -1) -export FIRST_VERSION -if [[ $FIRST_VERSION != "$PANDOC_MIN_VERSION" ]]; then +if ! "$VERGE" "$PANDOC_TOOL_VERSION" "$PANDOC_MIN_VERSION"; then echo "$0: ERROR: pandoc: $PANDOC_TOOL version: $PANDOC_TOOL_VERSION <=" \ "minimum allowed: $PANDOC_MIN_VERSION" 1>&2 echo "$0: Warning: pandoc version must be >= $PANDOC_MIN_VERSION" 1>&2 @@ -438,7 +449,6 @@ if [[ $FIRST_VERSION != "$PANDOC_MIN_VERSION" ]]; then exit 5 fi - # execute pandoc # if [[ -z $NOOP ]]; then