Subject: bin/6649: apropos(1) displays duplicate entries
To: None <gnats-bugs@gnats.netbsd.org>
From: Wolfgang Helbig <helbig@Informatik.BA-Stuttgart.DE>
List: netbsd-bugs
Date: 12/25/1998 16:55:10
>Number: 6649
>Category: bin
>Synopsis: apropos(1) displays duplicate entries
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Dec 25 08:05:00 1998
>Last-Modified:
>Originator: Wolfgang Helbig
>Organization:
>Release: NetBSD-current DEC 22 1998
>Environment:
System: NetBSD rvc2.informatik.ba-stuttgart.de 1.3I NetBSD 1.3I (RVC2) #1: Thu Dec 24 10:54:16 CET 1998 helbig@RVC2:/usr/src/sys/arch/i386/compile/RVC2 i386
>Description:
The command
apropos strings
displays two lines for one man page. (strings(1) and banner(1))
>How-To-Repeat:
See above.
>Fix:
<how to correct or work around the problem, if known
(multiple lines)> Apply the following patch to
libexec/getNAME/getNAME.c. The original version put a space
after the name description if an empty line follows the
name section--as in string's(1) man page. Since makewhatis
extracts the name description from the formatted pages as
well-- but without the trailing blank--we end up with two
different entries.
The unformatted man page of banner(1/6) has a trailing space
in the .Nm line--so here are patches fixing that as well.
--- libexec/getNAME/getNAME.c.orig Sat Oct 10 13:07:38 1998
+++ libexec/getNAME/getNAME.c Fri Dec 25 16:30:10 1998
@@ -225,7 +225,7 @@
if ((linebuf = realloc(linebuf, maxlen)) == NULL)
err(1, "%s", "");
}
- if (i != 0)
+ if (i != 0 && len != 0)
linebuf[curlen++] = ' ';
(void)memcpy(&linebuf[curlen], line, len);
curlen += len;
--- usr.bin/banner/banner.1.orig Fri Dec 25 16:12:53 1998
+++ usr.bin/banner/banner.1 Fri Dec 25 16:13:52 1998
@@ -3,13 +3,13 @@
.\" @(#)Copyright (c) 1995, Simon J. Gerraty.
.\"
.\" This is free software. It comes with NO WARRANTY.
-.\" Permission to use, modify and distribute this source code
+.\" Permission to use, modify and distribute this source code
.\" is granted subject to the following conditions.
-.\" 1/ that the above copyright notice and this notice
-.\" are preserved in all copies and that due credit be given
+.\" 1/ that the above copyright notice and this notice
+.\" are preserved in all copies and that due credit be given
.\" to the author.
-.\" 2/ that any changes to this code are clearly commented
-.\" as such so that the author does not get blamed for bugs
+.\" 2/ that any changes to this code are clearly commented
+.\" as such so that the author does not get blamed for bugs
.\" other than his own.
.\"
.\" Please send copies of changes and bug-fixes to:
@@ -19,14 +19,14 @@
.Dt BANNER 1
.Os
.Sh NAME
-.Nm banner
+.Nm banner
.Nd print strings in large letters
.Sh SYNOPSIS
.Nm
.Ar string ...
.Sh DESCRIPTION
.Nm
-prints up to 10 chars of each
+prints up to 10 chars of each
.Ar string
in large letters on the standard output.
.Sh SEE ALSO
--- games/banner/banner.6.orig Fri Dec 25 16:18:29 1998
+++ games/banner/banner.6 Fri Dec 25 16:20:08 1998
@@ -37,7 +37,7 @@
.Dt BANNER 6
.Os
.Sh NAME
-.Nm banner
+.Nm banner
.Nd print large banner on printer
.Sh SYNOPSIS
.Nm
>Audit-Trail:
>Unformatted: