diff options
Diffstat (limited to 'usr.bin/mandoc/roff_validate.c')
-rw-r--r-- | usr.bin/mandoc/roff_validate.c | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/usr.bin/mandoc/roff_validate.c b/usr.bin/mandoc/roff_validate.c index d9b17b5f5f3..839d42c7ed9 100644 --- a/usr.bin/mandoc/roff_validate.c +++ b/usr.bin/mandoc/roff_validate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: roff_validate.c,v 1.14 2018/12/14 05:17:45 schwarze Exp $ */ +/* $OpenBSD: roff_validate.c,v 1.15 2018/12/15 23:33:20 schwarze Exp $ */ /* * Copyright (c) 2010, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org> * @@ -104,30 +104,8 @@ roff_valid_ft(ROFF_VALID_ARGS) } cp = n->child->string; - switch (*cp) { - case '1': - case '2': - case '3': - case '4': - case 'I': - case 'P': - case 'R': - if (cp[1] == '\0') - return; - break; - case 'B': - if (cp[1] == '\0' || (cp[1] == 'I' && cp[2] == '\0')) - return; - break; - case 'C': - if (cp[1] != '\0' && cp[2] == '\0' && - strchr("BIRW", cp[1]) != NULL) - return; - break; - default: - break; - } - + if (mandoc_font(cp, (int)strlen(cp)) != ESCAPE_ERROR) + return; mandoc_msg(MANDOCERR_FT_BAD, n->line, n->pos, "ft %s", cp); roff_node_delete(man, n); } |