aboutsummaryrefslogtreecommitdiffstats
path: root/common/argparse.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-07-18common: Allow abbreviations of standard options.Marcus Brinkmann1-1/+13
* argparse.h (ARGPARSE_SHORTOPT_HELP, ARGPARSE_SHORTOPT_VERSION, ARGPARSE_SHORTOPT_WARRANTY, ARGPARSE_SHORTOPT_DUMP_OPTIONS): New macros. (ARGPARSE_end): Add some placeholders for standard options. * argparse.c (arg_parse): Fill in missing standard options so default machinery works. Check for standard options in new way. Do not write out standard options for --dump-options. Signed-off-by: Marcus Brinkmann <[email protected]> GnuPG-bug-id: 1747
2017-02-24Clarify text of LGPLv2+/GPLv2+ licensed files.Werner Koch1-2/+2
--
2016-11-05Change all http://www.gnu.org in license notices to https://Werner Koch1-1/+1
--
2015-04-24common: Remove JNLIB from boiler plate (jnlib merge).Werner Koch1-6/+6
* common/README.jnlib: Remove. -- This is the final part of merging jnlib into gnupg/common.
2015-03-17common: Allow standalone build of argparse.cWerner Koch1-6/+5
* common/argparse.h: Remove types.h - not required. * common/argparse.c: Change to allow standalone use. Signed-off-by: Werner Koch <[email protected]>
2014-10-29common: Check option arguments for a valid range.Werner Koch1-0/+1
* common/argparse.h (ARGPARSE_INVALID_ARG): New. * common/argparse.c: Include limits h and errno.h. (initialize): Add error strings for new error constant. (set_opt_arg): Add range checking. Signed-off-by: Werner Koch <[email protected]>
2014-03-07Allow marking options as ignored.Werner Koch1-1/+6
* 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 41d56433) 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 <[email protected]> (cherry picked from commit 54c54e2824aab5716a187bbbf6dff8860d6a6056) Resolved conflicts: common/argparse.c: Fixed.
2012-12-18common: Add meta option ignore-invalid-option.Werner Koch1-0/+1
* common/argparse.c (iio_item_def_s, IIO_ITEM_DEF): New. (initialize): Init field IIO_LIST. (ignore_invalid_option_p): New. (ignore_invalid_option_add): New. (ignore_invalid_option_clear): New. (optfile_parse): Implement meta option. -- This option is currently of no use. However, as soon as it has been deployed in all stable versions of GnuPG, it will allow the use of the same configuration file with an old and a new version of GnuPG. For example: If a new version implements the option "foobar", and a user uses it in gpg.conf, an old version of gpg would bail out with the error "invalid option". To avoid that the following line can be put above that option in gpg.conf ignore-invalid-option foobar This meta option may be given several times or several option names may be given as arguments (space delimited). Note that this option is not available on the command line.
2012-03-27Print warning for arguments not considered an option.Werner Koch1-0/+2
GnuPG requires that options are given before other arguments. This can sometimes be confusing. We now print a warning if we found an argument looking alike a long option without being preceded by the stop option. This is bug#1343. * common/argparse.h (ARGPARSE_FLAG_STOP_SEEN): New. * common/argparse.c (arg_parse): Set new flag. * g10/gpg.c (main): Print the warning. * agent/gpg-agent.c (main): Ditto. * dirmngr/dirmngr.c (main): Ditto. * g13/g13.c (main): Ditto. * scd/scdaemon.c (main): Ditto. * sm/gpgsm.c (main): Ditto. * tools/gpg-connect-agent.c (main): Ditto. * tools/gpgconf.c (main): Ditto.
2011-09-30Change JNLIB license to LGPLv3+ or GPLv2+.Werner Koch1-7/+18
This is to allow the use of this code with code under GPLv2(only).
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-4/+4
We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
2010-05-30Print --version etc via estreamWerner Koch1-0/+1
2010-03-10Merged jnlib into common.Werner Koch1-0/+0
2008-11-12Made arg_parse more readable.Werner Koch1-29/+133
2008-09-29Remove hacks which are not anymore needed since we now require Libgcrypt 1.4Werner Koch1-0/+13
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2006-10-02Fix for bug 537Werner Koch1-14/+14
2006-06-20Updated FSF's address.Werner Koch1-1/+2
2003-01-09Updated from NewPGWerner Koch1-0/+67
2002-06-29Removed files for CVS reorganizationDavid Shaw1-64/+0
2000-01-24Add files to new directory.Werner Koch1-0/+64
This is mainly stuff moved from ../util to here.