diff options
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r-- | mdoc_validate.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index 5bc3bec1..ac42fe45 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -53,6 +53,7 @@ enum mwarn { WNOWIDTH, WMISSWIDTH, WESCAPE, + WDEPESC, WDEPCOL, WWRONGMSEC, WSECOOO, @@ -478,6 +479,9 @@ pwarn(struct mdoc *m, int line, int pos, enum mwarn type) case (WESCAPE): p = "invalid escape sequence"; break; + case (WDEPESC): + p = "deprecated special-character escape"; + break; case (WNOLINE): p = "suggested no line arguments"; break; @@ -717,8 +721,6 @@ check_text(struct mdoc *mdoc, int line, int pos, const char *p) { size_t c; - /* FIXME: indicate deprecated escapes \*(xx and \*x. */ - for ( ; *p; p++) { if ('\t' == *p) { if ( ! (MDOC_LITERAL & mdoc->flags)) @@ -733,6 +735,10 @@ check_text(struct mdoc *mdoc, int line, int pos, const char *p) c = mdoc_isescape(p); if (c) { + /* See if form is deprecated. */ + if ('*' == p[1]) + if ( ! pwarn(mdoc, line, pos, WDEPESC)) + return(0); p += (int)c - 1; continue; } |