[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: "goals" for slink: FHS



> On Tue, Jul 28, 1998 at 12:36:37AM +0200, Michael Bramer wrote:
> > A other goal for the future:
> > all man-programs use MANPATH and /etc/manpath.config
> > all info-programs use INFOPATH
> > 
> > with a little patch, this should no problem.
> 
> I believe the correct way of doing this would be to build a small
> library for handling generic path-searching.  This lib is then used by
> *all* man page browsers and info readers.  Possibly other classes of
> software will find the library beneficial, too.
> 
> The library would have a config file and it would naturally react to
> MANPATH, INFOPATH and other such environment variables.
> Functionality-wise this is very close to the kpathsea library included
> with teTeX.  In fact, kpathsea could possibly be modified to implement
> this.
> 
> Advantages of this approach:
>  * A simple library that a developer can use to bring in complex path
>    searching
>  * A single config file for man, info and possibly other things too
>    makes future transitions like this one easier
>     - and it's easier for the sysadmin too
> 
> I don't think this is a hard one to implement.  Comments?

I think that a series of library functions that searched a path 
parameter would be a good start. Something like:

SYNOPSIS
  char *findpath(char* filename, char* path)

DESCRIPTION
  findpath attempts to locate a file in a directory within a 
  colon-separated path.  If the filename is not an absolute 
  pathname, will search each directory in the path, in an manner similar
  to the method the shell uses when searching the PATH variable for
  an executable, and will return the full pathname of the first matching
  file found.  If the filename is an absolute pathname, the path 
parameter
  is ignored, and findpath will just check for the existance of the 
file.
  If the file cannot be found, findpath will return NULL.

This could be used by anything needing to search a man path, an info 
path, an ld path, etc, etc, etc.  I -think- I could code it up fairly 
simply, but I don't know what to do after that!  Would the 
debian-mentor list be a good one for me to subscribe to if I want to do 
this?


-- 
     Buddha Buck                      bmbuck@acsu.buffalo.edu
"Just as the strength of the Internet is chaos, so the strength of our
liberty depends upon the chaos and cacaphony of the unfettered speech
the First Amendment protects."  -- A.L.A. v. U.S. Dept. of Justice


--  
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: