Home GnuPG
Diffusion GnuPG 54c54e2824aa

Allow marking options as ignored.
54c54e2824aaUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Allow marking options as ignored.

* jnlib/argparse.h (ARGPARSE_OPT_IGNORE): New.
(ARGPARSE_TYPE_MASK): New, for internal use.
(ARGPARSE_ignore): New.
* jnlib/argparse.c (optfile_parse, arg_parse): Replace remaining
constants by macros.
(optfile_parse): Implement ARGPARSE_OPT_IGNORE.
(arg_parse): Exclide ignore options from --dump-options.

In addition to the ignore-invalid-option (commit 8ea49cf5) it is often
useful to mark options in a configuration which as NOP. For example
options which have no more function at all but can be expected to be
found in existing conf files. Such an option (or command) may now be
given as

ARGPARSE_ignore (300, "obsolete-option")

The 300 is merely used as a non-valid single option name much like
group names or the 500+n values used for long options.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Apr 18 2013, 2:40 PM
Parents
rGda0925973ef3: Do not mix test result with progress lines.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rG54c54e2824aa: Allow marking options as ignored. (authored by Werner Koch <wk@gnupg.org>).Apr 22 2013, 3:03 PM