home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1992 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1992.iso
/
usenet
/
altsrcs
/
3
/
3239
< prev
next >
Wrap
Internet Message Format
|
1991-04-24
|
777b
From: ksh@ai.mit.edu (K. Shane Hartman)
Newsgroups: alt.sources,comp.unix.programmer,comp.os.vms
Subject: Re: Relative path to Absolute Path
Message-ID: <KSH.91Apr24232226@rice-chex.ai.mit.edu>
Date: 25 Apr 91 03:22:26 GMT
In article <1515@geovision.gvc.com> pt@geovision.gvc.com (Paul Tomblin) writes:
Although I got absolutely zero response to this request, I did find an
answer. With the error checking turned off, what I ended up doing was
approximately this:
chdir(new_dir);
getcwd(new_dir, MAX_PATH_LEN);
It works beatifully, on both VMS and unix. (And probably DOS, but
I wouldn't bet my life on it.)
Works fine in DOS too. The only wrinkle I add to it is error checking
for nonexistent path and preserve the original path.
Shane Hartman