summaryrefslogtreecommitdiffhomepage
path: root/scripts/gen-ccoin
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-10-29 22:39:48 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-10-29 22:39:48 +0100
commit9cad508b5c98ca1029460807249cafb712f28f1e (patch)
tree2ad62d1ca57b7dc691550865cb7fb0b55c26da34 /scripts/gen-ccoin
parentc88b4c2d0842dfbb32fa744dde781601b9e4e7cf (diff)
Migrate the site to GSP and a Makefile
Diffstat (limited to 'scripts/gen-ccoin')
-rwxr-xr-xscripts/gen-ccoin33
1 files changed, 33 insertions, 0 deletions
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__