have tbl, not troff, diagnose a missing T} Reference: /n/sources/patch/applied/tbl-text Date: Sat Oct 8 09:23:17 CES 2005 --- /sys/src/cmd/tbl/tg.c Sat Oct 8 09:22:41 2005 +++ /sys/src/cmd/tbl/tg.c Sat Oct 8 09:22:39 2005 @@ -6,9 +6,10 @@ { /* get a section of text */ char line[4096]; - int oname; + int oname, startline; char *vs; + startline = iline; if (texname == 0) error("Too many text block diversions"); if (textflg == 0) { @@ -42,7 +43,11 @@ if (ctype(ilin, icol) == 'a') Bprint(&tabout, ".ll -2n\n"); Bprint(&tabout, ".in 0\n"); - while (gets1(line, sizeof(line))) { + for (;;) { + if (gets1(line, sizeof(line)) == nil) { + iline = startline; + error("missing closing T}"); + } if (line[0] == 'T' && line[1] == '}' && line[2] == tab) break; if (match("T}", line))