aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit4e120eae8181c64f21d4e84a5110cf74abbe4131 (patch)
tree0799e1dd0f603aca1f530b6386432460bdf499fe /mandocdb.c
parent15f7805ab7d044633a350c184879f241494dbdef (diff)
downloadmandoc-4e120eae8181c64f21d4e84a5110cf74abbe4131.tar.gz
mandoc-4e120eae8181c64f21d4e84a5110cf74abbe4131.tar.zst
mandoc-4e120eae8181c64f21d4e84a5110cf74abbe4131.zip
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mandocdb.c b/mandocdb.c
index aaa80a46..09319489 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.29 2011/12/09 00:49:01 kristaps Exp $ */
+/* $Id: mandocdb.c,v 1.30 2011/12/09 01:21:10 kristaps Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;