diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-06-17 09:41:00 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-06-17 09:41:00 +0000 |
commit | aa8ebdeebdc3218708b91a72e0b499258a3e5cef (patch) | |
tree | 9289cc60fcdaae8923bb814a216143646c215e13 /mdoc_validate.c | |
parent | fdc3fdd6a6ddbc503a53564a3b4f607a0e7ca8c3 (diff) | |
download | mandoc-aa8ebdeebdc3218708b91a72e0b499258a3e5cef.tar.gz |
Noted deprecation of \*( and \* special-character escapes.
Minor clean-ups.
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; } |