This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=82495a46554342054a4e220ecdc928c9c24be092 commit 82495a46554342054a4e220ecdc928c9c24be092 Author: Guillem Jover <guil...@debian.org> AuthorDate: Thu Aug 19 04:43:27 2021 +0200 libdpkg: Add new ACTION_MUX macro for continued options --- lib/dpkg/options.c | 2 ++ lib/dpkg/options.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/dpkg/options.c b/lib/dpkg/options.c index 859dfc80d..2107a774c 100644 --- a/lib/dpkg/options.c +++ b/lib/dpkg/options.c @@ -318,4 +318,6 @@ setaction(const struct cmdinfo *cip, const char *value) option_short(cip->oshort), cip->olong, option_short(cipaction->oshort), cipaction->olong); cipaction = cip; + if (cip->takesvalue == 2 && cip->sassignto) + *cipaction->sassignto = value; } diff --git a/lib/dpkg/options.h b/lib/dpkg/options.h index 2cb7c0be9..c820fadcd 100644 --- a/lib/dpkg/options.h +++ b/lib/dpkg/options.h @@ -79,6 +79,8 @@ void setobsolete(const struct cmdinfo *cip, const char *value); #define ACTION(longopt, shortopt, code, func) \ { longopt, shortopt, 0, NULL, NULL, setaction, code, NULL, func } +#define ACTION_MUX(longopt, shortopt, code, func, strvar) \ + { longopt, shortopt, 2, NULL, strvar, setaction, code, NULL, func } #define OBSOLETE(longopt, shortopt) \ { longopt, shortopt, 0, NULL, NULL, setobsolete, 0, NULL, NULL } -- Dpkg.Org's dpkg