This is the mail archive of the cygwin 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]

commanline argument parsing


If I compile this snippet:

#include <stdio.h>
int main (int argc, char **argv)
{
    int i;
    for (i = 0; i < argc; ++i)
        printf("argv[%d] %s\n", i, argv[i]);
    return 0;
}

with cygwin GCC and then run it from CMD prompt:

C:\cygwin\home\me> test \"stuff\"

it prints this:

    argv[0] test
    argv[1] \stuff"

Is that expected?  I'm aware that there is some conversion going on
and that it's meant to work from a cygwin shell really, but still.

Could someone shed light upon the reasoning with this?

--- gr

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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