aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpg-check-pattern.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gpg-check-pattern.c')
-rw-r--r--tools/gpg-check-pattern.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/gpg-check-pattern.c b/tools/gpg-check-pattern.c
index 46b9e589d..69248a3a3 100644
--- a/tools/gpg-check-pattern.c
+++ b/tools/gpg-check-pattern.c
@@ -15,6 +15,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>
@@ -133,9 +134,11 @@ my_strusage (int level)
const char *p;
switch (level)
{
+ case 9: p = "GPL-3.0-or-later"; break;
case 11: p = "gpg-check-pattern (@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;
@@ -176,8 +179,8 @@ main (int argc, char **argv )
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)
{
@@ -189,6 +192,8 @@ main (int argc, char **argv )
default : pargs.err = 2; break;
}
}
+ gnupg_argparse (NULL, &pargs, NULL); /* Release internal state. */
+
if (log_get_errorcount(0))
exit (2);
@@ -489,4 +494,3 @@ process (FILE *fp, pattern_t *patarray)
if (opt.verbose)
log_info ("no input line matches the pattern - accepted\n");
}
-