mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-22 19:58:29 +01:00
* g10.c (list_config): Add "version" tag for --list-config.
This commit is contained in:
parent
9e6119f07b
commit
335d393062
@ -1,3 +1,7 @@
|
|||||||
|
2004-01-20 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* g10.c (list_config): Add "version" tag for --list-config.
|
||||||
|
|
||||||
2004-01-15 David Shaw <dshaw@jabberwocky.com>
|
2004-01-15 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* g10.c (collapse_args): New function to turn argc/argv into a
|
* g10.c (collapse_args): New function to turn argc/argv into a
|
||||||
|
55
g10/g10.c
55
g10/g10.c
@ -1091,13 +1091,43 @@ static void
|
|||||||
list_config(char *items)
|
list_config(char *items)
|
||||||
{
|
{
|
||||||
int show_all=(items==NULL);
|
int show_all=(items==NULL);
|
||||||
char *name;
|
char *name=NULL;
|
||||||
|
|
||||||
if(!opt.with_colons)
|
if(!opt.with_colons)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
while(show_all || (name=strsep(&items," ")))
|
while(show_all || (name=strsep(&items," ")))
|
||||||
{
|
{
|
||||||
|
if(show_all || ascii_strcasecmp(name,"group")==0)
|
||||||
|
{
|
||||||
|
struct groupitem *iter;
|
||||||
|
|
||||||
|
for(iter=opt.grouplist;iter;iter=iter->next)
|
||||||
|
{
|
||||||
|
STRLIST sl;
|
||||||
|
|
||||||
|
printf("cfg:group:");
|
||||||
|
print_string(stdout,iter->name,strlen(iter->name),':');
|
||||||
|
printf(":");
|
||||||
|
|
||||||
|
for(sl=iter->values;sl;sl=sl->next)
|
||||||
|
{
|
||||||
|
print_string2(stdout,sl->d,strlen(sl->d),':',';');
|
||||||
|
if(sl->next)
|
||||||
|
printf(";");
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(show_all || ascii_strcasecmp(name,"version")==0)
|
||||||
|
{
|
||||||
|
printf("cfg:version:");
|
||||||
|
print_string(stdout,VERSION,strlen(VERSION),':');
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
|
||||||
if(show_all || ascii_strcasecmp(name,"pubkey")==0)
|
if(show_all || ascii_strcasecmp(name,"pubkey")==0)
|
||||||
{
|
{
|
||||||
printf("cfg:pubkey:");
|
printf("cfg:pubkey:");
|
||||||
@ -1128,29 +1158,6 @@ list_config(char *items)
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(show_all || ascii_strcasecmp(name,"group")==0)
|
|
||||||
{
|
|
||||||
struct groupitem *iter;
|
|
||||||
|
|
||||||
for(iter=opt.grouplist;iter;iter=iter->next)
|
|
||||||
{
|
|
||||||
STRLIST sl;
|
|
||||||
|
|
||||||
printf("cfg:group:");
|
|
||||||
print_string(stdout,iter->name,strlen(iter->name),':');
|
|
||||||
printf(":");
|
|
||||||
|
|
||||||
for(sl=iter->values;sl;sl=sl->next)
|
|
||||||
{
|
|
||||||
print_string2(stdout,sl->d,strlen(sl->d),':',';');
|
|
||||||
if(sl->next)
|
|
||||||
printf(";");
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(show_all)
|
if(show_all)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user