X-Git-Url: http://nsz.repo.hu/git/?p=c-standard;a=blobdiff_plain;f=tohtml.sh;h=8555d245b5387e14591496a39139c4562c6b18bb;hp=504d92a5008c0d473174d319d433aa5c89897781;hb=e0dad195ae10aa54dbb0e9f4c65562ccdf423ea4;hpb=533cb8614abf721fa173e6e75aee12a277a71af2
diff --git a/tohtml.sh b/tohtml.sh
index 504d92a..8555d24 100755
--- a/tohtml.sh
+++ b/tohtml.sh
@@ -39,6 +39,7 @@ BEGIN {
} else
print
}
+ note = 1
}
!seenindex && /^ *([1-9A-Z]\.|Annex|Index|Foreword|Introduction|Bibliography)/ {
@@ -103,7 +104,22 @@ BEGIN {
p = p m
s = substr(s,RSTART+RLENGTH)
}
- print p s
+ s = p s
+ p = ""
+ while (match(s, note "\\)")) {
+ if (note==1 && s !~ /\.1\)/)
+ break
+ p = p substr(s,1,RSTART-1)
+ p = p "" note ")"
+ note++
+ s = substr(s,RSTART+RLENGTH)
+ }
+ s = p s
+ if (s ~ /^ *[1-9][0-9]*\) /) {
+ sub(/\)/,"",s)
+ sub(/[0-9]+/,"&)",s)
+ }
+ print s
}
END { print "