Module Name:    src
Committed By:   wiz
Date:           Fri May  4 23:50:26 UTC 2012

Modified Files:
        src/usr.sbin/makemandb: makemandb.c

Log Message:
The new apropos(1) incorrectly displays hyphens in the first line
of the search results for a few man pages (for man(7) based man
pages).

Use patch from Abhinav Upadhyay in PR 46408 to fix this.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/makemandb/makemandb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/makemandb/makemandb.c
diff -u src/usr.sbin/makemandb/makemandb.c:1.7 src/usr.sbin/makemandb/makemandb.c:1.8
--- src/usr.sbin/makemandb/makemandb.c:1.7	Fri Mar  2 15:09:58 2012
+++ src/usr.sbin/makemandb/makemandb.c	Fri May  4 23:50:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: makemandb.c,v 1.7 2012/03/02 15:09:58 joerg Exp $	*/
+/*	$NetBSD: makemandb.c,v 1.8 2012/05/04 23:50:26 wiz Exp $	*/
 /*
  * Copyright (c) 2011 Abhinav Upadhyay <er.abhinav.upadh...@gmail.com>
  * Copyright (c) 2011 Kristaps Dzonsons <krist...@bsd.lv>
@@ -17,7 +17,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: makemandb.c,v 1.7 2012/03/02 15:09:58 joerg Exp $");
+__RCSID("$NetBSD: makemandb.c,v 1.8 2012/05/04 23:50:26 wiz Exp $");
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -1269,8 +1269,8 @@ pman_sh(const struct man_node *n, mandb_
 		 */
 		int has_alias = 0;	// Any more aliases left?
 		while (*name_desc) {
-			/* Remove any leading spaces. */
-			if (name_desc[0] == ' ') {
+			/* Remove any leading spaces or hyphens. */
+			if (name_desc[0] == ' ' || name_desc[0] =='-') {
 				name_desc++;
 				continue;
 			}

Reply via email to