manually fix n1570.html, fix x^y in cpow for n1256.html
[c-standard] / annot.sh
index debb71d..47eadff 100755 (executable)
--- a/annot.sh
+++ b/annot.sh
@@ -142,7 +142,7 @@ function dosect(s,   n,a) {
        if (id ~ /Annex/)
                id = a[2]
        if (id ~ /^([A-Z]|[1-9]\.|[1-9A-Z]\.[0-9.]*[0-9]|Contents|Index|Foreword|Introduction|Bibliography)$/ &&
-           (n==1 || a[2] ~ /^[A-Z.v]/)) {
+           (n==1 || a[2] ~ /^[A-Z.v_]/)) {
                sub(/^ +/,"",s)
                if (id ~ /\.$/)
                        id = substr(id,1,length(id)-1)
@@ -182,8 +182,10 @@ BEGIN {
                indent = 0
        for (i = 1; i < n; i++) {
                if (a[i] ~ /^@/) {
-                       if (a[i] ~ /^@para/)
+                       if (a[i] ~ /^@para/) {
+                               endpre()
                                endlist()
+                       }
                        print a[i]
                } else {
                        s = substr(a[i], indent+1)