summaryrefslogtreecommitdiff
path: root/cli/options.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-06-04 09:25:29 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-06-04 09:25:29 +0200
commitb8cec4a2571596692c1e0b27cc3953ecff712178 (patch)
tree2aadf52a5f0dea3af5d45c894f0370274e6042b2 /cli/options.cxx
parent840f2fae3995a3e263801ad07d1285d35ddd9485 (diff)
Add support for single quotes in option files
Diffstat (limited to 'cli/options.cxx')
-rw-r--r--cli/options.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/options.cxx b/cli/options.cxx
index 3f3c1b9..1c46fd4 100644
--- a/cli/options.cxx
+++ b/cli/options.cxx
@@ -351,10 +351,11 @@ namespace cli
// If the string is wrapped in quotes, remove them.
//
n = s2.size ();
+ char cf (s2[0]), cl (s2[n - 1]);
- if (s2[0] == '"' || s2[n - 1] == '"')
+ if (cf == '"' || cf == '\'' || cl == '"' || cl == '\'')
{
- if (n == 1 || s2[0] != s2[n - 1])
+ if (n == 1 || cf != cl)
throw unmatched_quote (s2);
s2 = string (s2, 1, n - 2);