From: franl AT world DOT std DOT omit-this DOT com (Francis Litterio) Subject: Re: cygnus bugs 13 Jul 1997 09:23:17 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <33c8f0a3.1384462.cygnus.gnu-win32@world.std.com> References: <199707121921 DOT JAA02783 AT haleakala DOT aloha DOT net> <199707130728 DOT RAA03575 AT murlibobo DOT cs DOT mu DOT OZ DOT AU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Original-To: gnu-win32 AT cygnus DOT com In-Reply-To: <199707130728.RAA03575@murlibobo.cs.mu.OZ.AU> X-Mailer: Forte Agent 1.01/32.397 Original-Sender: owner-gnu-win32 AT cygnus DOT com In wstd.mail.gnu-win32, you wrote: > Tim Newsham 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: franl AT world DOT std DOT omit-this DOT com 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 "gnu-win32-request AT cygnus DOT com" with one line of text: "help".