delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/06/20/14:52:12

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
Message-ID: <82BCF2187EB8D54483F55F9FB210E440275221@s099npex01.myInland.com>
From: "Pitts, Christopher (Inland)" <CPitts AT iccnet DOT com>
To: cygwin AT cygwin DOT com
Subject: RE: sprintf question.
Date: Thu, 20 Jun 2002 13:51:08 -0500
MIME-Version: 1.0


-----Original Message-----
From: Bernard A Badger [mailto:bab AT vx DOT com]
Sent: Thursday, June 20, 2002 1:44 PM
To: cygwin AT cygwin DOT com
Subject: RE: sprintf question.


>The problem does not lie in sprintf(), but with system().
>System invokes a shell which re-interprets the backslashes
> \w -> w, \s -> s and \n -> n 


Yea, I found that about the time I sent the message off. supposedly there is
a define 
"HAVE_DOS_BASED_FILE_SYSTEM" that controls this (I think, if I'm reading
 http://gcc.gnu.org/onlinedocs/gccint/Host-Config.html correctly), however
defining this  doesn't seem to make a difference to cygwin.


>The cygwin shell, ash -- I'm guessing here --, likes slashes, not back
slashes.
>You might try, system("/cygdrive/c/winnt/system32/notepad.exe");

Forward slashes work.



>BTW, why copy backslashes at all?
I have a program that takes user input in the form of directory paths, hence
the backslashes.  

Does cygwin supposed to obey the "HAVE_DOS_BASED_FILE_SYSTEM" defines?  I
don't see any reason it should'nt but maybe I'm reading the docs wrong or
just missing something else.


C. Pitts

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