mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
2004-02-23 Marcus Brinkmann <marcus@g10code.de>
* gpgconf.h (struct): Add member runtime. * gpgconf.c: Add new option oRuntime. (main): Same here.
This commit is contained in:
parent
c38f609206
commit
5620ac56bf
@ -1,5 +1,9 @@
|
|||||||
2004-02-23 Marcus Brinkmann <marcus@g10code.de>
|
2004-02-23 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
|
* gpgconf.h (struct): Add member runtime.
|
||||||
|
* gpgconf.c: Add new option oRuntime.
|
||||||
|
(main): Same here.
|
||||||
|
|
||||||
* gpgconf-comp.c (hextobyte): New function.
|
* gpgconf-comp.c (hextobyte): New function.
|
||||||
(percent_deescape): New function.
|
(percent_deescape): New function.
|
||||||
(get_config_pathname): Percent deescape pathname if taken from
|
(get_config_pathname): Percent deescape pathname if taken from
|
||||||
|
@ -35,6 +35,7 @@ enum cmd_and_opt_values
|
|||||||
oOutput = 'o',
|
oOutput = 'o',
|
||||||
oQuiet = 'q',
|
oQuiet = 'q',
|
||||||
oVerbose = 'v',
|
oVerbose = 'v',
|
||||||
|
oRuntime = 'r',
|
||||||
oComponent = 'c',
|
oComponent = 'c',
|
||||||
oNoVerbose = 500,
|
oNoVerbose = 500,
|
||||||
oHomedir,
|
oHomedir,
|
||||||
@ -61,6 +62,7 @@ static ARGPARSE_OPTS opts[] =
|
|||||||
{ oVerbose, "verbose", 0, N_("verbose") },
|
{ oVerbose, "verbose", 0, N_("verbose") },
|
||||||
{ oQuiet, "quiet", 0, N_("quiet") },
|
{ oQuiet, "quiet", 0, N_("quiet") },
|
||||||
{ oDryRun, "dry-run", 0, N_("do not make any changes") },
|
{ oDryRun, "dry-run", 0, N_("do not make any changes") },
|
||||||
|
{ oRuntime, "runtime", 0, N_("activate changes at runtime, if possible") },
|
||||||
|
|
||||||
/* hidden options */
|
/* hidden options */
|
||||||
{ oNoVerbose, "no-verbose", 0, "@"},
|
{ oNoVerbose, "no-verbose", 0, "@"},
|
||||||
@ -131,10 +133,10 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
i18n_init();
|
i18n_init();
|
||||||
|
|
||||||
/* Patrse the command line. */
|
/* Parse the command line. */
|
||||||
pargs.argc = &argc;
|
pargs.argc = &argc;
|
||||||
pargs.argv = &argv;
|
pargs.argv = &argv;
|
||||||
pargs.flags = 1; /* do not remove the args */
|
pargs.flags = 1; /* Do not remove the args. */
|
||||||
while (!no_more_options && optfile_parse (NULL, NULL, NULL, &pargs, opts))
|
while (!no_more_options && optfile_parse (NULL, NULL, NULL, &pargs, opts))
|
||||||
{
|
{
|
||||||
switch (pargs.r_opt)
|
switch (pargs.r_opt)
|
||||||
@ -142,6 +144,11 @@ main (int argc, char **argv)
|
|||||||
case oOutput: opt.outfile = pargs.r.ret_str; break;
|
case oOutput: opt.outfile = pargs.r.ret_str; break;
|
||||||
case oQuiet: opt.quiet = 1; break;
|
case oQuiet: opt.quiet = 1; break;
|
||||||
case oDryRun: opt.dry_run = 1; break;
|
case oDryRun: opt.dry_run = 1; break;
|
||||||
|
case oRuntime:
|
||||||
|
opt.runtime = 1;
|
||||||
|
/* FIXME */
|
||||||
|
fputs ("gpgconf: warning: option --runtime not supported yet\n", stderr);
|
||||||
|
break;
|
||||||
case oVerbose: opt.verbose++; break;
|
case oVerbose: opt.verbose++; break;
|
||||||
case oNoVerbose: opt.verbose = 0; break;
|
case oNoVerbose: opt.verbose = 0; break;
|
||||||
|
|
||||||
@ -154,7 +161,7 @@ main (int argc, char **argv)
|
|||||||
default: pargs.err = 2; break;
|
default: pargs.err = 2; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (log_get_errorcount (0))
|
if (log_get_errorcount (0))
|
||||||
exit (2);
|
exit (2);
|
||||||
|
|
||||||
|
@ -23,12 +23,14 @@
|
|||||||
|
|
||||||
#include "../common/util.h"
|
#include "../common/util.h"
|
||||||
|
|
||||||
/* We keep all global options in the structure OPT. */
|
/* We keep all global options in the structure OPT. */
|
||||||
struct {
|
struct
|
||||||
int verbose; /* Verbosity level. */
|
{
|
||||||
int quiet; /* Be extra quiet. */
|
int verbose; /* Verbosity level. */
|
||||||
int dry_run; /* Don't change any persistent data. */
|
int quiet; /* Be extra quiet. */
|
||||||
char *outfile; /* Name of output file. */
|
int dry_run; /* Don't change any persistent data. */
|
||||||
|
int runtime; /* Make changes active at runtime. */
|
||||||
|
char *outfile; /* Name of output file. */
|
||||||
|
|
||||||
int component; /* The active component. */
|
int component; /* The active component. */
|
||||||
} opt;
|
} opt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user