On 11/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> >Mike Gerdts wrote:
> >> if ( (manpath = getenv("MANPATH")) == NULL ) {
> >>     if ( (path = getenv("PATH")) != NULL ) {
> >>         /* for each PATH component
> >>          *    if component ends in /bin or /sbin
> >>          *        replace bin or sbin with man
> >>          *        append to manpath
> >>          */
> >>
> >You'd need to make sure you check that the man part of each component
> >exists.  /man doesn't exist, even though /bin and /sbin do (even if they
> >are links).
>
>
> Perhaps expand with "realpath()" first also?

Sounds reasonable, especially if we are concerned about eliminating duplicates.

-- 
Mike Gerdts
http://mgerdts.blogspot.com/
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to