summaryrefslogtreecommitdiffstats
path: root/subopt-helper.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-09-27 08:52:40 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-09-27 08:52:40 +0000
commita949fa9b6639b00072c03def23413ebef82d9ea0 (patch)
tree16762677f083027c0bd151fb8fc96659d7d01fad /subopt-helper.c
parent9f24b5c71f2ef8d8d6343e27acda8ad728625e1b (diff)
downloadmpv-a949fa9b6639b00072c03def23413ebef82d9ea0.tar.bz2
mpv-a949fa9b6639b00072c03def23413ebef82d9ea0.tar.xz
Allow string escaping via "".
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16610 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'subopt-helper.c')
-rw-r--r--subopt-helper.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/subopt-helper.c b/subopt-helper.c
index 9ae6669a05..0cf2299899 100644
--- a/subopt-helper.c
+++ b/subopt-helper.c
@@ -262,6 +262,15 @@ static char const * parse_str( char const * str, strarg_t * const valp )
match = &str[len];
}
else
+ if (str[0] == '"') {
+ str = &str[1];
+ match = strchr(str, '"');
+ if (!match)
+ return NULL;
+ valp->len = match - str;
+ valp->str = str;
+ return &match[1];
+ }
if ( !match )
match = &str[strlen(str)];