Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Mon, 15 Jul 2002 14:28:57 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: cygwin1.dll mangling command line args Message-ID: <20020715182857.GC27999@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20020715155555 DOT GC26820 AT redhat DOT com> <010d01c22c2c$a8dc2ca0$0100a8c0 AT advent02> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <010d01c22c2c$a8dc2ca0$0100a8c0@advent02> User-Agent: Mutt/1.3.23.1i On Mon, Jul 15, 2002 at 07:23:03PM +0100, Chris January wrote: > >----- Original Message ----- >From: "Christopher Faylor" >To: >Sent: Monday, July 15, 2002 4:55 PM >Subject: Re: cygwin1.dll mangling command line args > > >> On Mon, Jul 15, 2002 at 10:08:35AM -0400, Mark Blackburn wrote: >> >Observe the following testcases >> > >> >test.c: >> >int main(int argc, char** argv) >> >{ >> > int i; >> > for (i=0; i> > printf("%s\n",argv[i]); >> >} >> > >> >D:\home\windows\desktop>gcc test.c -o test -mno-cygwin >> > >> >D:\home\windows\desktop>test \\mark\share "\\mark\share" >> >test >> >\\mark\share >> >\\mark\share >> > >> >Everything is fine here. >> > >> >D:\home\windows\desktop>gcc test.c -o test >> > >> >D:\home\windows\desktop>test \\mark\share "\\mark\share" >> >test >> >\\mark\share >> >\mark\share >> > >> >The second argument in the quotes loses a backslash >This is correct - the first \ in the quotes escapes the second. Unfortunately, it doesn't do this with native, msvc, compiled apps. This is the age-old discussion regarding what command line paradigm cygwin is supposed to emulate when it is not run from a UNIX shell. cgf -- 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/