This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: small inter-operability patch for vim 6.1.2 for Cygwin



Corinna Vinschen wrote:

> On Mon, Apr 22, 2002 at 08:35:50PM +0200, Bram Moolenaar wrote:
> > 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?
> 
> Sure: 
> 
>    #include <sys/cygwin.h>
> 
>    cygwin_conv_to_posix_path(const char *win_path, char *posix_path);

That sounds like something we can use.  But lacking the manual page it's
a bit difficult to know exactly how to call it.  Also, can this function
be used when the path is already a "posix" path?  Or do we need a test
whether this function needs to be called (a backslash being present).

Actually, it would help a lot if someone with Cygwin installed can look
into this and test a few things.

-- 
FIRST HEAD:  Oh! quick! get the sword out I want to cut his head off.
THIRD HEAD:  Oh, cut your own head off.
SECOND HEAD: Yes - do us all a favour.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 ///  Bram Moolenaar -- Bram@moolenaar.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]