On Thu, Nov 27, 2014 at 1:32 AM, Marcel Rodrigues <[email protected]> wrote:
> The patch below unifies the code in a separated function. I have considered
> using the strchr() approach, but ended up using strtok() because it is
> simpler and both approaches required a writable buffer anyway. While it's
> possible to refactor the new function to work with read-only buffers (such
> as the one directly returned by getenv()), I don't know if it is worth the

getenv() is not readonly.

> trouble -- that would only remove one xstrdup()+free() pair.
>
> Maybe it's also worth mentioning that this patch makes it simple (in theory)
> to add a GNU-like option -M to man, which is just another way to specify a
> path list. That may be overkill, though.

I already applied my version of this idea, actually quite similar to
yours... I didn't expect such a quick reply from you!

Thanks.
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to