dbp = dbc->dbp;
__bam_c_iclose(dbp, dbc)	DB *dbp;	DBC *dbc;{	CURSOR *cp;	int ret;	/*	 * All cursors are queued from the master DB structure.  For	 * now, discard the DB handle which triggered this call, and	 * replace it with the cursor's reference.	 */	dbp = dbc->dbp;	/* If a cursor key was deleted, perform the actual deletion.  */	cp = dbc->internal;	ret = F_ISSET(cp, C_DELETED) ? __bam_c_physdel(dbp, cp, NULL) : 0;	/* Discard any lock if we're not inside a transaction. */	if (cp->lock != LOCK_INVALID)		(void)__BT_TLPUT(dbp, cp->lock);	/* Remove the cursor from the queue. */	DB_THREAD_LOCK(dbp);	TAILQ_REMOVE(&dbp->curs_queue, dbc, links);	DB_THREAD_UNLOCK(dbp);	/* Discard the structures. */	FREE(dbc->internal, sizeof(CURSOR));	FREE(dbc, sizeof(DBC));	return (ret);}