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

Sender: vheyndri AT rug DOT ac DOT be
Message-Id: <34F55107.FCA@rug.ac.be>
Date: Thu, 26 Feb 1998 12:24:55 +0100
From: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
Mime-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Cc: djgpp AT delorie DOT com
Subject: Re: Funny thing with _fixpath
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980226130913 DOT 6246C-100000 AT is>

Eli Zaretskii wrote:
> I would be interested to know how to
> yield a unique file name spec without doing all these ``weird'' things
> (some of which `_fixpath' doesn't do, btw).  A unique name presumably
> means that you can find out whether any given two files are the same by
> doing a simple string comparison.  So how would you go about
> canonicalizing a file name if not by converting it to the shortest
> absolute path from the root?

Like is said to you in private email, the internal DOS' truename already
does this automagically. IIRC it is INT21 - FN 60h, but I might be (a
little bit) wrong.
That function was undocumented during a long period, but it did exist
from early DOS versions on. It seems a quite relyable method for finding
a "canonicalized" name.

A funny thing I discovered is that
"prn" is converted to "x:/dev/lpt1"

-- 
 \ Vik /-_-_-_-_-_-_/   
  \___/ Heyndrickx /          
   \ /-_-_-_-_-_-_/

- Raw text -


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