delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/26/04:45:24

From: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Funny thing with _fixpath
Date: Thu, 26 Feb 1998 09:45:41 +0100
Organization: University of Ghent, Belgium
Lines: 21
Message-ID: <34F52BB4.5C69@rug.ac.be>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980225174658 DOT 2648S-100000 AT is>
NNTP-Posting-Host: eduserv1.rug.ac.be
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Eli Zaretskii wrote:

> That's exactly what `_fixpath' is supposed to do.  It canonicalizes the
> file name.  ``Canonicalizing'' means that it adds the drive and the
> current directory, if they aren't already there, and resolves "." and
> ".." if present.  It also does other useful things, like converting all
> slashes to forward variety; see the libc docs.

What canonicalizing actually means is that it yields a unique filename
for some file. That is its primary functioning; not converting slashes,
stripping dots, simplifying double-dots, making absolute, adding drive
letters, un-SUBST-ing, un-ASSIGN-ing, capitalizing, adding "x:/DEV/" for
devices and other weird things.

A canonicalizing function should be complete enough to help decide
whether two filenames refer to the same file.

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

- Raw text -


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