Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <200204221835.g3MIZoU02673@moolenaar.net> To: Chris Metcalf cc: cygwin AT cygwin DOT com, vim-dev AT vim DOT org Subject: Re: small inter-operability patch for vim 6.1.2 for Cygwin In-Reply-To: From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Mon, 22 Apr 2002 20:35:50 +0200 Chris Metcalf wrote: > This small change fixes an interoperability problem with vim in Cygwin. If > the Cygwin vim is invoked by non-Cygwin aware tools, it may be passed a > backslash-separated path. Since vim is essentially Unix-built for Cygwin, > it doesn't realize it should recognize the backslashes as path separators, > and fails to create a valid .swp file path (error "E303"). > > For example, the Cygwin cvs.exe is substantially slower at updates than a > non-Cygwin build, presumably because of stat() overheads. Both versions > of cvs.exe will use $EDITOR to get checkin comments from the user, but the > non-Cygwin version will pass a C:\TEMP\... path to vim. (While it is > possible to set up a $CVSEDITOR .bat file that runs "cygpath -u" on its > argument, this seems more like a bandaid than a proper fix.) > > The attached patch just modifies the vim_ispathsep() function to be > Cygwin-aware. IMHO, the full BACKSLASH_IN_FILENAME mechanism is > inappropriate for Cygwin vim, since it really wants to present a complete > Unix facade to the user. However, when backslashes are supplied in > filenames, the underlying OS *will* treat them as directory separators, so > vim must be aware of special characters as separators. I'm quite sure this is not a good solution. It's just waiting to fail in another place. The Unix code just isn't prepared for backslashes in a file name to be path separators, they are seen as escaping the special meaning of characters. Why not add something at the start of main() to change backslashes to forward slashes? Or better: Isn't there a cygwin trick for this already? > (I am not subscribed to vim-dev but have cc'ed it based on the comments in > vim's README.txt.) Your message won't get to the vim-dev list then. And you can't read responses from others... -- His head smashed in, and his heart cut out, And his liver removed, and his bowels unplugged, And his nostrils raped, and his bottom burned off, And his penis split ... and his ... "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram AT moolenaar DOT net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org /// -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/