aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2004-02-25 19:35:36 +0000
committerMarcus Brinkmann <[email protected]>2004-02-25 19:35:36 +0000
commit8f8c5c47dd9495d1d4236ee632cd4e8193cb8607 (patch)
tree33a04c2e76b3b7468c5c3a1c08df4ce5b1b85ae4
parentNew option --disable-threads to inhibit (diff)
downloadgnupg-8f8c5c47dd9495d1d4236ee632cd4e8193cb8607.tar.gz
gnupg-8f8c5c47dd9495d1d4236ee632cd4e8193cb8607.zip
2004-02-25 Marcus Brinkmann <[email protected]>
* gpgconf-comp.c (gc_component_list_options): Correct output for lists of arg type none.
-rw-r--r--tools/ChangeLog5
-rw-r--r--tools/gpgconf-comp.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/tools/ChangeLog b/tools/ChangeLog
index efb3794b9..b98e4c559 100644
--- a/tools/ChangeLog
+++ b/tools/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-25 Marcus Brinkmann <[email protected]>
+
+ * gpgconf-comp.c (gc_component_list_options): Correct output for
+ lists of arg type none.
+
2004-02-24 Marcus Brinkmann <[email protected]>
* README.gpgconf: Revert last change. Add new flags "default",
diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c
index 4dc2fbbe8..8e143010f 100644
--- a/tools/gpgconf-comp.c
+++ b/tools/gpgconf-comp.c
@@ -837,7 +837,14 @@ gc_component_list_options (int component, FILE *out)
fprintf (out, ":%s", option->default_arg ? option->default_arg : "");
/* The value field. */
- fprintf (out, ":%s", option->value ? option->value : "");
+ if (gc_arg_type[option->arg_type].fallback == GC_ARG_TYPE_NONE
+ && (option->flags & GC_OPT_FLAG_LIST)
+ && option->value)
+ /* The special format "1,1,1,1,...,1" is converted to a number
+ here. */
+ fprintf (out, ":%u", (strlen (option->value) + 1) / 2);
+ else
+ fprintf (out, ":%s", option->value ? option->value : "");
/* ADD NEW FIELDS HERE. */