Mail Archives: djgpp-workers/1997/05/22/18:44:13
Eli Zaretskii wrote:
>
> No, arguments passed by `spawn' aren't expanded on the child's side, so
> it's only an issue for `system'. But your patch will indeed fail when the
> original arguments were quoted. You need to quote the arguments which
> include special characters and whitespace when you reconstruct the command
> line before calling `system'. (After you are through it, you might read
> the messy code on dosexec.c that handles it and smile. Or maybe read it
> *before* handling the quoting, so you get a few ideas...)
Interesting. This code would have to deal with such things as nested
quotes, escaped quotes, and other such nastiness. For example, it would
have to reconstruct the argument 'He said "This is great"' with single
quotes instead of double quotes, or the command line will be even more
messed up than it was before. This is probably why dosexec.c is so
messy. ;)
I'll take a look at it and see what I can come up with. In the
meantime, if anyone really does want to mess with the internal mechanics
of the command-line passing system used by DJGPP programs, you're
welcome to it.
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | mailto:fighteer AT cs DOT com |
| Descent 2: The Infinite Abyss - The greatest Internet game of all |
| time just got better! This time, you're going all the way down...|
---------------------------------------------------------------------
- Raw text -