summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-12-09 01:21:10 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-12-09 01:21:10 +0000
commit3be2e00ecd35820776812bf7d5eaabadee7e9c15 (patch)
tree032f25362d62964e278065628ca06bd8d88b40c7 /mandocdb.c
parentb88c62abf487d22b91a7f73aae5eb2b897822afc (diff)
downloadmandoc-3be2e00ecd35820776812bf7d5eaabadee7e9c15.tar.gz
Considerably tidy mandocdb(8) catman descriptions by skipping to the first
hyphen-space combo, not the last hyphen as done previously.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 9cbdd8c9..de4f2b70 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1325,8 +1325,8 @@ pformatted(DB *hash, struct buf *buf, struct buf *dbuf,
* bytes).
*/
- if (NULL != (p = strrchr(line, '-'))) {
- for (++p; ' ' == *p || '\b' == *p; p++)
+ if (NULL != (p = strstr(line, "- "))) {
+ for (p += 2; ' ' == *p || '\b' == *p; p++)
/* Skip to next word. */ ;
} else
p = line;