source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Considerably tidy mandocdb(8) catman descriptions by skipping to
@ 2011-12-09  1:21 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-12-09  1:21 UTC (permalink / raw)
  To: source

Log Message:
-----------
Considerably tidy mandocdb(8) catman descriptions by skipping to the first
hyphen-space combo, not the last hyphen as done previously.

Modified Files:
--------------
    mdocml:
        mandocdb.c

Revision Data
-------------
Index: mandocdb.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandocdb.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -Lmandocdb.c -Lmandocdb.c -u -p -r1.29 -r1.30
--- mandocdb.c
+++ mandocdb.c
@@ -1325,8 +1325,8 @@ pformatted(DB *hash, struct buf *buf, st
 	 * 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;
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-09  1:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-09  1:21 mdocml: Considerably tidy mandocdb(8) catman descriptions by skipping to kristaps

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).