struct PgpEntry
{
size_t num;
- pgp_uid_t *uid;
+ struct PgpUid *uid;
};
static const char *pgp_entry_fmt(char *dest, size_t destlen, size_t col, int cols,
{
char fmt[16];
struct PgpEntry *entry = NULL;
- pgp_uid_t *uid = NULL;
+ struct PgpUid *uid = NULL;
struct PgpKeyInfo *key = NULL, *pkey = NULL;
int kflags = 0;
int optional = (flags & MUTT_FORMAT_OPTIONAL);
static void pgp_entry(char *s, size_t l, struct Menu *menu, int num)
{
- pgp_uid_t **KeyTable = (pgp_uid_t **) menu->data;
+ struct PgpUid **KeyTable = (struct PgpUid **) menu->data;
struct PgpEntry entry;
entry.uid = KeyTable[num];
{
int r;
- pgp_uid_t **s = (pgp_uid_t **) a;
- pgp_uid_t **t = (pgp_uid_t **) b;
+ struct PgpUid **s = (struct PgpUid **) a;
+ struct PgpUid **t = (struct PgpUid **) b;
if ((r = mutt_strcasecmp((*s)->addr, (*t)->addr)))
return r > 0;
{
int r;
- pgp_uid_t **s = (pgp_uid_t **) a;
- pgp_uid_t **t = (pgp_uid_t **) b;
+ struct PgpUid **s = (struct PgpUid **) a;
+ struct PgpUid **t = (struct PgpUid **) b;
if ((r = mutt_strcasecmp(pgp_fpr_or_lkeyid((*s)->parent), pgp_fpr_or_lkeyid((*t)->parent))))
return r > 0;
static int _pgp_compare_date(const void *a, const void *b)
{
int r;
- pgp_uid_t **s = (pgp_uid_t **) a;
- pgp_uid_t **t = (pgp_uid_t **) b;
+ struct PgpUid **s = (struct PgpUid **) a;
+ struct PgpUid **t = (struct PgpUid **) b;
if ((r = ((*s)->parent->gen_time - (*t)->parent->gen_time)))
return r > 0;
{
int r;
- pgp_uid_t **s = (pgp_uid_t **) a;
- pgp_uid_t **t = (pgp_uid_t **) b;
+ struct PgpUid **s = (struct PgpUid **) a;
+ struct PgpUid **t = (struct PgpUid **) b;
if ((r = (((*s)->parent->flags & (KEYFLAG_RESTRICTIONS)) -
((*t)->parent->flags & (KEYFLAG_RESTRICTIONS)))))
return true;
}
-static bool pgp_id_is_strong(pgp_uid_t *uid)
+static bool pgp_id_is_strong(struct PgpUid *uid)
{
if ((uid->trust & 3) < 3)
return false;
return true;
}
-static bool pgp_id_is_valid(pgp_uid_t *uid)
+static bool pgp_id_is_valid(struct PgpUid *uid)
{
if (!pgp_key_is_valid(uid->parent))
return false;
#define PGP_KV_MATCH (PGP_KV_ADDR | PGP_KV_STRING)
-static int pgp_id_matches_addr(struct Address *addr, struct Address *u_addr, pgp_uid_t *uid)
+static int pgp_id_matches_addr(struct Address *addr, struct Address *u_addr, struct PgpUid *uid)
{
int rv = 0;
static struct PgpKeyInfo *pgp_select_key(struct PgpKeyInfo *keys, struct Address *p, const char *s)
{
int keymax;
- pgp_uid_t **KeyTable;
+ struct PgpUid **KeyTable;
struct Menu *menu = NULL;
int i, done = 0;
char helpstr[LONG_STRING], buf[LONG_STRING], tmpbuf[STRING];
FILE *fp = NULL, *devnull = NULL;
pid_t thepid;
struct PgpKeyInfo *kp = NULL;
- pgp_uid_t *a = NULL;
+ struct PgpUid *a = NULL;
int (*f)(const void *, const void *);
int unusable = 0;
if (i == keymax)
{
keymax += 5;
- safe_realloc(&KeyTable, sizeof(pgp_uid_t *) * keymax);
+ safe_realloc(&KeyTable, sizeof(struct PgpUid *) * keymax);
}
KeyTable[i++] = a;
f = pgp_compare_trust;
break;
}
- qsort(KeyTable, i, sizeof(pgp_uid_t *), f);
+ qsort(KeyTable, i, sizeof(struct PgpUid *), f);
helpstr[0] = 0;
mutt_make_help(buf, sizeof(buf), _("Exit "), MENU_PGP, OP_EXIT);
struct PgpKeyInfo *a_valid_addrmatch_key = NULL;
struct PgpKeyInfo *matches = NULL;
struct PgpKeyInfo **last = &matches;
- pgp_uid_t *q = NULL;
+ struct PgpUid *q = NULL;
if (a && a->mailbox)
hints = pgp_add_string_to_hints(hints, a->mailbox);
struct PgpKeyInfo *matches = NULL;
struct PgpKeyInfo **last = &matches;
struct PgpKeyInfo *k = NULL, *kn = NULL;
- pgp_uid_t *a = NULL;
+ struct PgpUid *a = NULL;
short match;
size_t l;
const char *ps = NULL, *pl = NULL, *pfcopy = NULL, *phint = NULL;
*sigp = NULL;
}
-static void pgp_free_uid(pgp_uid_t **upp)
+static void pgp_free_uid(struct PgpUid **upp)
{
- pgp_uid_t *up = NULL, *q = NULL;
+ struct PgpUid *up = NULL, *q = NULL;
if (!upp || !*upp)
return;
*upp = NULL;
}
-pgp_uid_t *pgp_copy_uids(pgp_uid_t *up, struct PgpKeyInfo *parent)
+struct PgpUid *pgp_copy_uids(struct PgpUid *up, struct PgpKeyInfo *parent)
{
- pgp_uid_t *l = NULL;
- pgp_uid_t **lp = &l;
+ struct PgpUid *l = NULL;
+ struct PgpUid **lp = &l;
for (; up; up = up->next)
{
- *lp = safe_calloc(1, sizeof(pgp_uid_t));
+ *lp = safe_calloc(1, sizeof(struct PgpUid));
(*lp)->trust = up->trust;
(*lp)->flags = up->flags;
(*lp)->addr = safe_strdup(up->addr);