diff options
author | KWSys Robot <kwrobot@kitware.com> | 2014-04-02 13:08:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-04-03 12:43:46 (GMT) |
commit | eccc425af6ffeb52963cc2dd94a36a24c271108b (patch) | |
tree | cb04a6adced95d2f31956b72fce05fd205f659cd /System.c | |
parent | 12faf00d71e9a9d9f48ee13ef9dd0011fa95c385 (diff) | |
download | CMake-eccc425af6ffeb52963cc2dd94a36a24c271108b.zip CMake-eccc425af6ffeb52963cc2dd94a36a24c271108b.tar.gz CMake-eccc425af6ffeb52963cc2dd94a36a24c271108b.tar.bz2 |
KWSys 2014-04-02 (39f98b5d)
Extract upstream KWSys using the following shell commands.
$ git archive --prefix=upstream-kwsys/ 39f98b5d | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' a8aa1014..39f98b5d
Brad King (1):
39f98b5d Encoding: Add self-assignment check to CommandLineArguments
Jiri Malak (1):
36982798 SystemTools: add Watcom single Quote processing
Change-Id: Ib8e67dc0c29ee62e6489c068987e4206fa4adaf3
Diffstat (limited to 'System.c')
-rw-r--r-- | System.c | 30 |
1 files changed, 28 insertions, 2 deletions
@@ -353,6 +353,10 @@ static int kwsysSystem_Shell__GetArgumentSize(const char* in, if(kwsysSystem_Shell__ArgumentNeedsQuotes(in, isUnix, flags)) { /* Surrounding quotes are needed. Allocate space for them. */ + if((flags & kwsysSystem_Shell_Flag_WatcomQuote) && (isUnix)) + { + size += 2; + } size += 2; /* We must escape all ending backslashes when quoting on windows. */ @@ -377,7 +381,18 @@ static char* kwsysSystem_Shell__GetArgument(const char* in, char* out, if(needQuotes) { /* Add the opening quote for this argument. */ - *out++ = '"'; + if(flags & kwsysSystem_Shell_Flag_WatcomQuote) + { + if(isUnix) + { + *out++ = '"'; + } + *out++ = '\''; + } + else + { + *out++ = '"'; + } } /* Scan the string for characters that require escaping or quoting. */ @@ -549,7 +564,18 @@ static char* kwsysSystem_Shell__GetArgument(const char* in, char* out, } /* Add the closing quote for this argument. */ - *out++ = '"'; + if(flags & kwsysSystem_Shell_Flag_WatcomQuote) + { + *out++ = '\''; + if(isUnix) + { + *out++ = '"'; + } + } + else + { + *out++ = '"'; + } } /* Store a terminating null without incrementing. */ |