Subject: [Mipshop] some ID nits

From: gabriel montenegro <[email-masked]>
Date: Fri, 07 Nov 2003 18:52:25 +0100

Folks,

As you know, ID nits:

  http://www.ietf.org/ID-nits.html

specify stuff related to both content and format. As related to the
format only, Stephen Casner wrote an awk (rather a gawk) script that one
can run for a quick check of compliance. I attach it to this message
as it can prove useful.

Running it on fmipv6 produces this output:

Long line at 1239 with 73 chars
draft-ietf-mipshop-fast-mipv6-00.txt: 1 lines longer than 72 characters, max 73

Running it on the lmm-req used to produce a huge output (similar to HMIP's below),
but conversion to XML takes care of most of it. I'll let Carl run it as it'll get
further edited anyway.

The output on HMIPv6 is quite long and is included below. It may be a good
idea to consider converting to XML format:

Long line at 6 with 73 chars, only spaces extra
Long line at 7 with 73 chars, only spaces extra
Long line at 48 with 73 chars, only spaces extra
Long line at 59 with 73 chars, only spaces extra
Long page at 59
Bad chars at 75
Long page at 119
Bad chars at 131
Long line at 138 with 73 chars, only spaces extra
Bad chars at 143
Bad chars at 155
Long line at 166 with 73 chars, only spaces extra
Long page at 179
Long line at 188 with 73 chars, only spaces extra
Long line at 194 with 73 chars, only spaces extra
Long page at 239
Long line at 252 with 73 chars, only spaces extra
Long line at 261 with 73 chars, only spaces extra
Bad chars at 262
Long line at 270 with 73 chars, only spaces extra
Long page at 299
Long line at 336 with 73 chars, only spaces extra
Long line at 337 with 73 chars, only spaces extra
Bad chars at 340
Long line at 344 with 73 chars, only spaces extra
Long line at 347 with 73 chars, only spaces extra
Long line at 348 with 73 chars, only spaces extra
Long line at 350 with 73 chars, only spaces extra
Long line at 351 with 73 chars, only spaces extra
Long line at 355 with 73 chars, only spaces extra
Long page at 359
Long line at 366 with 73 chars, only spaces extra
Long line at 375 with 73 chars, only spaces extra
Long line at 382 with 73 chars, only spaces extra
Long line at 389 with 73 chars, only spaces extra
Long line at 390 with 73 chars, only spaces extra
Long line at 400 with 73 chars, only spaces extra
Long line at 401 with 73 chars, only spaces extra
Long line at 402 with 73 chars, only spaces extra
Bad chars at 403
Long line at 413 with 73 chars, only spaces extra
Long page at 419
Long line at 450 with 73 chars, only spaces extra
Long line at 452 with 73 chars, only spaces extra
Long page at 479
Long line at 515 with 73 chars, only spaces extra
Long line at 521 with 73 chars, only spaces extra
Long line at 526 with 73 chars, only spaces extra
Long line at 528 with 73 chars, only spaces extra
Long line at 532 with 73 chars, only spaces extra
Long page at 539
Long line at 549 with 74 chars, only spaces extra
Long line at 553 with 74 chars, only spaces extra
Long line at 556 with 73 chars, only spaces extra
Bad chars at 563
Bad chars at 564
Long line at 573 with 73 chars, only spaces extra
Bad chars at 574
Bad chars at 577
Bad chars at 584
Bad chars at 588
Bad chars at 590
Long page at 599
Long line at 608 with 73 chars, only spaces extra
Bad chars at 609
Long line at 610 with 73 chars, only spaces extra
Bad chars at 619
Long line at 621 with 73 chars, only spaces extra
Long line at 624 with 73 chars, only spaces extra
Long line at 625 with 73 chars, only spaces extra
Long line at 629 with 73 chars, only spaces extra
Bad chars at 644
Bad chars at 651
Long page at 659
Long line at 673 with 73 chars, only spaces extra
Long line at 677 with 73 chars, only spaces extra
Bad chars at 682
Long line at 689 with 73 chars, only spaces extra
Long line at 691 with 73 chars, only spaces extra
Long line at 694 with 73 chars, only spaces extra
Long line at 695 with 73 chars, only spaces extra
Long line at 703 with 73 chars, only spaces extra
Long line at 708 with 73 chars, only spaces extra
Long page at 719
Bad chars at 731
Long line at 735 with 73 chars, only spaces extra
Long line at 736 with 73 chars, only spaces extra
Bad chars at 737
Long line at 737 with 73 chars, only spaces extra
Bad chars at 738
Bad chars at 753
Bad chars at 757
Long line at 759 with 73 chars, only spaces extra
Bad chars at 765
Long page at 779
Bad chars at 787
Bad chars at 792
Bad chars at 793
Long line at 802 with 73 chars, only spaces extra
Long line at 806 with 73 chars, only spaces extra
Long line at 816 with 73 chars, only spaces extra
Long line at 824 with 73 chars, only spaces extra
Long page at 839
Long line at 847 with 74 chars, only spaces extra
Long line at 856 with 73 chars, only spaces extra
Long line at 860 with 73 chars, only spaces extra
Long line at 863 with 73 chars, only spaces extra
Long line at 864 with 73 chars, only spaces extra
Long line at 874 with 73 chars, only spaces extra
Bad chars at 875
Long line at 880 with 73 chars, only spaces extra
Long line at 885 with 73 chars, only spaces extra
Bad chars at 892
Long line at 892 with 73 chars, only spaces extra
Long page at 899
Long line at 913 with 73 chars, only spaces extra
Long line at 926 with 73 chars, only spaces extra
Long line at 947 with 73 chars, only spaces extra
Long page at 959
Long line at 1002 with 73 chars, only spaces extra
Long page at 1019
Long line at 1032 with 73 chars, only spaces extra
Long line at 1036 with 73 chars, only spaces extra
Bad chars at 1059
Bad chars at 1068
Long line at 1074 with 73 chars, only spaces extra
Long page at 1079
Long line at 1096 with 73 chars, only spaces extra
Bad chars at 1097
Bad chars at 1098
Long line at 1098 with 73 chars, only spaces extra
Long line at 1100 with 73 chars, only spaces extra
Long line at 1113 with 73 chars, only spaces extra
Long line at 1122 with 73 chars, only spaces extra
Long line at 1123 with 73 chars, only spaces extra
Long line at 1128 with 73 chars, only spaces extra
Long page at 1139
Long line at 1148 with 73 chars, only spaces extra
Long line at 1155 with 73 chars, only spaces extra
Long line at 1156 with 73 chars, only spaces extra
Long line at 1163 with 73 chars, only spaces extra
Bad chars at 1182
Long line at 1183 with 73 chars, only spaces extra
Bad chars at 1185
Long line at 1188 with 73 chars, only spaces extra
Long line at 1194 with 73 chars, only spaces extra
Long page at 1199
Long line at 1207 with 73 chars, only spaces extra
Long line at 1210 with 73 chars, only spaces extra
Long line at 1211 with 73 chars, only spaces extra
Long line at 1222 with 73 chars, only spaces extra
Bad chars at 1230
Long line at 1240 with 73 chars, only spaces extra
Long line at 1244 with 73 chars, only spaces extra
Long line at 1249 with 73 chars, only spaces extra
Long line at 1254 with 73 chars, only spaces extra
Long line at 1255 with 73 chars, only spaces extra
Long page at 1259
Long line at 1265 with 73 chars, only spaces extra
Long line at 1274 with 73 chars, only spaces extra
Long line at 1286 with 73 chars, only spaces extra
Long line at 1287 with 73 chars, only spaces extra
Long line at 1289 with 73 chars, only spaces extra
Long line at 1299 with 73 chars, only spaces extra
Long line at 1301 with 73 chars, only spaces extra
Long line at 1303 with 73 chars, only spaces extra
Long line at 1304 with 73 chars, only spaces extra
Bad chars at 1308
Bad chars at 1309
Bad chars at 1314
Bad chars at 1315
Long page at 1319
Bad chars at 1327
Long line at 1333 with 73 chars, only spaces extra
Long line at 1338 with 73 chars, only spaces extra
Long line at 1346 with 73 chars, only spaces extra
Long line at 1353 with 73 chars, only spaces extra
Long line at 1367 with 73 chars, only spaces extra
Bad chars at 1371
Long page at 1379
Bad chars at 1388
Long line at 1393 with 73 chars, only spaces extra
Bad chars at 1412
Bad chars at 1416
Long line at 1419 with 73 chars, only spaces extra
Long line at 1431 with 73 chars, only spaces extra
Long page at 1439
Bad chars at 1460
Bad chars at 1465
Long line at 1465 with 74 chars, only spaces extra
Bad chars at 1466
Bad chars at 1468
Bad chars at 1469
Bad chars at 1471
Bad chars at 1474
Bad chars at 1476
Bad chars at 1479
Bad chars at 1480
Bad chars at 1482
Bad chars at 1483
Bad chars at 1485
Bad chars at 1486
Bad chars at 1490
Long page at 1499
Bad chars at 1509
Bad chars at 1510
Bad chars at 1513
Long line at 1513 with 74 chars, only spaces extra
Bad chars at 1515
Long page at 1559
Bad chars at 1577
Long line at 1583 with 73 chars, only spaces extra
Bad chars at 1589
Long line at 1592 with 73 chars, only spaces extra
Long line at 1599 with 73 chars, only spaces extra
Bad chars at 1600
Bad chars at 1602
Long line at 1606 with 73 chars, only spaces extra
Bad chars at 1607
Bad chars at 1610
Bad chars at 1613
Bad chars at 1615
Long page at 1619
Bad chars at 1644
Long line at 1647 with 73 chars, only spaces extra
Bad chars at 1649
Long line at 1650 with 73 chars, only spaces extra
Bad chars at 1651
Bad chars at 1652
Bad chars at 1654
Long line at 1654 with 73 chars, only spaces extra
Bad chars at 1655
Long line at 1667 with 73 chars, only spaces extra
Bad chars at 1672
Long page at 1679
Long line at 1705 with 74 chars, only spaces extra
Bad chars at 1713
Long line at 1716 with 73 chars, only spaces extra
Long line at 1723 with 73 chars, only spaces extra
Bad chars at 1724
Long line at 1725 with 73 chars, only spaces extra
Bad chars at 1727
Long line at 1731 with 73 chars, only spaces extra
Long page at 1739
Bad chars at 1745
Bad chars at 1747
Bad chars at 1754
Long line at 1755 with 73 chars, only spaces extra
Long line at 1756 with 73 chars, only spaces extra
Bad chars at 1757
Long line at 1759 with 73 chars, only spaces extra
Long line at 1763 with 73 chars, only spaces extra
Long page at 1799
draft-ietf-mipshop-hmipv6-00.txt: 105 stupid quotes/dashes characters
draft-ietf-mipshop-hmipv6-00.txt: 87 lines containing non-US-ASCII characters
draft-ietf-mipshop-hmipv6-00.txt: 136 lines longer than 72 characters, max 74
draft-ietf-mipshop-hmipv6-00.txt: 30 pages longer than 58 lines, max 59 lines

tnx,

-gabriel
#!/usr/bin/awk -f
#
# check pagination of Internet-Drafts
#
# @(#) $Id$

BEGIN {
#    linelim = 68;
#    charlim = 80;
    linelim = 58;
    charlim = 72;
    lines = 0;
    longpages = 0;
    badformfeeds = 0;
    maxlines = 0;
    maxchars = 0;
    longlines = 0;
    mschars = 0;
    badchars = 0;
}

{
    prefeed = 0;
    postfeed = 0;
    line = gensub(/\r$/, "", "g");
}

/^/ {
    prefeed = 1;
    if (length(line) != 1) {
	++badformfeeds;
    }
}

/$/ {
    postfeed = 1;
    if (length(line) != 1) {
	++badformfeeds;
    }
}

/[^-~]/ {
    ++badchars;
    print "Bad chars at", NR;
}

{
    mschars += gsub(/‘/, "'");
    mschars += gsub(/’/, "'");
    mschars += gsub(/“/, "\"");
    mschars += gsub(/”/, "\"");
    mschars += gsub(/–/, "-");
    if (length(line) > charlim) {
	++longlines;
	if (length(gensub(/ *$/, "", "g", line)) > charlim) {
	    print "Long line at", NR, "with", length(line), "chars";
	} else {
	    print "Long line at", NR, "with", length(line), "chars, only spaces extra";
	}
	if (length(line) > maxchars) {
	    maxchars = length(line);
	}
    }
    if ((lines < linelim) || ((postfeed == 1) && (prefeed == 0))) {
	++lines;
	if (prefeed == 1) lines = 1;
	if (postfeed == 1) lines = 0;
    } else { # (lines >= linelim) && ((postfeed == 0) || (prefeed == 1))
	if (prefeed == 0) {  # => (postfeed == 0))
	    if (lines == linelim) {
		++longpages;
		print "Long page at", NR;
	    }
	    ++lines;
	    if (lines > maxlines) maxlines = lines;
	} else {
	    lines = 0;
	    if (postfeed == 0) lines = 1;
	}
	blanks = 0;
    }
}

END {
    if (mschars) {
	print FILENAME ":", mschars, "stupid quotes/dashes characters";
    }
    if (badchars) {
	print FILENAME ":", badchars, "lines containing non-US-ASCII characters";
    }
    if (longlines) {
	print FILENAME ":", longlines, "lines longer than", charlim, "characters, max", maxchars;
    }
    if (longpages) {
	print FILENAME ":", longpages, "pages longer than", linelim, "lines, max", maxlines, "lines";
    }
    if (badformfeeds) {
	print FILENAME ":", badformfeeds, "formfeeds not on a line by themselves";
    }
    if (longlines || longpages) {
	exit(1);
    }
}