diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-12-09 01:21:10 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-12-09 01:21:10 +0000 |
commit | 4e120eae8181c64f21d4e84a5110cf74abbe4131 (patch) | |
tree | 0799e1dd0f603aca1f530b6386432460bdf499fe | |
parent | 15f7805ab7d044633a350c184879f241494dbdef (diff) | |
download | mandoc-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.
-rw-r--r-- | mandocdb.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |