[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mingw-users
Subject:    Re: [Mingw-users] Problem with (argc,argv) under MSYS
From:       Keith Marshall <keithmarshall () users ! sourceforge ! net>
Date:       2009-06-30 19:30:22
Message-ID: 200906302030.23003.keithmarshall () users ! sourceforge ! net
[Download RAW message or body]

On Tuesday 30 June 2009 14:34:07 Earnie Boyd wrote:
> > and it's ok... now I retry the same test.exe under bash but I
> > get   the same output!
>
> The test.exe is a native program and therefore the arguments are
> given as windows expects it.
>
> > Instead, I was expecting this one:
> >
> > argc=3
> > argv[0]=test
> > argv[1]=-c
> > argv[2]=(display "foo")
> >
> > I though that bash had to convert the arguments to something
> > like to:
>
> MSYS will only convert posix paths to native windows paths.  It
> will pass arguments to native programs untouched otherwise.

Hmm.  I'm *not* seeing the behaviour reported by the OP; with 
dumpargs.c as in: 
http://thread.gmane.org/gmane.comp.gnu.mingw.msys/3719

and with:

$ uname -a
MINGW32_NT-5.0 ... 1.0.11(0.46/3/2) 2009-01-29 00:39 i686 Msys

$ sh --version
GNU bash, version 3.1.0(1)-release (i686-pc-msys)
Copyright (C) 2005 Free Software Foundation, Inc.

$ dumpargs -c '(display "foo")'
argv[0]: d:\usr\sandbox\local\bin\dumpargs.exe
argv[1]: -c
argv[2]: (display "foo")

which seems to match the OP's expectations--but not experience--while
cmd.exe says, (as for the OP):

D:\usr\sandbox\local\bin> dumpargs -c '(display "foo")'
argv[0]: dumpargs
argv[1]: -c
argv[2]: '(display
argv[3]: foo)'

-- 

Regards,
Keith.

------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.

Most annoying abuses are:
1) Top posting
2) Thread hijacking
3) HTML/MIME encoded mail
4) Improper quoting
5) Improper trimming
_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic