Subject: Re: cygnus bugs
From: [email-masked] (Francis Litterio)

13 Jul 1997 09:23:17 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <[email-masked]> <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Original-To: [email-masked]
In-Reply-To: <[email-masked]>
X-Mailer: Forte Agent 1.01/32.397
Original-Sender: [email-masked]

In wstd.mail.gnu-win32, you wrote:

> Tim Newsham <[email-masked]> writes:
> 
> >- cygwin does not properly transform command line path names across
> >  mount points.  If I am on drive "D:" and type "vi /tmp/foo",
> >  I end up editing "D:\tmp\foo" and not "C:\tmp\foo" even though
> >  "/tmp" is on "C:".  (vi is not compiled with cygwin).
> >  Cygwin should transform the path to "C:\tmp\foo" for the benefit
> >  of non-cygwin applications.
> 
> How can cygwin know which arguments are pathnames and which are
> just ordinary strings that should not be transformed in this manner?

Cygwin can know because the strings that are pathnames are passed to
open(), at which point cygwin looks in the mount table to find what
drive-and-directory the pathname actually refers to.  For example,
given this mount table:

% mount
Device           Directory           Type        Flags
\temp            /tmp                native      no-mixed,text=binary
c:               /                   native      no-mixed,text=binary
....

Then the pathname "/tmp" refers to c:\temp regardless of my current
drive.  Since vi uses open() to access the file, then the command "vi
/tmp/foo" must open c:\temp\foo regardless of which drive is my
currect drive.
--
Francis Litterio                           PGP Key Fingerprint:
[email-masked]              02 37 DF 6C 66 43 CD 2C
http://world.std.omit-this.com/~franl/     10 C8 B5 8B 57 34 F3 21

"They that can give up essential liberty to obtain a little temporary 
 safety deserve neither liberty nor safety." -- Ben Franklin, ~1784
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".