delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/26/06:47:55

Date: Thu, 26 Feb 1998 13:45:16 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
cc: djgpp AT delorie DOT com
Subject: Re: Funny thing with _fixpath
In-Reply-To: <34F55107.FCA@rug.ac.be>
Message-ID: <Pine.SUN.3.91.980226133946.6246G-100000@is>
MIME-Version: 1.0

On Thu, 26 Feb 1998, Vik Heyndrickx wrote:

> the internal DOS' truename already does this automagically.

That call is similar, but not identical, to `_fixpath'.  For example, it
will return a UNC (which DJGPP libc generally doesn't support), whereas
`_fixpath' will keep the usual DOS "d:/path" format.  It will also return
a long name (if LFN are supported) whereas `_fixpath' doesn't change the
parts of the name which are present in the original name.  `_truename'
returns the name with DOS-style backslashes, while `_fixpath' converts
them to forward slashes.  There are cases where you need the former, and
there are places where the latter is better. 

IMHO, both these finctions canonicalize file names, only a bit 
differently.
 
> A funny thing I discovered is that "prn" is converted to "x:/dev/lpt1"

Not for me, it doesn't.  Please post a short code fragment to show this.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019