From: H.G. Muller Date: Sun, 6 Dec 2009 19:58:34 +0000 (-0800) Subject: improves the XBoard handling of the engine command line X-Git-Tag: hgm-4.20100107~23 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=0183533e818083b1099145a0f42ee359bf0f3358;p=xboard.git improves the XBoard handling of the engine command line it now understands limited forms of quoting, so engine binaries with spaces in their file name can be handled. --- diff --git a/xboard.c b/xboard.c index 3f1983d..c9546e2 100644 --- a/xboard.c +++ b/xboard.c @@ -7572,8 +7572,11 @@ int StartChildProcess(cmdLine, dir, pr) strcpy(buf, cmdLine); p = buf; for (;;) { + while(*p == ' ') p++; argv[i++] = p; - p = strchr(p, ' '); + if(*p == '"' || *p == '\'') + p = strchr(++argv[i-1], *p); + else p = strchr(p, ' '); if (p == NULL) break; *p++ = NULLCHAR; }