1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* main.h, misc.c (parse_options): Add a "noisy" flag to enable and disable

the messages about which option didn't match or matched ambiguously.
Change all callers (g10.c, keyserver.c).

* main.h, import.c (import_options), export.c (export_options): Pass the
noisy flag through.
This commit is contained in:
David Shaw 2003-12-28 03:46:43 +00:00
parent 7847eae02c
commit 392e6da660
7 changed files with 35 additions and 20 deletions

View file

@ -689,7 +689,8 @@ compliance_failure(void)
}
int
parse_options(char *str,unsigned int *options,struct parse_options *opts)
parse_options(char *str,unsigned int *options,
struct parse_options *opts,int noisy)
{
char *tok;
@ -722,7 +723,8 @@ parse_options(char *str,unsigned int *options,struct parse_options *opts)
{
if(ascii_strncasecmp(opts[j].name,tok,toklen)==0)
{
log_info(_("ambiguous option `%s'\n"),otok);
if(noisy)
log_info(_("ambiguous option `%s'\n"),otok);
return 0;
}
}
@ -738,7 +740,8 @@ parse_options(char *str,unsigned int *options,struct parse_options *opts)
if(!opts[i].name)
{
log_info(_("unknown option `%s'\n"),otok);
if(noisy)
log_info(_("unknown option `%s'\n"),otok);
return 0;
}
}