mirror of https://github.com/vitalif/openscad
Merge branch 'master' of github.com:openscad/openscad
commit
2712465a1d
|
@ -22,6 +22,7 @@ update_www_download_links()
|
|||
local $*
|
||||
filesize=$(human_filesize $filesize)
|
||||
webdir=../openscad.github.com
|
||||
# FIXME: release vs. snapshot
|
||||
incfile=inc/mac_snapshot_links.js
|
||||
BASEURL='http://files.openscad.org/'
|
||||
DATECODE=`date +"%Y.%m.%d"`
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#define WEXITSTATUS(S) (((S) >> 8) & 0xff)
|
||||
#endif
|
||||
|
||||
#define MAXCMDLEN 64000
|
||||
#define MAXCMDLEN /*64000*/ 32768 /* MS Windows limit */
|
||||
#define BUFFSIZE 42
|
||||
|
||||
int main( int argc, char * argv[] )
|
||||
|
@ -63,7 +63,10 @@ int main( int argc, char * argv[] )
|
|||
quote = NULL != strpbrk((s = argv[i]), " \"&'<>^|\t");
|
||||
if (quote) cmd[n++] = '"';
|
||||
while (*s) { // copy & check
|
||||
if ('"' == *s) cmd[n++] = *s; // duplicate it
|
||||
// The following test is compomise between brevity, clarity and performance.
|
||||
// It could be boiled down to: if ('"' == s[strspn(s,"\\")])
|
||||
// or expanded to avoid repetitive passes of strspn() over same data.
|
||||
if ('"' == *s || ('\\' == *s && '"' == s[strspn(s,"\\")])) cmd[n++] = '\\';
|
||||
cmd[n++] = *s++;
|
||||
if (n >= MAXCMDLEN-sizeof(redirect_str)) {
|
||||
fprintf(stderr, "Command line length exceeds limit of %d\n", MAXCMDLEN);
|
||||
|
|
Loading…
Reference in New Issue