This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: sprintf question.

-----Original Message-----
From: Bernard A Badger []
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
a define 
"HAVE_DOS_BASED_FILE_SYSTEM" that controls this (I think, if I'm reading 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
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:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]