source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: If a tbl(7) layout contains unknown font modifiers, fall back to
@ 2014-10-07 14:07 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-10-07 14:07 UTC (permalink / raw)
  To: source

Log Message:
-----------
If a tbl(7) layout contains unknown font modifiers, fall back to the 
default font rather than failing the whole table.
Needed by some pages in books/man-pages-posix.
Written on the plane back from EuroBSDCon in Sofia.

Modified Files:
--------------
    mdocml:
        mandoc.1
        tbl_layout.c

Revision Data
-------------
Index: mandoc.1
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.1,v
retrieving revision 1.114
retrieving revision 1.115
diff -Lmandoc.1 -Lmandoc.1 -u -p -r1.114 -r1.115
--- mandoc.1
+++ mandoc.1
@@ -1134,11 +1134,16 @@ or
 The invalid argument is moved out of the macro, which leaves the macro
 empty, causing it to toggle the spacing mode.
 .It Sy "unknown font, skipping request"
-.Pq man
+.Pq man , tbl
 A
 .Xr roff 7
 .Ic \&ft
-request has an invalid argument.
+request or a
+.Xr tbl 7
+.Ic \&f
+layout modifier has an unknown
+.Ar font
+argument.
 .El
 .Ss "Warnings related to plain text"
 .Bl -ohang
Index: tbl_layout.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/tbl_layout.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -Ltbl_layout.c -Ltbl_layout.c -u -p -r1.27 -r1.28
--- tbl_layout.c
+++ tbl_layout.c
@@ -201,6 +201,11 @@ mod:
 	default:
 		break;
 	}
+	if (isalnum((unsigned char)p[*pos - 1])) {
+		mandoc_vmsg(MANDOCERR_FT_BAD, tbl->parse,
+		    ln, *pos - 1, "TS f%c", p[*pos - 1]);
+		goto mod;
+	}
 
 	mandoc_msg(MANDOCERR_TBLLAYOUT, tbl->parse,
 	    ln, *pos - 1, NULL);
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-07 14:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-07 14:07 mdocml: If a tbl(7) layout contains unknown font modifiers, fall back to schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).