Xref: utzoo alt.sources:3653 comp.unix.programmer:1653 comp.os.vms:38263 Path: utzoo!utgpu!cunews!cognos!geovision!pt From: pt@geovision.gvc.com (Paul Tomblin) Newsgroups: alt.sources,comp.unix.programmer,comp.os.vms Subject: Re: Relative path to Absolute Path Keywords: file path relative vms unix root Message-ID: <1515@geovision.gvc.com> Date: 23 Apr 91 18:32:15 GMT References: <1473@geovision.gvc.com> Reply-To: pt@geovision.gvc.com Organization: GeoVision Corp., Ottawa, Ontario Lines: 21 pt@geovision.gvc.com (Paul Tomblin) writes: >Does anybody have a routine to go from a relative file (or directory) path to >an absolute (rooted) one? I need one for both unix and vms. I need to be >able to go from relative to absolute in the following cases: 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.) -- Paul Tomblin, Department of Redundancy Department. ! My employer does Two roads diverged in a wood, and I/ I took the one less ! not stand by my travelled by/ And that is why I'm lost, dammit... ! opinions.... pt@geovision.gvc.com or {cognos,uunet}!geovision!pt ! Me neither.