aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/ChangeLog5
-rw-r--r--g10/misc.c18
2 files changed, 20 insertions, 3 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index adabf3fc5..5d623f83a 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-27 David Shaw <[email protected]>
+
+ * misc.c (optsep): Add the ability to understand keyword="quoted
+ arg with spaces" type options.
+
2004-07-16 David Shaw <[email protected]>
* keylist.c (list_keyblock_print): Always use the new listing
diff --git a/g10/misc.c b/g10/misc.c
index 9ffe09de7..51c0e6757 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -673,11 +673,23 @@ optsep(char **stringp)
ptr++;
}
- /* There is an argument, so grab that too. */
+ /* There is an argument, so grab that too. At this point,
+ ptr points to the first character of the argument. */
if(sawequals)
- end=strpbrk(ptr," ,");
+ {
+ /* Is it a quoted argument? */
+ if(*ptr=='"')
+ {
+ ptr++;
+ end=strchr(ptr,'"');
+ if(end)
+ end++;
+ }
+ else
+ end=strpbrk(ptr," ,");
+ }
- if(end)
+ if(end && *end)
{
*end='\0';
*stringp=end+1;