Mail Archives: djgpp/1994/06/25/21:14:27
How does go32 handle single-quotes on the command line? After trying in
vain to pass a blank-interspersed script to awk on the command line, I
wrote the following beauty and built with djgpp:
#include <stdio.h>
main (int argc, char** argv)
{
printf (argv [1]);
}
The results (somewhat unexpected?):
>test "blah"
blah
>test 'blah'
blah
>test "blah blah"
blah blah
>test 'blah blah'
'blah
This behaviour makes a port of a Unix program that depends on the shell
for command line processing a nontrivial matter. I think single quotes
should be stripped by go32 just as double quotes are, in all cases.
Could someone point me to the place in go32 where quoting and globbing is
handled? I would then attempt a fix. Thanks a lot.
Ian T Zimmerman +-------------------------------------------+
P.O. Box 13445 I With so many executioners available, I
Berkeley, California 94712 I suicide is a really foolish thing to do. I
USA +-------------------------------------------+
- Raw text -