NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/46408: Inconsistent handling of hyphens by apropos(1)
The following reply was made to PR bin/46408; it has been noted by GNATS.
From: Abhinav Upadhyay <er.abhinav.upadhyay%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: bin/46408: Inconsistent handling of hyphens by apropos(1)
Date: Fri, 4 May 2012 15:43:34 +0530
On Fri, May 4, 2012 at 3:25 PM, Thomas Klausner <wiz%netbsd.org@localhost>
wrote:
> The following reply was made to PR bin/46408; it has been noted by GNATS.
>
> From: Thomas Klausner <wiz%NetBSD.org@localhost>
> To: gnats-bugs%NetBSD.org@localhost
> Cc:
> Subject: Re: bin/46408: Inconsistent handling of hyphens by apropos(1)
> Date: Fri, 4 May 2012 11:53:14 +0200
>
> =A0On Fri, May 04, 2012 at 08:35:00AM +0000,
> er.abhinav.upadhyay%gmail.co@localhost=
m wrote:
> =A0> Index: makemandb.c
> =A0> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =A0> RCS file: /cvsroot/src/usr.sbin/makemandb/makemandb.c,v
> =A0> retrieving revision 1.7
> =A0> diff -u -p -r1.7 makemandb.c
> =A0> --- makemandb.c 2 Mar 2012 15:09:58 -0000 =A0 =A0 =A0 1.7
> =A0> +++ makemandb.c 4 May 2012 08:18:29 -0000
> =A0> @@ -1270,7 +1270,7 @@ pman_sh(const struct man_node *n, mandb_
> =A0> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 int has_alias =3D 0; =A0 =A0 =A0// A=
ny more aliases left?
> =A0> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 while (*name_desc) {
> =A0> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Remove any leadin=
g spaces. */
> =A0> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (name_desc[0] =3D=
=3D ' ') {
> =A0> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (name_desc[0] =3D=
=3D ' ' || name_desc[0] =3D=3D'-') {
> =A0> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 name=
_desc++;
> =A0> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 cont=
inue;
> =A0> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
> =A0>
>
> =A0The patch has whitespace problems. Also, can you please update the com=
ment directly above?
>
> =A0Thanks,
> =A0Thomas
>
Index: makemandb.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/src/usr.sbin/makemandb/makemandb.c,v
retrieving revision 1.7
diff -u -p -r1.7 makemandb.c
--- makemandb.c 2 Mar 2012 15:09:58 -0000 1.7
+++ makemandb.c 4 May 2012 10:05:19 -0000
@@ -1269,8 +1269,8 @@ pman_sh(const struct man_node *n, mandb_
*/
int has_alias =3D 0; // Any more aliases left?
while (*name_desc) {
- /* Remove any leading spaces. */
- if (name_desc[0] =3D=3D ' ') {
+ /* Remove any leading spaces or hyphens. */
+ if (name_desc[0] =3D=3D ' ' || name_desc[0] =3D=3D'-') {
name_desc++;
continue;
}
Home |
Main Index |
Thread Index |
Old Index