www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/20/04:24:29

Date: Mon, 20 Jul 1998 11:23:08 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Paul Shirley <Paul AT chocolat DOT obvious DOT fake DOT foobar DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: a filenames problem
In-Reply-To: <LyNU$RA2wds1Ewez@foobar.co.uk>
Message-ID: <Pine.SUN.3.91.980720112248.3059I-100000@is>
MIME-Version: 1.0

On Sun, 19 Jul 1998, Paul Shirley wrote:

>  The normal solution is to issue a findfirst() with the command line
> supplied filename. The returned ffblk should contain the LFN.

AFAIK, the problem with findfirst is that it returns the long name
only for the last part of the file name; you still have the leading
directories to convert as well.

Calling _truename returns the long name for the entire path in one
swell whoop.

>  In some ways this is preferable to using djgpp's LFN functions because
> the same technique works in all Win32 compilers (although the
> findfirst() function is different). In particular, porting to cygwin32
> or mingw32 is simpler.

IMHO, Cygwin32 and Mingw32 should adopt some of the tricks from
DJGPP's experience.  Maybe you can give their developers a tip.  It is
not smart (IMHO) to require people to sacrifice code efficiency for
the sake of portability, when it's the same platform we are talking
about, and all these environments are free and so can exchange ideas
without any obstacles.

- Raw text -


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