summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-10-07 14:06:15 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-10-07 14:06:15 +0000
commit157ec7419051e62ff8ddb9ecdf1a814dbcb3a231 (patch)
tree2ada40b1f14c325731b6911fb6ff4e43cbce59bb
parent1cc1c02cb312134cda9adfe8cce1e4862cfd4917 (diff)
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.
-rw-r--r--usr.bin/mandoc/tbl_layout.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/mandoc/tbl_layout.c b/usr.bin/mandoc/tbl_layout.c
index 9c96444cf3c..d1b5f0d28ff 100644
--- a/usr.bin/mandoc/tbl_layout.c
+++ b/usr.bin/mandoc/tbl_layout.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_layout.c,v 1.14 2014/04/20 16:44:44 schwarze Exp $ */
+/* $Id: tbl_layout.c,v 1.15 2014/10/07 14:06:14 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2012, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -197,6 +197,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);