2003-05-27 Marcus Brinkmann <marcus@g10code.de>
+ * t-data.c: Remove TEST_OUT_CB.
+ (main): Likewise.
+ * gpg/t-trustlist.c (main): Access ITEM directly.
+
* (t-decrypt-verify.c, t-decrypt.c, t-edit.c, t-encrypt-sign.c,
t-encrypt-sym.c, t-sign.c, t-signers.c): Include <unistd.h>.
(passphrase_cb): Rewritten.
while (!(err = gpgme_op_trustlist_next (ctx, &item)))
{
printf ("l=%d k=%s t=%d o=%s v=%s u=%s\n",
- gpgme_trust_item_get_int_attr (item, GPGME_ATTR_LEVEL, NULL, 0),
- gpgme_trust_item_get_string_attr (item, GPGME_ATTR_KEYID, NULL, 0),
- gpgme_trust_item_get_int_attr (item, GPGME_ATTR_TYPE, NULL, 0),
- gpgme_trust_item_get_string_attr (item, GPGME_ATTR_OTRUST, NULL, 0),
- gpgme_trust_item_get_string_attr (item, GPGME_ATTR_VALIDITY, NULL, 0),
- gpgme_trust_item_get_string_attr (item, GPGME_ATTR_USERID, NULL, 0));
- gpgme_trust_item_release (item);
+ item->level, item->keyid, item->type, item->owner_trust,
+ item->validity, item->name);
+ gpgme_trust_item_unref (item);
}
if (err != GPGME_EOF)
fail_if_err (err);
TEST_INOUT_MEM_FROM_FILE_PART_BY_NAME,
TEST_INOUT_MEM_FROM_INEXISTANT_FILE_PART,
TEST_INOUT_MEM_FROM_FILE_PART_BY_FP,
- TEST_OUT_CB,
TEST_END
} round_t;
strlen (text), strlen (text));
}
break;
- case TEST_OUT_CB:
- err = gpgme_data_new_with_read_cb (&data, read_cb, &round);
- break;
case TEST_END:
return 0;
case TEST_INITIALIZER:
fail_if_err (err);
read_test (round, data);
- if (round != TEST_OUT_CB)
- write_test (round, data);
+ write_test (round, data);
gpgme_data_release (data);
}
return 0;