www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/11/13/01:03:47

Date: Tue, 13 Nov 2001 07:53:43 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
Message-Id: <3405-Tue13Nov2001075342+0200-eliz@is.elta.co.il>
X-Mailer: emacs 21.1.50 (via feedmail 8 I) and Blat ver 1.8.9
CC: djgpp-workers AT delorie DOT com
In-reply-to: <3BF027F7.DEE05D7@phekda.freeserve.co.uk> (message from Richard
Dawe on Mon, 12 Nov 2001 19:50:15 +0000)
Subject: Re: RESEND: Patch to computer st_blksize in struct stat
References: <10111111931 DOT AA17953 AT clio DOT rice DOT edu> <3BF027F7 DOT DEE05D7 AT phekda DOT freeserve DOT co DOT uk>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Mon, 12 Nov 2001 19:50:15 +0000
> From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
> 
> Charles Sandmann wrote:
> [snip]
> > > +
> > > +   _fixpath(path, fixed_path);
> > > +   d = tolower(path[0]) - 'a';
> > 
> > Calling fixpath just to get the drive letter seems like overkill here.
> > If the in path has a ':' in the second char we could use it; else get
> > the current drive.
> 
> I thought fixpath() would be needed to cope with joined paths, because I
> thought that the source & target of the join could have different block
> sizes.

_fixpath (or something similar) is also needed if the file name has
the /dev/c/foo or /dev/env/FOO forms.  In these cases, the current
drive is not the right one.

Of course, if the file name with which _get_cached_blksize is called
already has these constructs resolved, then you don't need anything,
including the logic to get the current drive.

- Raw text -


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