summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2017-01-27 11:33:09 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2017-01-27 11:33:09 +0000
commit7359c1f89aa543e0a5355295858247269a62578a (patch)
tree17270d8058a6cb289d333081ceb5612323113264 /usr.bin/mandoc/mandocdb.c
parent9bae502980c6b3d7f39dc76cee800bfc97165f52 (diff)
warn about missing one-line description;
missing feature found in the TODO file
Diffstat (limited to 'usr.bin/mandoc/mandocdb.c')
-rw-r--r--usr.bin/mandoc/mandocdb.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c
index ca58bf571b8..a75267f3eca 100644
--- a/usr.bin/mandoc/mandocdb.c
+++ b/usr.bin/mandoc/mandocdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mandocdb.c,v 1.190 2017/01/27 01:14:34 schwarze Exp $ */
+/* $OpenBSD: mandocdb.c,v 1.191 2017/01/27 11:33:08 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -1191,8 +1191,12 @@ mpages_merge(struct dba *dba, struct mparse *mp)
parse_mdoc(mpage, &man->meta, man->first);
else
parse_man(mpage, &man->meta, man->first);
- if (mpage->desc == NULL)
- mpage->desc = mandoc_strdup(mpage->mlinks->name);
+ if (mpage->desc == NULL) {
+ mpage->desc = mandoc_strdup(mlink->name);
+ if (warnings)
+ say(mlink->file, "No one-line description, "
+ "using filename \"%s\"", mlink->name);
+ }
for (mlink = mpage->mlinks;
mlink != NULL;
@@ -1320,7 +1324,8 @@ parse_cat(struct mpage *mpage, int fd)
/* Skip to next word. */ ;
} else {
if (warnings)
- say(mlink->file, "No dash in title line");
+ say(mlink->file, "No dash in title line, "
+ "reusing \"%s\" as one-line description", title);
p = title;
}