small inter-operability patch for vim 6.1.2 for Cygwin

Bram Moolenaar
Mon Apr 22 12:31:00 GMT 2002

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 -- --  \\\
///   Creator of Vim -- --   \\\
\\\           Project leader for A-A-P --           ///
 \\\  Help me helping AIDS orphans in Uganda -  ///

Unsubscribe info:
Bug reporting:

More information about the Cygwin mailing list