From b8cec4a2571596692c1e0b27cc3953ecff712178 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 4 Jun 2010 09:25:29 +0200 Subject: Add support for single quotes in option files --- cli/options.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cli/options.cxx') 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); -- cgit v1.1