pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/29152: pkgfind patch for linux and openbsd
The following reply was made to PR pkg/29152; it has been noted by GNATS.
From: "Julio M. Merino Vidal" <jmmv84%gmail.com@localhost>
To: Peter Postma <peter%pointless.nl@localhost>
Cc: Jan Schaumann <jschauma%netmeister.org@localhost>,
gnats-bugs%netbsd.org@localhost
Subject: Re: pkg/29152: pkgfind patch for linux and openbsd
Date: Sun, 30 Jan 2005 20:37:44 +0100
On Sun, 2005-01-30 at 18:53 +0100, Peter Postma wrote:
> Ok, the attached diff should be ok now I think.
> Could you please check it one more time before I commit it?
@@ -73,11 +68,10 @@
int
main(int argc, char *argv[])
{
+ const char *progname = argv[0];
const char *path;
int ch;
- setprogname("pkgfind");
-
/* default searches have partial matches */
search = partialmatch;
I think you could instead do:
if ((progname = strrchr(argv[0], '/')) != NULL)
progname++;
else
progname = argv[0];
to remove any possible directory name from argv[0].
Cheers,
--
Julio M. Merino Vidal <jmmv84%gmail.com@localhost>
http://www.livejournal.com/users/jmmv/
The NetBSD Project - http://www.NetBSD.org/
Home |
Main Index |
Thread Index |
Old Index