X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=tohtml.sh;h=504d92a5008c0d473174d319d433aa5c89897781;hb=533cb8614abf721fa173e6e75aee12a277a71af2;hp=cf86abc63ef38e0482e57980157f75eeb83730c2;hpb=643b668e5d03588b08459174b3bed69e31f97b7b;p=c-standard
diff --git a/tohtml.sh b/tohtml.sh
index cf86abc..504d92a 100755
--- a/tohtml.sh
+++ b/tohtml.sh
@@ -46,7 +46,8 @@ BEGIN {
if (id ~ /Annex/)
id = $2
if (($0 ~ /^ [1-9]\./ || id ~ /^([A-Z]|[1-9A-Z]\.[1-9][0-9.]*|Index|Foreword|Introduction|Bibliography)$/) &&
- (NF==1 || $2 ~ /^[A-Z]/)) {
+ (NF==1 || $2 ~ /^[A-Z]/) &&
+ ($0 !~ /^ *[0-9.]+[^0-9]$/)) {
if (id ~ /\.$/)
id = substr(id,1,length(id)-1)
print "" $0 ""
@@ -62,6 +63,11 @@ BEGIN {
next
}
+/^ *(Syntax|Semantics|Description|Constraints|Synopsis|Returns)$/ {
+ print "" $0 ""
+ next
+}
+
{
s = $0
p = ""
@@ -72,7 +78,7 @@ BEGIN {
while (match(s, r)) {
p = p substr(s,1,RSTART)
m = substr(s,RSTART+1,RLENGTH-1)
- if (m ~ /[4-9][0-9]/ || m ~ /[0-3][0-9][0-9]/ || substr(s,RSTART+RLENGTH,1) ~ /[a-zA-Z\-]/)
+ if (m ~ /\.0$/ || m ~ /[4-9][0-9]/ || m ~ /[0-3][0-9][0-9]/ || substr(s,RSTART+RLENGTH,1) ~ /[a-zA-Z\-]/)
p = p m
else
p = p "" m ""