From b4d123eaa56a95c80442ff851be2394e8746e1ab Mon Sep 17 00:00:00 2001
From: Landon Curt Noll
Date: Sun, 11 Feb 2024 22:31:06 -0800
Subject: [PATCH] fix The N-th IOCCC in years.html
---
bin/gen-years.sh | 15 +++++++-------
years.html | 52 ++++++++++++++++++++++++------------------------
2 files changed, 34 insertions(+), 33 deletions(-)
diff --git a/bin/gen-years.sh b/bin/gen-years.sh
index b028f4c5e..da2dbeb90 100755
--- a/bin/gen-years.sh
+++ b/bin/gen-years.sh
@@ -565,14 +565,15 @@ fi
# write markdown for each IOCCC year in reverse order
#
-export YEAR_COUNT=0
+YEAR_COUNT=$(wc -l < "$TOP_FILE" | sed -e 's/[[:space:]]//g')
+export YEAR_COUNT
export YYYY
for YYYY in $("$TAC_TOOL" "$TOP_FILE"); do
# debug YYYY
#
if [[ $V_FLAG -ge 1 ]]; then
- echo "$0: debug[1]: starting to process year: $YYYY" 1>&2
+ echo "$0: debug[1]: using: $TOP_FILE starting to process year: $YYYY" 1>&2
fi
# verify that YYYY is a readable directory
@@ -624,10 +625,6 @@ for YYYY in $("$TAC_TOOL" "$TOP_FILE"); do
continue
fi
- # count this year
- #
- ((++YEAR_COUNT))
-
# write leading markdown for this IOCCC year
#
{
@@ -766,7 +763,7 @@ for YYYY in $("$TAC_TOOL" "$TOP_FILE"); do
else
cat > /dev/null
if [[ $V_FLAG -ge 3 ]]; then
- echo "$0: debug[3]: because of -n, $YYYY_DIR markdown data is NOT written into: $TMP_YEARS_MD" 1>&2
+ echo "$0: debug[3]: because of -n, markdown data is NOT written into: $TMP_YEARS_MD" 1>&2
fi
fi
@@ -784,6 +781,10 @@ for YYYY in $("$TAC_TOOL" "$TOP_FILE"); do
echo "$0: debug[3]: because of -n, IOCCC year $YYYY ending markdown data is NOT written into: $TMP_YEARS_MD" 1>&2
fi
fi
+
+ # count down this year
+ #
+ ((--YEAR_COUNT))
done
# use the md2html.sh tool to form a location HTML file, unless -n
diff --git a/years.html b/years.html
index aa3bc048a..3f054974a 100644
--- a/years.html
+++ b/years.html
@@ -120,7 +120,7 @@ href="#1990">1990 | 1989 | 1988 | 1987
1986 | 1985 | 1984
-2020 - The 1st IOCCC
+2020 - The 27th IOCCC
Download IOCCC 2020 entry source
@@ -155,7 +155,7 @@ indentation
CPP
Jump to: top
-2019 - The 2nd IOCCC
+2019 - The 26th IOCCC
Download IOCCC 2019 entry source
@@ -189,7 +189,7 @@ calendrical
transparency
Jump to: top
-2018 - The 3rd IOCCC
+2018 - The 25th IOCCC
Download IOCCC 2018 entry source
@@ -221,7 +221,7 @@ stellar
- 2018/yang - Most shifty
Jump to: top
-2015 - The 4th IOCCC
+2015 - The 24th IOCCC
Download IOCCC 2015 entry source
@@ -251,7 +251,7 @@ Documented
Reaction
Jump to: top
-2014 - The 5th IOCCC
+2014 - The 23rd IOCCC
Download IOCCC 2014 entry source
@@ -278,7 +278,7 @@ beeps
functional
Jump to: top
-2013 - The 6th IOCCC
+2013 - The 22nd IOCCC
Download IOCCC 2013 entry source
@@ -311,7 +311,7 @@ versatile
of strings
Jump to: top
-2012 - The 7th IOCCC
+2012 - The 21st IOCCC
Download IOCCC 2012 entry source
@@ -344,7 +344,7 @@ Bronze award
obfuscation - Gold award
Jump to: top
-2011 - The 8th IOCCC
+2011 - The 20th IOCCC
Download IOCCC 2011 entry source
Jump to: top
-2006 - The 9th IOCCC
+2006 - The 19th IOCCC
Download IOCCC 2006 entry source
@@ -406,7 +406,7 @@ Show
Chess Set
Jump to: top
-2005 - The 10th IOCCC
+2005 - The 18th IOCCC
Download IOCCC 2005 entry source
@@ -439,7 +439,7 @@ walk
visuals
Jump to: top
-2004 - The 11th IOCCC
+2004 - The 17th IOCCC
Download IOCCC 2004 entry source
@@ -473,7 +473,7 @@ Indentation
CPP
Jump to: top
-2001 - The 12th IOCCC
+2001 - The 16th IOCCC
Download IOCCC 2001 entry source
@@ -505,7 +505,7 @@ position-independent code
Game
Jump to: top
-2000 - The 13th IOCCC
+2000 - The 15th IOCCC
Download IOCCC 2000 entry source
@@ -567,7 +567,7 @@ Efficient
Self-Documenting
Jump to: top
-1996 - The 15th IOCCC
+1996 - The 13th IOCCC
Download IOCCC 1996 entry source
@@ -592,7 +592,7 @@ Utility
Liner
Jump to: top
-1995 - The 16th IOCCC
+1995 - The 12th IOCCC
Download IOCCC 1995 entry source
@@ -620,7 +620,7 @@ Rules
Abuse of the C Preprocessor and Most Likely to Amaze
Jump to: top
-1994 - The 17th IOCCC
+1994 - The 11th IOCCC
Download IOCCC 1994 entry source
@@ -645,7 +645,7 @@ Program
the C Preprocessor
Jump to: top
-1993 - The 18th IOCCC
+1993 - The 10th IOCCC
Download IOCCC 1993 entry source
@@ -671,7 +671,7 @@ Intelligence Award
Expression
Jump to: top
-1992 - The 19th IOCCC
+1992 - The 9th IOCCC
Download IOCCC 1992 entry source
@@ -700,7 +700,7 @@ the Rules
Program
Jump to: top
-1991 - The 20th IOCCC
+1991 - The 8th IOCCC
Download IOCCC 1991 entry source
@@ -720,7 +720,7 @@ Graphics
Prize
Jump to: top
-1990 - The 21st IOCCC
+1990 - The 7th IOCCC
Download IOCCC 1990 entry source
@@ -745,7 +745,7 @@ Show
Layout
Jump to: top
-1989 - The 22nd IOCCC
+1989 - The 6th IOCCC
Download IOCCC 1989 entry source
@@ -767,7 +767,7 @@ use of C
in one program
Jump to: top
-1988 - The 23rd IOCCC
+1988 - The 5th IOCCC
Download IOCCC 1988 entry source
@@ -789,7 +789,7 @@ of the rules
layout
Jump to: top
-1987 - The 24th IOCCC
+1987 - The 4th IOCCC
Download IOCCC 1987 entry source
@@ -807,7 +807,7 @@ Obfuscation
Layout
Jump to: top
-1986 - The 25th IOCCC
+1986 - The 3rd IOCCC
Download IOCCC 1986 entry source
@@ -830,7 +830,7 @@ code
well-rounded in confusion
Jump to: top
-1985 - The 26th IOCCC
+1985 - The 2nd IOCCC
Download IOCCC 1985 entry source
@@ -846,7 +846,7 @@ most well-rounded in confusion
of the C preprocessor
Jump to: top
-1984 - The 27th IOCCC
+1984 - The 1st IOCCC
Download IOCCC 1984 entry source