aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tbl_layout.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-10-07 14:07:03 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-10-07 14:07:03 +0000
commit3ab6e5b465cb0d5d38813ac55a78b9eb484d32b9 (patch)
treec708deb2322a868e1477b30626bf30ac05fc57d0 /tbl_layout.c
parent7ab27b6da5bab30db0dc7aff43b2f2cf328a0a77 (diff)
downloadmandoc-3ab6e5b465cb0d5d38813ac55a78b9eb484d32b9.tar.gz
mandoc-3ab6e5b465cb0d5d38813ac55a78b9eb484d32b9.tar.zst
mandoc-3ab6e5b465cb0d5d38813ac55a78b9eb484d32b9.zip
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.
Diffstat (limited to 'tbl_layout.c')
-rw-r--r--tbl_layout.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tbl_layout.c b/tbl_layout.c
index d288c08b..3d27ee1a 100644
--- a/tbl_layout.c
+++ b/tbl_layout.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_layout.c,v 1.27 2014/08/10 23:54:41 schwarze Exp $ */
+/* $Id: tbl_layout.c,v 1.28 2014/10/07 14:07:03 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2012, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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);