aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-04-08 07:53:01 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-04-08 07:53:01 +0000
commitdb9ac84d691aa665ae1560055501f7b33c6f1bd4 (patch)
tree7995928351c9657a143aa76b293b978106466e6f /man.c
parent334c044215b7ad349e107fd3d5a14913d3f4baf1 (diff)
downloadmandoc-db9ac84d691aa665ae1560055501f7b33c6f1bd4.tar.gz
mandoc-db9ac84d691aa665ae1560055501f7b33c6f1bd4.tar.zst
mandoc-db9ac84d691aa665ae1560055501f7b33c6f1bd4.zip
Sync'd mdoc.c's function names with man.c.
Prompted by Ingo and Claus Assman, added warn/ignore for text lines beginning with `\."'.
Diffstat (limited to 'man.c')
-rw-r--r--man.c8
1 files changed, 7 insertions, 1 deletions
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 <kristaps@kth.se>
*
@@ -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) {