summaryrefslogtreecommitdiffhomepage
path: root/scripts/gen-ccoin
diff options
context:
space:
mode:
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__