[comp.sources.wanted] environment fetching and tilde expansion software

brown@ftms.UUCP (Vidiot) (04/13/91)

I'm looking for a couple of pieces of software, that could be in a library
type package (sources required).

One of the functions that I need is to be able to parse a path and expand the
~user into the full path of that user.  The ~user may be part of a longer
path, so it would be nice to be able to pass the function the unexpanded
filename and get back the expanded filename, or an error number indicating
that it couldn't be expanded.

The other function, which is tied to the previous one, is to be able to expand
a path like $(PROGHOME)/bin.

I'd rather not re-invent the wheel of this code is already available somewhere.

Please respond via e-mail and thanks in advance.
-- 
harvard\
  ucbvax!uwvax!astroatc!ftms!brown
rutgers/
INTERNET: spool.cs.wisc.edu!astroatc!ftms!brown

brown@ftms.UUCP (Vidiot) (04/13/91)

In article <42@ftms.UUCP> brown@ftms.UUCP (Vidiot) writes:
<
<The other function, which is tied to the previous one, is to be able to expand
<a path like $(PROGHOME)/bin.

Oh, for this one I understand that one can look for the $ and then get the
name after it and to a getenv on the word.  But, if this were part of a general
function that did both the ~ and $ expansions, it would make it a little easier.
-- 
harvard\
  ucbvax!uwvax!astroatc!ftms!brown
rutgers/
INTERNET: spool.cs.wisc.edu!astroatc!ftms!brown