D
DSF
Hello all,
A little background on the first question. A while back I
discovered that the parsing of the command line to **argv would be
corrupted if a parameter enclosed in quotes ended in a backslash, such
as "c:\Test 1\". (Assuming "c:Test 1\" should be argv[1], argv[1]
would also contain part or all of the next parameter, and so on,
pretty much screwing up the input to main entirely.) Recently, I had
the opportunity to investigate this, which I assumed was a bug in the
compiler's startup code. Upon browsing through the source, I found
that it is done intentionally. The startup code considers \" to be an
ESCAPE QUOTE sequence. Is this part of the standard, or just a
strange "feature" thought up by the compiler designer?
Is there any portable way to get the unparsed data passed to main?
Since I have never read anything that said this can be done, I
assume it can't. However, since C lets the programmer "get to the
guts" of things more than most other languages, I would expect there
to be a way to get at the unparsed data.
Thanks,
DSF
P.S. Question 2 was not posed to find a solution to the problem in
question 1. I solved that problem by modifying the startup source and
including it in the relevant projects.
A little background on the first question. A while back I
discovered that the parsing of the command line to **argv would be
corrupted if a parameter enclosed in quotes ended in a backslash, such
as "c:\Test 1\". (Assuming "c:Test 1\" should be argv[1], argv[1]
would also contain part or all of the next parameter, and so on,
pretty much screwing up the input to main entirely.) Recently, I had
the opportunity to investigate this, which I assumed was a bug in the
compiler's startup code. Upon browsing through the source, I found
that it is done intentionally. The startup code considers \" to be an
ESCAPE QUOTE sequence. Is this part of the standard, or just a
strange "feature" thought up by the compiler designer?
Is there any portable way to get the unparsed data passed to main?
Since I have never read anything that said this can be done, I
assume it can't. However, since C lets the programmer "get to the
guts" of things more than most other languages, I would expect there
to be a way to get at the unparsed data.
Thanks,
DSF
P.S. Question 2 was not posed to find a solution to the problem in
question 1. I solved that problem by modifying the startup source and
including it in the relevant projects.