On Tue, May 14, 2002 at 04:19:29PM +0300, Maxim Sobolev wrote:
> +++ version/perform.c   14 May 2002 12:41:41 -0000
> [...]
> +       strlcpy(tmp, PORTS_DIR, PATH_MAX);
> +       strlcat(tmp, "/INDEX", PATH_MAX);
> I'd suggest snprintf(3)

Yeah.  Like I said, it needs a bit of polishing.  I tend to do things
this way while I'm developing because I find it easier to keep track of
what's going where in the string.  There's also a bunch of places where
the 'l' versions aren't needed...

> Why noy use matchinstalled() which do something similar?

I looked at it, but it was taking more code to make it work than to
duplicate it because the -s flag is not a regex or a globing pattern. 
It's a poorly designed interface...  Now that it's working I'll look at
it again and see if I can get it to do the right thing.  Simplifying
working code is a lot easier than building it.

> + funny:
> +    warnx("This is a very funny looking INDEX!");
> +    return 1;
> I don't think this is a good choice for an error message.



FreeBSD - Because the best things in life are free...

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to