Hi, On Wed, Nov 11, 2015 at 08:40:06PM +0100, Gert Doering wrote: > ... but wouldn't > > argv_printf (&argv, > "%s%sc interface ipv6 set address interface=%lu %s > store=active", > get_win_sys_path(), > NETSH_PATH_SUFFIX, > get_adapter_index_flexible(actual), > ifconfig_ipv6_local); > > (without storing into a temp variable) work "just fine"?
Turns out this does not work, as argv_printf() does not implement a
generic printf() parser, but splits up the string at whitespace boundaries
and then handles each element explicitly - and '%-parsing' is only done
for known cases, and then the % part has to stand on its own, with
some special exceptions...
else if (!strcmp (term, "%s/%d"))
...
else if (!strcmp (term, "%s%sc"))
...
given that, I think the v3 patch is as good as it's going to get without
extending argv_printf() - IOW, ACK, and I'll merge later. Thanks.
(I'll add a comment to the commit message to explain why a temporary
string has to be used, in case I forget and start wondering a year from
now...)
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]
fax: +49-89-35655025 [email protected]
signature.asc
Description: PGP signature
