Module Name:    src
Committed By:   snj
Date:           Sat Apr  4 23:42:49 UTC 2009

Modified Files:
        src/libexec/makewhatis [netbsd-5]: makewhatis.c

Log Message:
Pull up following revision(s) (requested by apb in ticket #667):
        libexec/makewhatis/makewhatis.c: revision 1.47
In addwhatis(), two items should not be treated as duplicates unless
both the "data" and "prefix" elements are identical.  For example, the
two lines
        amiga/boot (8) - system bootstrapping procedures
        amd64/boot (8) - system bootstrapping procedures
both appear with data = "boot (8) - system bootstrapping procedures" but
with different values for prefix, and we do not want to reject one of
them as a duplicate.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.44.4.1 src/libexec/makewhatis/makewhatis.c

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

Modified files:

Index: src/libexec/makewhatis/makewhatis.c
diff -u src/libexec/makewhatis/makewhatis.c:1.44 src/libexec/makewhatis/makewhatis.c:1.44.4.1
--- src/libexec/makewhatis/makewhatis.c:1.44	Sun Jul 20 01:09:07 2008
+++ src/libexec/makewhatis/makewhatis.c	Sat Apr  4 23:42:48 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: makewhatis.c,v 1.44 2008/07/20 01:09:07 lukem Exp $	*/
+/*	$NetBSD: makewhatis.c,v 1.44.4.1 2009/04/04 23:42:48 snj Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 #if !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1999\
  The NetBSD Foundation, Inc.  All rights reserved.");
-__RCSID("$NetBSD: makewhatis.c,v 1.44 2008/07/20 01:09:07 lukem Exp $");
+__RCSID("$NetBSD: makewhatis.c,v 1.44.4.1 2009/04/04 23:42:48 snj Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -477,6 +477,7 @@
 
 	while ((wi = *tree) != NULL) {
 		result = strcmp(data, wi->wi_data);
+		if (result == 0) result = strcmp(prefix, wi->wi_prefix);
 		if (result == 0) return;
 		tree = result < 0 ? &wi->wi_left : &wi->wi_right;
 	}

Reply via email to