From db9ac84d691aa665ae1560055501f7b33c6f1bd4 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Thu, 8 Apr 2010 07:53:01 +0000 Subject: Sync'd mdoc.c's function names with man.c. Prompted by Ingo and Claus Assman, added warn/ignore for text lines beginning with `\."'. --- man.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'man.c') diff --git a/man.c b/man.c index b1853d1a..44cc06b1 100644 --- a/man.c +++ b/man.c @@ -1,4 +1,4 @@ -/* $Id: man.c,v 1.59 2010/03/29 10:10:35 kristaps Exp $ */ +/* $Id: man.c,v 1.60 2010/04/08 07:53:01 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -53,6 +53,7 @@ const char *const __man_merrnames[WERRMAX] = { "invalid nesting of roff declarations", /* WROFFNEST */ "scope in roff instructions broken", /* WROFFSCOPE */ "document title should be uppercase", /* WTITLECASE */ + "deprecated comment style", /* WBADCOMMENT */ }; const char *const __man_macronames[MAN_MAX] = { @@ -378,6 +379,11 @@ man_ptext(struct man *m, int line, char *buf) int i, j; char sv; + /* Ignore bogus comments. */ + + if ('\\' == buf[0] && '.' == buf[1] && '\"' == buf[2]) + return(man_pwarn(m, line, 0, WBADCOMMENT)); + /* Literal free-form text whitespace is preserved. */ if (MAN_LITERAL & m->flags) { -- cgit v1.2.3-56-ge451