summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-27 11:33:26 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-27 11:33:26 +0000
commit7efe93e3b86eedc728ca70b488cc2c8cef9d1790 (patch)
treede4dbb77617b851ea4e6cbf98f553910b82da380 /mandocdb.c
parenta9fa4d7ad9278cbef0f49153774f86964c0ea8ec (diff)
downloadmandoc-7efe93e3b86eedc728ca70b488cc2c8cef9d1790.tar.gz
warn about missing one-line description;
missing feature found in the TODO file
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 3e011e44..1b384d94 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1231,8 +1231,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;
@@ -1360,7 +1364,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;
}