FILE *fp; pid_t thepid; char buf[LONG_STRING]; KEYINFO *db = NULL, **kend, *k = NULL;  thepid = gpg_invoke_list_keys(pgp, NULL, &fp, NULL, -1, -1, -1, NULL); if( thepid == -1 ) return NULL;  kend = &db; k = NULL; while( fgets( buf, sizeof(buf)-1, fp ) ) { if( k ) kend = &k->next; *kend = k = parse_pub_line(buf); }  fclose( fp ); mutt_wait_filter( thepid );  return db;
return read_ring( pgp, 0 );
KEYINFO *gpg_read_pubring(struct pgp_vinfo *pgp){    FILE *fp;    pid_t thepid;    char buf[LONG_STRING];    KEYINFO *db = NULL, **kend, *k = NULL;    thepid = gpg_invoke_list_keys(pgp, NULL, &fp, NULL, -1, -1, -1, NULL);    if( thepid == -1 )	return NULL;    kend = &db;    k = NULL;    while( fgets( buf, sizeof(buf)-1, fp ) ) {	if( k )	    kend = &k->next;	*kend = k = parse_pub_line(buf);    }    fclose( fp );    mutt_wait_filter( thepid );    return db;}