Mail Archives: cygwin/2002/04/22/15:19:18
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 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/
- Raw text -