From 4afa18bcaacb2d75dd1eb97830b9e8fb709d2104 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Wed, 14 Sep 2005 22:31:21 +0000 Subject: * main.h, misc.c (parse_options): Add the ability to have help strings in xxx-options commands. * keyserver.c (keyserver_opts), import.c (parse_import_options), export.c (parse_export_options), g10.c (parse_list_options, main): Add help strings to xxx-options. --- g10/misc.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'g10/misc.c') diff --git a/g10/misc.c b/g10/misc.c index 8d7b6804a..a50ab884e 100644 --- a/g10/misc.c +++ b/g10/misc.c @@ -968,11 +968,20 @@ parse_options(char *str,unsigned int *options, if (str && !strcmp (str, "help")) { - int i; + int i,maxlen=0; + + /* Figure out the longest option name so we can line these up + neatly. */ + for(i=0;opts[i].name;i++) + if(opts[i].help && maxlen