delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/03/12/17:18:01

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Wed, 12 Mar 2003 17:17:53 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: anton AT mips DOT complang DOT tuwien DOT ac DOT at
cc: cygwin AT cygwin DOT com
Subject: Re: Mixing / and \ path separators
In-Reply-To: <200303122208.XAA17485@a0.complang.tuwien.ac.at>
Message-ID: <Pine.GSO.4.44.0303121712340.25867-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

On Wed, 12 Mar 2003, Anton Ertl wrote:

> Cygwin 1.3.18(0.69/3/2) handles filenames like
>
> /usr/local/share/gforth/0.5.9-20030201\kernl32l.fi
>
> all right, where the "\" is meant as a path separator.  Cygwin
> 1.3.19(0.71/3/2) and 1.3.20 reportedly do not like such names (file
> not found).  Is this intentional and will it stay that way?

This is intentional.  See <http://cygwin.com/ml/cygwin-announce/2003-01/msg00021.html>,
especially the line that says:
- Make handling of \foo\bar equivalent to /foo\bar.  (Christopher Faylor)
(the above should be the other way around, but you get the idea).

> If so, how should I deal with path names where parts of the path come
> from ordinary windows users?

Translate them to Unix paths using, for example, "sed 's!\\!/!g'.

> Background: We use Cygwin for the Windows port of Gforth
> (http://www.complang.tuwien.ac.at/forth/gforth/).  The Windows port
> currently produces mixes like the above by default, and we could
> change that; but I am worried about paths coming from the users (e.g.,
> through the GFORTHPATH environment variable), which may use either
> way.
> - anton

Does the windows port of Gforth know about POSIX paths?  If so,
backslashes are not allowed in POSIX paths, and should be changed.  You
could then require that user variables provide paths in POSIX format
(i.e., with forward slashes).  If you want to be able to handle
backslashes in user-specified paths, you'll have to do the translation
internally.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune


--
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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019