This is the mail archive of the
mailing list for the Cygwin project.
RE: sprintf question.
- From: "Pitts, Christopher (Inland)" <CPitts at iccnet dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 20 Jun 2002 13:51:08 -0500
- Subject: RE: sprintf question.
From: Bernard A Badger [mailto:firstname.lastname@example.org]
Sent: Thursday, June 20, 2002 1:44 PM
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
"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
>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
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.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html