aboutsummaryrefslogtreecommitdiffstats
path: root/g10/misc.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2003-12-28 03:46:43 +0000
committerDavid Shaw <[email protected]>2003-12-28 03:46:43 +0000
commit392e6da660d4deb1da06bfdeb569071e432eec33 (patch)
tree4318d912de49365612d60122a2b99535cb3d3cdc /g10/misc.c
parent* build-packet.c (write_fake_data, do_secret_key), seckey-cert.c (diff)
downloadgnupg-392e6da660d4deb1da06bfdeb569071e432eec33.tar.gz
gnupg-392e6da660d4deb1da06bfdeb569071e432eec33.zip
* 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.
Diffstat (limited to 'g10/misc.c')
-rw-r--r--g10/misc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/g10/misc.c b/g10/misc.c
index 7ee6d2d67..229436cf5 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -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;
}
}