Re: windows shell problem
felix winkelmann <bunny351 <at> gmail.com>
2009-01-05 08:14:38 GMT
On Mon, Jan 5, 2009 at 1:37 AM, Lars Nilsson <chamaeleon <at> gmail.com> wrote:
> On Sun, Jan 4, 2009 at 7:27 PM, Thomas Chust <chust <at> web.de> wrote:
>> Ivan Raikov wrote:
>>> [...]
>>> I think the problem is that \ in strings needs to be escaped,
>>> [...]
>>
>> Hello,
>>
>> I don't think so, unless the escaping problem occurs on the Scheme or C
>> side of things.
>>
>> As far as I know, the Windows shell only understands two escape
>> characters: The double quote ("), to group things that contain spaces
>> together and the caret (^) to escape a single following special character.
>
> The important part is, I think, that system() is used according to
> Felix's first email, presumably in a piece of C code, which means \ in
> a string constant should be \\ to be taken literally, instead of
> escaping the character following it. The shell / cmd invokation was
> supposedly working without a problem.
>
The handling of backslashes as escaping characters is not the problem,
it seems. If I pass this string (verbatim, just like it is printed here) to
system(3):
"c:\home\chicken-trunk\bin\csi" -bnq -e "(require-library setup-api)"
-e "(import setup-api)" "c:\...some...path...\defstruct.setup"
I get an error message that tells me that the program
"c:\home\chicken-trunk\bin\csi" -bnq -e ""
(sic) can not be found.
To reproduce the problem, one can do the following:
- checkout the current svn trunk
- run "make PLATFORM=mingw PREFIX=c:/home/chicken-trunk DEBUGBUILD=1
bootstrap"
(prefix must contain drive letter and use forward slashes)
- run "make PLATFORM=mingw PREFIX=c:/home/chicken-trunk DEBUGBUILD=1"
- run "make PLATFORM=mingw PREFIX=c:/home/chicken-trunk DEBUGBUILD=1 install"
- run "bin\chicken-install defstruct"
cheers,
felix