Print warning for arguments not considered an option.
authorWerner Koch <wk@gnupg.org>
Tue, 27 Mar 2012 10:35:13 +0000 (12:35 +0200)
committerWerner Koch <wk@gnupg.org>
Tue, 27 Mar 2012 10:38:49 +0000 (12:38 +0200)
commitde01c51ecb3918f427aa76281351749c8ad07ed6
tree944740e90c45a6bea9a0c539b5dab77d0142ec03
parent26ec6c79020c8b3dfd6f517c292bb973209b0d31
Print warning for arguments not considered an option.

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.
agent/gpg-agent.c
common/argparse.c
common/argparse.h
dirmngr/dirmngr.c
g10/gpg.c
g13/g13.c
scd/scdaemon.c
sm/gpgsm.c
tools/gpg-connect-agent.c
tools/gpgconf.c
tools/gpgtar.c