From 5024821991ef46ccc1ec43cc08ce8729eb507004 Mon Sep 17 00:00:00 2001 From: "Tim V. Shaporev" Date: Sat, 22 Feb 2014 12:55:04 +0400 Subject: [PATCH 1/2] proper quotation of \" special case --- src/winconsole.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/winconsole.c b/src/winconsole.c index 7182ea8f..d9e1ad81 100644 --- a/src/winconsole.c +++ b/src/winconsole.c @@ -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); From 6867c5000379b75388473994815f90b7948936bf Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 22 Feb 2014 11:29:43 -0500 Subject: [PATCH 2/2] Added fixme for release builds --- scripts/publish-macosx.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/publish-macosx.sh b/scripts/publish-macosx.sh index cca941d7..aff08095 100755 --- a/scripts/publish-macosx.sh +++ b/scripts/publish-macosx.sh @@ -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"`