From 4e120eae8181c64f21d4e84a5110cf74abbe4131 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Fri, 9 Dec 2011 01:21:10 +0000 Subject: Considerably tidy mandocdb(8) catman descriptions by skipping to the first hyphen-space combo, not the last hyphen as done previously. --- mandocdb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mandocdb.c') 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 * Copyright (c) 2011 Ingo Schwarze @@ -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; -- cgit v1.2.3