diff options
Diffstat (limited to 'dirmngr/dirmngr-client.c')
-rw-r--r-- | dirmngr/dirmngr-client.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/dirmngr/dirmngr-client.c b/dirmngr/dirmngr-client.c index 0d714d485..e4df476d7 100644 --- a/dirmngr/dirmngr-client.c +++ b/dirmngr/dirmngr-client.c @@ -16,6 +16,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, see <https://www.gnu.org/licenses/>. + * SPDX-License-Identifier: GPL-3.0-or-later */ #include <config.h> @@ -158,9 +159,11 @@ my_strusage (int level) switch(level) { + case 9: p = "GPL-3.0-or-later"; break; case 11: p = "dirmngr-client (@GNUPG@)"; break; case 13: p = VERSION; break; + case 14: p = GNUPG_DEF_COPYRIGHT_LINE; break; case 17: p = PRINTABLE_OS_NAME; break; case 19: p = _("Please report bugs to <@EMAIL@>.\n"); break; case 49: p = PACKAGE_BUGREPORT; break; @@ -202,6 +205,9 @@ main (int argc, char **argv ) set_strusage (my_strusage); log_set_prefix ("dirmngr-client", GPGRT_LOG_WITH_PREFIX); + /* Register our string mapper. Usually done in + * init_common_subsystems, but we don't use that here. */ + gnupg_set_fixed_string_mapper (map_static_macro_string); /* For W32 we need to initialize the socket subsystem. Because we don't use Pth we need to do this explicit. */ @@ -223,8 +229,8 @@ main (int argc, char **argv ) /* Parse the command line. */ pargs.argc = &argc; pargs.argv = &argv; - pargs.flags= 1; /* Do not remove the args. */ - while (arg_parse (&pargs, opts) ) + pargs.flags= ARGPARSE_FLAG_KEEP; + while (gnupg_argparse (NULL, &pargs, opts)) { switch (pargs.r_opt) { @@ -247,9 +253,11 @@ main (int argc, char **argv ) break; case oForceDefaultResponder: opt.force_default_responder = 1; break; - default : pargs.err = 2; break; + default : pargs.err = ARGPARSE_PRINT_ERROR; break; } } + gnupg_argparse (NULL, &pargs, NULL); /* Release internal state. */ + if (log_get_errorcount (0)) exit (2); |