mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* misc.c (optsep): Add the ability to understand keyword="quoted arg with
spaces" type options.
This commit is contained in:
parent
a32297863b
commit
a2e332cded
2 changed files with 20 additions and 3 deletions
18
g10/misc.c
18
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue