From 9cad508b5c98ca1029460807249cafb712f28f1e Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 29 Oct 2023 22:39:48 +0100 Subject: Migrate the site to GSP and a Makefile --- scripts/gen-ccoin | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 scripts/gen-ccoin (limited to 'scripts/gen-ccoin') diff --git a/scripts/gen-ccoin b/scripts/gen-ccoin new file mode 100755 index 0000000..2f42958 --- /dev/null +++ b/scripts/gen-ccoin @@ -0,0 +1,33 @@ +#!/bin/sh + +gawk -v CC=$1 ' +@include "scripts/getcls.awk" + +BEGIN { + CC = toupper(CC) +} + +$1 == CC { + split($0, a, "\t") + $0 = a[1] + + n = 2 + y = $2 + + if (getcls($3) == "error") { + n = 3 + printf "tr {td .missing {-%s @sup{-%s}}", y, $3 + } else + printf "tr {td .missing {-%s}", y + + for (i = 1; i <= NF - n; i++) + printf "td colspan=\"Y\" .%s {-%s}", getcls($(i + n)), a[i + 1] + print "}" +} + +END { + print "__MARKER__" +} +' data/ccs \ +| scripts/colspan.sed \ +| grep -Fv __MARKER__ -- cgit v1.2.3