1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* 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.
This commit is contained in:
David Shaw 2004-11-24 05:25:03 +00:00
parent 44289a4e68
commit 04b715e4da
6 changed files with 58 additions and 29 deletions

View file

@ -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));
validity=uid_trust_string_fixed(pk,uid);
indent=(keystrlen()+9)-atoi(uid_trust_string_fixed(NULL,NULL));
indent=(keystrlen()+7)-strlen(validity);
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,"");