Mail Archives: cygwin/2002/06/20/14:52:12
-----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 -