diff options
author | David Shaw <[email protected]> | 2004-11-24 05:25:03 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2004-11-24 05:25:03 +0000 |
commit | 04b715e4dad23f85a38cf72950fbc96e3b33b646 (patch) | |
tree | 7cefccf89f270fe8afa106116c2f93fad5186129 /g10/keylist.c | |
parent | (S_IRGRP) [HAVE_DOSISH_SYSTEM]: Define to 0. (diff) | |
download | gnupg-04b715e4dad23f85a38cf72950fbc96e3b33b646.tar.gz gnupg-04b715e4dad23f85a38cf72950fbc96e3b33b646.zip |
* trustdb.h, trustdb.c (uid_trust_string_fixed): New. Return a fixed-size
translatable string similar to trust_value_to_string. This allows for
easier lining up of displays.
* keyedit.c (show_key_with_all_names), keylist.c (list_keyblock_print):
Use it here to print validity strings.
* gpgv.c: Stub.
Diffstat (limited to 'g10/keylist.c')
-rw-r--r-- | g10/keylist.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/g10/keylist.c b/g10/keylist.c index f874b2d64..e4c9e6e84 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -778,19 +778,13 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque ) const char *validity; int indent; - if(uid->is_revoked) - validity=_("revoked"); - else if(uid->is_expired) - validity=_("expired"); - else - validity=trust_value_to_string(get_validity(pk,uid)); - - indent=(keystrlen()+7)-strlen(validity); + validity=uid_trust_string_fixed(pk,uid); + indent=(keystrlen()+9)-atoi(uid_trust_string_fixed(NULL,NULL)); - if(indent<0) + if(indent<0 || indent>40) indent=0; - printf("uid%*s[%s] ",indent,"",validity); + printf("uid%*s%s ",indent,"",validity); } else printf("uid%*s",keystrlen()+10,""); |