From ce4ddd144ccdf6d0beb45cdaf707b2dc0983ccdb Mon Sep 17 00:00:00 2001 From: David Shaw Date: Mon, 25 Nov 2002 03:18:48 +0000 Subject: [PATCH] * g10.c (main), keydb.c (keydb_add_resource, keydb_locate_writable): Rename --default-keyring as --primary-keyring. Stefan wins the naming contest. --- g10/ChangeLog | 6 ++++++ g10/g10.c | 6 +++--- g10/keydb.c | 14 +++++++------- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/g10/ChangeLog b/g10/ChangeLog index 04d1aa494..4956c70aa 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,9 @@ +2002-11-24 David Shaw + + * g10.c (main), keydb.c (keydb_add_resource, + keydb_locate_writable): Rename --default-keyring as + --primary-keyring. Stefan wins the naming contest. + 2002-11-23 David Shaw * g10.c (add_notation_data): Disallow notation names that do not diff --git a/g10/g10.c b/g10/g10.c index 3fa6547bf..2795cc9b7 100644 --- a/g10/g10.c +++ b/g10/g10.c @@ -141,7 +141,7 @@ enum cmd_and_opt_values { aNull = 0, oAnswerNo, oDefCertCheckLevel, oKeyring, - oDefaultKeyring, + oPrimaryKeyring, oSecretKeyring, oShowKeyring, oDefaultKey, @@ -421,7 +421,7 @@ static ARGPARSE_OPTS opts[] = { { oAnswerYes, "yes", 0, N_("assume yes on most questions")}, { oAnswerNo, "no", 0, N_("assume no on most questions")}, { oKeyring, "keyring" ,2, N_("add this keyring to the list of keyrings")}, - { oDefaultKeyring, "default-keyring",2, "@" }, + { oPrimaryKeyring, "primary-keyring",2, "@" }, { oSecretKeyring, "secret-keyring" ,2, N_("add this secret keyring to the list")}, { oShowKeyring, "show-keyring", 0, N_("show which keyring a listed key is on")}, { oDefaultKey, "default-key" ,2, N_("|NAME|use NAME as default secret key")}, @@ -1371,7 +1371,7 @@ main( int argc, char **argv ) case oAnswerYes: opt.answer_yes = 1; break; case oAnswerNo: opt.answer_no = 1; break; case oKeyring: append_to_strlist( &nrings, pargs.r.ret_str); break; - case oDefaultKeyring: + case oPrimaryKeyring: sl=append_to_strlist( &nrings, pargs.r.ret_str); sl->flags=2; break; diff --git a/g10/keydb.c b/g10/keydb.c index 7b31e2dd0..3162a1696 100644 --- a/g10/keydb.c +++ b/g10/keydb.c @@ -55,7 +55,7 @@ struct resource_item { static struct resource_item all_resources[MAX_KEYDB_RESOURCES]; static int used_resources; -static void *default_keyring=NULL; +static void *primary_keyring=NULL; struct keydb_handle { int locked; @@ -200,7 +200,7 @@ keydb_add_resource (const char *url, int flags, int secret) else { if(flags&2) - default_keyring=token; + primary_keyring=token; all_resources[used_resources].type = rt; all_resources[used_resources].u.kr = NULL; /* Not used here */ all_resources[used_resources].token = token; @@ -211,10 +211,10 @@ keydb_add_resource (const char *url, int flags, int secret) else { /* This keyring was already registered, so ignore it. - However, we can still mark it as default even if it was + However, we can still mark it as primary even if it was already registered. */ if(flags&2) - default_keyring=token; + primary_keyring=token; } break; @@ -550,12 +550,12 @@ keydb_locate_writable (KEYDB_HANDLE hd, const char *reserved) if (rc) return rc; - /* If we have a default set, try that one first */ - if(default_keyring) + /* If we have a primary set, try that one first */ + if(primary_keyring) { for ( ; hd->current >= 0 && hd->current < hd->used; hd->current++) { - if(hd->active[hd->current].token==default_keyring) + if(hd->active[hd->current].token==primary_keyring) { if(keyring_is_writable (hd->active[hd->current].token)) return 0;